[PORT] Display Percent Battery Left within Battery Icon - Fresh 2.1.2+

Search This thread

JsChiSurf

Inactive Recognized Developer
Feb 5, 2010
2,416
1,396
Hacksville
I've seen a lot of chatter regarding the desire to port over the mod that was created originally, I believe by PaY87, and then ported to the EVO by kubino99.

While I generally prefer to create my own stuff, versus porting other's work, there seemed to be enough demand / desire for this, that I decided to give it a try.

I take no credit for the original mod, which is quite smart in how it was done, rather, I simply cracked open the applicable framework file (services.jar) to try and determine what was modified, and then worked to incorporate these changes, which were vast into our CDMA Hero services.jar file.

This will NOT change your battery icon / graphic in any way, it will simply add, in white text, the percent battery left, inside of your existing battery icon. While this is nice to have, if you are like me, you are now going to drive yourself crazy watching the percent value tick down!

The linked zip files, to be flashed via recovery, as mentioned, modifies a framework file, and as such, your initial boot will take a while after flashing, as your dalvik-cache will get rebuilt. This was built off of the Fresh 2.3.3 services.jar file.

FYI, since this modifies the services.jar file, the same file contains a previous mod I had done for removing the clock from the taskbar. As such, if you still do not want the clock in the taskbar, you will have to flash the mod that contains both changes (included below).

Reference:
percent_battery2.png


Downlad Percent Battery Used Mod <--- Flash via Recovery

Downlad Percent Battery Used Mod + No Clock <--- Flash via Recovery
 
Last edited:

Papa Smurf151

Senior Member
Feb 24, 2010
5,643
6,741
Atlanta
thanks again jschisurf. Once again u out do most on this forum. Ur skills r unmatched. BTW I'm incorporating into both of my roms tonight. I've already flashed to my phone and it works perfectly
 

t12icky0

Senior Member
Mar 27, 2010
1,204
187
Shawnee, ks
Samsung Galaxy S22 Ultra
does this kill the battery in any way? im very tempted to flash this as it looks beautiful!


**EDIT** i flashed it and it did nothing to my battery icon. the same as before i flashed it!
 
Last edited:

primerib

Member
May 20, 2010
45
1
I downloaded but i havnt flashed yet.. what do i do if i dont like it.
how would i get my original display back?
 

primerib

Member
May 20, 2010
45
1
I flashed in recovery and there was no change when i rebooted.
im running fresh 2.3.3 with a 710 v4 kernel.

Edit: nevermind..upon a second reboot it worked..
idk..if it doesnt come up the first time..shut down and just reboot again.

ill give updates soon
* i dont know if its just the fact that i pulled my phone off the the charger after sending the file to sd but my batttery has dropped from 90 to 83 within a couple minutes
 
Last edited:

primerib

Member
May 20, 2010
45
1
I'm running 2.3.3 as well, so it should work for you. Are you plugged in by chance, or at 100% battery? You will only see a value when you are between 99% and 1%.

nevermind :p i realized i didnt unplug till the second reboot.
i dont know why i assumed i would see numbers while plugged in

lol i might just nandroid backup and wait till someone makes a version thats the just the circle.
its gonna kill me clicking the screen on just to see what number the batter says
 
Last edited:

JsChiSurf

Inactive Recognized Developer
Feb 5, 2010
2,416
1,396
Hacksville
so what does that mean? im not to familiar with the whole slang of things..lol.
You can read a little about odex verssus deodex ROMs in Flipz's post here.

What it comes down to, however, is deodexing allows us to then more easily modify the binaries (compiled executable code), to make the mods we make, then re-compile and release.
 

c00ller

Senior Member
Jun 10, 2010
2,054
321
In general can I assume that a mod working for Fresh will (or at least might) also work on other de-odexed Sprint-based ROMs?