yashsingh1/xdaforums huggingface dataset:
[Nexus 5 Themes and Apps] Nolimited:
I've rebuilt SystemUI.apk from source and change the color of the text.

Batterylevel:

>30% - Green

<30% & >15% - Orange

<15% - Red

But i've only tested it on pabx 4.4 AOSP for Xperia Z.

Just need to boot to recovery, mount system and then run adb:

adb shell
rm system/priv-app/SystemUI.apk
exit

adb push SystemUI.apk system/priv-app/SystemUI.apk
adb reboot

Only problem is, that there is some bug that causes the screenshot preview to be messed up.

But the actual screenshot image is fine.

Let me know if someone want to try it out.
[Nexus 5 Themes and Apps] AndroidRaven:
Can you explain a little more as to how to test this out on rooted stock?
[Nexus 5 Themes and Apps] Nolimited:
You need recovery, at least that's the only way i know how to flash SystemUI.apk.

I've updated the previous post with the apk now.

It's bacially the default SystemUI.apk but i've just added some lines of code.
[Nexus 5 Themes and Apps] jco23:
yup - we've got a genius in dhacker29....
[Nexus 5 Themes and Apps] Deeco7:
Great app! Okay, something unrelated, but didn't want to create another thread, just wanted to ask when data is syncing/pulling content is it normal that the upload/download icons not to appear in wifi/3g icon for KitKat?
[Nexus 5 Themes and Apps] jdjta:
Tried to install but there's no percentage after following these steps... <-- NVM, forgot to enable the percentage in the app :$

Something else: the command 'su' doesn't work in adb shell (/sbin/sh su:not found) but was still able to remove and push the new SystemUI.apk. At the end you need to use 'adb reboot' to make it work.
[Nexus 5 Themes and Apps] Nolimited:
I've change the guide now :)
[Nexus 5 Themes and Apps] cornelha:
Found something interesting. I noticed someone saying that the battery meter is now drawn programatically, so naturally I was curious and found what might be what we are looking for:

On lines 207 and 208 of BatteryMeterView.java we find this:

mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);

mTextPaint.setColor(0xFFFFFFFF);

The battery % TextView being set to White. I am not going to compile this myself, I just dont have the build system for it, but this could help other devs. If only it was a variable...
[Nexus 5 Themes and Apps] Nolimited:
Why don't you look at the source for BatteryMeterView.java the i've attached :)

It's not the original, but it's the one in my text-color mod :) Really simple :)

Also, i've rebuilt it to change color:

http://xdaforums.com/showthread.php?p=47406005&postcount=93
[Nexus 5 Themes and Apps] noodles2k:
Looks good, do you need to set the mTextColor for every level change? Otherwise it might be better to set it only in the if statement or outside it, when it changes you're setting three times in a row. Nothing wrong with it though.
[Nexus 5 Themes and Apps] Nolimited:
Yeah, i know. But it's just a integer so not an impact on performance, also it's not called that often.

This way i can handle sudden drops, like if where to go from 31% to 28% or something :)

But thank you for pointing it out :)
[Nexus 5 Themes and Apps] noodles2k:
Oops, I meant the mTextPaint.setColor method - it's getting called 4 times on a color change, but it's probably only an int setter so it shouldn't matter either.

It does seem to be calling the paint constructor twice if the color changes, which you probably don't need to either. Again, the code still works perfectly regardless. :)
[Nexus 5 Themes and Apps] vegalinho:
Has someone tested this on a N5?
[Nexus 5 Themes and Apps] Nolimited:
Just try it :) pull your default SystemUI.apk first

adb pull system/priv-app/SystemUI.apk defaultSystemUI.apk

It's builded from AOSP, so it should work.

Also signed with the same key as the AOSP. :)

If it don't work, statusbar and navigationbar will not show up. Just reboot into recovery and do the same steps again

but this time push the defaultSystemUI.apk :)

---------- Post added at 09:25 PM ---------- Previous post was at 09:15 PM ----------

Ops ^^ I was tired when i made that mod.

Just overlooked it.

The setColor should only be called if newColor is not equal to mTextColor.

In other words, if the color has change.

And also, we can't just change the color of a Paint object, we need to create a new.

So we are saving system resources and are in need for more or less no GC at all :)
[Nexus 5 Themes and Apps] noodles2k:
Didn't work on stock (which I kinda expected). Is it possible to sign it for stock? Looks great on aosp btw.

You can install it using the twrp file manager, but adb is probably simpler.

If your code's working then it looks like you can ;) :p

mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mTextPaint.setColor(0xFFFFFFFF);
...
mTextPaint.setColor(mTextColor);

It's funny how similar Google's coding convention is to Apple's iOS code, even though they're two complely different languages.
[Nexus 5 Themes and Apps] Nolimited:
I think i worked for [MENTION=605275]jdjta[/MENTION], but sure. He might not be using N5 stock.

N5 Stock isn't clean AOSP :P They have changed some stuff :P

So maybe they have signed it differently also

Yeah, i know there were to much "setColor" in my code. I had overlooked things.

I've fixed it now :)
[Nexus 5 Themes and Apps] gaosphappy:
Didn't work for me on rooted stock either. Also as expected. Great work all the same :thumbup:
[Nexus 5 Themes and Apps] nathanmiller:
Nice app. I will try this.
[Nexus 5 Themes and Apps] jdjta:
No, sorry...as stated in my signature I'm using a C6603 (Xperia Z) on AOSP 4.4 (PABx v3.3). It's working fine for me! Did you use the SystemUI.apk from v3.2 or v3.3 as base for your mod? And is there a difference between them?
[Nexus 5 Themes and Apps] Nolimited:
Sorry, didn't see that :P

I based it on Android 4.4 r1 AOSP from android.googlesource.com :P

That's why i thought it would work on N5 as well :)

i might be able to port it to N5 if i can get hold of a system.img to that phone :)
[Nexus 5 Themes and Apps] MaxDNet:
Lol does it have any real sense? You have a clear notification (plus red indicator) when battery is down to 14% over your phone, you have a visual leve over the battery icon and if you want to see the percentage and change your life dropdown the notification bar..

I'm glad i've not it over my battery.
[Nexus 5 Themes and Apps] Nolimited:
I've compared the SystemUI from AOSP to when one on N5 stock, and found that the one from N5 is about 700kb smaller.

N5's is also missing around 20-25 files (when decoded with apktool), and the files from N5 is also smaller.

So there is a big different, apparently. hm.

I've added my mod to the N5's SystemUI, but i can't sign it, because i don't have the key.

But i'll try to fix that :)
[Nexus 5 Themes and Apps] Quinny899:
Is it not platform key signed?
[Nexus 5 Themes and Apps] Nolimited:
I need the platform key from that rom to sign the SystemUI.apk, right?

I'm new to this thing :P

I've made apps for some year, but never system app or stuff like that :P
[Nexus 5 Themes and Apps] Quinny899:
https://play.google.com/store/apps/details?id=kellinwood.zipsigner2

Use that
[Nexus 5 Themes and Apps] Nolimited:
Funny thing is, i have it installed already :)

Used it for the SystemUI.apk i build for the rom i'm using.

I read somewhere that you build your roms with your own keys.

So i thought the zipsigner only signed with the keys for that rom it was running on :P

But here it is, N5 SystemUI.apk with colored battery-info, platform signed with zipsigner :)
[Nexus 5 Themes and Apps] Grakel:
Any chance we get a black text version?

I planned to do it myself, but right now I wont have the time. I kinda tried it already, but as the value is hard-coded and I cant seem to find a way to change the color in the smali code, I already gived up.

Is there anyway I can decompile SystemUI.apk to java and then recompile it back? I just know how to backsmali/smali.
[Nexus 5 Themes and Apps] Nolimited:
A back version is possible. Takes like 5 sec :P Also, dose this mean that the one in my prev post worked on N5? :)

Sure you can decompile it to Java, but it probably won't compile back.

Also, i wouldn't recommend downloading the source. Took me hours of manipulation before i got a sdk that would show the hidden api's required to compile >.<
[Nexus 5 Themes and Apps] Grakel:
Oh Im using a nexus4, but still didnt flash your mod.

Id really appretiate it if you made a black text mod of systemUI ^^
[Nexus 5 Themes and Apps] richardsb17:
Nexus 4 problems

The app works perfectly on my Nexus 4 but has the unusual side effect of changing the amount of apps per row in the app draw from 5 per row to 4 per row. This doesn't revert if I either turn it off our uninstall the app, apart from that it works perfectly! I am not running the ota of 4.4 if that makes a difference.

Thanks for making a great app! :)
[Nexus 5 Themes and Apps] kroegerama:
IMHO, it's impossible, that my app causes this problem...
[Nexus 5 Themes and Apps] gpvecchi:
That's because of the update of Google Search...
[Nexus 5 Themes and Apps] DoubleIk:
Working perfectly.

Thanks!
[Nexus 5 Themes and Apps] PigFire:
Thanks, great application.
[Nexus 5 Themes and Apps] HpNoTiQ56:
Hi,

I've tried it with no sucess on nexus 5 (statusbar and navigationbar did not show up) and i didn't back up the default ui.

I've just downloaded nexus 5 image and extract the default systemui.

The app to enable de battery percentage works good by the way but the color mod would be usefull!!
[Nexus 5 Themes and Apps] funtomi:
Thanks, it works with nexus 7 2012
[Nexus 5 Themes and Apps] Nolimited:
Which one did you try? :)

I've one on port 93 (page 10) that works for pabx's AOSP for Xpeira Z

Then i've one on post 118 (page 12) that is made from a extracted SystemUI, from N5 stock rom. :)
[Nexus 5 Themes and Apps] SunnyOK:
This is a very useful application. I like it. Thank you.

I would be grateful if somebody can share your change of text color on infuse4g.

A question: Instead of changing text color, how to change battery icon color?
[Nexus 5 Themes and Apps] McHale:
Read the very first post.
[Nexus 5 Themes and Apps] SunnyOK:
I read all posts one by one and no answer to my question on changing icon color was found. I even thought how to disable the internal battery display, and enable the third-party battery icons.

I have successfully compiled SystemUI.apk for infuse4g, based on Nolimited's SystemUI.apk. Thank you Nolimited!
[Nexus 5 Themes and Apps] Nolimited:
No problem. I'll extend the modification with ability to sett battery-color (from system settings that will have to be added for each rom)

and ability to select text-colors for the 3 states (High, medium and low %).

I'll start of by just making it (both battery-icon and system settings) for pabx XZ-rom and N5 Stock.

I might do it for N4 stock also.
[Nexus 5 Themes and Apps] chavocarlos:
Read again please, and pay attention to the FIRST POST... nah FIRST PAGE.
[Nexus 5 Themes and Apps] SunnyOK:
That is great! Thank you. Wait for your wonderful work.

---------- Post added at 09:13 AM ---------- Previous post was at 09:11 AM ----------

Thanks. I will revisit this and see what I have missed.
[Nexus 5 Themes and Apps] HpNoTiQ56:
I tried both and got the same result !
[Nexus 5 Themes and Apps] jtrentha:
Thanks for the app - works perfectly for me on rooted N5. For the record, the rendering of the percentage text also looks better on the phone (the text is sharper) than the screenshots posted.

Small suggestion: I discovered the battery percentage goes to a red exclamation point after 5% - maybe I'm alone in this but I think the app would be better for counting all the way down to 0%. I find it valuable to know exactly when I'm about to shut down! Case in point, my phone just died in the middle of first composing this message...... :)
[Nexus 5 Themes and Apps] diagrams:
good

大家好，这个是小尾巴哈
[Nexus 5 Themes and Apps] C4SCA:
This app only enables a hidden feature on android 4.4... So changing colors, chose to show the % until 0% and things like that cant be done.

sent from my NEXUS 4 tasting Kitkat for the first time.
[Nexus 5 Themes and Apps] Nolimited:
Yes i can. I'll just have to go in and change one value in the source code and then complie it :)

} else if (level <= EMPTY) {
final float x = mWidth * 0.5f;
final float y = (mHeight + mWarningTextHeight) * 0.48f;
c.drawText(mWarningString, x, y, mWarningTextPaint);

"EMPTY = 0x4;"

I'll just have to change that to "EMPTY = 0;" :)
[Nexus 5 Themes and Apps] Spannaa:
Thanks - this works fine on the Wi-Fi Nexus 7 2012 with 4.4 KRT16O.

Rather than change the colour of the battery percentage though, I'm building a VRTheme to change the colour of the battery, the clock and most of the other icons to ICS blue as I feel there's too much white.
[Nexus 5 Themes and Apps] homeslice976:
I just wanted to share this guide I put together for changing the digits' color.

http://xdaforums.com/showthread.php?t=2533912
[Nexus 5 Themes and Apps] PelegK:
Thanks a lot !

Works great with N4 with KitKat installed.
[Nexus 5 Themes and Apps] SunnyOK:
Great! Thanks.
[Nexus 5 Themes and Apps] kroegerama:
Just to ask:

Is anyone around here, who wants to help me translate the App (one short Sentence and the FAQ) to his/her native language?

That I've already got are:

- English

- German
[Nexus 5 Themes and Apps] SunnyOK:
Yes. I can translate into Chinese.

Attached is the version I used (version 1.0.1)
[Nexus 5 Themes and Apps] kroegerama:
Thank you, but please delete your attachment, as it contains a decompiled version of my app. If you want to translate, please use the attached .xml File.
[Nexus 5 Themes and Apps] SunnyOK:
Ok. Will do.

See attached xml file.
[Nexus 5 Themes and Apps] hoomanoid:
Hey man. I looked into your file, wanted to translate in Russian. But in English it looks muck more simple and readable. I wish there is no Russian in this app :D
[Nexus 5 Themes and Apps] Yukicore:
Could this setting affect the performance/battery life on my device?
[Nexus 5 Themes and Apps] kroegerama:
Thank you very much. Will update the App soon with your Strings :)

I don't think so, as it's only one function call more on each repaint. Your system does not redraw more often, when this setting is enabled.
[Nexus 5 Themes and Apps] Yukicore:
Okay, thanks. The setting is brilliant, I dont see the percentage when I don't need to, only approximate level, and when the battery is close to the end I can keep an eye out.
[Nexus 5 Themes and Apps] junkinmytrunk426:
great app! works fine for my nexus 4, 5 and 7(2013)
[Nexus 5 Themes and Apps] kroegerama:
New version is out, including two translations :)

Version 1.0.2

Added Translations:

Chinese (by [MENTION=3853873]SunnyOK[/MENTION])

Russian (by [MENTION=4353800]T.I.E.R.[/MENTION])

Added full FAQ

Reduced application size
[Nexus 5 Themes and Apps] cobyman7035:
does this mod have more battery drain then normal?
[Nexus 5 Themes and Apps] kroegerama:
See Post 151 ;)

Also, it's not a mod. It's a hidden system-setting.
[Nexus 5 Themes and Apps] gpvecchi:
My small contribution, italian translation...
[Nexus 5 Themes and Apps] kroegerama:
Thank you very much! Have added it to the app :)
[Nexus 5 Themes and Apps] cobyman7035:
Nice will try that app

installed it

so it only works when you have less than 10 percent battery?

Via Google voice Δ |\|€×u$™ 7 FHD on Tapatalk²
[Nexus 5 Themes and Apps] Yukicore:
You can Start reading the percentage when below about 49%
[Nexus 5 Themes and Apps] cobyman7035:
kinda of a pointless mod for me, i guess, i always try to keep my phone topped up on battery:confused:
[Nexus 5 Themes and Apps] Yukicore:
Not very healthy for the battery, the Li-ION battery has the best lifetime if you completely discharge and charge every time, at least most of the time, or a few times per month. Always keeping it charged is not worth it.

You can still doubleswipe from the top of the screen to see the battery percentage.

Just a heads up.
[Nexus 5 Themes and Apps] ldubs:
Actually this is not true...no need to fully discharge and recharge lion batts all the time

sent from my hammerhead
[Nexus 5 Themes and Apps] kroegerama:
And even more languages :)

1.0.4

Added dutch translation (by [MENTION=4938939]joris454[/MENTION])

Added arabic translation
[Nexus 5 Themes and Apps] gpvecchi:
I noticed that accented characters (à, è, é) are shawn incorrectly in the translation I made...
[Nexus 5 Themes and Apps] kroegerama:
No problem, you can send me a corrected version, if you want :)
[Nexus 5 Themes and Apps] diegofdg:
Working excellent on my Rarz HD with CM11 unofficial!!!

Thank you.
[Nexus 5 Themes and Apps] xgaboard:
I sent the translation of Korean.

Please check your E-mail.
[Nexus 5 Themes and Apps] gpvecchi:
Well I don't know how to correct, they shows up correctly in my string, I think it's because of a different ISO encoding...
[Nexus 5 Themes and Apps] marcosdemori:
[MENTION=2100288]kroegerama[/MENTION]

I did the translation into Portuguese of Brazil
[Nexus 5 Themes and Apps] 3Shirts:
Oh good, another ignorant person spreading misinformation about battery technology. Li-Ion batteries are best maintainted by keeping them topped up. Not constantly on charge (that IS bad for them) but ideally as full as you can. There is no need to discharge them at all and completely draining them regularly will shorten their life significantly:

http://arstechnica.com/gadgets/2011/02/ask-ars-what-is-the-best-way-to-use-an-li-ion-battery/
[Nexus 5 Themes and Apps] Yukicore:
This changes everything, but I've always heard that it's best to discharge them... And also wasn't nexus 4 battery Li-PO? Some sites say that, weird. Probably they have confused the names. Because on replacement battery it says Lithium Ion Polymer battery.

Does that mean that I have crippled my battery? Because I have usually tried so hard to discharge to about 10% and then only charge again.
[Nexus 5 Themes and Apps] kroegerama:
New version out, thank you all for your translations :)

Version 1.0.5

Fixed italian translation

Added spanish translation (by [MENTION=4274064]JoseBerga[/MENTION])

Added portuguese-brazil translation (by [MENTION=4111053]marcosdemori[/MENTION])

Added korean translation (by [MENTION=1951904]xgaboard[/MENTION])

(@gpvecchi: Is the italian translation correct now?)
[Nexus 5 Themes and Apps] 3Shirts:
Not necessarily, they are fairly resilient, but stop doing that. I tend to charge it overnight and occasionally during the day if it's getting low or I'm planning to be out late or needing to use it a lot.

Very rarely drops below 40% to be honest.
[Nexus 5 Themes and Apps] gpvecchi:
Great, Italian is fixed!
[Nexus 5 Themes and Apps] marcosdemori:
[MENTION=2100288]kroegerama[/MENTION]

Great, sorry to another translation I did but was not so good, I made some corrections and improvements in the translation of the Portuguese Brazil, is now better! :D

:victory:
[Nexus 5 Themes and Apps] aspot72:
Just wondering if there's something like this for 4.3?
[Nexus 5 Themes and Apps] kroegerama:
Yes, you can change the battery icons of SystemUI.apk on your System.

New Release:

Version 1.0.6

Added slovenian (by Tadej R.)

Added hebrew (by Tom G.)

Added polish (by MK)

Added japanese (by [MENTION=1951904]xgaboard[/MENTION])

Fixed portuguese-brazil
[Nexus 5 Themes and Apps] aspot72:
Well, I don't wanna change icon. I am after enabling the battery percentual status in status bar. Have stock 4.3.
[Nexus 5 Themes and Apps] fgr:
This would explain why there are no battery icons in the SystemUI.apk and when I put my custom ones in framework-res.apk, they are not displayed.

This is going to make doing the 1% circle battery mod much more difficult (if not impossible).
[Verizon Samsung Galaxy S 4] czonin:
Handing my S4 over to my boss who wants stock TW on it. I got the phone day 1 when it was released and put TWRP and have run some form of AOSP since then. What's a good TW ROM that close enough to stock? Also I know there was some stuff that broke rooting methods in the later builds we've gotten (ME7 I think?), will flashing these builds have any effect on my recovery/root?
[Verizon Samsung Galaxy S 4] Crawshayi:
I've heard Bonestock or Clean Rom are good TW roms, but as I have ME7 and a locked bootloader (I don't use Safestrap) I can't comment on them. If you flash ANY of the new updates you will lose the ability to unlock the bootloader, and will not be able to flash most roms anymore. If you use ME7, or to a lesser extent MI1, you can use Safestrap to flash roms, but will be severely limited on storage options.

Another thing you could do is flash back to MDK stock (what your phone originally came with), root it, freeze the updater apps, and hand it to him. It'll be bone stock without the risk of auto-updating.
[Nexus 5 General] shoco:
I noticed, as other people did too, that the display gets periodically dimmer during use.

What I've discovered is that the display suffers from some "major" brightness throttling, as soon as the CPU reaches around 50°C, the brightness of the display will start to drop from around 410 cd/m² while idle to around 350 cd/m², and will go as low as 300 cd/m² if temperatures remain high. You get to that kind of temperature in about 5 mins of browsing heavy sites (The Verge for example), so you almost never get to actually enjoy the full brightness of the display doing anything heavy.

Personally, 300 cd/m² is way too low for a smartphone, 400 cd/m² is really the minimum for comfortable viewing in sunlight, so this is a total dealbreaker for me.

They really should have gone with a lower ppi screen, 445 ppi is completely overkill compared to 300ish, would have improved performance, battery life, and they wouldn't have needed to throttle the brightness so bad. More isn't always better I guess :(
[Nexus 5 General] supercakefish:
If they didn't go with 445ppi screen then people would moan that the phone was last year's tech. Can't please everybody in this world. Plus, they wanted a 5" screen which needs a higher resolution otherwise the ppi would fall below the Nexus 4 - imagine the negative criticism that would create if this years phone had a worse display than last years!
[Nexus 5 General] xXxG0dzRAgexXx:
Yeah that wouldn't have been good at all. They have to go with the trend, and also yes I believe that the nexus is a consumer device but because its heavily used by developers like it should be, it will push them more to support XXHDPI displays. There are still many apps that aren't built with XXHDPI in mind and its ridiculous. Resources meant for 720p look awful on 1080p screens. Also I can see a huge difference between such PPI. Anyone who says they can't see the difference between 300ish PPI and 450ish must have terrible vision. I myself have pretty bad vision and can tell. I look at my old iPhone 4 sometimes (yes I was an iPhone owner :p how terrible) and my god that 320 some PPI looks really really bad compared to my One. Now we are getting to 1440p devices and that sounds crazy. Maybe. I will have to see for myself if 520+ PPI makes a difference to my One and soon to be nexus 5's 440+ PPI.
[Nexus 5 General] PhilipL:
Hi

How else do you cool a phone that is over heating? There is no active cooling in these devices (i.e. no fan) so the only way to cool the device down is to dial in lower numbers. LG have gone for turning down the LED back-light, which means the CPU can run faster than it might otherwise if it was being baked by the display.

LEDs also hate being hot as they start to age very quickly, so this may also be protecting the backlights. Also the panel uses a high voltage, something like 30 volts to drive the LEDs using a DC-DC convertor, these are not 100% efficient so produce heat as well, another reason it might need to turn the LEDs down. You can't have a slim sexy looking mobile device with 2GHz quad core processor running 100% flat out without it overheating, so passive cooling is used.

This isn't unique to this phone, and many devices uses passive cooling in this way, even my Ivy Bridge desktop computer with a fan has the ability to turn down the CPU clock to help prevent heating issues.

Regards

Phil
[Nexus 5 General] jodvova:
Galaxy S4's Chrome would enable auto-brightness when you open it even though the phone has full-brightness enabled.