Jump to content

[mod] services.jar with battery percent


Recommended Posts

Guest xkonni
Posted (edited)

Applying this to the disassembled services.jar found in EPE54B got me a services.jar with battery percentage.

Tested it a bit and this time it seems to be stable.

This works in rooted stock roms and MCR - NOT in the desire rom!

Taking no responsibility, always do a backup first!

Unzip and push to /system/framework.

There are 2 versions, one with white text and a regular one.

Preview:

batt_percent.png

I did not write this code, i only copied it and compiled. All props go to canadiancow!

services.zip

services_white.zip

Edited by xkonni
Guest commodoor
Posted
Applying this to the disassembled services.jar found in EPE54B got me a services.jar with battery percentage.

Tested it a bit and this time it seems to be stable.

Taking no responsibility, always do a backup first!

Unzip and push to /system/framework.

There are 2 versions, one with white text and a regular one.

Preview:

batt_percent.png

I did not write this code, i only copied it and compiled. All props go to canadiancow!

Nice thnx, i read it but never compiled it nor i tried it. Can we just use update method to use it?

Guest xkonni
Posted
Nice thnx, i read it but never compiled it nor i tried it. Can we just use update method to use it?

download, unzip.

make a backup of the existing file, like

adb pull /system/framework/services.jar services.bak

and push the new one over

adb remount

adb push new-services.jar /system/framework/services.jar

adb reboot

first boot might take a little longer than usual.

Guest commodoor
Posted
download, unzip.

make a backup of the existing file, like

adb pull /system/framework/services.jar services.bak

and push the new one over

adb remount

adb push new-services.jar /system/framework/services.jar

adb reboot

first boot might take a little longer than usual.

Thnx gonna try it when i'm home (working right now <_< )

Guest janjan2
Posted (edited)
download, unzip.

make a backup of the existing file, like

adb pull /system/framework/services.jar services.bak

and push the new one over

adb remount

adb push new-services.jar /system/framework/services.jar

adb reboot

first boot might take a little longer than usual.

not working for me. frezz on first boot . Using Alpha 12

Edited by janjan2
Guest commodoor
Posted
not working for me. frezz on first boot . Using Alpha 12

I think its a little different on Desire Roms because the customization off HTC (that's why i bought Nexus). anyways this is only tested on CM Rom. and maybe will work on MCR 1.8 but not sure.

Guest xkonni
Posted
I think its a little different on Desire Roms because the customization off HTC (that's why i bought Nexus). anyways this is only tested on CM Rom. and maybe will work on MCR 1.8 but not sure.

yep, correct.

updated first post so no other desire rom users fall for this.

i guess i should have said this before, but i hope you did a backup <_<

Guest janjan2
Posted
yep, correct.

updated first post so no other desire rom users fall for this.

i guess i should have said this before, but i hope you did a backup <_<

Yeh i push the old one ye ye :mellow:

Guest igotnexusone
Posted
Yeh i push the old one ye ye <_<

Any chance you can merge these changes with the trackball notifications services.jar?

Guest Bay Harbor Butcher
Posted

Is that jar the same I suggested yesterday?

Does it look like different than in my N1 due to theme that you are using?

Thanks to Canadiancow..

Guest xkonni
Posted (edited)
Any chance you can merge these changes with the trackball notifications services.jar?

you mean the notification in succession one?

last i heard that wasn't really stable. but i'll look into it <_<

Is that jar the same I suggested yesterday?

Does it look like different than in my N1 due to theme that you are using?

Thanks to Canadiancow..

thats a stock jar, modified according to the one from canadiancow, that someone around here mentioned yesterday. not sure who it was.

you should see a white number on top of your battery, rest is my own customisation :mellow:

Edited by xkonni
Guest igotnexusone
Posted

you mean the notification in succession one?

last i heard that wasn't really stable. but i'll look into it <_<

Yep - the lastest version of notification in succession for trackball has been flawless - I've been running it since early last week and frankly find this ability to be the single greatest feature on my nexus one. I was able to setup custom colors for missed calls/sms from my wife etc.

That said, adding the battery percent would make my nexus one even better.

Thanks for looking into it.

Guest pabbas
Posted

My battery bar still the same. I'm using Nexus One Stock EPE

Guest xkonni
Posted
My battery bar still the same. I'm using Nexus One Stock EPE

and you're sure you pushed it right? and pulled off the charger? it only shows when its disconnected.

do adb shell ls -l /system/framework

and see if its modified, or you misstyped it and got 2 different services now.

Guest Aaron Taulbee
Posted
Applying this to the disassembled services.jar found in EPE54B got me a services.jar with battery percentage.

Tested it a bit and this time it seems to be stable.

This works in rooted stock roms and MCR - NOT in the desire rom!

Taking no responsibility, always do a backup first!

Unzip and push to /system/framework.

There are 2 versions, one with white text and a regular one.

Preview:

batt_percent.png

I did not write this code, i only copied it and compiled. All props go to canadiancow!

While file in the classes.dex did you modify?

Guest xkonni
Posted (edited)
While file in the classes.dex did you modify?

xxdiff is a mighty tool,

xxdiff services-{mod,cm}/**/status

turned up 3 changed files, IconData.smali, StatusBarIcon.smali, StatusBarPolicy.smali.

i replaced the stock ones almost completely.

ps using zsh, not sure if that would work in other shells.

Edited by xkonni
Guest Aaron Taulbee
Posted
xxdiff is a mighty tool,

xxdiff services-{mod,cm}/**/status

turned up 3 changed files, IconData.smali, StatusBarIcon.smali, StatusBarPolicy.smali.

i replaced the stock ones almost completely.

ps using zsh, not sure if that would work in other shells.

Thanks, I used your 3 modified .smali's and put them in Enom's 1.7.1 services.jar and its working great! Thanks!

Guest xkonni
Posted
Thanks, I used your 3 modified .smali's and put them in Enom's 1.7.1 services.jar and its working great! Thanks!

nice... <_<

does enomther modify services.jar for anything? it could as well be stock too...

Guest Bay Harbor Butcher
Posted

Is it possible to create a version working in Desire Alpha14?

Guest xkonni
Posted (edited)
Is it possible to create a version working in Desire Alpha14?

maybe. but i do not intend to flash it anytime soon.

if you want to, i can create a version that 'should' work and upload it. but you have to do the testing <_<

edit: okay, i tried but the StatusBarPolicy.smali is crowded with HTC stuff and i dont think i can manage to merge the changes in there without messing it all up... ;(

Edited by xkonni
Guest Bay Harbor Butcher
Posted
maybe. but i do not intend to flash it anytime soon.

if you want to, i can create a version that 'should' work and upload it. but you have to do the testing <_<

edit: okay, i tried but the StatusBarPolicy.smali is crowded with HTC stuff and i dont think i can manage to merge the changes in there without messing it all up... ;(

Thus you think it is impossible to do?If you ask help to Paul,can you fix this status bar problem?

Guest xkonni
Posted
Thus you think it is impossible to do?If you ask help to Paul,can you fix this status bar problem?

its certainly not impossible. but its a big mess.

that files contains about 4000 lines of assembler code and i am not an expert on that <_<

i do not know how good paul is at this, of if he got time to try it.

if i get bored, i might flash a desire rom and play around with it. but i can not do this without testing and probably producing some failures ;p

Guest pabbas
Posted
and you're sure you pushed it right? and pulled off the charger? it only shows when its disconnected.

do adb shell ls -l /system/framework

and see if its modified, or you misstyped it and got 2 different services now.

Yes I pushed it, checked with adb and its the newest file. Only 1 services.jar in there.

Just tried it again now, and still no changes. Anything else I should do?

thanks

Guest Bay Harbor Butcher
Posted
its certainly not impossible. but its a big mess.

that files contains about 4000 lines of assembler code and i am not an expert on that <_<

i do not know how good paul is at this, of if he got time to try it.

if i get bored, i might flash a desire rom and play around with it. but i can not do this without testing and probably producing some failures ;p

Ok,thanks..now I have Cyanogen rom but I'm thinking about flashing Desire rom..I'm only waiting for a stable and issue free rom.

If you try in Desire rom please update this thread..thanks..

Guest xkonni
Posted (edited)
Yes I pushed it, checked with adb and its the newest file. Only 1 services.jar in there.

Just tried it again now, and still no changes. Anything else I should do?

thanks

thats quite strange. when replacing services.jar it either badword up the entire system cause you did something wrong or it works <_<

i suppose you rebooted already, maybe oush and reboot again.

or compare md5sums:

ls -lc7c2d1dae0dfd9f819edc7f26ad0d0c5 services.jar

2ddbb01c29a23bde69bf540191f9d713 services-white.jar

edit the board censored me! badword... ;D

Edited by xkonni

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.