Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] [HOW TO] Change Stock Battery 4.4.2

OP icedventimocha

22nd June 2014, 07:25 PM   |  #1  
icedventimocha's Avatar
OP Recognized Contributor / Themer
Flag Erie
Thanks Meter: 3,261
 
2,295 posts
Join Date:Joined: Sep 2010
Donate to Me
More
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
Last edited by icedventimocha; 22nd June 2014 at 07:55 PM.
The Following 4 Users Say Thank You to icedventimocha For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes