Things you will need
1. Apktool 2.0
2. NotePad ++
3. Xposed Installed on Your Mobile
STEPS :
1. Decompile your SystemUI.apk
2. Open the file (\SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali)
3. Find the Line(around at 36)
Replace with
Then find (around at 8511)
Replace with
Then find
Replace with
Then find
Replace with
4. Now add these lines below above line
5.Find around line 9033
replace with
and around line 9553
replace with
Note : the concept here is to replace all
with
6. extract and copy the attached smali.zip to /smali/com/
7.Open res/layout/msim_status_bar.xml or status_bar.xml
find
replace with
NOTE: android:layout_height="wrap_content" renders big battery icon you can instead use android:layout_height="18.dip"
8. compile the SystemUI
9. Now download OG BatteryMod and put it in (system\app) folder.
ORIGINAL GUIDE ADAPTED FOR MOTO G
BUGS :
0% text always in Quick Setting Battery Icon
Temporary Fix :
Disable the Text by : editing quick_settings_title_battery.xml
to
1. Apktool 2.0
2. NotePad ++
3. Xposed Installed on Your Mobile
STEPS :
1. Decompile your SystemUI.apk
2. Open the file (\SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali)
3. Find the Line(around at 36)
Code:
.field mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
Code:
.field mBatteryController:Lcom/ghareeb/BatteryMod/BatteryController;
Then find (around at 8511)
Code:
new-instance v0, Lcom/android/systemui/statusbar/policy/BatteryController;
Code:
new-instance v0, Lcom/ghareeb/BatteryMod/BatteryController;
Then find
Code:
invoke-direct {v0, v2}, Lcom/android/systemui/statusbar/policy/BatteryController;-><init>(Landroid/content/Context;)V
Code:
invoke-direct {v0, v2}, Lcom/ghareeb/BatteryMod/BatteryController;-><init>(Landroid/content/Context;)V
Then find
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/ghareeb/BatteryMod/BatteryController;
4. Now add these lines below above line
Code:
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/ghareeb/BatteryMod/BatteryController;
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
[color=red]const v4, 0x7f07002d[/color] # public id of battery
invoke-virtual {v0, v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
invoke-virtual {v3, v0}, Lcom/ghareeb/BatteryMod/BatteryController;->addIconView(Landroid/widget/ImageView;)V
5.Find around line 9033
Code:
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
Code:
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/ghareeb/BatteryMod/BatteryController;
and around line 9553
Code:
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
Code:
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/ghareeb/BatteryMod/BatteryController;
Note : the concept here is to replace all
Code:
Lcom/android/systemui/statusbar/policy/BatteryController
Code:
Lcom/ghareeb/BatteryMod/BatteryController
6. extract and copy the attached smali.zip to /smali/com/
7.Open res/layout/msim_status_bar.xml or status_bar.xml
find
Code:
<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" />
Code:
<ImageView android:id="@id/battery" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
NOTE: android:layout_height="wrap_content" renders big battery icon you can instead use android:layout_height="18.dip"
8. compile the SystemUI
9. Now download OG BatteryMod and put it in (system\app) folder.
ORIGINAL GUIDE ADAPTED FOR MOTO G
BUGS :
0% text always in Quick Setting Battery Icon
Temporary Fix :
Disable the Text by : editing quick_settings_title_battery.xml
Code:
<TextView android:gravity="top|center" android:layout_gravity="top|center" android:id="@id/text" android:layout_width="fill_parent" android:layout_height="wrap_content" style="@style/TextAppearance.QuickSettings.TileView" />
to
Code:
<TextView android:gravity="top|center" android:layout_gravity="top|center" android:id="@id/text" android:layout_width="0.0dip" android:layout_height="0.0dip" style="@style/TextAppearance.QuickSettings.TileView" />
Attachments
Last edited: