Android OS Forum banner
1 - 20 of 85 Posts

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #1 ·
Let me start by saying that I have been kinda blasted for bringing this up in different threads of these 2nd init roms and am not looking for that here. I'm trying to understand this a little better and find out if there is anyone looking into it. This is a feature of the Froyo based 2nd init roms I miss. (and others do as well)

Is there a way to get the 2nd init roms to report in 1%? I know that on the 602 blur based roms (Shuji,SSM,Vortex) they report in 10% BUT battery widgets such as battery monitor and moto charge will give you 1%. Now switch to roms such as CM7 and MIUI on the GB kernel, and you get 10% and that's it. If you use things like those battery widgets I mentioned, you get readouts like 148293406%. I'm trying to figure out why that is. In the froyo versions it was as easy as adding a line to the build.prop file. But the GB kernel is not being very nice or cooperative about it. Is it something in the way the bootloader is hijacked on this kernel? Is it something in the build.prop file that is preventing it? Or is it something just can't be figured out and fixed?

I guess I'm asking for myself. Maybe to see what I can do to help figure it out. Maybe to see if it's even possible. Or maybe just to learn a little more about the way things work. Whatever way it is, if all you're gonna do is blast me as well, then please don't bother to reply. I do not want to start a words war about something like this. I'm just looking for info and that's it.

Thanks all!
 

· AKA Spitemare
Joined
·
182 Posts
I can give a little bit of info on how 1% increments are read.

Battery level is output on almost all phones at /sys/class/power_supply/battery/capacity. For some reason Moto phones output 10% increments to this file instead of 1%. Moto phones, however, also output 1% increments to /sys/class/power_supply/battery/charge_counter. This is the file that is read by some battery widgets to get 1% increments. CM7 also has the ability to read battery level from this file based on the value in /system/build.prop.

On CM7GB, though, /sys/class/power_supply/battery/charge_counter doesn't hold the 1% battery level but probably some value below its minimum value. Why it does this on CM7GB and not on stock or the Blur-based ROMs is a mystery. There is probably some Blur library that is responsible for setting this file to the correct value.
 

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #4 ·
That very well could be. But I remember a time when people were begging P3Droid to make a 1% battery fix for froyo roms way back when and he said then it wouldn't work. So months later, along came CM7 and within a month of it's release was the 1% battery. Why Moto wouldn't just do this from the beginning is beyond me.

If it's a blur lib, couldn't someone (with WAY more skills than I have) kinda pull apart a blur based rom and see if any of the code in there could be useful in making the necessary changes to get it coded right?

I read in the CM4GB thread that someone working on the MIUI4GB rom thinks that the charge light "bug" and the 1% battery readout may be connected. I wonder if that is the case somehow.
 

· Android Fanatic
Joined
·
1,662 Posts
Haven't seen any progress on this yet. Has anyone else? (the charge light being linked to the 1% batt is what I'm talking about)
 

· Member
Joined
·
381 Posts
cubsfan187 said:
Let me start by saying that I have been kinda blasted for bringing this up in different threads of these 2nd init roms and am not looking for that here. I'm trying to understand this a little better and find out if there is anyone looking into it. This is a feature of the Froyo based 2nd init roms I miss. (and others do as well)

Is there a way to get the 2nd init roms to report in 1%? I know that on the 602 blur based roms (Shuji,SSM,Vortex) they report in 10% BUT battery widgets such as battery monitor and moto charge will give you 1%. Now switch to roms such as CM7 and MIUI on the GB kernel, and you get 10% and that's it. If you use things like those battery widgets I mentioned, you get readouts like 148293406%. I'm trying to figure out why that is. In the froyo versions it was as easy as adding a line to the build.prop file. But the GB kernel is not being very nice or cooperative about it. Is it something in the way the bootloader is hijacked on this kernel? Is it something in the build.prop file that is preventing it? Or is it something just can't be figured out and fixed?

I guess I'm asking for myself. Maybe to see what I can do to help figure it out. Maybe to see if it's even possible. Or maybe just to learn a little more about the way things work. Whatever way it is, if all you're gonna do is blast me as well, then please don't bother to reply. I do not want to start a words war about something like this. I'm just looking for info and that's it.

Thanks all!
Do the random numbers that are being put out on the GB kernel ROMs seem to have any meaning? Maybe it's something that just needs translated into a percent?
 

· Solus
Joined
·
294 Posts
"Jordan8 said:
Do the random numbers that are being put out on the GB kernel ROMs seem to have any meaning? Maybe it's something that just needs translated into a percent?
No... as those numbers read the same no matter the battery level.. I for one love the one preteen read...and the duke that reports out is actually in /sys/devices/platform/cpcap_battery/power_supply/battery
And it's something in the battery management services that reports to these files that is broken... I've been looking into this... But haven't figured out a quick fix till one percent can be made properly...

Edit: first sentence makes sense now

We have nothing to fear but running out of beer
 

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #8 ·
Well I'm glad someone is still trying for this. Its a feature I definitely miss. If there is anything I can test, just ask. I'm always happy to learn and help when I can.
 

· su
Joined
·
2,256 Posts
Nemo aeternamn said:
No... as the studio the same matter the battery level... I for one love the one preteen read...and the duke that reports out is actually in /sys/devices/platform/cpcap_battery/power_supply/battery
And it's something in the battery management services that reports to these files that is broken... I've been looking into this... But haven't figured out a quick fix till one percent can be made properly...

We have nothing to fear but running out of beer
Took me a few read through's to get the first couple sentences, haha. Auto-correct fail I'm assuming.
 

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #10 ·
I'm hoping there is something that I can try/test to get this working. I'm gonna ask in the miui thread too. I wanna know if the charging led 'bug' and 1% are connected somehow.
 

· Solus
Joined
·
294 Posts
"cubsfan187 said:
Well I'm glad someone is still trying for this. Its a feature I definitely miss. If there is anything I can test, just ask. I'm always happy to learn and help when I can.
If you want... What I'm doing right now... Take apart a blur build... And grab the battery files... Not the ones in the location noted above... As they only report what's being read..

This would be easier if I had a phone to play around with... as I only have my day to day phone to use

We have nothing to fear but running out of beer
 

· Aspiring Android
Joined
·
319 Posts
cubsfan187 said:
I'm hoping there is something that I can try/test to get this working. I'm gonna ask in the miui thread too. I wanna know if the charging led 'bug' and 1% are connected somehow.
I doubt this very much. Based on Nis's explanation of how battery percentages are read, I would be very surprised to hear that the charging LED is at all related to them.

Some might think that because the LED goes off when the phone is completely charged that they would be related, but I bet more that the LED is related to whether the phone is drawing current from the charger or not.

If anyone knows for certain otherwise, please correct me...

Sent from my CM7 DROIDX.
 

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #13 ·
Same here. Only my everyday X.

What location do I need to look in for the batt files?
 

· Android Fanatic
Joined
·
1,662 Posts
"strikeir13 said:
I doubt this very much. Based on Nis's explanation of how battery percentages are read, I would be very surprised to hear that the charging LED is at all related to them.

Some might think that because the LED goes off when the phone is completely charged that they would be related, but I bet more that the LED is related to whether the phone is drawing current from the charger or not.

If anyone knows for certain otherwise, please correct me...

Sent from my CM7 DROIDX.
I would think the best way to try this is to (maybe) is to try and get a logcat on a blur based rom while a 1% widget is working and then on a 2nd init rom. Maybe compare the differences. Just a thought.

I have no experience with adb or alogcat.
 

· Developer
Joined
·
709 Posts
I'm working on 1%, you can view my project notes in the link in my signature. They're really just notes for me so don't expect them to be entirely coherent.
 

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #18 ·
Hopefully you can pull a logcat and see what is happening when it's reporting 1% and then it will narrow down (I think) what to look at on gb.
 

· Android Fanatic
Joined
·
1,662 Posts
Discussion Starter · #19 ·
"droidxchat said:
I'm working on 1%, you can view my project notes in the link in my signature. They're really just notes for me so don't expect them to be entirely coherent.
I finally got to read your notes on it and about 1/2 of it I got...lol. hopefully it all works out soon. If I can be any help somehow let me know please. Thanks for your hard work on this much missed feature.
 
1 - 20 of 85 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top