Hello guys..
As you know, changing the battery icon on a KitKat rom wasn't easy before..
Today I'm gonna guide you about start using your own icons back on KK.
*Download the pack. Package includes ;
KitkatBattery_Erhany_apktool1 and KitkatBattery_Erhany_apktool2 folders. I decompiled java codes with both apktool versions for you to try one by one due to smaling problems.
**If you have doubts with my guide, check @Ticklefish 's SAME GUIDE FROM HERE!!
* Copy stat_sys_battery.xml and stat_sys_battery_charge.xml files from downloaded pack and paste into your decompiled SystemUI/drawable folder.
* go to res/values/public.xml and add following lines:
!! You will do it manually so find your last drawable hex code and continue to it.. Then save & close..
* copy 16 images into drawable/?dpi folder.. (your device resolution)
!No need to add image codes into public.xml .. Apktool will do it otomatically..
* copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)
and open KitKatBattery$1.smali file.
find .line 33 and .line 36 and change const v3, 0X.. with your public codes you created! Then save it.
* go back to res/layout/status_bar.xml and open it. find your " @id/battery " code line and change it with new following code:
An Example from Stock!!;
from this:
to this:
Warning! The magic is giving android:visibility="gone" to your original code to hide ex..
Also this will give you GravityBox (KK) support too !!
Save and close.
* All done. Recompile apk, test it and reply to topic for several devices!
---------
TESTED DEVICE RESULTS:
GENERAL MOBILE DISCOVERY MTK6589 AOSP KK 4.4.2
%100 works.. 16 icons √ 100+100 icons √ animated charging xml √
Note: If success I want you try with "your" 100 icons of stat_sys_battery_charge.xml file also with an animated one too..
Try and reply !
---No noob questions please---
---Try it with your own risk. Im not responsible for any damages---
Happy days!
As you know, changing the battery icon on a KitKat rom wasn't easy before..
Today I'm gonna guide you about start using your own icons back on KK.
Code:
--
APKTOOL
Decompiled SystemUI.apk
--
*Download the pack. Package includes ;
KitkatBattery_Erhany_apktool1 and KitkatBattery_Erhany_apktool2 folders. I decompiled java codes with both apktool versions for you to try one by one due to smaling problems.
**If you have doubts with my guide, check @Ticklefish 's SAME GUIDE FROM HERE!!
* Copy stat_sys_battery.xml and stat_sys_battery_charge.xml files from downloaded pack and paste into your decompiled SystemUI/drawable folder.
* go to res/values/public.xml and add following lines:
PHP:
<public type="drawable" name="stat_sys_battery" id="0xYOURCODE1" />
<public type="drawable" name="stat_sys_battery_charge" id="0xYOURCODE2" />
* copy 16 images into drawable/?dpi folder.. (your device resolution)
!No need to add image codes into public.xml .. Apktool will do it otomatically..
* copy erhany/ folder into decompiled .dex /com/ folder.. (long path: /com/erhany/KitKatBattery.smali & KitKatBattery$1.smali)
and open KitKatBattery$1.smali file.
find .line 33 and .line 36 and change const v3, 0X.. with your public codes you created! Then save it.
* go back to res/layout/status_bar.xml and open it. find your " @id/battery " code line and change it with new following code:
PHP:
<com.erhany.KitKatBattery android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" />
An Example from Stock!!;
from this:
PHP:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="4.0dip" />
to this:
PHP:
<com.erhany.KitKatBattery android:gravity="center" android:id="@id/battery" android:paddingLeft="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
Also this will give you GravityBox (KK) support too !!
Save and close.
* All done. Recompile apk, test it and reply to topic for several devices!
---------
TESTED DEVICE RESULTS:
GENERAL MOBILE DISCOVERY MTK6589 AOSP KK 4.4.2
%100 works.. 16 icons √ 100+100 icons √ animated charging xml √
Note: If success I want you try with "your" 100 icons of stat_sys_battery_charge.xml file also with an animated one too..
Try and reply !
---No noob questions please---
---Try it with your own risk. Im not responsible for any damages---
Happy days!
Attachments
Last edited: