yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Themes and Apps] C4SCA:
https://play.google.com/store/apps/details?id=de.kroegerama.android4batpercent
[Nexus 5 Themes and Apps] michpo:
This is what I'm talking about, not compatible with HTC One (M7) Google Play edition...
[Nexus 5 Themes and Apps] solaxx:
Play Store says "Not compatible with your device" on LG G3 (Euro D855). Can you make this app avalaible for G3?
[Nexus 5 Themes and Apps] memogoren:
http://www.mediafire.com/?umxg6kpajbp5xpc

Try this.
[Nexus 5 Themes and Apps] solaxx:
Thanks, but it does not work (no percent in icons). I'll try later with another rom.

Thanks anyway.
[Nexus 5 Themes and Apps] Quinny899:
Does it not work or can you not see them? Are you on Android 4.4?
[Nexus 5 Themes and Apps] Fabio3105:
I've Moto X 2014 and the app work perfectly. thanks! :)
[Nexus 5 Themes and Apps] kroegerama:
Sorry for that. I got negative reviews from some users having your devices. They said, it won't work on these. So i chose to disable them.

But I enabled them now, so feel free to try. But please don't give it a bad review, if it doesn't work :p

And I've got a small update:

1.1 (b15)

Layout changes
[Nexus 5 Themes and Apps] titetanium:
Does this command work on 4.2.2? The apk from the OP has a parsing error, I'm guessing because it's set for 4.4+.
[Nexus 5 Themes and Apps] kroegerama:
No, it does not work on versions below 4.4.

The code for battery percentage (which is enabled by my app or this adb command) was added in 4.4, when the battery view switched to drawing by code instead of using images. Your system has a dedicated image for every battery level.
[Nexus 5 Themes and Apps] mirror0:
I always wanted to have the battery icon that shows the percentage. Thank You.
[Nexus 5 Themes and Apps] Keprygy:
ASUS ZenUI - not work (on KitKat)

Great idea, but it seems ASUS Padfone2 (and maybe others ZenUI phones) have non standard SystemUI.apk. Or ASUS programmers already enabled that function. One difference is percentage is written to the left from battery icon
[Nexus 5 Themes and Apps] Yaminashi:
Thank you so much.

I've always hated that stock android has never given us a battery percentage meter and I've always resorted to fiddling around with zooper widgets just to get a better handle on my battery.

This is perfect.
[Nexus 5 Themes and Apps] michpo:
Thank you very much :)
[Nexus 5 Themes and Apps] iamkoza:
thanks for making this app, works great on my n5! despite the small text size it beats having to swipe notification bar down twice (or using one - 2 finger swipe).
[Nexus 5 Themes and Apps] knski:
about battery percent text on Lollipop

Hi [MENTION=2100288]kroegerama[/MENTION]!

Can you add additional configuration in your application?

On Lollipop in /data/data/com.android.providers.settings/databases/settings.db

status_bar_show_battery_percent = 0 - as stock, without percent

status_bar_show_battery_percent = 1 - percent inside battery

status_bar_show_battery_percent = 2 - percent outside battery

THX
[Nexus 5 Themes and Apps] kroegerama:
Thanks for your request! Sure, I will check this out and push an update in a few hours :D

Edit:

Seems, this does NOT work on 5.0.1. What version do you have installed?

Edit2:

Latest source code of 5.0.2 [HERE] also still has two modes: Enabled and disabled. Where did you get your information from?
[Nexus 5 Themes and Apps] knski:
[MENTION=2100288]kroegerama[/MENTION],

Thank you for the quick response )

About my Android: 5.0.1, it values works on HTC One (m7)

Can you give me a version with two values so that I can check up on my phone?

Now I change these values by using a script. With your application it will be very easy.
[Nexus 5 Themes and Apps] kroegerama:
That's quite interesting, thanks. I will add this to my app as soon as possible. First I have to figure out, which devices have this special display mode. Then I can add a special menu for those devices.

Do you own any other HTC device? Maybe it also works on the M8?

I compiled a special version of my app for you to test. It sets the value to 2 if you enable the setting and to 0 if you disable it. Good luck ;)
[Nexus 5 Themes and Apps] knski:
[MENTION=2100288]kroegerama[/MENTION], Dankeschön

On HTC One application works well! Other devices with Lollipop do not have (

I will expect your application with a choice of two or three parameters.
[Nexus 5 Themes and Apps] lanyco:
Hi master.

I have a N9005 Note 3 with Lollipop and my number is wHite. In play store you say numbers in lollipop are black. What's is the problem:confused:
[Nexus 5 Themes and Apps] kroegerama:
I know about this problem. But I can't do anything about it, because it's your device manufacurer's fault.

As you may know, my app only enables a hidden setting. The icon is displayed by the Android system. So it's up to the manufacurer, how the icon is displayed. There is no way for me to change that.

Because of that, you also can uninstall my app after enabling the setting. The battery text will remain. If you later decide to disable the text, then you need to install my app once again and disable the setting.

Edit:

device manufacurer = Samsung. They decided not to update the Battery Icon code in their lollipop ROMs.
[Nexus 5 Themes and Apps] lanyco:
Ohh Samsung sucks. I don't uninstall your app. I am use it since kit kat. Thanks
[Nexus 5 Themes and Apps] NastyNeil:
This app is great on my Nexus 6. Well done!
[Nexus 5 Themes and Apps] UszkiX:
On my LG G3s/Beat does not percentages. and as having root when change text color?
[Nexus 5 Themes and Apps] evilrussian800:
Russian translation is bad. There are many grammatical and lexical errors. I fixed this.

New translation attached.

And thanks you for this app
[Nexus 5 Themes and Apps] rodrigo8458:
make it available to the maxx moto droid and turbo. The application is not available to be downloaded by our device via google play.
[Nexus 5 Themes and Apps] abu46:
why is the google play store showing as incompatible with my 4.4.3 htc one m7??
[Nexus 5 Themes and Apps] UszkiX:
Why this not works on LG stock 5.0.2?
[Nexus 5 Themes and Apps] Timmyfoxeh:
Play Store thinks it's incompatible with my HTC One M7 GPE having just updated to 5.1. It's always worked flawlessly with all previous Android versions!
[Nexus 5 Themes and Apps] sschlosnagle:
I have the m7 with a 5.1 GPE ROM as well.

The Play Store says that it is incompatible, but I installed the lastest version from the OP and it works perfectly.
[Nexus 5 Themes and Apps] Elting:
Will it have an effect on future OTA Updates?

I use a Nexus 6, 5.1.1, LMY47Z, no root.
[Nexus 5 Themes and Apps] Ben36:
Well it works on the M preview so so far so good

Sent from my Android M Nexus 5 yo!
[Nexus 5 Themes and Apps] jazzh:
Version 1.15b works finw on my stock android 5.1.1 Nexus 5.

However, I would like percentage to be beside battery icon, not inside, because it's hardly visible. Is ti doable?
[Nexus 5 Themes and Apps] zelzel:
not working on htc m8 (sprint) with gpe 5.1

app button seems to function ok but doesn't display % on status bar (only on lockscreen, which I believe was the default behavior regardless).
[Nexus 5 Themes and Apps] Ben36:
U did reboot yea?
[Nexus 5 Themes and Apps] giojie:
Not workinh

Not working for asus zenfone5 lillipop 5.0 (Root) SKU WW

Sory my Bad english
[Nexus 5 Themes and Apps] lord dredd:
Thanks for this :)
[Nexus 5 Themes and Apps] Alcarete96:
works on android M?
[Nexus 5 Themes and Apps] dja2002:
Yes
[Nexus 5 Themes and Apps] generationblue:
Can someone please tell me how to turn this off? I tried unticking and restarting and this doesn't work.
[Nexus 5 Themes and Apps] jmorgie:
not working Venue Lollipop

i installed on my Dell Venue 7040 [10"] running android 5.1; checked the check box. rebooted. doesnt show. looked again that the checkbox is checked. rebooted. no battery indicator. any thoughts?
[Nexus 5 Themes and Apps] kroegerama:
My thoughts are, that Dell changed too much in the SystemUI. The setting is simply ignored because of that.
[Nexus 5 Themes and Apps] NmeEcko:
Hey dev you rock samsung galaxy s6 edge here just picked it up, installed ur app works flawless thanks couldn't get it on play store for some reason but good ol q r code did thanks again good sir will be getting this for my m9 as well awesome thanks again
[Nexus 5 Themes and Apps] Macguyver1980:
Custom ROM

Hello,

To activate it in the custom ROM I'm doing, should I replace in the systemui.apk file the what is in the "res" repository to work? Thanks
[Nexus 5 Themes and Apps] dummyxl:
Hi there, it's not working on my Samsung s7.

Known issue? Or do i missing something?

What i did :

Installed

Activated

Reboot..
[Nexus 5 Themes and Apps] Jaizu:
This is for Nexus 5 man, Samsung uses Touchwiz not pure AOSP or Nexus rom
[Nexus 5 Themes and Apps] dummyxl:
Ok thank to bad. I saw users successfully using it on the Samsung s6
[Nexus 5 Themes and Apps] hanifvahora:
See it's working with nougat 7. ????
[Nexus 5 Themes and Apps] Paul3000:
It doesnt work on my device.

When i bought the phone(android 5.1) i had an indicator.

After i go back to reset and factory settings, the indicator dissapear.

I tried the app and put off/on its still not there.

Maybe some one can help me out?
[Nexus 5 Themes and Apps] alivisa:
I installed the app. It didn't work:rolleyes:

---------- Post added at 07:48 PM ---------- Previous post was at 07:46 PM ----------

What's your phone model?

You probably can activate it on battery setting
[Nexus 5 Themes and Apps] PJng89:
It worked on my Samsung A7 2016 when lollipop and marshmallow,

last week received nougat update, no longer work,

and battery icon look smaller compare on MM,

it is Samsung remove something?
[Nexus 5 Themes and Apps] RobertGStroupe:
how can I get the source code?
[Nexus 5 Themes and Apps] gelado:
Did it works on Oreo?
[Nexus 5 Themes and Apps] Quinny899:
It's built into Oreo, in the battery settings
[Nexus 5 Themes and Apps] gelado:
Actually not, at least on mine (Motorola Z2 Force). Only has the option to show it outside icon.
[Nexus 5 Themes and Apps] Quinny899:
That's the same option that this app toggled, they just changed how it's displayed
[Nexus 5 Themes and Apps] gelado:
Ok, but the app was created exactly to put the text inside battery icon. Battery text option was there since older versions of Android...
[Nexus 5 Themes and Apps] Quinny899:
No, the app was created to toggle the option. The option just so happened to place the battery text in the icon, the app doesn't do that itself it only changes a setting in Settings.System.

Android changed, not this app, so there's nothing broken to fix

And the option for separate text was NOT in AOSP. It was in some custom ROMs and in many manufacturer firmwares, but not AOSP
[Nexus 5 Themes and Apps] Power_Money:
Hallo
[Nexus 5 Themes and Apps] kuchynek:
Do not work on Android 10 (lg g8s) :( Is there any way to achieve the battery percentage instead of battery icon?
[Nexus 5 Themes and Apps] kroegerama:
See the first post, I added a mini-FAQ :)
[Nexus 5 Themes and Apps] dnlsmy:
How did you get this to work? Is there a hidden activity that you are starting or some hidden setting? Great work by the way!
[Nexus 5 Themes and Apps] Giuku:
white on white

Well white text on white battery it's not great, but I guess without root there's nothing more we can do. Thanks :)
[Nexus 5 Themes and Apps] Shamz84:
prefect, i was looking for something like this, lightweight and easy, only downside its in white, and can't see the text, but can't complain..

Thank
[Nexus 5 Themes and Apps] DoppelgängerGER:
Thanx for this tiny little app :) Greetings from BO to DO ;)
[Nexus 5 Themes and Apps] HDClown:
Is it possible to do a version that puts the percentage to the left of the battery icon as ##% or is that not a hidden setting like you used for displaying percentage inside of the battery?
[Nexus 5 Themes and Apps] :
Remove?

Stupid question: how to remove it?

I removed the app, rebooted, but the percentage is still shown....

Thanks!
[Nexus 5 Themes and Apps] benifactor:
Install the app again, unchecked the box.
[Nexus 5 Themes and Apps] five40:
Something so simple and Google still hasn't implemented it by default.

Thanks OP
[Nexus 5 Themes and Apps] c@p:
Is this working on SlimKAT for Mako.? I know that the Op wrote should work on all 4.4, but they changed some things and I want to be sure it works.

Gesendet von meinem Nexus 4 mit Tapatalk
[Nexus 5 Themes and Apps] kroegerama:
Just try it. Will not break anything :)
[Nexus 5 Themes and Apps] Otalgia:
It seems to be very cool :good:

Can I know how it work without root (even by private message if it's a secret ) ?

And when the phone is charging, there is a lightning on the battery icon. Is the number still here ? :confused:

sorry for my english
[Nexus 5 Themes and Apps] c@p:
Thank you, now I can confirm that it works - very nice! :thumbup:

Gesendet von meinem Nexus 4 mit Tapatalk
[Nexus 5 Themes and Apps] kroegerama:
It's no secret :D my app just changes a hidden setting, which is not accessible through the android settings menu. Because of that, you can uninstall my app after enabling the percent display and the setting will stay enabled ;)
[Nexus 5 Themes and Apps] viruz82:
After removing the app the percentage is still there. :eek:
[Nexus 5 Themes and Apps] kroegerama:
That's because the app changes a system setting. The app does NOT display the battery itself!
[Nexus 5 Themes and Apps] aooga:
Wait a minute. So 4.4 actually has this built in, just not enabled?

WHY GOOGLE???? :D
[Nexus 5 Themes and Apps] MrSpiceGuy:
[MENTION=2100288]kroegerama[/MENTION]:

Do you have a source code on github?

Would be interested how to enable this hidden feature
[Nexus 5 Themes and Apps] :
I am interested in this setting, but is there a way to disable it after enabling it? As you said you can run the app, delete it and it would still be there? Why not make something to go back to normal if someone wants to?
[Nexus 5 Themes and Apps] deanesn:
If you read a few pages back it says just to uncheck the box and reboot and then uninstall the app. This will remove the feature.
[Nexus 5 Themes and Apps] iTzGavin96:
Nice!

This.... is.... awsome!!!! great work dev- google needs to take lessons from you, almost 5 years of droid and we never have gotten battery percentage by stock!
[Nexus 5 Themes and Apps] martinezma99:
Fantastic work! Thank you!
[Nexus 5 Themes and Apps] Rhatfield25:
Like a dream!!
[Nexus 5 Themes and Apps] sonic_7:
can i ask to you the name of that weather widget? :D

[MENTION=2100288]kroegerama[/MENTION] is possible to make the same app, with coloured %, for who has a rooted device?

if you don't want to root your device, you could explain how the system file has to be edited, then the mod can be posted in the modding section :)
[Nexus 5 Themes and Apps] TheMentalGoose:
The SystemUI Apk value?

Hi, using this app at the moment (i'm on a N4 with a CM11 early build on, but works perfectly)

Out of curiosity, where is this hex value in the SystemUI.apk? I have the apktool file, and thought might as well have a go and changing it. Any id's or locations in it's directory?
[Nexus 5 Themes and Apps] kroegerama:
It's no id in a xml file. It is hard coded in the java code. See Line 208 in this file.
[Nexus 5 Themes and Apps] Bierfreund:
I personally would not mind flashing a modded SystemUI.apk, but if it must changed directly in java source, just decompiling will not help as far as i know.

Maybe someone with more knowledge than o have will make a modded SystemUI.apk sometime. Nevertheless, thanks for the info, kroegerama.
[Nexus 5 Themes and Apps] indelible:
how do i install this? trying to drag and drop the apk from my computer onto the phone but it wont let me, phone is in MTP mode.
[Nexus 5 Themes and Apps] detdett:
You read the op...
[Nexus 5 Themes and Apps] indelible:
care to highlight/bold what i'm missing?
[Nexus 5 Themes and Apps] detdett:
Just open your phone's browser and download the apk.
[Nexus 5 Themes and Apps] tonyp:
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:

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

disable:

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:

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.
[Nexus 5 Themes and Apps] ketjr81:
If you can't transfer the apk over USB, use the XDA app or open XDA in your phones browser to download and install.
[Nexus 5 Themes and Apps] Bierfreund:
tonyp, can you maybe help where in smali this has to be changed?

kroegerama already told us, where change in the java source:

I already have decompiled SystemUI.spk and had a look in BatteryMeterView.smali but i can't figure out what to change.

You can find BatteryMeterView.smali here: http://pastebin.ca/2475054
[Nexus 5 Themes and Apps] :
Does showing the battery percentage use more battery because the system is constantly showing the status? I tried out the battery display and felt that I could almost watch the percentage drop where all day I have seen a slow decrease with moderate usage
[Nexus 5 Themes and Apps] Kurotsuchi:
even I don't have enough money to buy this phone :(

but nice job buddy! really nice job
[Nexus 5 Themes and Apps] occtec:
+Kroegerama thanks for this awesome little mod, world flawlessly. Cheers, :beer:
[Nexus 5 Themes and Apps] t0lkien1:
Following this commit, do you think there is a future possibility for Google to expose the text colour to the UI for changing in a setting somewhere? Is that part of the intent of this?
[Nexus 5 Themes and Apps] mumpfpuffel:
Well, the charging icon already uses the "right" colour styling for this use case, so I'm guessing it's just a case of deciding when to switch over to which percentage and which of the "foreground" colours to use.
[Nexus 5 Themes and Apps] johhn:
just installed battery widget reborn, which comes with the lovely looking circle icon showing battery percentage.

will find out if it drains the battery later on.
[Nexus 5 Themes and Apps] t0lkien1:
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.
[Nexus 5 Themes and Apps] geminy4ever:
not the only useful option that is missing :)
[Nexus 5 Themes and Apps] GrandMstrBud:
How empty is empty enough? Installed and rebooted and no percentage
[Nexus 5 Themes and Apps] kroegerama:
50 %? See first post for screen shots ;)
[Nexus 5 Themes and Apps] mumpfpuffel:
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".
[Nexus 5 Themes and Apps] pandacookie:
Sorry if I seem rude, but what good is this if it is white text on a white battery and can only see it if it is "empty enough"? Why not take the time to decompile and edit the text? Sure, it takes a while, but it will be worth it to have a percentage all can see.
[Nexus 5 Themes and Apps] Quinny899:
It would be a different systemUI for every device. An app can't change that, and it would take too much time to do it for everyone
[Nexus 5 Themes and Apps] pandacookie:
Okay. Didn't realize he did this for other phones.
[Nexus 5 Themes and Apps] xybur:
Not quite perfect but it works considering the circumstances. Thanks for the effort.

Sent from my Nexus 5
[Nexus 5 Themes and Apps] davitdavtyan@gmail.com:
Thank you very much !!!!
[Nexus 5 Themes and Apps] bleuiko:
It seemed that way at first too, but IMHO after a while you learn to stop thinking about battery % when it is above halfway and only think about it when it is getting lower and the numbers show up. I think the design thinking from Google to not include battery % is both a hardware issue (different manufacturer have different battery specs that might not allow 1% increments) and so that the users don't worry about battery life and just use the android devices whenever they need them.
[Nexus 5 Themes and Apps] luisjoseb:
Thanks, work fine in my Nexus 4 with KitKat
[Nexus 5 Themes and Apps] _Sparks:
You know its actually a neat idea. You don't need to generally be concerned with the battery percentage when its above 50, below that you might need to start getting concerned so it starts showing the percentage.

If you are really really concerned there's always a option to view it in Quick settings!

I'm not sure if Google meant this or if its an unfinished feature, so they might change the percentage text colour later.
[Nexus 5 Themes and Apps] baliriot:
works with my nexus 4, cm11 kitkang :good:
[Nexus 5 Themes and Apps] jonnyg1097:
It be great if you could change the colours on this to something if your preference but it is a cool thing nontheless.

Thanks!
[Nexus 5 Themes and Apps] VivaErBetis:
Thanks for the app. I think it should be a good idea to make it available at Google Play.
[Nexus 5 Themes and Apps] rameshchowdhary:
Thanks works like a charm
[Nexus 5 Themes and Apps] InfinitiGuy:
This is great. I don't like to run additional battery monitor apps.
[Nexus 5 Themes and Apps] Aldo72:
Thanks

Thanks, awesome app....:)
[Nexus 5 Themes and Apps] rossikwan:
Thanks, it's what I want from day 1 taking N5 on hand with stock ROM :D
[Nexus 5 Themes and Apps] ttg:
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.
[Nexus 5 Themes and Apps] OneOfOne:
I beleive hd widgets does this as an option. I know mine does.
[Nexus 5 Themes and Apps] medhinou:
Thanks you, i will link you to our french blog for this great tweak. I assume this is a hidden feature of android 4.4 no ?

BR

---------- Post added at 10:36 AM ---------- Previous post was at 10:06 AM ----------

And voilà i submit your tutorial tp french people with link to your topic : i can't post link but you can go at DroidSoft.fr.

Thanks again !
[Nexus 5 Themes and Apps] kroegerama:
Correct :) thanks for your link.
[Nexus 5 Themes and Apps] jwats01:
Great work! Thanks.
[Nexus 5 Themes and Apps] keyra74:
thx!!! that's exactly what i needed on my nexus 4
[Nexus 5 Themes and Apps] 1Chef:
Working really well on my nexus 4 (nexus 5 port ROM) tapatalk won't let me thank you, so thanks for this.
[Nexus 5 Themes and Apps] jco23:
this worked on my Razr M, thanks!
[Nexus 5 Themes and Apps] phositadc:
RAZR M has KitKat?

Sent from my Nexus 5
[Nexus 5 Themes and Apps] alicepattinson:
worked perfectly! thank you soooooooo much
[Nexus 5 Themes and Apps] meZQureshi:
Thank you for screenshot. Developer was too busy to provide a good screenshot.
[Nexus 5 Themes and Apps] quanfd2:
works on KRT16M for E975 version F180K :) TKS