Overview How to change battery Icons (High Risk - do at your own risk)
Today I will share more extreme tutorial, hopefully this article can be more useful for those who want to learn to be android developer. I will also discuss this tutorials with more careful so that this tutorial can be used also by those who just know the android. Previously I would show the results obtained after running the tutorial above. look at screen shotsScreen Shot
Before Edited After EditedLook at battery icon ? i change it. if you interest in how to do it continued reading this tutorial if not then you can close this tutorial.
Requirement
- Android SDK (Windows) or Android SDK (Linux)
- ApkTool (Windows) or ApkTool (Linux)
- Icon & Xml file
- 7zip (windows)
- Installed JDK
How To
- Install Android SDK. I am not going to show you how. I think you can already do. open SDK Manager, Udate / Install Android-Platform SDK Tools
- Extract ApkTool to C:\ApkTool\ or /home/ApkTool
- Now you must pull framework-res.apk from your device and place it to your save place for backup. before do it test your adb command first by typing adb devices . if it show your devices then you can type adb pull /system/framework/framework-res.apk /home/backup/ or C:\adb.exe pull /system/framework/framework-res.apk C:\backup
- Now copy framework-res.apk to APKTool Folder, remember copy don't move cause we still need backup.
- Next, de compile framework-res.apk using APKTool. type this command
- sh apktool if framework-res.apk
- sh apktool d framework-res.apk
- sh apktool if framework-res.apk
- Look to your APKTool Folder, de compile command will create new folder called framework-res/, now you will need to extract icon & xml file. copy all image in the battery folder paste it to /home/APKTool/framework-res/res/drawable-mdpi/. replace it if there is any warning. drawable-mdpi it depend on your smartphone sometime it can be drawable-hdpi or drawable-ldpi
- Next step we need copy stat_sys_battery.xml and stat_sys_battery_charge.xml from extracted icon and xml file to /home/APKTool/framework-res/drawable/ if any warning just replace it.
- After step 1-7 done, now time to compile our framework-res folder so we can use it to our smartphone. type this command sh apktool b framework-res
- It will create 2 folder on framework-res, dist and build. create folder RESULT on your home directory, separate it for your workspace folder. follow below step :
- copy all icon that you get from icon&xml.zip to this folder.
- copy /framework-res/build/apk/resources.arsc to this folder
- copy /framework-res/build/apk/res/drawable/stat_sys_battery.xml and /framework-res/build/apk/res/drawable/stat_sys_battery_charge.xml to this folder
- copy /home/backup/framework-res.apk to this folder
- Open framework-res.apk in result folder using ark or file roller if you using linux or open it with 7zip if you using window. follow below step :
- drag and drop all icon from result folder to /res/drawable-mdpi/
- drag and drop stat_sys_battery.xml and stat_sys_battery_charge.xml from result folder to /res/drawable/
- drag and drop resources.arsc from result folder to /
- Now use adb to push framework-res.apk in result folder to your smartphone. follow below command :
- adb push /home/Result/framework-res.apk /mnt/sdcard/
- adb shell
- su
- mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
- cp /mnt/sdcard/framework-res.apk /system/framework/framework-res.apk
- chmod 644 /system/framework/framework-res.apk
- reboot
- Your smartphone will reboot after you run above command, congratulations you've been able to make modifications to the framework-res.apk
- Finish.
if you using windows, please use windows command and change the folder
in this tutorial I only teach how to replace the battery icon with the icon have been provided, on another occasion I'll show you how to replace the icon you want. This tutorial is very dangerous and can lead to bootloop smartphone. so do at your own risk