Post Reply

Wrong state of charge calculation by android

OP Ulianov_Lenin

28th April 2014, 12:13 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Apr 2014
I've i9195 with stock battery and rom, all was normal. Then I replaced it with double sized battery+new back cover. Not a microUSB batterycase. After many cycles and weeks of use it still didn't calibrated to new capacity. Fully charged battery lasts about a day and phone shuts down. If I switch it back ON after couple of minutes - I see 50% charged and can use phone another day.After second 'full discharge' I'll have about 15% more. All techniques for 'calibrating' battery with deleting batterystats doesn't work. Charge, off, remove bat, wait, place it back - either. /sys/class/power_supply/battery/uevent have string POWER_SUPPLY_ENERGY_FULL=1940000000 and it is always the same. So phone simply downcount from this level and tells that charge is 0% while voltage is about 3.7v. Interesting that "energy_full" file has number of 3880000000 but it seems that it's not used in calculations.
After all I installed CWM, root, cyanogenmod 11 and used it for about a week. SAME problems, except that "energy_full" is 1940000000.
I want to solve this very much, I can program or recompile kernel, if needed. It's pm8921 charger ic there. Maybe this number was programmed in it in factory mode or smth. Maybe threis a way to correct it. Thanks in advance.
1st September 2014, 11:17 PM   |  #2  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Sep 2012
Same here with stock-rom, CyanogenMod and MoKee's rom.
I think the only way will be to recompile the used kernel with the correct value of 3880000000 instead of 1940000000 in file "drivers/power/pm8921-bms.c" in kernel sources (function "calculate_fcc_uah", part "scalefactor". Scalefactor has to be change into scalefactor *= 2;).

Huge work for a little problem...
Last edited by JulianAT; 1st September 2014 at 11:23 PM.
5th September 2014, 03:04 PM   |  #3  
Junior Member
Thanks Meter: 1
 
20 posts
Join Date:Joined: Aug 2014
Instead of making any advanced config, have you tried this little app (needs root privileges)?

https://play.google.com/store/apps/d...erycalibration

After migrating to CM11 my battery was draining very fast. I used this app and it apparently fixed a part of the issue (battery still drains fast, but not as fast as before).
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes