[Galaxy S II Themes and Apps] davidwilson83:
G'Day XDA,

I have written a bit of a guide to changing your battery icons in a way which is quite easy to do. There are a couple of ways to do it, and depending on your framework and mods depends on how you will need to do it. And before you do anything, please make a Nandroid backup using ClockworkMod Recovery. I will NOT be held responsible if you brick your phone, but I will try my best to help you if the inevitable happens.

On my SGSII I run an odexed 4.0.3 XWLPI stock ROM which has JKay's Deluxe framework & Deluxe Settings app, so I can easily choose to theme my battery icon. There are a number of different icons and ways to create them on XDA, I downloaded mine from shayne77's Battery Mod Tool thread which has quite a few, or if you're that way inclined then you can make your own.

Ok so first things first, you will need a rooted phone and some sort of file explorer that can navigate down to the root folders. I use ES File Explorer but it's personal preference. You will also need a computer with a USB cable that can connect into your phone and a zip program like 7Zip. If you don't have a ROM that currently supports % battery icons then you will need something like APK Tool to decompile and recompile SystemUI.apk . You will also need a text editor like Notepad++ to edit the XML file. The last thing that you may need (if you want to create your own icons or modify any) is a program like Photoshop, but I use Greenfish Icon Editor Pro.

You will need to download/make the icons that you want. Then you need to make sure that they are named accordingly to your SystemUI.apk's /res/drawable-hdpi folder. I use JKay's framework, so mine are named jkay_stat_sys_battery_0.png through to jkay_stat_sys_battery_100.png and then jkay_stat_sys_battery_charge_anim0.png through to jkay_stat_sys_battery_charge_anim100.png . Yours may be named without the jkay at the start if you don't use his framework.

If your ROM currently doesn't support % battery icons then I will show you how to do that. It involves decompiling SystemUI.apk, editing an XML file and then recompiling and flashing and will be detailed in the 3rd post..

Ok now once you have all of the things I mentioned above, you will need to use your file explorer to navigate to /system/app and make a copy of SystemUI.apk .

I use a folder on my phone's SD card called Mods so I know where everything is. You will then need to plug the phone into the computer and copy SystemUI.apk onto your computer. Again, I use a folder called Mods.

Now right click on SystemUI.apk, hover over 7Zip click Open archive.

When the window opens, double click on res and then double click on drawable-hdpi. Have a look in this folder for a number of icons which will be named something like stat_sys_battery_0.png or jkay_stat_sys_battery_0.png and make note of what they are named. This is what you will need to be renaming the icons that you have downloaded or made, unless of course they already have the same names.

Once all 202 icons have the same names as the ones in the /res/drawable-hdpi folder, you now need to select them all and drag them into the 7Zip archive which you have open. When the prompt asks you if you are sure that you would like to copy the files to the archive, click Yes. Then close the archive.

Now you need to plug your phone back into the computer (unless you left it plugged in from before) and copy your newly modded SystemUI.apk back onto your phone's internal SD Card. Once this is done you can unplug the phone from the computer (unless you are charging it) and open up your file explorer. Navigate to where your newly modded SystemUI.apk is stored and then move it to /system. Once that is done navigate to /system.

Now find the SystemUI.apk that you have modified and long press on it to bring up the menu and click on Properties. When you click on Properties a new window will open up which looks like this.

Notice how the permissions are set to rw- rw- rw-? This needs to be changed. So click on the Change button.

Once you have done that, you will see a new window which looks like the screenshot with a bunch of check boxes and ticks in some of them. We need to uncheck the ticks in the write column in the Group row and the Other row. Yours should now look like this. Click OK.

Now notice how the permissions have changed to rw- r-- r--? This is what we want.

Now long press on SystemUI.apk and select Move To and move it to /system/app.

A window will appear asking if you are sure that you want to overwrite your existing SystemUI.apk. Click yes.

Now restart the phone. And once it reboots, you will be left with your new battery icon! Simple!!!