[HD2 Android Themes and Apps] fruchtfliege:
at first, it would be nice if any mod can modify the title to: [HOWTO] 1% battery mod on gingerbread and delete all following posts.

further i'm sorry for my poor english - hopefully everyone here can follow my steps!

the hard thing on changing battery icons on gingerbread is, that there are only 7 steps: 0, 10, 20, 40, 60, 80 and 100... that means you have to edit or replace two xml files (more later).

IMPORTANT: please make a backup of your rom! i'm not responsible if your device won't boot after modding! also it is possible that your google/facebook etc. accounts are deleted after flashing back your modded framework. but you can easily readd them again!

WHAT YOU NEED:

apk manager from here: http://www.multiupload.com/GXW01G6URJ

battery icons or a framework-res.apk with your desired icons

a rooted gingerbread rom

your original framework-res.apk (guide to extract later on)

WHAT YOU GET (IN ATTACHMENT):

stat_sys_xml_dateien.zip (stat_sys_battery.xml and stat_sys_battery_charge.xml with 100 steps)

framework-res.apk (modified by me with circlemod battery (i hope it's okay to use them in here! btw. many thx to devs (was it mdj?) for this icons). THIS FRAMEWORK WAS ONLY TESTED BY ME ON MDJ GINGERBREAD 2.2!!!

screenshot of the circle battery mod on gingerbread

FIRST STEPS:

extract apk manager to a a desired folder and conenct your phone to debug mode

start script.bat and change kompression level to 0 (type 19, afterwards 0)

type in 0 to download framework-res.apk from your phone. it asks for the path, type: /system/framework/framework-res.apk and hit enter

if asked for a name, type framework-res.apk and hit enter and confirm with Y to be your current project

type 9 and hit enter to decompile your framework and wait until it's finished

have a look in the folder "projects" - there will be a folder "framework-res.apk" now.

navigate to the subfolder: res/drawable-hdpi and delete ALL png files with the name stat_sys_battery_X.png and stat_sys_battery_charge_animX.png (while X stands for the according number). do this also with stat_sys_battery_unknown.png and stat_sys_battery_charge_animfull.png (IMPORTANT: delete last two ones only if you have a replacement icon or you will get errors on compiling!!!)

also delete following two xml files in subfolder projects/framework-res.apk/res/drawable: stat_sys_battery_charge.xml and stat_sys_battery.xml

now it gets tricky:

depending on the amount of your custom icons you have on charging, you may have to edit your stat_sys_battery_charge.xml file and delete or add the percentual steps! if you have 100 custom png's for charging animation, you can use the stat_sys_battery_charge.xml i attached (it also includes a stat_sys_battery.xml with 100 steps if you need)

now it's time to paste your modified/downloaded stat_sys_battery_charge.xml and stat_sys_battery.xml into subfolder /res/drawable/ (where you deleted the original of gingerbread before!)

go back to apk manager and type 11 to compile your framework

when it asks "is this a system apk?", type Y for yes. confirm again with Y and let apk manager create a new folder, called "keep". a list of files appears, and after that DON'T CONFIRM!!!

first you have to navigate into this "keep" folder and delete again exactly what you deleted above (stat_sys_battery_X.png, stat_sys_battery_charge_animX.png, stat_sys_battery_unknown.png, stat_sys_battery_charge_animfull.png, stat_sys_battery.xml, stat_sys_battery_charge.xml) and ADDITIONALLY the file resources.arsc

now you can confirm in apk manager to complete the compiling process. as far as i know, these steps with keep folders are needed to include the right id's automatically in public.xml! if any errors occur, feel free to post your log in this thread (see log by typing 21 in apk manager)

flash your new created framework-res.apk by entering 8.

if you didn't anything wrong, you should have your new % battery icons after reboot! as mentioned before, your desktop background maybe messed up and/or your accounts are deleted. you can solve this by just readd accounts and change background again.