Default [GUIDE] [HOW TO] Change Stock Battery 4.4.2

This is just a simple tutorial on how to change stock battery on 4.4.2 now that its smali code. This might sound difficult, but its only 4 simple values that need changed.



BEFORE READING ANY FURTHER, YOU NEED TO HAVE APKTOOL2 AND YOU NEED TO KNOW HOW TO DECOMPILE/RECOMPILE APPS ALREADY. THIS IS NOT A APKTOOL SUPPORT GROUP, PLEASE POST ALL QUESTIONS ABOUT GENERAL APKTOOL USAGE IN ITS REPECTIVE THREAD.



You're gonna need your SystemUI.apk and that's it besides the framework files. Decompile SystemUI.apk. Now navigate to:

smali\com\android\systemui

and open BatteryMeterView.smali with Notepad++. Now search for:

Paint;->setColor(I)V

until you come across a set of 4 arrays. These are stock values, if attempting this on a custom rom these values might be different, hence why I'm telling you to track Paint;->setColor(I)V instead of just searching for these values. If you're on stock you can cheat and search these values.



.array-data 4

-0xcf00 (red)

-0xcf00 (red)

-0x2900 (yellow)

-0x1 (white)

.end array-data





Use the hexcode converter supplied to convert your hex values to smali code. Save, build and you're done. If you want to change the bolt charging color and battery background colors the are located in res/values/colors.xml. These values are pretty self explanitory as they are clearly labeled


HEX/SMALI CONVERTER

http://d-h.st/7oY

Sent from my Galaxy Note II