Android OS Forum banner
1 - 20 of 47 Posts

·
Kitten Punter
Joined
·
2,808 Posts
I am always seeing questions about how to change images out in apks. So I decided to write up a basic tutorial on how to change out images. This tutorial is strictly for basic images like pngs. This tutorial will not cover how to do more complex theming such as smali, xml or 9 Patch images. The tutorial is for Windows users. I will try to keep it simple. Please ask questions if you get stuck.

Two things you are going to need:
*The 7zip application for extracting images - Get it HERE
*An image editing application if you are wanting to edit images. I use Photoshop but a good free app is GIMP

GETTING STARTED
First thing you will need to do is install 7zip. Then we need to get the apk you are wanting to edit. The most common apk will be the systemui.apk. This is where you will find images like signal, wifi and battery. Framework-res.apk is another one that houses many of the images you see on your device.

I like to just download the ROM that I am wanting to manipulate and unzip it file to get the desired apk. After unzipping the ROM you will need to navigate to the folder where the systemui.apk is(or whatever apk you are wanting to edit). Systemui can be found in system/app folder. I suggest making a copy of the apk and putting it somewhere like the Desktop.

Now before you edit the apk lets unzip it just to have a look around. Right-click on the systemui.apk and hover over the 7zip menu and then select Extract to "systemui/".



Open it up and look around a bit. Check out the images and get familiar with where they are. Images most commonly used are in the res/drawable-xhdpi folder (for the Gnex). Now make whatever edits you are wanting to make to the images. Don't try and edit the images with the .9.png extension unless you know how to. That's a whole other tutorial there.

EDITING THE APK
Now lets use 7zip to open the original apk. You wont be unzipping it but rather opening the apk. Again Right-click on the systemui.apk and hover over the 7zip menu. This time select "Open archive".



This lets you look into an apk without messing it up. Essentially all you have to do now is drag the files you edited into the proper folder to "replace" the original files. YOU HAVE TO MAKE SURE THEY ARE NAMED EXACTLY THE SAME NAME. You will get a dialog in zip asking if your sure you want to copy the files over blah blah blah. Just hit yes and continue replacing files. When you are done close 7zip. You now have a modified systemui.apk(or whatever apk you are editing).

INSTALLING THE MODIFIED APK
Having the tweaked out apk is nice and all but how do we get it on our phone? There are several ways of doing it. You can push it through ADB, use apk multitool or replace it using a file browser on the phone(ie: Root Explorer) but my preferred method is using a flashable zip file. Don't worry its not complicated.

Download this blank flashable zip file that I have for you - DOWNLOAD

Now, basically we are going to do the same thing we did to the apk. Just open the BlankFlashable.zip file using 7zip and open archive. Now you just have to put your modified apk in the correct folder. For systemui, place the apk in the system/app folder. For a framework-res.apk you would put it in the system/framework folder. Get it? Basically the zip file will install whatever apk is in the corresponding folder or in this case overwrite the existing apk on your device. After you add in your apk just close it and rename the zip file to something of your choice. Now copy the zip onto your phone and and reboot into Clockwork Recovery.

DISCLAIMER: Its usually a good idea to flash a backup now in case something goes bonkers. Also, you can wipe the Dalvik Cache if you want. I usually don't but hey…who am I to say not to?

Choose "Install zip from sdcard" and then select "Choose zip from sdcard". Find the zip file and select it then scroll to Yes and watch it go. You have just installed your modified apk. Reboot and see your changes.

Hope this helps the beginner or aspiring themer. Remember this method will not allow you to edit xml or 9 patch files. Maybe another tutorial for that later
Enjoy!
 

·
Head Forum Stoner
Joined
·
368 Posts
Thank you very much. I finally was able to get the softkeys that I wanted. Now on to modding my battery.

Just one question. On Bugless Beast, I want to make myself a 1% battery mod. Do I need to do anything special with the battery images? Since the battery images in BB are stock and a 1% would warrant different image names and values, hypothetically wouldn't there be more to modding the battery than just swapping out images?
 

·
Kitten Punter
Joined
·
2,808 Posts
Discussion Starter · #4 ·
Thank you very much. I finally was able to get the softkeys that I wanted. Now on to modding my battery.

Just one question. On Bugless Beast, I want to make myself a 1% battery mod. Do I need to do anything special with the battery images? Since the battery images in BB are stock and a 1% would warrant different image names and values, hypothetically wouldn't there be more to modding the battery than just swapping out images?
Yes that would require decompile and XML edits then recompile.

Sent from my Galaxy Nexus using RootzWiki
 

·
Head Forum Stoner
Joined
·
368 Posts

·
Android Enthusiast
Joined
·
292 Posts
Thanks for the Great tutorial. Could you point me in the direction of what file and folder contains the status bar? I would like to make a variation of a transparent one.
 

·
Kitten Punter
Joined
·
2,808 Posts
Discussion Starter · #7 ·
Thanks for the Great tutorial. Could you point me in the direction of what file and folder contains the status bar? I would like to make a variation of a transparent one.
Status bar is controlled by an XML file in the values folder called drawable.XML. not as simple as just changing an image out.

Sent from my Galaxy Nexus using RootzWiki
 

·
Registered
Joined
·
22 Posts
In AOKP the battery percentages are an add-on and the battery images don't have the actual number in it. this leads me to believe that the image of the percent number is somewhere else and just thrown on top of the battery image. Is this correct? I'm trying to use the honeycomb battery images for another ROM but they all of have the battery percentage in each image (100 images). Could I just replace the necessary battery images removing the white number inside) and it would still overlay the AOKP percentage on top of the new battery icons? Thanks.
 

·
Kitten Punter
Joined
·
2,808 Posts
Discussion Starter · #10 ·
In AOKP the battery percentages are an add-on and the battery images don't have the actual number in it. this leads me to believe that the image of the percent number is somewhere else and just thrown on top of the battery image. Is this correct? I'm trying to use the honeycomb battery images for another ROM but they all of have the battery percentage in each image (100 images). Could I just replace the necessary battery images removing the white number inside) and it would still overlay the AOKP percentage on top of the new battery icons? Thanks.
Yes thats exactly right
 

·
Android Beginner
Joined
·
65 Posts
Thank you. haven't touched a theme in well over a year and was a nice little kick in my head to remember stuff :) since artwork is the easy stuff...and maybe will do a public release of something now
 

·
Registered
Joined
·
6 Posts
Hopefully i will not embarass myself too much but i have a question.

In reviewing a ROM that i would like update a few icons, Wifi and Signal specifically i see several different icons for them.
Example: 1)stat_sys_wifi_signal_1.png and 2)stat_sys_wifi_signal_1_fully.png

These are two different images yet on the phone my only display option is my first example.

I assume some other files(s) are dictating what file should be used for Wifi.

So, following that assumption i should be okay if i customize the first option and not the second?

If thats all correct, then why include image files in the rom if they are not used?

I think this question is similar to the one previously asked but i want to make sure.

Thanks in advance.
 

·
Android Beginner
Joined
·
42 Posts
How come when i edit a image like the icon for istance and then just replace it in the apk ithout unzipping the apk they wont install anymore? it acts like its going to then just says application not installed
 

·
Mr Click Click Derk
Joined
·
812 Posts
How come when i edit a image like the icon for istance and then just replace it in the apk ithout unzipping the apk they wont install anymore? it acts like its going to then just says application not installed
What APK? If it is in /system/app already, try replacing the icon then rebooting. You don't need to reinstall the apk if it is already there.
 

·
Android Apprentice
Joined
·
166 Posts
Can someone point me to the background images for the main menu in settings? I found the pop-up images (dialog) but I'd like to change the dull gray to black as in most themes. I'm running CM9 now so no theming...... Or do those background settings reside in xml files?

Thanks.
 

·
Kitten Punter
Joined
·
2,808 Posts
Discussion Starter · #16 ·
Can someone point me to the background images for the main menu in settings? I found the pop-up images (dialog) but I'd like to change the dull gray to black as in most themes. I'm running CM9 now so no theming...... Or do those background settings reside in xml files?

Thanks.
Its the gray background tile in the nodpi folder in framework-res
 

·
overcome evil with good
Joined
·
631 Posts
Anyone know the name/names of the images in Nova Launcher for the scrollbar that appears when you are changing pages? thanks.
 

·
Kitten Punter
Joined
·
2,808 Posts
Discussion Starter · #18 ·
Anyone know the name/names of the images in Nova Launcher for the scrollbar that appears when you are changing pages? thanks.
hotseat_scrubber_holo.9.png
 

·
Registered
Joined
·
80 Posts
Yes that would require decompile and XML edits then recompile.

Sent from my Galaxy Nexus using RootzWiki
Where can I learn how to do this? I want to be able to change my navbar size by editing values/dimens.xml. I have no idea where to look to learn about compile
 
1 - 20 of 47 Posts
Top