• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP] Enable Battery Percentage (Android 4.4) [NO ROOT]

Search This thread

kroegerama

Senior Member
Just install my App and click on "Enable Battery Percent". Then reboot. You can uninstall the App afterwards. The setting will remain :)

On Android KitKat, you can only see the battery percent text, if the battery is empty enough. (White text on white battery!)

FAQ:
Do I need a rooted device?
No, should work on any 4.4+ device :)

Can you change the text-color?
Sorry, this is impossible with a simple app like this one, because the color is hard-coded in SystemUI.apk. You need to decompile that apk, edit one line of source code and then recompile it. Actually, I don't plan to do this, because I don't like to change system-apps. Also, the OTA-Updates from google would fail after that and it would require root.

After removing the app the percentage is still there. :eek:
That's because the app changes a system setting. The app does NOT display the battery itself!

I uninstalled the App. Now I want to disable the percent display.
Ok, just install the App again, uncheck the setting and uninstall it.


Current Version: 1.1 (b15)

Screenshots:
Android KitKat (4.4.x):
kitkat.png
Android Lillipop (5.0.x):
lollipop.png

Changelog:
1.1 (b15)
  • Layout changes
1.1 (b12)
  • Finnish (by Miska M.)
  • Turkish (by Furkan M.)
  • New launcher icon
1.1 (b11)
  • Hungarian (by @Davidsolo)
  • Credits to all translators (see Menu)
  • Added System-Info (see Menu)
1.0 (b10)1.0.8
  • Added Georgian (by @giokaxo)
  • Added Portuguese-Portugal (by @xonaecom)
  • Fixed French
  • Fixed Hebrew
1.0.7
  • Added Catalan (by Pere P.)
  • Added French (by Nicolas B.)
1.0.6
  • Added slovenian (by Tadej R.)
  • Added hebrew (by Tom G.)
  • Added polish (by MK)
  • Added japanese (by @xgaboard)
  • Fixed portuguese-brazil
1.0.5
  • Fixed italian translation
  • Added spanish translation (by @JoseBerga)
  • Added portuguese-brazil translation (by @marcosdemori)
  • Added korean translation (by @xgaboard)
1.0.4
  • Added dutch translation (by @joris454)
  • Added arabic translation
  • Changed app icon
1.0.31.0.2
  • Added Translations:
  • Added full FAQ
  • Reduced application size
1.0.1
  • changed the two buttons to one checkbox :D


Want to help me translate?:
Just translate this file and send it to me: View attachment strings-en.zip

This app is available in the Play Store:
If you want an easy way to install this app, SEE HERE

 

Attachments

  • battery.percent.1.1.b11.apk
    83.5 KB · Views: 51,220
  • battery.percent.1.1.b12.apk
    113.9 KB · Views: 7,514
  • battery.percent.1.1.b15.apk
    84.7 KB · Views: 29,017
Last edited:

kroegerama

Senior Member
Not possible to change the hex value to zero for black text :) ?
Sorry, this will be only possible, if we decompile the system-app, change this value and recompile it again. This is much more work, as you have to change an entire system application.
My app only changes one hidden setting, which will in no way affect any part of the system. Also, it should work for non-rooted devices too...
 
  • Like
Reactions: travperk

mjs2011

Senior Member
May 25, 2011
5,014
1,870
Oh, could that be the problem? I'm at 82%. But if it's white on white it obviously won't show up.
 
  • Like
Reactions: ridobe

dagaetch

Senior Member
Apr 8, 2010
270
92
well done sir, thank you. This will help tide me over until xposed is working and I can customize everything :)
 

Jeimygirl

Senior Member
Mar 25, 2010
463
98
Jax
FYI: when I click on your pictures it force closes my XDA app.

Sent from my Nexus 5 using xda app-developers app
 

MistaJae

Senior Member
May 4, 2010
355
62
The app works perfectly. Shame the text is white though. Good work from the dev!
eqyryqud.jpg


Sent from my Nexus 5 using Tapatalk
 

agalvin13

Senior Member
May 16, 2012
358
55
Just install my App and click on "Enable Battery Percent". Then reboot.

You can only see the battery percent text, if the battery is empty enough. (White text on white battery!)

Current Version: 1.0.1

Changelog:
1.0.1
- changed the two buttons to one checkbox :D

Screen shots:
49 percent:
View attachment 2377937
39 percent:
View attachment 2377936
28 percent:
View attachment 2377960

Is there no way to get a black text version? It would make me soo happy
 
G

GuestK00431

Guest
Able to set it for different colours or make it black with white outline. Solves both problems with the colour.



Sent from my Nexus 5 using Tapatalk
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 358
    Just install my App and click on "Enable Battery Percent". Then reboot. You can uninstall the App afterwards. The setting will remain :)

    On Android KitKat, you can only see the battery percent text, if the battery is empty enough. (White text on white battery!)

    FAQ:
    Do I need a rooted device?
    No, should work on any 4.4+ device :)

    Can you change the text-color?
    Sorry, this is impossible with a simple app like this one, because the color is hard-coded in SystemUI.apk. You need to decompile that apk, edit one line of source code and then recompile it. Actually, I don't plan to do this, because I don't like to change system-apps. Also, the OTA-Updates from google would fail after that and it would require root.

    After removing the app the percentage is still there. :eek:
    That's because the app changes a system setting. The app does NOT display the battery itself!

    I uninstalled the App. Now I want to disable the percent display.
    Ok, just install the App again, uncheck the setting and uninstall it.


    Current Version: 1.1 (b15)

    Screenshots:
    Android KitKat (4.4.x):
    kitkat.png
    Android Lillipop (5.0.x):
    lollipop.png

    Changelog:
    1.1 (b15)
    • Layout changes
    1.1 (b12)
    • Finnish (by Miska M.)
    • Turkish (by Furkan M.)
    • New launcher icon
    1.1 (b11)
    • Hungarian (by @Davidsolo)
    • Credits to all translators (see Menu)
    • Added System-Info (see Menu)
    1.0 (b10)1.0.8
    • Added Georgian (by @giokaxo)
    • Added Portuguese-Portugal (by @xonaecom)
    • Fixed French
    • Fixed Hebrew
    1.0.7
    • Added Catalan (by Pere P.)
    • Added French (by Nicolas B.)
    1.0.6
    • Added slovenian (by Tadej R.)
    • Added hebrew (by Tom G.)
    • Added polish (by MK)
    • Added japanese (by @xgaboard)
    • Fixed portuguese-brazil
    1.0.5
    • Fixed italian translation
    • Added spanish translation (by @JoseBerga)
    • Added portuguese-brazil translation (by @marcosdemori)
    • Added korean translation (by @xgaboard)
    1.0.4
    • Added dutch translation (by @joris454)
    • Added arabic translation
    • Changed app icon
    1.0.31.0.2
    • Added Translations:
    • Added full FAQ
    • Reduced application size
    1.0.1
    • changed the two buttons to one checkbox :D


    Want to help me translate?:
    Just translate this file and send it to me: View attachment strings-en.zip

    This app is available in the Play Store:
    If you want an easy way to install this app, SEE HERE

    32
    As no one is answering the question about the new hidden option, allow me:
    It's status_bar_show_battery_percent

    It's been introduced into kitkat here:
    https://github.com/android/platform_frameworks_base/commit/dfaf3bdeeb21c8421074c70d82642612bcdd8e98
    Oh and btw, this commit is the reason the old batterypercentage mods don't work anymore where you could simply decompile the framework and replace the files - the battery images get drawn programmatically now.


    Oh and you can enable/disable the battery percentage via adb if you'd prefer that (reboot required):

    enable:
    Code:
    adb shell content insert --uri content://settings/system --bind name:s:status_bar_show_battery_percent --bind value:i:1

    disable:
    Code:
    adb shell content insert --uri content://settings/system --bind name:s:status_bar_show_battery_percent --bind value:i:0

    You can just fire a "adb reboot" to reboot then.
    I haven't tested it, but it should be enough to symply restart the SystemUI instead of a reboot as well:
    Code:
    adb shell pkill com.android.systemui


    Last but not least: Guys, stop demanding a color change. It isn't possible without some deeper SystemUI hacks.
    Decompiling and changing the color value in smali should work, but it's great to at least have a way which works without rooting or messing with system files.
    There's no reason to downvote this thread, that Google has hardcoded it isn't the OPs fault.
    10
    While the solution here is fully stock (and as such has its greatness) if anyone want more customizable solution (at a cost of some memory and processing power of your powerful N5 :) ) I've made an app to show percent as overlay...

    https://play.google.com/store/apps/details?id=com.talaviram.overlaypercent

    It has some nice additional features I missed like notification sound when disconnect/connect to charger and etc... :)

    As this is overlay it's a little limited and movement or ducking is by guess what's the system gonna do next but still I think it's better than nothing.
    4
    FYI: when I click on your pictures it force closes my XDA app.

    Well, you should send a bug report to the creator of that XDA app ;)
    3
    You know, it's really odd Google haven't baked in an option to display battery percentage on the icon. It's such an obviously needed and useful option.

    I'm guessing they're arguing "users don't really need to know more than "fully charged", "well charged", "halfway empty", "getting low" and "find a charger, kay".