[GUIDE]Ultimate Guide[Decompiling][9 pngs][Theming] - Android Software Development

The Ultimate Guide​
Preliminary Requirements:-
PC with Windows(Please avoid Windows Vista)
Java JRE or JDK
APK Multitool
framework-res.apk, SystemUI.apk, twframework-res.apk, com.htc.resources for installing
7-zip
Notepad++
Android Device for testing
Photoshop or equivalent image editing software
android-sdk(for 9 png editing)
Lots and lots of patience and mind
What this guide includes:-
Main Part:
1. Easiest Decompiling and Recompiling Guide *Must Read before continuing*
Theming Part:
2. APK png resources(General Location of General pngs)
3. Explanation of 9 pngs and how to edit or make them
4. How to Batch edit pngs (Not 9 pngs) (Changing color, etc)
All of us like if all things are present in one guide
This guide covers topics like decompiling, 9 png editing, theming in a very newbie friendly manner.
I have worked upon this guide to make it so that no problem arises during performing certain tasks which I faced.
I have covered workarounds such that they ensure LEAST no. of errors while performing these tasks.
However, if even then any problem arises, I am always there to help you out :laugh:
Main Part:
Decompiling: [MUST READ]
We are assuming that you have installed JAVA, Android SDK and apk-multitool without any problems
1. Copy your mobile's framework-res.apk, SystemUI.apk and twframework-res.apk in others folder in directory where you have extracted apk-multiool
2. Open Setup.bat. Choose 2 :- Installing Framework-res
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Setup.bat​
Choose 1 (framework-res.apk)
Choose 2 (twframework-res.apk) [similarly install OEM specific files such as com.htc.resources , etc]
Choose 4 (SystemUI.apk)
Window will close each time you choose an option
You will have to restart Setup.bat each time
3. Now place the apk you want to edit in place-apk-here-for-modding
4. Now open script.bat. (If you see any error, either you haven't installed JAVA and SDK[adb] or they aren't implented, Please install them properly before continuing). Click any key to continue
APK-Multitool Window​
5. You will see the above window. Now, make sure you have installed all frameworks and Compression level is set to 9.
6. Now, we will choose our project. Click 24. A list of files present in place-apk-here-for-modding will be in front of you. Choose any file
7. Click on 9. Now decompiling will be in process.
8. After it is complete, go to projects folder, you will see a folder with the name of apk you decompiled
Decompiled apk example​
If it is decompiled properly, then there will be apktool.yml file in it
9. Do your modifications. Now, you can edit .9.png files (they will be discussed later) and xml files which were uneditable first
You will notice that there will be many new folders which weren't present in compiled form of apk. These all folders are generated from a file called resources.arsc present in compiled form which is absent in decompiled form
Such an example is of values folder which contains crucial xml files like styles.xml, strings.xml, ids.xml, etc
Always open xml files with Notepad++, it will mark commands and syntax making it look aligned and making it easy to understand
Example of decompiled xml file ​
Also, you can edit 9 patch files also which will be changed from now on
Example:-
We will discuss 9 png in detail later on
10. After you have done your modifications and you are ready to recompile the app, choose 11 (Compile System APK) if you are editing System App or 12(Compile Non-System App) if you are editing other than System App
11. a) If System App:-
After some time it will ask that if you want to copy additional files other than signatures to ensure less amount of errors, then choose y
After extracting some files, it will ask you to delete files from keep folder
Simply go to keep folder,
If you edited any pngs and there are many and you are lazy enough to delete one by one, then delete the whole folder in which you edited pngs
If you edited any xml file, then delete that xml file AND ALSO DELETE RESOURCES.ARSC
Why? Because we told that values and several other folders are generated from resources.arsc while decompiling
Now, if we don't delete resources.arsc, the modification we did in values folder will be reverted to original state
After doing this, go to script.bat again and press any key to continue
11. b)If its not system app:
Just recompile it and sign it man through the menu in apk multitool man.
It is easy as hell. Tutorial of non-system app has been ended here
12. Now, you will get another apk name System_ apkname.apk
Open both apks as archives by 7-zip
13. Last and most important step:-
Just drop the files you edited from new apk to old apk in correct folders. By now, you may have understood that resouces.arsc INCLUDES your edited xmls
14. Now, the final apk is not System_apkname.apk but apkname.apk (the original file you started with). Push it and enjoy
This is a work in progress.
Will add more things soon
Don't hesitate to ask any questions about anything
Credits:
@d3cka for teaching best about 9 pngs
@deathnotice01 for helping me
Miscellaneous Google and xda posts

Theming Part​
General APK png Resources
Here I will tell you where to find some pngs to theme your Phone
Note: Here I will tell location of pngs but that may differ based on modification done to your ROM by OEMs or devs. These pngs are found after decompiling or extracting the apk files. For more reference, read this.
In this part, there is only brief information, but for a very good guide, please go here. I haven't covered it all up as d3cka himself has done a marvellous job in making that guide. All the things present in that guide should solve all your queries.
General location of apks:
SystemUI.apk - /system/app/
framework-res.apk - /system/framework/
twframework-res.apk - /system/framework
framework.jar - /system/framework/
lidroid-res.apk - /system/framework/
Click to expand...
Click to collapse
Variable list:
I have referred to some locations as drawable-xdpi. X here stands for
X: m, l, h, xh
Meaning pngs can be in drawable-mdpi, drawable-hdpi, drawable-ldpi, drawable-xhdpi depending on resolution of your phone
In some places, I have just added * in order to fill spaces that are not common in each png
[?] means maybe only for GB or Samsung
Click to expand...
Click to collapse
Battery Icons -
(i)Ice Cream Sandwich/Jelly Bean: SystemUI.apk/res/drawable-xdpi/stat_sys_battery**.png
(ii)Gingerbread: framework-res.apk/res/drawable-xdpi/stat_sys_battery**.png
Status Bar icons - SystemUI.apk/res/drawable-xdpi/
Note, some, however very few status bar icons are also present in framework-res.apk
Platlogo - framework-res.apk/res/drawable-nodpi/platlogo*.jpg
(image that pops up when repeatedly clicked on Android Version)
In Gingerbrad, its a single file but in ICS and JB, they are many images.
Default Wallpaper - framework-res/res/drawable-xdpi/default_wallpaper.jpg
Default Lockscreen Wallpaper[?] - framework-res.apk/res/drawable-xdpi/zzzzzzzz_default_lockscreenw.jpg
On stock based HTC roms, the default wallpaper location is specified in the.build.prop (so the dev can either swap out the image, or change the path)
The default wallpaper path for HTC roms is /system/customize/resource/wallpapers_a_00.jpg (Thanks to CNExus)
Spinners[GB] - framework-res.apk/res/drawable-xdpi/spinner_****_**.png
(The loading circles)
Menu Icons - framework-res.apk/res/drawable-xdpi/ic_menu_**.png
These icons may also be present in twframework-res.apk for Samsung Touchwiz ROMs
Notification Toggles
(i)With lidroid 15 toggles : lidroid-res.apk/res/drawable-xdpi/
(ii)Without lidroid mod : SystemUI.apk/res/drawable-xdpi
These were some general pngs of system apps that may be used to theme the phone. You can find respective pngs to theme in their apks.
Will add more soon...
9 PNG Discussion
These are special types of pngs that can be stretched to fit the need of program or different scenarios or cases. It contains 1 pixel lines on each border of different lengths for different things
As told above, we can't edit 9 png in compiled form as it will lose these lines which define its properties. So, we first need to decompile apk in order to edit 9 pngs
So, after decompiling apk, open 9 png in Photoshop and select the part inside that 1 px border and edit anything you want (Hue, Saturation, Bevel, Emboss, ANYTHING)
Now save it (save it as a normal png and then rename it as .9.png because photoshop doesn't recognise 9 png extension and image will loose its RGB format)
Explanation of 9 png:-
You can read this for more information
If you have doubt that you have gone wrong somewhere or you have made a new png from scratch and want to test if it is correct or not:
(Check all 9 png files you edit as they can cause Force Closes or bootloops)
Go to folder where you extracted android-sdk and go to tools folder and open draw9patch.bat
A window like this will open up:-
Drop you 9 png here
A new window will open with you 9 png on it
Tick on show bad patches
If you see red rectangles, you have a bad 9 patch image. You will need to delete or add those lines in png to remove all red boxes. If you want to delete, press Shift and start moving cursor over lines you want to delete. You can choose method of hit and trial to remove all rectangles and move the lower scale to see how your image size is adjusted
Or you can do what I do:
1. Remove all lines
2. Add single dot on top centre and left centre border of image (That can be taken as stretchable area)
3. Add lines on right and bottom of image where you want to fill content. Now, click on Show Content
The purple area you see in image is the content area (Text will be filled there. Eg:- Popup Menu)
4. Now, you can adjust these lines acoording to your need that what you want for stretchable area and content area until an unless there comes an red triangle
5. When it is done. Save the file. DONE
Easy, isn't it?
That's what theming is
Batch Editing pngs in Photoshop
Well the scenario is you have 200 pngs and you want to change their color, hue, add effect to them, etc. Definitely not worth the time you will spent doing this one by one. So, here, I will cover how to batch apply same edits on to your infinite pngs. Here, I am taking example of changing color of battery png from green to purple, you can apply any attribute to your image in the same way. I repeat it is not for .9.png files. Read above guide for reference
Let's start
1. First copy all your pngs you need to edit in a separate folder. I have made a folder named Battery Base and pasted my all pngs of battery there.
Now create another folder where your edited pngs will be saved. For eg:- Battery Done. (Don't create it inside Battery Base folder)
2. Open Adobe Photoshop and Choose Window>Actions or Alt+F9
3. Click on the note like file (Create new Action)
Rename it to anything you want . I have chosen Battery_color
Then click on Record. Now, you will see that red circle is enabled and now everything you do on image will be recorded and will be applied on each image.
4. Now, do this very carefully, don't miss any step.
We will do every thing that we want Photoshop to do with each file we want to edit.
a) So, first we want Photoshop to open the image. So , click on Open and choose any png from Battery Base folder (Choose a file with more color so that you know what color exactly your file will be after editing. That is why I chose 90 percent battery here).
b) Now, after opening, we want to change Color of png from green to purple. So, choose Image>Adjustment>Hue and Saturation or Ctrl+U
A dialog box with 3 sliders will appear. Move upper slider to change color. You can move other slider to change saturation and brightness if you want. Now, if you got it right, click on OK.
Every step of yours is being recorded, so don't do unnecessary stuff you don't want to do on other images. Nonetheless, if you have done it, then Drop down the Battery Base Action in action palette and you will see your every action there, If you want to delete any action , you can delete it from there. You can also add any action before pre completed action by clicking above that action and performing it.
Now, you can do anything you want to be done on your rest of pngs.
c) Now, we want Photoshop to save this png to carry on working on others. So, Go to File>Save as... and save it as a png in Battery Done folder. Photoshop will ask you to choose, so choose smallest compression and no interlace.
d) Image is saved but we also want Photoshop to close the png so that it does not open 200 tabs for editing 200 pngs. So, click on close (Small cross on title bar of png). If, it asks that do you want to save changes to png . Say no, because if you say yes, the png in Battery Base will be changes and when batch processing is done, that png in Battery Done will be of different color that all others.And also, your all green pngs in Battery Base folder will turn purple too. But we want purple images in Battery Done and green in Battery Base.
5. Now, we hae done what we want, so, we will stop recording the Action. Click on that square in Actions Palette.
6. Fun Starts. Now we will do the batch processing.
Go to File>Automate>Batch
In the dialog box, Choose the action to be Battery_Color (or obiviously any action you created)
Source folder: Battery Base
Destination Folder: Battery Done
Tick both Override Action 'Open' commands and Override Action 'Save as' commands
Click on OK. Sit back for 3 to 5 minutes(204 pngs) and TADA
You can apply any action in same way. Such as bevel, glossy, pale, etc to innumerous amount of pngs

Why APK-Multitool?​
Yeah, why not just apktool or VTS (Virtuous Ten Studio)
But, when working with certain system apk files, there is a feature of APK Multitool that comes in very handy and that is, making a keep folder and asking you to delete stuff which you modded to then make an apk file. Certain files in apk do not need to be touched which can be easily controlled by APK Multitool.
Note: This is no way against VTS in any form
As I was making a guide which ensured least amount of errors, I chose APK Multitool, because we can easily fix those known errors od Status Bar disappearing or this and that :victory:
apktool is very minimalistic but not too user friendly for a newbie. And it may return with huge amount of errors if not used correctly.
So, APK Multitool is a perfect balance in between simplicity and work power

FAQ

Oops
Last One left

Awesome guide areeb..
Will include this guide in the index for sure
-asdf-

Will be a great guide for me
Sent from my GT-I9100 using Tapatalk 2

Great guide.

Good info. Nice work :good:

This is a good guide, very good one. But, I've found that the latest APK Multi Tool doesn't work for Android 4.2.2 apks.
Does this one work? Any solution?

krazzyvishal said:
This is a good guide, very good one. But, I've found that the latest APK Multi Tool doesn't work for Android 4.2.2 apks.
Does this one work? Any solution?
Click to expand...
Click to collapse
Thanks for notifying
You can try downloading this - http://d-h.st/cze and replacing the previous files with the new files in others folder
It's by Rizal Lovin from his guide here http://forum.xda-developers.com/showthread.php?t=2195680
Or you can notify the bug (if it's a bug ) here http://forum.xda-developers.com/showthread.php?t=1310151

Best theming guide i ever seen
i love ur ,9 pngs method and how u explained us more deeply about them
Thanks

krazzyvishal said:
This is a good guide, very good one. But, I've found that the latest APK Multi Tool doesn't work for Android 4.2.2 apks.
Does this one work? Any solution?
Click to expand...
Click to collapse
Try some of the suggestions in my guide. Link below.
From me to you.

great guide for starters
all hail to areeb

iamareebjamal said:
So, after decompiling apk, open 9 png in Photoshop and select the part inside that 1 px border and edit anything you want (Hue, Saturation, Bevel, Emboss, ANYTHING)
Click to expand...
Click to collapse
Here's what i do if i want to keep the .9.png border intact:
Open my .9.png.
Select>All.
Select>Modify>Border. Set width at 1 pixel.
Select>Inverse.
Edit>Cut.
Edit>Paste special>Paste in place.
Layer>Arrange>Send to back.
This splits the the border from the image allowing you to edit the image freely without affecting the 9patch.
I'll attach my action i created to automate the process.
Extract the action from the zip.
Window>Actions.
Select dropdown menu.
Load actions> select split.9.atn
One final thing. Photoshop has no problems with the .9.png extension. When you save your image (save for web) it will show as .png, just insert .9 into the name. I've never had a problem.:good:

Appreciate! Great guide

dully79 said:
Here's what i do if i want to keep the .9.png border intact:
Open my .9.png.
Select>All.
Select>Modify>Border. Set width at 1 pixel.
Select>Inverse.
Edit>Cut.
Edit>Paste special>Paste in place.
Layer>Arrange>Send to back.
This splits the the border from the image allowing you to edit the image freely without affecting the 9patch.
I'll attach my action i created to automate the process.
Extract the action from the zip.
Window>Actions.
Select dropdown menu.
Load actions> select split.9.atn
One final thing. Photoshop has no problems with the .9.png extension. When you save your image (save for web) it will show as .png, just insert .9 into the name. I've never had a problem.:good:
Click to expand...
Click to collapse
Thanks for suggestions
About last thing, I never said anything about Photoshop having problems with .9.png files
Maybe words appeared different from what they meant

iamareebjamal said:
Thanks for suggestions
About last thing, I never said anything about Photoshop having problems with .9.png files
Maybe words appeared different from what they meant
Click to expand...
Click to collapse
Sorry, my bad. I didn't mean it had problems. What I was trying to say is you can just add the .9 without any problems.
Normally I just copy the nines into a separate folder, work on them, then when saving double click and replace. Doesn't save much time with a handful, but when you have quite a lot it all adds up. Plus you still have the originals incase of an error.

dully79 said:
One final thing. Photoshop has no problems with the .9.png extension. When you save your image (save for web) it will show as .png, just insert .9 into the name. I've never had a problem.:good:
Click to expand...
Click to collapse
I think you're using a step or two more than you need to layer the border, and to save I just merge the layers, save and close.

XperienceD said:
I think you're using a step or two more than you need to layer the border, and to save I just merge the layers, save and close.
Click to expand...
Click to collapse
What steps are they? When it's automated using the action it takes less than a second.
Everyone has their own technique, personally I think merging layers and saving is redundant as they are merged when saved.

Related

[DEV/GUIDE]Creating APKs for use with TMobile Theme engine

First of I want to say that I am not a developer. I don't have programming experience nor do I know a whole lot about this particular subject. I hope that sharing what I have found so far will help anyone else who wants to do something similar. With the help of voodoo55 I have successfully created and compiled APKs for use with the TMobile theme engine. Although this appears to be a great idea for the experienced developer because it will make themes cross device compatible it probably isnt going to be such a big hit with the normal joe blow themer such as myself for a few main reasons.
1. You have to be running linux and tapped into the CyanogenMOD github.
2. You're probably going to need to know a bit of xml coding (which I didnt when I started).
3. You're going to have to know how to decompile and edit .9 PNGs.
4. You're going to have to know how to compile APKs un linux as well​
None of these in themselves are all that complicated or hard for that matter, just tedious and very time consuming for the average themer. I am not going to get into specifics or xml code details here. As I am not a developer and dont know much about this stuff all I am going to do is tell you how these APKs function and what files need to be changed in order to compile them. Also, you'll find out the time consuming problem with compiling these APKs and how to fix it. Im just too lazy to sit here and manually fix hundreds of images.
Please remember these instructions are not very detailed but give a general idea on the direction you will need to take to make this happen. Also, for anyone who knows more about this than I do, please, feel free to correct me.
Step 1 - You are going to need to have a working linux distro running.​Step 2 - You need to follow the instructions located here minus the last step to get the source from Cyanogen's github.​Step 3 - Once #2 is complete and you have downloaded the source to the ~/android/system directory, you will find the current uncompiled source for the TMobile themes "Androidian" and "Cyanbread" in the ~/android/system/vendor/tmobile/themes directory.​Step 4 - The experienced Dev would probably start completely from scratch here but I didn't so I'm not going to tell you how. As template, make a copy of the Cyanbread folder and renamed to your theme name.​Step 5 - Here we are going to want to edit some files to make the compile possible with. In "your theme" directory there is a filed named Android.mk. In a txt editor you will need to change the following line:
Code:
LOCAL_PACKAGE_NAME := Cyanbread
to
Code:
LOCAL_PACKAGE_NAME := yourthemename
Step 6 - Edit the following lines in AndroidManifest.xml by replacing Cyanbread with your theme name.
Code:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:pluto="http://www.w3.org/2001/pluto.html"
package="com.tmobile.theme.Cyanbread"
android:hasCode="false">
<uses-feature android:name="com.tmobile.software.themes" />
<theme
pluto:themeId="Cyanbread"
pluto:styleId="@style/Cyanbread"
pluto:name="@string/theme_name"
pluto:preview="@drawable/preview"
pluto:author="@string/author"
pluto:copyright="@string/copyright"
pluto:wallpaperImage="@drawable/wallpaper"
pluto:styleName="@string/style_appearance_name"
pluto:ringtoneName="Shocking"
pluto:ringtoneFileName="media/audio/ringtones/Shocking.mp3"
pluto:notificationRingtoneName="Teleport"
pluto:notificationRingtoneFileName="media/audio/notifications/Teleport.mp3">
Step 7 - Open up the res/values folder. There are two files in this particular template that need to be edited, strings.xml and themes.xml.
In the themes.xml you will need to change this line of code
Code:
<style name="Cyanbread" parent="@android:style/Theme" />
to this
Code:
<style name="yourthemename" parent="@android:style/Theme" />
and in the strings.xml you are basically doing the same thing by replacing "Cyanbread" everywhere with "yourthemename"
Code:
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">Cyanbread Theme</string>
<string name="theme_name">Cyanbread</string>
<string name="style_appearance_name">Cyanbread</string>
<string name="author">T-Mobile MSD</string>
<string name="copyright">T-Mobile</string>
</resources>
it should look similar to this when edited
Code:
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">youthemename Theme</string>
<string name="theme_name">yourthemename</string>
<string name="style_appearance_name">yourthemename</string>
<string name="author">You are the author</string>
<string name="copyright">there is no copyright on open source</string>
</resources>
Ok, so far this isn't to complicated but from here on out it gets a little more tricky for the average joe. Let me try to explain how these APKs work. Basically the xml files in the theme APK tells android to look in its own folders for, basically, substitute PNG images for the ones currently in the your framework and system/app packages on your phone. Pretty simple, no big deal. There are numerous xml files located in the various folders within the APK but I'm only going to talk about the two main ones need. In the res/xml there is a file named redirections.xml and android.xml. The redirections.xml basically tells the Tmobile theme picker thingy what other xml files to look at to find the source for the replacement PNGs. The main one being android.xml. Android.xml tells the OS on your phone what replacement PNGs to use for the theme. This will replace images that would normally be used from the framework-res.apk. There are other xml files in this directory as well, each one is correspondent to any APK in /system/app on your phone that you wish to theme. For instance com_android_systemui.xml will correspond to /system/app/SystemUI.apk. It works the same was that the android.xml file does and can be edited in the same way as well.
Hope that wasn't to confusing.
Step 8 - Now you will notice there are res/drawable-hdpi and res/drawable-mdpi folders in here as well. Here is where you will add new PNGs for your theme. Personally I deleted the entire contents of the folder and started over. Im not going to get into the specifics of what PNGs to replace as any themer should be ok with doing this. You can place images from any /system/app/*.apk as well but for now I am referring to the framework-res.apk. Once you replace your PNGs you are going to have to create an associated link in the android.xml.​
Please note: Any .9 PNGs you replace will HAVE, IT IS A MUST, to be decompiled and the borders edited correctly for the APK to compile correctly.
Step 9 - Open the android.xml file. Initially you will see lots of code but since you are starting over you will want to delete everything between these two lines.
Code:
<resource-redirections>
</resource-redirections>
Once this is complete we will now add the code you will need so it will find the PNG you replaced. For instance, if you placed an edited stat_sys_battery_40.png in the res/drawable-hdpi folder you are going to need to add this line of code the the xml file inbetween the <resource-redirections> code
Code:
<item name="drawable/stat_sys_battery_40">@drawable/frameworks_res_stat_sys_battery_40</item>
I hope you can see how the code corresponds to the PNG name as well. You can basically name the image anything you want as long as the code above is told to where to look.​
The same this would apply to any other xml file for their associated APKs as well.
Step 10 - Here you will want to edit the res/xml/redirections.xml file. You will see it has tons of stuff in it but again you will want to remove anything are not using. If you are only using say, the android.xml and the com_android_systemui.xml it would look similar to this:
Code:
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:pluto="http://www.w3.org/2001/pluto.html">
<package-redirections android:name="android"
android:minSdkVersion="7"
android:resource="@xml/android" />
<package-redirections android:name="com.android.systemui"
android:minSdkVersion="7"
android:resource="@xml/com_android_systemui" />
</theme-redirections>
Step 11 - Now for the final test of whether or not you edited everything correctly you will need to compile the APK. Open a terminal window and type
Code:
cd ~/android/system
and then type
Code:
make yourthemename
If you have edited everything correctly you APK will be compiled and can be found in the ~/android/system/out/target/product/supersonic/system/app folder. If it doesnt compile it will give you pretty specific errors in the terminal window that you could can go by to correct your problems.
And now for the BAD NEWS !!! The troubles I had while doing this was mainly with .9 PNGs. It seems that a ton of the .9 PNGs us normal themers use have been in some way corrupted d/t being edited incorrectly. Most of the borders are not done correctly. One of two things will happen: 1. They will not decompile correctly or 2. the will not compile correctly with the theme due to faulty editing. This is a simple fix but is extremely time consuming. And I, like most of us, simply don't have the time to fix each .9 I use in my themes for build each APK. Normal PNG changes are no problem however. I hope people will experiment with this as I have and will continue to do in my free time but for now I am going to stick to creating themes the old fashioned way. I do sincerely hope Cyanogen plans on placing his "UI Tweaks" section back into "CM Settings" as well for those of us who dont plan on building theme APKs.
Once again, I AM NOT a developer, so I probably couldn't answer any more advanced questions but feel free to ask. I'm sure there are plenty of people here who can. I just wanted to share my findings and what I did to make these APKs. The "Androidian" theme varies slightly if plan on using it as a template.
Hi! Thankk you so much for your tutorial, all works fine and apk is ok and properly installs on my N1, but if i try to upload the apk on market, it says me "The icon for your application is not valid. Please use a 48x48 PNG.".
Obviously, i checked twice my icons, and searched for a solutions on the net, and for the most of people with this problem it was due by a "\n" in the app name, and not from the icon. But i have not "\n" in my app name, and icons are right, so i can't figure out what is the error due to...
Can you give me some help?
Regards and sorry for my english!
do you happen to know how this would be done on windows?
Currently I have the CyanBread template / source off t-mobiles github page and have a working SDK and eclipse plugin. I am capable of making unsigned or test signed apps and have compiled a few simple apps myself, which worked fine.
Now when I Run As or export unsigned app (as done previously) the theme manager say that the theme was NOT compiled correctly.
I have done this with an unedited version and a minimalist version containing only a few of the SystemUI and framework-res files and removed from the xml correctly, the images in use are the ones which came with the template and so should not be the problem.
I must say that I would not have been able to edit this much without your explainations, so TYVM! truely awesome! And when this works I have an awesome theme half developed , I'm itching to finish.
I've read something about a modified appt.exe to allow the theme manager to assign res images differently or something, this i cannot seem to find. or figure how to bypass. I understand that in linux, you can just pull the whole repository and get it as you stated above, but surely its possible in windows???
any and all help welcome! I'm no dev, but I'd love to be able to theme like this! no more update.zips!
------
p.s. I don't want to do it in Linux virtual box fyi, and even if i did repo/adb (in VM only) currently seem to be broken at my end.
Maybe this links are useful too:
http://code.google.com/p/tmobile-themes/
http://code.google.com/p/android-theme/w/list
From "haxzamatic":
I also have a theme template on github with all AOSP graphics so you can start with stock graphics. I put a ton of work in behind the scenes so we can see some awesome themes for this system.
Click to expand...
Click to collapse
http://github.com/haxzamatic/Templatebread-
Ganii said:
Maybe this links are useful too:
http://code.google.com/p/tmobile-themes/
http://code.google.com/p/android-theme/w/list
From "haxzamatic":
http://github.com/haxzamatic/Templatebread-
Click to expand...
Click to collapse
thanks alot for taking the time to reply, but i have read the first 2 links before and it only has instructions for getting the full repository in linux, as for the templates they are all quite similar, althought that one by haxzamatic is one of the "fullest" ones I've seen. This I'm sure is not the problem, as i can compile the template after importing it as a project in eclipse but it will NOT apply.
I have even made a signed apk and installed it off the SD, it installs fine, but wont apply.
I suppose i should get repo working in my linux box.... but i do think its silly the appt wasn't released for windows and linux.... any more advice?
I compiled my theme this morning, and it finished with no errors but when i go to install it doesn't work. The apk looks good, so Idk.
trock79 said:
I compiled my theme this morning, and it finished with no errors but when i go to install it doesn't work. The apk looks good, so Idk.
Click to expand...
Click to collapse
You have to be using the AAPT from T-Mobile git to support the theme resource IDs in resources.arsc. The stock AAPT will not generate the IDs expected by the theme manager.
weareallkosh said:
You have to be using the AAPT from T-Mobile git to support the theme resource IDs in resources.arsc. The stock AAPT will not generate the IDs expected by the theme manager.
Click to expand...
Click to collapse
That is the method I used. When I go to install the apk it fails.
trock79 said:
That is the method I used. When I go to install the apk it fails.
Click to expand...
Click to collapse
Where did you get the modified AAPT from?
NickHu said:
Where did you get the modified AAPT from?
Click to expand...
Click to collapse
From here http://code.google.com/p/android-theme/wiki/TMobileThemeEngine
and here http://pastebin.com/3i7xLBTU
If the instructions in this thread are followed everything works and applies correctly. I am getting the code from the cyan github.
Sent from my PC36100 using XDA App
t3project said:
If the instructions in this thread are followed everything works and applies correctly. I am getting the code from the cyan github.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
That is fine if you want to work with the png's that are included with cyanbread theme, but I have more than what is included that theme and do not want to add all the commits just shy of a thousand more png's.
Anybody know how to change the color of the text on [just] the pulldown? I've been fiddling with no luck so far...
Thanks!
Hi t3project, I made a script following your instructions that may help on build apk theme:
http://forum.xda-developers.com/showthread.php?p=12050403#post12050403
trock79 said:
That is fine if you want to work with the png's that are included with cyanbread theme, but I have more than what is included that theme and do not want to add all the commits just shy of a thousand more png's.
Click to expand...
Click to collapse
you can use any png you want and as many as you want as long as you add the resource the the appropriate xml. they just have to be decompiled pngs and correctly edited for compiling. same thing goes for template them xml. just add the appropriate resource to the xmls and you can use whatever or howmany ever you want.
i did have a script that did this in about 2 seconds for you but i cant find it at the moment
You dont need a linux box for it to compile, install the windows android sdk, eclipse + eclipse adt, git clone the androidian theme, create a new android project in eclipse, choose create from source and select the androidian folder, build and enjoy.
How can I just download the t-mobile bit (and gingerbread, or whatever is the barebones minimum for this)? Its downloading all the devices cyanogen supports, and thats just a waste of my time/disk space/internet connection (which is particularly slow)
items name
This is about /res/xml/android.xml.
how to do so that we can know where the drawable position located? I'm confused what the name of the image that I would change.
examples where the position of the image and name in the /res/xml/android.xml.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

AURORA mods/addons+Connect to ad-hoc hotspots guide+decompile/compile/edit apks guide

*THESE MODS ARE FOR AURORA! USE THEM AT YOUR OWN RISK ! SEARCH THIS THREAD FOR BAD REPORTS BEFORE DOING ANYTHING ! SAY THANKS IF EVERYTHING GOES OK !*
*REMEMBER TO REBOOT YOUR PHONE IF YOU MAKE ANY CHANGES AT YOUR /SYSTEM/ FOLDER WITH A ROOT EXPLORER, IN ORDER FOR THE CHANGES TO TAKE EFFECT
REMEMBER ALSO TO SET THE SAME PERMISSIONS AS THE OTHER FILES OF THE FOLDER YOU EDITED
IT IS SUGGESTED TO WIPE CACHE & DALVIK CACHE BEFORE FLASHING ANYTHING
CWM 5.5.0.4 IS RECOMMENDED FOR FLASHING THESE MODS*
YOU MAY ALSO SEE THIS VERY USEFUL THREAD
ALL MODS UPDATED TO 5.0 (and compatible with any of the small updates, since they don't interfere with SystemUI, framework or android.policy.jar)
WAKEUP-WITH-VOLUME-KEYS:
UPDATE: Do you want this mod for your official 2.3.5?? See here
Hi there. I've modified a file of the dzo's aurora release in order to enable the "wakeup with volume keys" feature, when the phone is locked. I've been using it since the 1.6 dzo's release without having any problems and it has been tested also by other users without a problem yet. As many of us are having trouble with the nearly dead power button I think it may be useful. I have to pinpoint that this modification is NOT AN OPTION. IT IS PERMANENT. The only way to disable it is to reflash a regular (dzo's) aurora release, older, the same or newer, it doesn't matter or to flash the attached "stock_android.policy_(xxx)_flashable.zip" file.
So... the file that needs replacement is the /system/framework/android.policy.jar. As long as dzo doesn't make any changes to that file you can replace it without any problem at any aurora release. If any change is made I will update a new patch.
I suggest the following procedure to apply it:
1) Download the Aurora release you want.
2) Open the aurora_xx.zip file you've downloaded.
3) Navigate to /system/framework/ folder
3) Drag and drop inside that folder the "android.policy.jar" from the flashable zip attached. Replace if asked.
4) Flash the new .zip as usual.
Alternatively, you can try coping the android.policy.jar file with a root explorer to the same folder from your phone. Users have confirmed that this method works ok. I suggest the flashing method described above though.
EDIT: Flashable version added at the attachments. Flash it through clockworkmod normally. Thanks to sks976.
TABLET MODE
See this post and search this thread for reports.
http://forum.xda-developers.com/showpost.php?p=25452526&postcount=286
What is tablet mode? See this
FONT CHANGER - thank to leventccc and his thread here
Change the fonts of your phone. WARNING! COMPATIBLE WITH ANDROID 4.xx ONLY!
Flash the .zip through clockwork mod and follow the instructions. Navigate with volume buttons and select with power buttons.
It includes:
- Android Logo
- Gingerbread Stock
- MeeGo
- Nokia Pure View Font
- Roboto(Stock)
- Ubuntu
- Windows Phone 7
- Sony Xperia S
You can download the .zip from the original thread or you can get an updated version made by me (I only updated the Ubuntu fonts ) from here:
http://ubuntuone.com/3CfA4Hu4BKTjcCmPhxYzaa
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
ADDING SYSTEM APPLICATIONS:
Some other changes you can do is to add the applications you want at the /system/app/ folder. After flashing or copying, these application would be "system applications" and the only way to remove them is to delete their xxxxx.apk file from the /system/app/ folder of your phone. You can do that easily with a file explorer with root permissions (ex. Root Explorer). So these applications better be worth it. I do that for Nova Launcher and Apex Launcher. IF YOU COPY THEM MANUALLY REMEMBER TO SET THE CORRECT PERMISSIONS (rw-r--r--) AND REBOOT!
SGS3 Apps - thanks to sr21
http://forum.xda-developers.com/showthread.php?t=1682697
ICS Dictionary:
In the following link you will fild a post with a .zip attached. Inside the .zip is a version of LatinIME.apk with added these dictionaries:
English
French
German
Italian
Spanish
Greek
Enable it from "language & Input" settings and set the desired language! Thanks to halman for digging it for us.
THE FILE IS NOT A FLASHABLE .zip. I WON'T MAKE IT BECAUSE THE APK IS ABOUT 10MB SO COPYING IN MANUAL AS DESCRIBED ABOVE WILL ENSURE THAT YOU HAVE THE AMOUNT OF FREE SPACE NEEDED!
file here: http://forum.xda-developers.com/showpost.php?p=23949474&postcount=103
T9 Dialer:
thanks to boss_y and fsnelis for digging it up for us...
see here:
http://forum.xda-developers.com/showthread.php?t=1503581
Stock MMS APK with 160 characters sms capacity! - thanks to theos0o and mrasquinho - IMPLEMENTED ON AURORA 4.0 AND LATER
HUGEHUGEHUGEHUGE patch. See here: http://forum.xda-developers.com/showthread.php?t=1591989
You don't like the above?? You want our stock Aurora Mms.apk with correct translations?? See this - thanks to mrasquinho
http://forum.xda-developers.com/showpost.php?p=25577189&postcount=309
CM9 DSP Manager - thanks to eng.stk
see here:
http://forum.xda-developers.com/showthread.php?t=1636056
REMOVING SYSTEM APPLICATIONS:
You can also remove applications that you don't want from any rom, simply by deleting their xxxx.apk file from the /system/app/ folder of the rom's flashable .zip or from inside the phone (after flashing) with a root file manager. Just be careful with which you remove, because it may be important for the system to work properly. Here is a list of POSSIBLE unwanted applications. I haven't tested all of them, but there are reports that removing them won't harm anything. It's up to you.
OpenWnn.apk (Japanase IME) - safe to remove if you want
PinyinIME.apk (Chinese IME) - safe to remove if you want
BackupRestoreConfirmation.apk (Google's backup and restore - see settings->Backup & reset)
SharedStorageBackup.apk
WAPPushManager.apk (process incoming WAP Push messages, supported by your provider) - safe to remove if you want
PermissionToAccessLocApi.apk
PrivInit.apk
com.android.inputmethod.pinyin.apk
ChromeBookmarksSyncAdapter.apk (sync's your bookmarks from pc chrome if installed) - safe to remove if you want
Email.apk - If you use only Gmail)
Exchange.apk - If you use only Gmail)
Feedback on more apks and descriptions much appreciated!!
Thanks to eng.stk, wangjun1984
UI MODS:
SystemUI.apk:
SystemUI.apk is a system apk that controls the look/behaviour of your status bar. Here are some modified SystemUI.apk. Install them as described above (ADDING SYSTEM APPLICATIONS) or flash if .zip is a flashable file. BACKUP THE ORIGINAL SystemUI.APK AND REMEMBER TO SET THE RIGHT PERMISSIONS
return-to-stock-SystemUI.apk - flashable .zip
stock-SystemUI.apk + center clock - flashable .zip
- baterry percentage V2 (higher quality, ICS coloured) - flashable .zip
- center clock + battery percentage V2 - flashable .zip
- battery bar percentage - flashable .zip
- center clock + battery bar percentage - flashable .zip
- vertical battery percentage - flashable .zip
- vertical battery percentage + center clock -flashable .zip
- horizontal battery percentage - flashable .zip
- horizontal battery percentage + center clock - flashable .zip
- dotted circle battery percentage - flashable .zip
- dotted circle battery percentage + center clock - flashable .zip
- full circle battery percentage - flashable .zip
- full circle battery percentage + center clock - flashable .zip
- honeycomb battery - flashable .zip
- honeycomb battery + center clock - flashable .zip
- honeycomb battery V2 (only ICS colours and transparent background) - flashable .zip
- honeycomb battery V2 + center clock - flashable .zip
- liquid blue - flashable .zip
- liquid blue + center clock - flashable .zip
- more to come...
framework.apk
/system/framework/framework.apk is an .apk that configures the UI of your phone (transitions,look,icons e.t.c). Here are some mods:
return-to-stock-framework - flashable .zip
- lockscreen animation (only when screen turns off) - see howto on 3rd post - flashable.zip - thanks to fjsferreira - IMPLEMENTED BY DZO AT 4.1 AND LATER...
- Turn lockscreen animation off - flashable .zip
like this video
- lockscreen rotation - see howto on 3rd post - flashable .zip
- lockscreen animation + lockscreen rotation - see howto on 3rd post - flashable .zip
- ICS screen buttons - see howto on 3rd post - flashable .zip
- Turn lockscreen animation off + ICS screen buttons - flashable .zip
- Jellybean Animations - thanks to fjsferreira
see this post
http://forum.xda-developers.com/showpost.php?p=36596794&postcount=8326
- more to come...
If you want a combination of the above see post #3 for guides...
framework.apk + SystemUI.apk
stock framework.apk + SystemUI.apk - flashable .zip
vold.fstab - CHANGE THE DEFAULT SDCARD: -thanks to julle131
There is this file named vold.fstab at your /system/etc/ folder, which controls which of your sdcards (Internal/External) will be mounted when you connect your phone to the PC. The last 2 lines are the only that matter. These are the two possibilities:
EXTERNAL SDCARD MOUNTED (DEFAULT):
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.4/mmc_host
dev_mount emmc /mnt/sdcard1 14 /devices/platform/msm_sdcc.2/mmc_host
INTERNAL SDCARD MOUNTED:
dev_mount sdcard /mnt/sdcard 14 /devices/platform/msm_sdcc.2/mmc_host
dev_mount emmc /mnt/sdcard1 auto /devices/platform/msm_sdcc.4/mmc_host
change them as you wish with a root explorer or before flashing.
Record Videos in .mp4 file format
I edited the /system/etc/media_profiles.xml in order to record all videos in .mp4 file format. Download it and replace the stock one on your phone with it. Remember to set the same permissions and reboot.
mp4_media_profiles.xml
Speedup wifi speeds - thanks to sbasil for the patch
Some reported that this works some didn't. Just try it if you have wifi speed problems. You can find the patch here
It replaces the /system/etc/firmware/wlan/qcom_cfg.ini file. The only difference from the original is at this line:
gDynamicPSPollvalue=5
that is commented out like this:
#gDynamicPSPollvalue=5
so you can do this change manually.
Ad-Blocking hosts
There is a file inside /system/etc/ folder named "hosts" which is responsible for blocking incoming links from the web. This can be used to filter out annoying ads from inside an app or at the browser. Flash normally without wipes. It's permissions must be rw-r--r--
download
If you want the default flash this
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GENERAL GUIDES
GPS FIXES
CHANGE THE GPS SERVER - gps.conf:
There is a file at your system/etc/ folder named gps.conf. This file has information for your GPS in order to work properly. If you open this file the first lines look like this:
#Test
#NTP_SERVER=time.gpsonextra.net
#Asia
NTP_SERVER=asia.pool.ntp.org
#Europe
# NTP_SERVER=europe.pool.ntp.org
#North America
# NTP_SERVER=north-america.pool.ntp.org
These are the servers your gps is communicating with. By default a server at asia is chosen (everything after a '#' symbol is a comment and isn't "executed"). So if you are in europe you should change the default server to be the european one for better behaviour of the gps. I always do this change and my gps works good and locks really fast. So this is how you should change these lines for the european server (you can use any root explorer to open the file as text):
#Test
#NTP_SERVER=time.gpsonextra.net
#Asia
#NTP_SERVER=asia.pool.ntp.org
#Europe
NTP_SERVER=europe.pool.ntp.org
#North America
# NTP_SERVER=north-america.pool.ntp.org
and for the american:
#Test
#NTP_SERVER=time.gpsonextra.net
#Asia
#NTP_SERVER=asia.pool.ntp.org
#Europe
# NTP_SERVER=europe.pool.ntp.org
#North America
NTP_SERVER=north-america.pool.ntp.org
CHANGE THE GPS INTERMEDIATE_POS - gps.conf: ON 2.03test DZO MADE THIS CHANGE - THANKS
Do this only if you have problems with gps.
Inside the /system/etc/gps.conf file you will find a line
INTERMEDIATE_POS=1
change it to
INTERMEDIATE_POS=0
save and exit. Report if it works for you...
ADD YOUR BOOT ANIMATION:
It is very simple to add your own boot animation. Just copy/replace the desired bootanimation.zip file to /data/local/ with a root explorer. Set the permissions to rwxrwxr-x and reboot.... Done! This will not delete your stock bootanimation, it just replaces it. To revert delete or rename the file you pasted...
To find boot animations search google for "ICS Bootanimations" or "Android Bootanimations" and you will find many of them. If the file you find is a flashable .zip DON'T FLASH unless it's compatible for U8800. If it is for another phone (for ex Nexus), just extract the bootanimation.zip file from it and do the procedure described above! Make sure that the file you paste is named exactly "bootanimation.zip", else it won't work.
Here is a boot animation developing thread for dzo's aurora releases. Credits to kostasvr :
http://forum.xda-developers.com/showthread.php?p=22843604
CONNECT TO AD-HOC HOTSPOTS GUIDE - FOR ANY ANDROID VERSION:
I finally figured out how to connect to ad-hoc hotspots (hotspots from your pc) since android has disabled this, by filtering out the ad-hoc networks from the list. The best way to do this is to recompile the wpa_cli file removing this filtering but since I have no idea how to do that I found another way to bypass it. The idea is to manually create the profile of your wifi inside your phone and let it connect automatically! In order to do that you need a root file manager to edit the file : /data/misc/wifi/wpa_supplicant.conf.
Lets say the ad-hoc wifi you have created is called MyWiFi and it has no password. Here is the guide:
0) Disable your wifi
1) Goto /data/misc/wifi/ and open wpa_supplicant.conf as text
2) Add this entry somewhere:
network={
ssid="MyWiFi"
mode=1
frequency=2412
key_mgmt=NONE
priority=50
}
set priority as you wish. Wifi connects automatically to the lowest available profile
3) enable your wifi and let it connect automatically!!!!
If you need encryption to your wifi (WARNING: only plaintext and static WEP) you have 2 ways:
1) Add at your wifi sharing options on your PC, MAC address filtering and enter the MAC address of your mobile. This way only your mobile would be able to connect to your wifi and no changes are needed at your phone.
OR 2) Set a WEP encryption code from your computer and add these lines inside the {...} of the above code:
proto=WPA
key_mgmt=WPA-NONE
pairwise=NONE
group=TKIP
psk="secret passphrase"
I haven't tested it but it should work. Report if it does or not!
This entry wont be deleted until you do a FULL WIPE or delete it manually...
This is not only for Aurora, it is for any AOSP android which has ad-hoc filtering. But since MIUI and CM have this disabled I post it here and added it at the name of the thread.
BEWARE. WHEN THE PHONE IS CONNECTED TO AN AD-HOC NETWORK (MAYBE ALSO WHILE WIFI IS ON AND AT STANDBY) IT WON'T ENTER TO "DEEP-SLEEP" STATE NORMALLY, CAUSING GREATER BATTERY LOSS. I don't know why this is happening but it is a known problem!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I will support this thread with any other fixes-updates-tips-mods I find.
Thank you very much and CREDITS TO DZO FOR HIS WORK!
Enjoy!
Cheers
AURORA ICS- "wake with volume keys" + mods/addons + Connect to ad-hoc hotspots guide
As promised, this is a complete guide on how to edit apk files. It is not only for AURORA. It is a general guide!
TOOLS YOU NEED
- apktool (It can handle .jar files too)
OR
- apkManager: Uses apktool to decompile and compile apks but offers easier UI and other options, such as signing apk. Rcommended!
You can find any of the above tools for your platform (linux, Windows, MacOs) at google or at xda threads.I won't put any links here because there are many editions. Find what works for you best. Attached you can find the version of apkManager I use (only linux compatible, and with some fixes).
UPDATE! New version (4.3.1) added that supports decompiling framework-res.apk! Enjoy!
MOD APKS
To edit any apk you need to decompile it. This process will create some folders which include the .xml files, the icons and the .smali files of the apk. The .smali code is a pain in the ass to understand but it is the only "safe" way to decompile and recompile an apk without destroying it. To edit an apk you have to do the following:
STEP 1: You need the framework-res.apk of the rom you are editing, because it contains necessary information for the apktool to decompile or compile. Copy the framework-res.apk of the rom and paste it at the same folder with apktool (if you are using apkManager, apktool is inside its "other" folder; copy it there)
STEP 2: Open a terminal/command line and navigate at the directory of the apktool
STEP 3: type this command
Code:
./apktool if framework-res.apk
This will install the framework-res.apk to your system. In linux it installs it at ~/apktool/ . I don't know for windows .
STEP 3: Decompile an apk. Lets say you want to decompile the SystemUI.apk.
If you use apkManager copy SystemUI.apk (or any apk you want to decompile/compile) at the "place-apk-here-for-modding" folder and run the Script.sh and you will easily find how to decompile, compile and sign the apk.
If you are using apktool copy SystemUI.apk (or any apk you want to decompile/compile) at the same place with apktool and execute this at terminal
Code:
./apktool d SystemUI.apk
and you will find at the same directory a folder with the name of the apk you decompiled and all of its files inside.
STEP 4: Edit anything you want to edit!
STEP 5: Recompile...
With apkManager follow the on screen instructions of the Script.sh and also sign the apk. You will find the apk ready at the "place-apk-here-for-modding" with the the name "repackaged-signed.apk". Rename it as the original and you are ready to rock.
With apktool execute this command:
Code:
./apktool b SystemUI/
SystemUI is the folder of the decompiled apk. It could be any other apk name instead. After that you will find a folder named "dist" inside the SystemUI folder and inside of it a an .apk file which is the new .apk with your changes. In order to sign your apk you need some extra tools. You can search the web on how to sign an apk. I don't know what are the consequences of using an unsigned apk. Probably it would work ok but I haven't tried it.
STEP 6: You are ready to put the new apk at your phone. Remember if you are replacing a system apk to set the correct permissions after pasting.
Cheers
AURORA ICS- "wake with volume keys" + mods/addons + Connect to ad-hoc hotspots guide
How to Change Battery in ICS ROM - thanks to fergie716 and his guide here
After you got apktool all set up with ICS resources installed get the SystemUI.apk from your ICS ROM, decompile it.
Make sure you have installed framework-res.apk in apktool prior to decompiling ICS apks
Navigate to your decompiled SystemUI folder, go to /res/drawable-hdpi/
This is where the battery png's are in ICS. Copy/paste your battery png's. To make it more easy, make sure your png's follow the pattern (stat_sys_battery_1.png, etc)
If you plan on changing the png's for charging animation make sure you have the correct png's named stat_sys_battery_charge_anim0.png etc
(optional) Delete leftover battery png's, if any, from stock ICS
Once all your png's are in place, you need to modify the corresponding xml's
Those are found in SystemUI/res/drawable/stat_sys_battery.xml and stat_sys_battery_charge.xml
The first is responisble for the look of the battery while discharging and the second while charging. The form of them is like: When battery=20% show stat_sys_battery_20.png (random example). if you have percentage icons with all the values (0-100) you need to have a stat_sys_battery.xml like the attached named "stat_sys_battery_allpercentage.xml.zip".
For the charging images you can keep the stock stat_sys_battery_charge.xml or you can create a new based on the stock in order to show all percentages (if icons are provided). Attached you will find a charging animation .xml named "stat_sys_battery_charge_allpercentage_anim.xml.zip" which needs charging icons for all percentages in order to work properly.
If you have made mistakes at one of the .xml files the build will probalby fail or you will lose the battery icon. Your phone will work ok though and a flash of the stock SystemUI.apk will fix everything. You can decompile and use .xml files from other SystemUI.apk as long as the filenames match.
Now that you have your png's and xml's in place, go back and recompile.
How to Enable Lockscreen Rotation (ICS) - thanks to fergie716 and his guide here
-decompile framework-res.apk using apktool
-navigate to decompiled folder, go to /res/values/bools.xml
-change "config_enableLockScreenRotation" to "true"
-recompile framework-res.apk
HOW TO CENTER CLOCK - thanks to fergie716 and his guide here
-decompile your SystemUI.apk
-navigate to your decompiled folder and go to res>layout>status_bar.xml
-look for this line:
Code:
-press "enter" to create an empty line
-place your cursor at the beginning of that empty line and paste this line of code:
Code:
-make sure everything lines up (see the attached xml below)
-lastly, find this line:
Code:
name="notification_header_bg">
#00000000 would be fully transparent, #ff000000 is fully opaque.
[SIZE="5"][B]Lockscreen animation - thanks to fjsferreira for the guide[/B][/SIZE]
decompile framework-res.apk
go to res/values/bool.xml
change line
[CODE]true
to
Code:
false
Disable Unlock-with-menu-key - implemented by dzo on 2.05 and later
You may have noticed that if you are at lockscreen and press the menu key the phone unlocks. If you want to disable this do the following:
decompile framework-res.apk
go to res/values/bool.xml
change line
Code:
false
to
Code:
true
Enable ICS screen buttons
decompile framework-res.apk
go to res/values/bool.xml
change line
Code:
false
to
Code:
true
SystemUI.apk - bools.xml
After decompiling the SystemUI.apk you will find the bools.xml file inside res/values/ and it's stock form is this (I added descriptions, trueN, falseFF):
Code:
[COLOR="YellowGreen"][/COLOR]
false
[COLOR="YellowGreen"] [/COLOR]
false
[COLOR="YellowGreen"][/COLOR]
false
[COLOR="YellowGreen"][/COLOR]
false
[COLOR="YellowGreen"][/COLOR]
false
[COLOR="YellowGreen"][/COLOR]
false
Change them in your desire and report if you find something.
ENABLE VOLUME WAKE:
1) decompile android.policy.jar
I use apktool 1.4.3 for linux.
with the command:
apktool d [dir-of-the-.jar]
2) go to the apktool folder where the decompiled version is.
3) find the KeyguardViewMediator.smali source
4) change this:
...
.method private isWakeKeyWhenKeyguardShowing(IZ)Z
....
:sswitch_data_8
.sparse-switch
#0x18 remove
#0x19 remove
0x1b -> :sswitch_5
....
5) save and compile again with the command:
apktool b -f [dir-of-the-decompiled]
- ...more to come
Cheers
hey mate.
Just flashed 1.9, but forgot to change the android policy jar file
Well, tried to do it just moving it to the /system/framework, and it worked great, after reboot
thanks
Thanks spirosbond, REP+
thanks a lot. works great
Thanks for the feedback guys.
Cheers
Sent from my U8800 using xda premium
One thing you could add here (If you want) is a list of "bloatware" in this rom. The un-needed keyboards and some things. It would be easier to find the list from this topic than searching the post in ICS aurora topic.
julle131 said:
One thing you could add here (If you want) is a list of "bloatware" in this rom. The un-needed keyboards and some things. It would be easier to find the list from this topic than searching the post in ICS aurora topic.
Click to expand...
Click to collapse
Yes, I am preparing it!
Thanks
Nice work! Always nice with tweaks. Thanks!
Can you provide a simple solution/explanation how to get long press volume key to skip to next song in media players?
Thanks in advance!
cokratex said:
Nice work! Always nice with tweaks. Thanks!
Can you provide a simple solution/explanation how to get long press volume key to skip to next song in media players?
Thanks in advance!
Click to expand...
Click to collapse
I use player pro which has this option inbuilt . You can try it from market... it's a paid apk though...
spirosbond, can you add in the first post mod "center clock"?
Made for myself, decided to share)
View attachment center_clock.zip
sorry for my bad english)
sks976 said:
spirosbond, can you add in the first post mod "center clock"?
View attachment 919702
Made for myself, decided to share)
View attachment 919700
sorry for my bad english)
Click to expand...
Click to collapse
Thanks a lot sks. I've added all your work as UI MODS.
sks976,
How about working on a battery % icon for status bar ?!
The circle battery icon used on 2.1 roms would look great on this one!
Great work both of you !!! Thanks !!!
nrdl said:
sks976,
How about working on a battery % icon for status bar ?!
The circle battery icon used on 2.1 roms would look great on this one!
Great work both of you !!! Thanks !!!
Click to expand...
Click to collapse
I have long been using it) starting with version 1.7. Made it in UOT Kitchen - It is very simple)))
View attachment battery_1.9.zip
for undo stock battery flash this - View attachment battery_1.9_stock.zip
But when using this % battey mod need another center_clock.
Here it is - View attachment center_clock_forbatterymod.zip
But I have a problem with animation is charging. I do not have time to fix it.
I lost all statusbar icons, including clock, after flashing the center clock mod...
Sent from my U8800 using xda premium
Tested and approved
Thanks sks976!
I 've replaced ths file by root explorer and this method works ok without any problem ..
Thank u
olfyboy said:
I lost all statusbar icons, including clock, after flashing the center clock mod...
Sent from my U8800 using xda premium
Click to expand...
Click to collapse
Have you wipe anything ?
I made in this order:
Wipe Data Cache
Wipe Dalvik Cache
Flash battery_1.9
Flash center clock mod
Tested and working fine
nrdl said:
Have you wipe anything ?
I made in this order:
Wipe Data Cache
Wipe Dalvik Cache
Flash battery_1.9
Flash center clock mod
Tested and working fine
Click to expand...
Click to collapse
I didn't do that and work fine too...

◄ GUIDE ► Customizing ROM Graphics and Interface

-----
What is this?
This is an elementary reference/guide that I would like to share with anyone interested in customizing or modifying the Graphical User Interface of their custom ROMs - which includes, but is not limited to backgrounds, toggles, system icons etc.
It is based completely on my experiments playing around with ROM elements, as well as help from users across the web.​
Yet another How to Theme guide?
Yes. And No.
Themes are an excellent way to achieve our purpose, and provide much varied levels of customization. They are much more extensive and require knowledge which is outside the scope of this guide.
Themes do not replace any system files or images. Instead, they create references via XML files, which direct your OS to use that which is supplied by the theme instead of the stock elements.
This gives greater flexibility and compatibility, and is without doubt a lot safer.
However, in this guide we will be directly manipulating, modifying and changing the system files and images of your custom ROM instead of taking the XML route. This will only help to alter what you pack beforehand inside your ROM. Not that which you may add later from the device.
Both methods have their appeal, and we will not debate on that.​
DISCLAIMER
As with all guides and tutorials, please proceed with caution. If the end-result is to your liking, give yourself a pat on the back. But if something goes wrong, please don't come running for my head.
Before you jump to searching for a suitable tool to de-compile apk files, please note that we do not require to de-compile any apk or jar files for this purpose. We are simply working on image elements (PNGs ONLY) which can be replaced without any fuss.
The posts that follow will be updated and improved upon regularly based on your views and opinions. Kindly do not take to petty quarrels. If you find something objectionable, please report to the moderators and let them choose the course of action.​
By the end of these few posts, if you are able to create something that gives you satisfaction, please share it with others too.
Your creations, no matter how 'unique' will all be gladly put up here.​​
--
What to edit?
---
Let us begin by extracting the ROM package to a directory.
When you open this new directory, you will find that it contains the following 3 components -
A folder called META-INF
A folder called system
Another file named boot.img
It is the folder named system, that we are concerned with. But when you open this folder, you again find yourself looking at numerous other folders.
For our purpose, we require only the folders named app and framework.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Let us begin with the app folder.
The app folder evidently contains the apk files that you have chosen to package with the ROM. It is inside these apk files that our images reside.
As stated earlier, for the purpose of this tutorial we do not need any tools to de-compile the apk files. We treat them as simple archives.
We choose Contacts.apk to start with. This is the apk file that we would want to edit for changing our dialer background.
Open this apk file as you would open any other archive using WinRAR, 7-Zip etc. You should now see the following inside -
Folder named META-INF
Folder named res
XML file named AndroidManifest
Two other files namely, classes.dex and resources.arsc
Now enter the res folder and you find several more folders with prefix drawable, layout, menu and mipmap. Without going into details as to what each folder is for, I would just say that it is the bunch of folders having the prefix drawable and mipmap that we are concerned with.
:good: The mipmap folders usually contain the app's icon which appears in the app drawer, or other places as relevant. The images are usually the same in all folders - xhdpi, hdpi, mdpi.​
The xhdpi icons are somewhere around 96-100px. This is completely upto you to decide how you want your app icon to look like.
The hdpi icons are usually about 75% of the size of xhdpi, while mdpi are a further 66% of hdpi icons in size.
The images are all in PNG format. To edit them you would require a suitable program. I personally use Adobe Photoshop. Other useful ones are GIMP, Pixlr Studio, fotographiX, Corel Photopaint, Microsoft Picture Manager - or any combination that suits you.
In case you want to work with vectors (graphics that use vectors and mathematical functions to describe images rather than fixed bitmaps. As a result the images can be cleanly scaled to any size without losing fidelity.) there is nothing better than Adobe Illustrator or Corel Draw.
Once you are done with creating your custom icons, save them in PNG format and rename them to the exact name of the stock PNG that you are substituting.
:good: It is always advisable to keep your PNGs the same dimensions as the ones you are replacing. Try not to over-do them. I am sure you wouldn't want a 500 kB PNG file ​
Once you are through creating icons for the xhdpi folder - just copy them all and paste inside the other folders - hdpi, mdpi. Take care that you don't forget to re-size them!
hdpi ~ 75% xhdpi
mdpi ~ 66% hdpi
Now time to edit other elements. We first start with the dialer background. So where exactly is the image for this?
:good: Dialer Background can be found at /res/drawable-nodpi/
The image we want to edit is background_dial_holo_dark.png​
This image is usually 512 X 512 px in dimension. In my experience, this works well if your image is a texture or a pattern (nothing better than a seamless texture). However, if your idea of a dialer image involves using distinct entities etc, you would like to keep your dimensions around the same ratio as the Galaxy Note screen resolution. Otherwise, you will find that the image actually gets stretched vertically once on the phone, and looks really bad.
Next comes the drawable-xhdpi folder. In almost all apk files, this is one folder that you don't want to miss with regards to graphical customization.
You will find loads of PNG images here - each of which can be modified as per your whims and fancies.
You could get started with a few prominent PNGs - ones which you come across or ones that you 'notice' more than the rest. I have tried to list a few that would be worth starting on -
contacts_widget_preview.png
dial_num_9_wht.png (and other digits)
ic_contact_picture_180_holo_dark.png (and the other 'light' counterpart)
:good: Have a look at the other drawable folders. Experimenting is the only way you can know what changes what ​
You can follow the same procedure to customize images inside the Mms.apk, Phone.apk or any other apk for that matter! All you need to do is open the apk file as you would any archive, look for the drawable and mipmap folders under /res
Here I would like to discuss a bit about 2 important apk files -
Settings.apk and SystemUI.apk
These 2 apk files contain the bulk of images that we look to customize. And hence the special mention. The methods remain the same. We look for the same folders as discussed previously. I would just be helping to speed-up things and tell you which image appears where.
SETTINGS.APK
As before, we look for the drawable and the mipmap folders.The mipmap folders will contain the apk icon that represents the module. It is named as ic_launcher_settings.png
Start with the mipmap-xhdpi folder and simply duplicate your custom image into the other mipmap folders. DO NOT FORGET to re-size and rename.
Next we come to the all-important drawable-xhdpi folder, which again contains the bulk of the images we would like to customize. You will find icons here that are find elsewhere too. So which one is which? Where does it appear on your device?
This being the Settings apk that you are editing, the images in the drawable-xhdpi folder appear when you are inside the System Settings menu. This is where we usually set our -
Wireless and Network Preferences (Wi-Fi, Bluetooth, Data Usage etc.)
[*]Interface Preferences (Launcher, Lock screen, Themes etc)
[*]Device Options (Sound, Display, Storage, Battery, Apps etc.)
Here is how the menu looks when customized using graphics from the Cobalt Theme. (Though this was achieved by explicitly applying the theme, the same can be done by replacing those files in the ROM itself)
The images usually have the prefix ic_settings before them, which should make it easy for you to identify which ones you want to edit.
...to be continued....
---
under const
toxicthunder said:
under const
Click to expand...
Click to collapse
patience.
Nice
Can be very useful, and sort of unique - visual instruction is the key. Can exactly help me with somehing I've tried to do. Great thread.:good:
And adding one step-by-step (with pics) example of re-doing graphics, preferably, contacts/dialer, would be even perfect
This is not a good guide mate...
Where do u decompile the apks so u dont break the .9.png or where do u warn people for them ?
You will create overloading systems with this guide.
When theming the only proper way is to decompile the apk and edit the images then compile the apk again.
I bet none of the apks u did like this can compile because they all have broken .9's.
The system can not find the borders of these images and will create drain.
I think you miss the point.
Before jumping to conclusions on whether this is a good guide or not, please read what I have written.
We are dealing with png files here and NOT 9pngs
PNG files can very well be simply dropped over to replace in the apk.
Most of the icons - toggles, backgrounds, status bar icons etc are ALL png files.
You can simply open the apk files and replace the PNGs you want,
As for the .9png files, though I havent even touched upon them (If you could read the 'to be continued'), you can edit the .9pngs this way too as long as it is limited to color overlays and not with changing the geometric vector dimensions.
Thanks for dropping by..
I am sure users will find your point and our subsequent discussion helpful
Robbie Hood said:
This is not a good guide mate...
Where do u decompile the apks so u dont break the .9.png or where do u warn people for them ?
You will create overloading systems with this guide.
When theming the only proper way is to decompile the apk and edit the images then compile the apk again.
I bet none of the apks u did like this can compile because they all have broken .9's.
The system can not find the borders of these images and will create drain.
Click to expand...
Click to collapse
Hmmm point. As of now above it has been discussed to modify the .png files. Hence not an issue.
Toxic u would want to put a cautionary note about modifying the .9.png files
@abhi aao ... all set up
toxicthunder said:
I think you miss the point.
Before jumping to conclusions on whether this is a good guide or not, please read what I have written.
We are dealing with png files here and NOT 9pngs
PNG files can very well be simply dropped over to replace in the apk.
Most of the icons - toggles, backgrounds, status bar icons etc are ALL png files.
You can simply open the apk files and replace the PNGs you want,
As for the .9png files, though I havent even touched upon them (If you could read the 'to be continued'), you can edit the .9pngs this way too as long as it is limited to color overlays and not with changing the geometric vector dimensions.
Thanks for dropping by..
I am sure users will find your point and our subsequent discussion helpful
Click to expand...
Click to collapse
your guide states modifying .png and .9.png mate ....
remember what you write
We are simply working on image elements (PNGs, .9PNGs etc) which can be replaced without any fuss.
Click to expand...
Click to collapse
Robbie Hood said:
your guide states modifying .png and .9.png mate ....
remember what you write
Click to expand...
Click to collapse
yes, you are correct.
But where does it say "How to modify .9pngs"
as I said - under construction
Oh god no time toplay silly kids games.
Justput up a warning if u even know what the .9s exactly are.
If a guide is under construction leave it on ur pc and drop it when its finished.
U can really mess up peoples phones
.9pngs?
Sorry, not much know-how about graphic designing.
Give it a rest guys
Robbie - Toxic is a web designer and that too of an elite class...so he knows what he is doing!! Though your point is valid and well taken ! :good:
Toxic - No harm in putting up a cautionary note as i stated earlier.....many people here you know will mess things up and then flood the Q&A and this thread. So prevention is better than cure
removed reference to .9s under disclaimer.
Thanks Robbie
toxicthunder said:
.9pngs?
Sorry, not much know-how about graphic designing.
Click to expand...
Click to collapse
http://developer.android.com/tools/help/draw9patch.html here you go mate
---------- Post added at 12:50 PM ---------- Previous post was at 12:50 PM ----------
abhisahara said:
.many people here you know will mess things up and then flood the Q&A and this thread. So prevention is better than cure
Click to expand...
Click to collapse
you are a wise man
toxicthunder said:
patience.
Click to expand...
Click to collapse
Oh how cool!!! i didn't have to PM or ask you about this, you already created a Thread, this is really helpful for us newbies how want to learn mean while ill keep playing with the building from source part of the custom Rom, thanks toxic!!!
Since xda-university is going to be launched soon, advancing this thread is pointless.
Thread Closed

[TOOL][NoobFriendly]EAIT:Easy Apk Image Themer

Today I am proud to present my new creation EAIT - EASY APK IMAGE THEMER.
DISCONTINUED
I don't use Windows anymore, so any support for this script/app is dropped.
Download from Mediafire or from ATTACHMENT.
I see sometimes peoples get very shocked after they see my modded versions of whatsapp, so I thought lets make something which helps to *any* normal android user to edit any apk.
Keep in mind that this is not much advance tool and won't be able to do all editing.
So what exactly is EAIT, it's a simple tool which extracts APK to let you edit images and then compress it back to .apk to install on your phone.
What you need?
JRE 6/7 -download it from java.com
Any good image editor like l Photoshop, GIMP or Paint.net
steps:
1. Download .rar from above.
2. Extract in C:/
3. Take backup of app(by ES explorer) you want to edit and move it to "PLACE-APK-HERE"
4. Run main application "easy apk image themer" from folder.
5. See your current apk will be listed on top.
6. Press 1 and enter to extract
7. Minimize the window and go to 'Project' folder. You'll find appname.apk folder, click on it.
8. Browse through "res" folder and see images inside drawable folders. Edit then with help of Photoshop/GIMP/Paint.NET.
Warning: rules of editing
>never edit "imagename".9.png files or you may get force close.
>If you want to replace image then choose something that has same resolution
9. After all editing maximize the window you previously minimized.
10. Press 2 and hit enter, wait for a while.
11. Press 3 and hit enter wait for a while.
12. You will find Signed-appname.apk in your "place-apk-here" folder
13. Send that app to your phone and install ( you may need to Un-install previous one)
14. Enjoy... and press thanks if you liked it
Report any bugs/problems here only.
Some images
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
the result:-
reserved
bump
Here is a Mediafire mirror for you
I've always wanted to make an inverted Facebook app, so I might give this a shot. Thank you for your work
I’m not trying to rain on OP’s parade, but out of curiosity, aren’t there similar tools for Windows already? Sometimes with even better GUIs like elesbb's GUI APK Tool
This looks like APK Multi Tool, minus all of the extra features. Even the folder structure is the same.
please help
i did everything as mentioned in ur tutorial. i colored some whatsapp smiles. and recompiled the apk and signed it. uninstalled my previous whatsapp and installed new one. but whenever i try to open a new contact to chat with it force closes. am attaching the edited apk. plz help me.
i didnt changed any resolution of images. just coloured them.
http://www.mediafire.com/download/ew7rgzz6qaa95uu/signed_whatsapp.apk
Interesting tool, would love it if i'd see screenshots and shared apks of modified apps! :good:
Great work.!!!
Hi Ankush,
You can use the Mediafire mirror.
http://www.mediafire.com/view/2zomqhmuoknb0gm/APK-Image-Themer_3.rar
BTW, amazing job now I can theme my apps...:good::good:
Downloaded
Ankush menat said:
Today I am proud to present my new creation EAIT - EASY APK IMAGE THEMER.
Download from dropbox
Please provide me mediafire mirror(mine account is not working properly)
I see sometimes peoples get very shocked after they see my modded versions of whatsapp, so I thought lets make something which helps to *any* normal android user to edit any apk.
So what exactly is EAIT, it's a simple tool which extracts APK to let you edit images and then compress it back to .apk to install on your phone.
What you need?
JRE 6/7 -download it from java.com
Any good image editor like l Photoshop, GIMP or Paint.net
steps:
1. Download .rar from above.
2. Extract in C:/
3. Take backup of app(by ES explorer) you want to edit and move it to "PLACE-APK-HERE"
4. Run main application "easy apk image themer" from folder.
5. See your current apk will be listed on top.
6. Press 1 and enter to extract
7. Minimize the window and go to 'Project' folder. You'll find appname.apk folder, click on it.
8. Browse through "res" folder and see images inside drawable folders. Edit then with help of Photoshop/GIMP/Paint.NET.
Warning: rules of editing
>never edit "imagename".9.png files or you may get force close.
>If you want to replace image then choose something that has same resolution
9. After all editing maximize the window you previously minimized.
10. Press 2 and hit enter, wait for a while.
11. Press 3 and hit enter wait for a while.
12. You will find Signed-appname.apk in your "place-apk-here" folder
13. Send that app to your phone and install ( you may need to Un-install previous one)
14. Enjoy... and press thanks if you liked it
Report any bugs/problems here only.
Some images
the result:-
Click to expand...
Click to collapse
Will try it soon cool tool will try to mod some apps
+1 Nice tool
himanshu.khanna said:
i did everything as mentioned in ur tutorial. i colored some whatsapp smiles. and recompiled the apk and signed it. uninstalled my previous whatsapp and installed new one. but whenever i try to open a new contact to chat with it force closes. am attaching the edited apk. plz help me.
i didnt changed any resolution of images. just coloured them.
http://www.mediafire.com/download/ew7rgzz6qaa95uu/signed_whatsapp.apk
Click to expand...
Click to collapse
You've edited one .9.png which is causing FC
So from what I am seeing, this allows you to easily edit images in apps. Does it however facilitate color changing? I'd like to theme facebook into the one team blackout has
asdfasdfvful said:
So from what I am seeing, this allows you to easily edit images in apps. Does it however facilitate color changing? I'd like to theme facebook into the one team blackout has
Click to expand...
Click to collapse
Facebook is mostly coded with HEX color codes and not Images...
You should use APKtool by brut.all
There are tons of guide available for How-to-theme-with-Apktool on XDA follow them.
Ankush menat said:
Facebook is mostly coded with HEX color codes and not Images...
You should use APKtool by brut.all
There are tons of guide available for How-to-theme-with-Apktool on XDA follow them.
Click to expand...
Click to collapse
Mhm... Apktool keeps on giving me issues. I guess I'll just love without theming
Sent from my One S using XDA Premium 4 mobile app
thanks but,
Ankush menat said:
You've edited one .9.png which is causing FC
Click to expand...
Click to collapse
how do i identify that which one is .9.png file? any suggestions?
himanshu.khanna said:
how do i identify that which one is .9.png file? any suggestions?
Click to expand...
Click to collapse
See the Image...
Those image files who have name like name.9.png will be visible as name.9 in Windows dont edit them
please help
Ankush menat said:
See the Image...
Those image files who have name like name.9.png will be visible as name.9 in Windows dont edit them
Click to expand...
Click to collapse
see i edited these files and they dont have .9.png in there name.View attachment 2479108
Sure, this is similar to some of the other apk editors out there like ApkTool/ApkMultiTool but this is NEWB friendly as the op expressed. I think this is a great program for someone just starting to learn about the android os and curious about themeing their own applications. Wish I had this tool when I first started themeing with apk multi tool. Without all the fluff and extra features, this software will be very helpful for users who are specifically interested in modifying the look of their applications. Good job Ankush
Anyone have any tips on editing Hangouts.apk? More specifically I would like to modify the emoji. Does framework-res.apk need to be included or something?
Sub'ed
OK so far so good, anyone know the name or where in the APK folder (which drawable folder) I could find the background images. I am working on the facebook messenger from my Sprint GS3.
Well I managed to edit the color of one of the pictures inside an app (ended up using the clock app) and now I cannot get it to install. I deleted the old clock and tried installing from es and also flashing from TWRP but could not find the file there (guess because it was not a .zip). Has to be in system/app folder.

[GUIDE] How to get GravityBox mods on your Pixel even though Xposed no longer works!

Hi all!
I was extremely disheartened when I discovered that XPosed and thus GravityBox would not work on my Google Pixel (or any phone with Nougat for that matter).
There are so many little tweaks to the OS that GravityBox can enable and I felt like I could not live without them. Having the day of the week in the status bar was a big one for me. It was such a big deal to me that I spent days messing with my Pixel, accidentally bricking it and wiping it and restoring it more times than I want to admit, just to get the day of the week in the status bar. Now I know I could have just downloaded an app that did it, but they always required a separate program running at all times and I hated that idea, especially since Android has the feature built-in.
So the problem is that GravityBox was able to modify the SystemUI.apk, but Xposed and thus GravityBox does not work with Nougat. Manually editing the SystemUI.apk on my Pixel always caused a lockup where SystemUI would crash and I could not boot my phone.
So after several weeks trying to figure this out, and with the help of other members, I was able to get these GravityBox-like tweaks to work on the Google Pixel! (though I definitely need some help getting code to make other tweaks, so if any of you know the codes of other tweaks, post them please!).
Anyway:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(as you can see I was able to unlock new SystemUI settings in the stock Android settings menu, as well as the date and day of the week in my status bar)
Step 1:
Make sure your Pixel is rooted with Magisk. I am using V12 because V13 caused my phone to be unusable for some reason (even with the Pixel guide). If you need the Magisk version that is for the Pixel specifically; the download, as well as a great guide, is available here: https://android.gadgethacks.com/how-to/install-magisk-your-pixel-pixel-xl-0177522/
Step 2:
Create a backup in TWRP. Use TWRP 3.0.2.0-RC1 for saltfish/Pixel. I had issues with RC2 not restoring my backups properly. When you choose backup, select the following: Boot, System Image (not system!), Vendor Image (not Vendor!), Data, and EFS. I have zero issues restoring my pixel with those selected (and System and Vendor de-selected). You don't have to do this step, but I like to do it in case a mistake is made.
Step 3:
After you have Magisk installed, you will need to download the zip from the link below. I titled it magiskXDAhelperWORKSnavbarENABLEd4.zip.
Please excuse the silly file name. I had to make so many different zips that I had to give them weird titles so I knew which ones worked and which ones didn't.
Install that Zip in TWRP. Reboot.
You should now notice in your status bar that you have the day of the week and the date. You will also have a new option in your System UI Tuner settings called "Navigation Bar". This will let you edit the navigation bar to your heart's content; as well as the option to remove the brightness slider if for some reason you'd want to.
In short, Android has these options built into the OS, but they don't have easy ways to enable or adjust them. I have no idea why. Anyway, long story short: XML files need to be edited to enable these types of settings or features. These tweaks are NOT separate programs constantly running on your phone which is why I love them.
Anyway you might not want the tweaks I included which is fine (day and date in status bar and extra options in settings menu). All you need to do is delete the layout and xml folders I created (and the XML files inside them) in magiskXDAhelperWORKSnavbarENABLEd4.zip\eviltheme\system\priv-app\SystemUIGoogle.apk\res
You will see later on how you will use the folders and files you create in the zip to make changes you like!
So back to the beginning: directly messing with your systemui.apk can be dangerous, @djb77 was nice enough to create a Magisk module that allows you to make these XML edits, without messing with your systemUI.apk. It basically finds these changes on your phone and makes the changes when your phone boots. It's great and safe, but unfortunately does not work with the Pixel due to the dual partitions the device has. @Tulsadiver is an awesome member of the XDA community and edited the module to work with the Pixel. Tulsadiver's edited module is what is inside of the magiskXDAhelperWORKSnavbarENABLEd4.zip I provided below, with the only difference being I added my XML edits that allows for the day of the week and date in the status bar, and the extra options unlocked in the SystemUI Tuner in the settings menu.
You can see where my edited XML files are in the zip and it will help you understand how this all works. Extract my magiskXDAhelperWORKSnavbarENABLEd4.zip and you will see a bunch of folders and files. Open the EvilTheme folder, then system folder, then the priv-app folder. Then the SystemUIGoogle.apk folder (it is named SystemUiGoogle.apk but it is NOT an apk. It is just a folder with that name). If you did not notice yet, this is how the actual SystemUIGoogle.apk is stored on your Pixel. SystemUiGoogle.apk is stored in the system/priv-app/SystemUIGoogle/ folder on your phone. So basically, this magiskXDAhelperWORKSnavbarENABLEd4.zip structure sort of "mimics" where things reside on your system folder. You will see if you decompile your SystemUIGoogle.apk that inside it has a /res folder and a /layout and /xml folder (amongst others) and you will notice the magiskXDAhelperWORKSnavbarENABLEd4.zip has it, too. Those contain the changes I made to enable what I mentioned.
Step 4
You might notice if you look at my XML files in the magiskXDAhelperWORKSnavbarENABLEd4.zip, they are a garbled mess. This is because they need to be in the "recompiled" format on your phone. You will notice if you decompile the SystemUiGoogle.apk, that those same XML files are nice and readable. So if you want to make any tweaks, you need to decompile your SystemUiGoogle.apk, edit the XML files you like, then recompile. Then because you are only using the XML files (and not the recompiled SystemUiGoogle.apk), you would use 7zip to unzip the SystemUiGoogle.apk and pick out the files that you edited. This time they will be a garbled mess, which is what you want. You then add them to their respective folder in magiskXDAhelperWORKSnavbarENABLEd4.zip
If you need help decompiling and recompiling the SystemUiGoogle.apk, I can help.
Get Tickle My Android here: https://forum.xda-developers.com/showthread.php?t=1633333
Make sure you get it up and running by following the directions there.
I will guide you through decompiling and recompiling since it is a bit different because Google renamed systemui.apk to SystemUiGoogle.apk for who knows what reason.
Once it is running, Go to the "settings menu".
Now select the "change favorite files" menu.
Press 1 and make that favorite file system/framework/framework-res.apk
Now go back to that menu and press 2 and make that favorite file system/priv-app/SystemUIGoogle/SystemUIGoogle.apk
Again we are doing this because TickleMyAndroid won't be able to find those due to them being renamed on the Pixel.
Now go back to the main menu, and choose the Theming Menu
Now choose the Pull Menu
Choose the option near the bottom that says Pull/Set Favorite File and pull AND install the 1st one (system/framework/framework-res.apk). You will only need to do this once. You do not need to do this again in the future unless you use a new computer or something.
Now you want to decompile your SystemUIGoogle.apk that is on your phone.
"Pull" the file from the favorites option; making sure you select the 2nd one this time. SystemUIGoogle.apk will be pulled from your phone and decompiled.
You will find the decompiled SystemUIGoogle.apk in your Tickle My Android folder, and in the \_WorkArea1\_working\SystemUIGoogle.apk folder (like on the zip I uploaded, this SystemUIGoogle.apk is the name of a folder and is NOT an apk!).
Now say you want to edit your status bar to have the date and day of the week in the status bar (make believe there are no folders or files in eviltheme/system that already do this for you). The code for that is this:
The file that needs to be edited is res\layout\status_bar.xml
Find this line: com.android.systemui.statusbar.policy.Clock and remove that entire code block and replace it with this:
Code:
<TextClock android:format12Hour="EEE MMM dd h:mm a" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:singleLine="true" />
Save the XML file.
Now we need to put that file in the magiskXDAhelperWORKSnavbarENABLEd4.zip in the proper location and flash it in TWRP. But remember, we can't put in the "easy to read" .XML. It needs to be the garbled one you get when the apk is compiled. So in TickleMyAndroid, simply go to "recompile app with original signature" in the the "quick menu". Choose SystemUIGoogle.apk. Find the recompiled one that was just created. Unzip it (yes you can unzip an apk!) and look for status_bar.xml
Take this status_bar.xml and place it in the magiskXDAhelperWORKSnavbarENABLEd4.zip in the \eviltheme\system\priv-app\SystemUIGoogle.apk\res\layout folder and that's it! Flash the zip in TWRP and when you reboot, you should see your changes! Congrats! You've successfully "edited" your SystemUI.apk without ever touching the original file, and without needing to stay on Marshmallow to use XPosed/Gravitybox!
Since this took me such a long time to figure out (even with the help of XDA forum members!) I figured a nice guide like this would be helpful to others and I could pay it forward.
I am going to reserve the next post for us all to post nice systemui XML and other edits that will give us nice custom tweaks! So if you know some, please reply with them because finding them online can be a nightmare (not to mention some of them I have yet to be able to find!).
Enjoy!
This space will be reserved for useful customization edits and tricks forum members may come across. They are very difficult to find, so any would be appreciated! Also feel free to add a "wish list" and I will add it to this page.
XML code edits:
To get the navigation bar edit menu to show up in SystemUI settings:
edit: res/xml/tuner_prefs.xml
Before this line:
<Preference android:title="@string/other" android:key="other" android:fragment="com.android.systemui.tuner.OtherPrefs" />
Place this:
Code:
<Preference android:title="@string/nav_bar" android:key="nav_bar" android:fragment="com.android.systemui.tuner.NavBarTuner" />
(do not erase any code. Just place that line before the other line).
-------------------------------------------
To put the Day of the week and date in the status bar:
edit: res\layout\status_bar.xml
Find this line: com.android.systemui.statusbar.policy.Clock and remove that entire code block and replace it with this:
Code:
<TextClock android:format12Hour="EEE MMM dd h:mm a" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:singleLine="true" />
You can change the format of it where I put in "EEE MMM dd h:mm a" and make it look the way you like:
d.............Day Of Month (single digit) 7
dd.......... Day Of Month (double digit) Zero, 07
EEEE......Day Of Week (Full) Monday
EEE........Week Day (Short) Mon
MMMM....Month (Full) AUGUST
MMM.......Month (Short) AUG
MM..........Month (double digit) 08
M............Month (Single digit) 8
yyyy........Year (Full) 2013
yy............Year (Short) 13
h..............Hour (12 hour, single digit) 8
hh............Hour (12 hour, double digit) 08
H.............Hour (24 hour, single digit) 8 20
HH...........Hour (24 hour, double digit) 08 20 (Note: some roms use kk instead)
m.............Minute (single digit) 9
MM..........Minute (double digit) 09
s..............Second (single digit) 9
ss............Second (double digit) 09
a..............Marker AM/PM
Click to expand...
Click to collapse
Thanks to @Spannaa for posting that code back in 2014!
WISH LIST:
This is for a list of tweaks that were available in Xposed/Gravitybox that I have not been able to find the code for. Feel free to reply to this thread and I will add your wishlist to this one!
1) automatically have all volume sliders expanded instead of just the one Android thinks you want to adjust
2) Adjust brightness by moving finger across status bar (this used to be an option in Android when you enabled SystemUI Tweaks so it definitely can be enabled; I just can't find the code for pure Android)
3) Enable holding the back button to force close the foreground app.
4) Allow pressing the back button twice quickly to enable/disable auto-rotate
5) Allow moving the text entry cursor back and forward using volume buttons
6) Battery percentage only (no icon) in status bar
7) Automatically default to file transfer mode instead of charging when plugged into a computer
8) Put screen shot and "restart to recovery" options in power menu
Very nice work and detailed information. That's what XDA is all about!
I wonder if other Xposed modules such as Xinstaller or App Settings work similarly to Gravity Box.
Your method seems reminiscent of tweaks that can be performed by editing db files with SQL editor apps.
xdadevnube said:
Very nice work and detailed information. That's what XDA is all about!
I wonder if other Xposed modules such as Xinstaller or App Settings work similarly to Gravity Box.
Your method seems reminiscent of tweaks that can be performed by editing db files with SQL editor apps.
Click to expand...
Click to collapse
Thank you!
Yeah a lot of these things are as simple as editing an xml file. I just wish it were easy to find what edits do what around the web.

Categories

Resources