For you today a detalied tutorial x adding stock battery percentage over the stock kitkat battery:
First, you have to know how to push files and decompile apk, or even create a flashable x it. Tutorial is for advanced users, developers and themers
This thread is not intended to provide zips, due to various roms around, so a wrong flashable will maybe lead to a fc or loosing some mods, or better if someone will do it, i will add it on first post (if comfirmed working).... credits given
let's start with it:
U need SystemUI.apk of course, decompile it.
1. go to \res\values\arrays.xml
Battery meter bolt pints builds the thunder when charging, so i made it bigger, copy all like above
2. go then to \res\values\colors.xml
Bolt color is thunder color when charging, i putted a 95% trasparent green(u can put whatever color you like)
3. now focus on \res\values\dimens.xml
second and third value is for battery dimension, i make it bigger as x screen to fit my bigger signal icon, u can do as x your needings
ignore fourth value(just copy paste it)
set last value to 0.0 as above
4. now open \res\values\strings.xml and find the string
5. last point go to \res\layout\status_bar.xml
Be Aware, for emoji reasons(otherwise above u will see emoji instead of code) remove the space in pasted text from :
android: orientation
android: paddingStart
android: paddingTop
Recompile it and it is done












Mod will work even u have applied imaged battery mod, so you can just add your preferred image battery
hope you enjoy.
Feel free to use this tutorial, it will work on other devices too , just some position corrections needed.
I will just ask credits, thanks.
First, you have to know how to push files and decompile apk, or even create a flashable x it. Tutorial is for advanced users, developers and themers
This thread is not intended to provide zips, due to various roms around, so a wrong flashable will maybe lead to a fc or loosing some mods, or better if someone will do it, i will add it on first post (if comfirmed working).... credits given
let's start with it:
U need SystemUI.apk of course, decompile it.
1. go to \res\values\arrays.xml
here you can set colors of battery for various levels, i leaved red when less then 5%, and white for others.<array name="batterymeter_color_values">
<item>#ffff3300</item>
<item>#ffffffff</item>
<item>#ffffffff</item>
</array>
<integer-array name="batterymeter_bolt_points">
<item>130</item>
<item>-146</item>
<item>392</item>
<item>-146</item>
<item>201</item>
<item>259</item>
<item>442</item>
<item>259</item>
<item>10</item>
<item>783</item>
<item>157</item>
<item>334</item>
<item>0</item>
<item>334</item>
</integer-array>
Battery meter bolt pints builds the thunder when charging, so i made it bigger, copy all like above
2. go then to \res\values\colors.xml
change above values as your likings, frame color is the grayed frame of the battery i have setted solid light grey insted of a semi trasparent stock, charge color tells you enough, no explanation needed<color name="batterymeter_frame_color">#ff999999</color>
<color name="batterymeter_charge_color">#ffffffff</color>
<color name="batterymeter_bolt_color">#f21eff00</color>
Bolt color is thunder color when charging, i putted a 95% trasparent green(u can put whatever color you like)
3. now focus on \res\values\dimens.xml
first value it is text dimension, ignore it as i mod it in last step<dimen name="status_bar_battery_text_size">11.0dip</dimen>
<dimen name="battery_icon_width">11.66dip</dimen>
<dimen name="battery_icon_height">17.33dip</dimen>
<dimen name="battery_icon_bottom_margin">0.33000004dip</dimen>
<dimen name="status_bar_battery_text_marginStart">0.0dip</dimen>
second and third value is for battery dimension, i make it bigger as x screen to fit my bigger signal icon, u can do as x your needings
ignore fourth value(just copy paste it)
set last value to 0.0 as above
4. now open \res\values\strings.xml and find the string
modify is as above as it will remove percentage from battery text<string name="status_bar_settings_battery_meter_format">%d</string>
5. last point go to \res\layout\status_bar.xml
and paste this:<LinearLayout android:gravity="center" android: orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android: paddingStart="2.0dip">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="3.0dip" layout="@layout/signal_cluster_view" />
<TextView android:textSize="@dimen/status_bar_battery_text_size" android:textColor="#ffffffff" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" android:importantForAccessibility="no" android:fontFamily="sans-serif" android:layout_marginStart="@dimen/status_bar_battery_text_marginStart" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/battery_icon_width" android:layout_height="@dimen/battery_icon_height" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:layout_marginStart="3.0dip" />
</LinearLayout>
in the textview content u can modify regarding your needings, text size,color, font and format.<LinearLayout android:gravity="center" android: orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android: paddingStart="2.0dip">
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="3.0dip" layout="@layout/signal_cluster_view" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/battery_icon_width" android:layout_height="@dimen/battery_icon_height" android:layout_marginBottom="@dimen/battery_icon_bottom_margin" android:layout_marginStart="3.0dip" />
<TextView android:textSize="10.33dip" android:textStyle="bold" android:textColor="#ff000000" android:layout_marginStart="-12.0dip" android: paddingTop="1.0dip" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" android:importantForAccessibility="no" android:fontFamily="sans-serif" />
</LinearLayout>
Be Aware, for emoji reasons(otherwise above u will see emoji instead of code) remove the space in pasted text from :
android: orientation
android: paddingStart
android: paddingTop
Recompile it and it is done
Mod will work even u have applied imaged battery mod, so you can just add your preferred image battery
hope you enjoy.
Feel free to use this tutorial, it will work on other devices too , just some position corrections needed.
I will just ask credits, thanks.
Last edited: