Kaiser Battery Status [kernel mod] - Tilt, TyTN II, MDA Vario III Android Development

NOTE: I don't post kernels here anymore: look for my changes in the standard kernel now.
This thread is still useful for battery discussion, if you like.
I have gotten tired of seeing my battery go from 90% to 15%.
Why can't it go smoothly from 100% down to 5% or less, and back up again?
Why does nbheditor have to apply a 1.6 multiplier for battery capacity?
Can we get the temperature sensor working?
I'd like to get this fixed, and would welcome discussion.
First, in the new or old kernel, the battery status is managed by the file:
kernel/arch/arm/mach-msm/board-kaiser-battery.c.
I have several proposals:
a) Change the default KAISER_BATTERY_RATING to 1350, since the equations really do work out correctly, that the rating should match in mAh. Note: in the kernel, that's 2160 = 1350 * 1.6.
b) Add a thirty second maximum for voltage and current, before using them to guess the battery level. At first I used averaging, but maximum works better for old batteries.
c) When booting from HaRET, scale the battery level because Windows does it different. I don't understand how Windows does it, but I have figured out a scale factor that works.
d) When the ds2746 reports that it has lost power, assume that the battery may have been changed, and do a coarse recalibration based on voltage and charge current.
e) Eliminate the minimum of 15%: let the meter go all the way to zero.
f) Allow battery level to be set to any value at any time.
g) Report what the kernel thinks the capacity should really be.
h) Use ds2746 units directly since nbh-editor already scales mAh to units.
Also, questions:
1) How to convert the thermistor resistance (I think it is aux0r) to temperature?
2) Would be nice if the dynamically-adjusted capacity could be stored in flash. I don't know how to do that, but I know how to report it.
3) Should we have an option on the boot menu to manually set the battery level?
I have edited the new 2.6.34 kernel to act as I propose.
Since the modules must match the kernel version you are using, I have included modules separately.
Warning though that, although it seems to work properly for me, it might do bad things for you, especially to your phone's battery. In particular, the Polaris needs to be tested since I don't have one.
NBH file: for NAND install. Use nbheditor to edit, but put your battery's capacity under "advanced settings". For attempt #6, you can use the standard setting.
ZIMAGE: for HaRET install. Edit your default.txt to contain:
board-kaiser-battery.battery_capacity=2160 (your true battery capacity in mAh * 1.6)
board-kaiser-battery.haret_divisor=2200 (use a WinMo -> android scale factor of 1000/2200)
CAUTION: The 2.6.25 NBH images probably don't work. I'll have to learn how to make them!
NOTE: Attempt #7 and later are in the standard kernel, so are no longer posted here.

just setting this up on Incubus26Jc's Super FroYo 2.2 [Deodexed] [RLS15] [9/3/10]. I will let you know how it goes.

WOW, I´m glad somebody finally took this matter as serious as it is I´m not saying that others guy in here haven´t provided advice on this, it is just that nobody, afaIk hadn´t come with a "downloadable" solution, the only thing close to a real fix to me was to use the nbh editor and put the recommended capacity for my battery, it helped a lot to be honest cuz I used to get no more than 15 minutes of battery life, and after that I can use it for a few hours, unless I turn wifi and bluetooth of course, then it gets down to 15%, well I hope this really works cuz I´v been strugling with this for more than a month and I love android so much that I flashed on nand even though I knew about this problem, and I was about to give up on this, (was I?), thanks for this, I hope we get good results!!!

Isn't it that the latest kernel for froyo is 2.6.32? Is that your own build?
I wanna try your version. So far, how does all features? How is it compared to DZO's kernel?
More power!

Ok so I had lockups with Incubus26Jc's Super FroYo 2.2 [Deodexed] [RLS15] [9/3/10], I am loading up dzo's current Froyo and his 9-9-10 kernel for some base testing then I will install your kernel and updates and test again.

So, how do I install this? i mean, do I:
1- flash the new nbh.
2- install theandroidupdate.tar
done? I mean, do I have to do the whole "calibration dance" with it again or something? Or after i do this it will (in theory) perform as normal as it should? btw my battery is about a month old, so I guess if i put 2000 in advance mode, (not mah) it would be ok, right?
ps: I have donut installed, so I guess it might not work, but heck I´ve got to try this anyways, so I´ll go ahead and install it, in case it works, would you be able to tweak a donut kernel for us?. thanks in advance.

zack, how is it?

so far with dzo's latest froyo build and the attached kernel and update things have been very stable, however the battery is at 100% constantly. hopefully this will change as the battery is drained and recharged.

The kernel is dzo's with the experimental battery file.
Not ready for prime time. If your configured capacity is wrong, it gets calibrated as you run, but the calibration is not remembered when you reboot.
Sent from my Full Android on Vogue using XDA App

I'm looking for opinions on the individual questions in the first post. Especially, does anyone know how the kernel can store battery_capacity s it remains persistent after reboot?
If you search dmesg output for ds2746 you can see what the current capacity is.
Sent from my Full Android on Vogue using XDA App

I´ve installed it and after a while of letting both wifi and bluetooth on, it finally died and showed me 1% left and powered down all by itself, I had never seen 1% left on android, so that´s a good thing I guess, but after I connected the charger it started charging just fine, but in the console after typing dmesg it tells me that the battery has 4079mv and 54/3200 units, but I think that if the battery has 4079mv, it means it is fully charged, am I wrong? if anybody reads this please confirm this because I put it is still charging I don´t want my kaiser to blow up on me, lol. thanks.
ps: while charging it isn´t showing the amber led, but it has a red blinking led as when the battery is completely empty and not charger is connected (but in android the battery icon has the charging animation).

elander said:
I´ve installed it and after a while of letting both wifi and bluetooth on, it finally died and showed me 1% left and powered down all by itself, I had never seen 1% left on android, so that´s a good thing I guess, but after I connected the charger it started charging just fine, but in the console after typing dmesg it tells me that the battery has 4079mv and 54/3200 units, but I think that if the battery has 4079mv, it means it is fully charged, am I wrong? if anybody reads this please confirm this because I put it is still charging I don´t want my kaiser to blow up on me, lol. thanks.
ps: while charging it isn´t showing the amber led, but it has a red blinking led as when the battery is completely empty and not charger is connected (but in android the battery icon has the charging animation).
Click to expand...
Click to collapse
Do not worry. Nothing will happen to your phone. Electronic circuits inside the battery takes care of it. You have to repent attention to the current charge (mAh). When the value falls below 200mA, then the battery is full.

I've had two crashes (phone totally frozen, unresponsive) when on charger and full battery. Probably a coding error somewhere in this experimental file.
I'm also wondering which phone models use this source file?
Do some of them perhaps have different resistor values?
Do we have any historical information about why 10M Ohm was chosen as a resistor value, rather than 15 or some other value?

Millence said:
Do not worry. Nothing will happen to your phone. Electronic circuits inside the battery takes care of it. You have to repent attention to the current charge (mAh). When the value falls below 200mA, then the battery is full.
Click to expand...
Click to collapse
Thanks for replying, I know that the battery has some sort of sensor built in that tells the OS when it is full, but since we are dealing with calibration here (a.k.a I don't know when it is full or empty) I kinda freaked out a bit there, but thanks to your answer I feel (a little) relieve, the thing is that it's been plugged for more than two hours (I had to unplugged it cuz I had to return home from work) and dmesg still says something like: 4180 mv 145mah 50/100 (1604/3200 units) so when you told me about the current charge below 200mah you meant the number that appears on dmesg right after the (4180)mv? in this case it is 145mah, if so, does that means that the battery is already fully charged? cuz according to android it is only like 52% full. should I leave connected or should I unplug it (it is already unplugged just in case,lol). thanks.

It depends. It looks like your battery currently has 1002 mAh of charge, out of 2000 mAh. I doubt that you have a 2000 mAh battery. If you really have a 1350 mAh battery, you are more like 75% full.
I chose a lower limit than 200 mA for when the kernel thinks you are 100% full based on charge, since my phone charges at under 200 mA when connected to a computer, regardless of how full it is.
Please include what kind of phone you have. Otherwise I will assume you have a Kaiser.

n2rjt said:
It depends. It looks like your battery currently has 1002 mAh of charge, out of 2000 mAh. I doubt that you have a 2000 mAh battery. If you really have a 1350 mAh battery, you are more like 75% full.
I chose a lower limit than 200 mA for when the kernel thinks you are 100% full based on charge, since my phone charges at under 200 mA when connected to a computer, regardless of how full it is.
Please include what kind of phone you have. Otherwise I will assume you have a Kaiser.
Click to expand...
Click to collapse
I do have a Kaiser, and I do have a 1350mah battery, and as you said on the first post I edited the nbh to 2000 capacity using the nbh editor, so did I misunderstand first post and instead of 2000 capacity in advance mode I should have put 1350mah in simple mode, or should I have put 1350mah in advance mode in order to make android recognize the capacity of my battery? cuz as I see it now it seems it is the other way around now, cuz before android used to think that the battery was full when in fact it wasn't and now even when full android thinks it is not.

Put the battery rated capacity (1350) in the advanced setting, so it won't be multiplied by 1.6.
The conversion from dmesg units to mAh is: 625 x units / 1000 = mAh. Probably dmesg should show mAh so we don't have to calculate.
Sent from my Full Android on Vogue using XDA App

I am trying to use this kernel with cyanogen build, but it does not boot.
When I start haret it hangs. It moves the staus bar to the bottom of the screen and then freezes. (I can only reset via stylus os sim card cover)
The files I have in andboot are:
zImage-2.6.32-froyo-06-09-10_22 - the original zImage
initrd.lzma
zImage - the zimage with the battery fix
androidinstall.tgz - cyanogen install pack
androidupdate.tgz - update for the battery fix
startup.txt - modified for the battery test (zImage name and battery capacity)
haret-for-kernel-2-6-32.exe - haret
my startup.txt file is:
Code:
#alloctest 0x2000
set RAMSIZE 0x08000000
set RAMADDR 0x10000000
set FBDURINGBOOT 0
set MTYPE 1553
set KERNEL zImage
set initrd initrd.lzma
#
# The following kernel parameters are useful
# ppp.nostart - Set ppp.nostart=1 to disable starting the ppp connection on boot
# msm_sdcc.msmsdcc_fmax - The maximum frequency (in Hz) used by the SD controller
# pm.sleep_mode - The mode used when the phone is off
# 0=Power Collapse Suspend, 1=Power Collapse, 2=Apps Sleep,
# 3=Slow Clock and Wait for Interrupt 4=Wait for Interrupt
# Default is 1, use 1 for best power savings
# board-htckaiser.panel_type - Panel type used to power the panel off and on
# 0=Don't power off the panel (Default)
# 1=Sony 2=Topoly 3=Topoly (probably just the same as 2)
# lcd.density - Defaults to 160, 128 shows more on screen
#
set cmdline "ppp.nostart=0 pm.sleep_mode=1 mddi.width=240 mddi.height=320 no_console_suspend board-kaiser-keypad.atttilt=2 board-htckaiser.panel_type=1 hw3d.version=1 board-kaiser-battery.battery_capacity=1350 board_htckaiser.pmem_size=4 board_htckaiser.pmem_adsp_size=1 clock-7x00.a11=500"
boot
do I need to use another haret or initrd?

yesterday I left the phone connected to the charger all night and when I woke up (about 5hours and 30 minutes later) it had the green light turned on so it means that it got charged full, and dmesg gave something like this: 4180mv 28mAh and 100/100 (2076/2076 units) I gotta tell you, I had never seen such "low" values on units, its kinda strange, anyways I unpluggued it and went to work, so here I am, I´ll report back in a few hours after I stress this thing a bit to see if it really got all the "juice" the battery can take.
ps: I haven´t tried putting the 1350 (MAh) in advance setting, because since it says that it is charged (I know it may still be wrong) I decided to give it a go to see how it works with the current settings, after finishing testing this, I´ll try with 1350.

I don't know the HARET problem, sorry. Everything you are doing looks right to me. Perhaps you need to wait until this experiment is mature enough to be in a dzo kernel. Sorry!
Sent from my Full Android on Vogue using XDA App

Related

XDAndroid and Touch Pro 2 battery life

I just started running the latest (not sure what it is, but I got it this weekend - 10/30/10) version of XDAndroid.
I am a little disappointed with the life of the battery... I charged it fully last night and drove to work with it in the car charger. I don't take my cell phone into work, so I put into airplane mode and left it in a cool area (like have always done with the same phone running WinMo 6.5.) I checked to make sure there were no apps running also.
When I went out for lunch, I was surprised to find that the phone was still warm and the battery indicator was down 25%. After lunch (I did not even use it) the phone was warning me that it only had 15% life left (and it was still warm.)
I put it into airplane mode after lunch - we'll see where is stands on my way home, but my guess is that it will be completely dead.
The same phone running WinMo 6.5 (and the same battery) can last for days like this...
Is this a common problem? (I have not found anything to this effect other than the battery meter being unreliable.)
Is there something I could check or do?
I am using the app to launch the OS and it has my over-clocking set at "Medium" ("Hi" froze my phone.) I'm planning on trying "Normal" tomorrow to see if there is any difference in battery life.
thanks in advance,
Jordan
There's gotta be something running in the background, otherwise the phone would be cool.
Make sure you're completely up to date - some of the bundle packages have old pieces in them. Sometimes it's OK, other times it means your build is very outdated.
I dropped back to the overclocking level before medium, made absolutely sure that all processes were stopped, and the battery was completely dead. It had been on charge until around 10:00 and in Airplane mode with all processes stopped. I checked it around 5:00, but the battery was already dead, so I don't know when it actually died.
Format SD card using any other third party program like Panasonic SD Formatter or what have you > Go here http://sites.google.com/site/androidport/downloads/archive and download any old Android build (Except for Sense 2.1) > Manually update kernals and rootfs > Uncheck Ovclock (Or take out the OC command line in the startup.txt and check the manual startup.txt from the launcher app) > Boot.
You should have great battery life now and phone should stay cool and go into deep sleep (Green LED light).
So are you saying that overclocking is causing the battery life to drain quickly? I can turn it off with the installer that I am using.
jordanthompson said:
So are you saying that overclocking is causing the battery life to drain quickly? I can turn it off with the installer that I am using.
Click to expand...
Click to collapse
Well it would stand to reason that OVERclocking a processor would degrade battery life & stability.
well to be honest you are not going to get great battery life out of android on the tp2...yet. On WM with normal use I get about a little over a full day, android max is like 7-8 hours. The battery life has made great strides though recently and I'm sure will eventually be usable for a full day.
Try a program from the market called juice defender, it literally doubles my battery life when running android, should help with your heat issues as well
Thanks very much for the helpful advice - I'll look for it tomorrow and let you know how I make out
iamterence said:
Format SD card using any other third party program like Panasonic SD Formatter or what have you > Go here http://sites.google.com/site/androidport/downloads/archive and download any old Android build (Except for Sense 2.1) > Manually update kernals and rootfs > Uncheck Ovclock (Or take out the OC command line in the startup.txt and check the manual startup.txt from the launcher app) > Boot.
You should have great battery life now and phone should stay cool and go into deep sleep (Green LED light).
Click to expand...
Click to collapse
Is it really necesarry to manually update the kernals and rootfs or can sov's XDAndroid startup utility be used to update them?
slapshot30 said:
Is it really necesarry to manually update the kernals and rootfs or can sov's XDAndroid startup utility be used to update them?
Click to expand...
Click to collapse
Its not really necessary, but you'll know for a fact that your build's up to date. Thats what I do anyways.
iamterence said:
Its not really necessary, but you'll know for a fact that your build's up to date. Thats what I do anyways.
Click to expand...
Click to collapse
Am I correct with these steps on how to do it manually?
1) Download the latest kernal and rootfs that you want to update
2) Unpack the rootfs file to desktop and copy it into andboot and rename it rootfs and delete the old one.
3) Unpack the kernal to the desktop and send the module into andboot but DO NOT rename (Delete old).
Rename the zImage file to just zImage and put it into andboot and delete the old one.
lemeiux1 said:
well to be honest you are not going to get great battery life out of android on the tp2...yet. On WM with normal use I get about a little over a full day, android max is like 7-8 hours. The battery life has made great strides though recently and I'm sure will eventually be usable for a full day.
Try a program from the market called juice defender, it literally doubles my battery life when running android, should help with your heat issues as well
Click to expand...
Click to collapse
My tp2 oc'ed at 768 runs for days in android. maybe its cuss i got the rhod400?
immson said:
My tp2 oc'ed at 768 runs for days in android. maybe its cuss i got the rhod400?
Click to expand...
Click to collapse
Days? In Android?!? You must not be doing... anything. Plus have every radio turned off or something.
Wistilt2 was saying he was getting around 36 hours at peak, but that was basically all sleep.
I get 10 hours if I'm lucky, but lately it's just been dying out of nowhere and shutting off completely. Not sure what's up with that...
lemeiux1 said:
well to be honest you are not going to get great battery life out of android on the tp2...yet. On WM with normal use I get about a little over a full day, android max is like 7-8 hours. The battery life has made great strides though recently and I'm sure will eventually be usable for a full day.
Try a program from the market called juice defender, it literally doubles my battery life when running android, should help with your heat issues as well
Click to expand...
Click to collapse
The settings in that app are kind of confusing. Which settings do you use and do you use the free version or paid version. It seems some features are blocked out on the free version, do I really need the ones blocked out?
Manually Updating XDAndroid & Power Management
slapshot30 said:
Am I correct with these steps on how to do it manually?
1) Download the latest kernal and rootfs that you want to update
2) Unpack the rootfs file to desktop and copy it into andboot and rename it rootfs and delete the old one.
3) Unpack the kernal to the desktop and send the module into andboot but DO NOT rename (Delete old).
Rename the zImage file to just zImage and put it into andboot and delete the old one.
Click to expand...
Click to collapse
Your post may seem OT but since current updates can be related to better power management its very relevant.
1) Yes, if you are getting:
Kernels & modules from dev glemsom: http://glemsom.users.anapnea.net/android2/htc-msm-linux/
Rootfs from dev stinebd: http://files.xdandroid.com/rootfs/
2) After unpacking / extracting rootfs-xxxx.zip either on desktop or Rhodium (using 7-Zip for WM [it's Free]) rename it "rootfs.img"
3) Yes. You can also unpack / extract the kernel & module archive htc-msm-linux-xxxx.tar.bz2 on Rhodium using 7-Zip for WM.
Equally important is using latest XDAndroid System. If your using Sov's Startup utility (make certain your using latest version as of this post 1.3.1) and his latest "reference" build, not Blazin, you will be current with the latest XDAndroid System [2.2] [25-10-10] (Oct. 25, 2010) FRX02 aka system.ext2 NOTE: If you update the system file you will need to delete the data.img file and that means loosing all your configs, downloads, & customizations. Using Titanium Backup makes this a little less painful.
Battery life is directly related to how you use your device. Some power hogs include overclocking, videos, and services such as GPS, WiFi, Data, & Voice. Many concerned with extending battery life underclock. Personally I don't subscribe to OC or UC.
arrrghhh said:
Days? In Android?!? You must not be doing... anything. Plus have every radio turned off or something.
Wistilt2 was saying he was getting around 36 hours at peak, but that was basically all sleep.
I get 10 hours if I'm lucky, but lately it's just been dying out of nowhere and shutting off completely. Not sure what's up with that...
Click to expand...
Click to collapse
mine too, i updated it like half a month ago. i guess somehow it glitched and had super battery. anywhere from 6 to 8 hours is what i get until out of no where, nothing.
jordanthompson said:
I just started running the latest (not sure what it is, but I got it this weekend - 10/30/10) version of XDAndroid.
I am a little disappointed with the life of the battery... I charged it fully last night and drove to work with it in the car charger. I don't take my cell phone into work, so I put into airplane mode and left it in a cool area (like have always done with the same phone running WinMo 6.5.) I checked to make sure there were no apps running also.
When I went out for lunch, I was surprised to find that the phone was still warm and the battery indicator was down 25%. After lunch (I did not even use it) the phone was warning me that it only had 15% life left (and it was still warm.)
I put it into airplane mode after lunch - we'll see where is stands on my way home, but my guess is that it will be completely dead.
The same phone running WinMo 6.5 (and the same battery) can last for days like this...
Is this a common problem? (I have not found anything to this effect other than the battery meter being unreliable.)
Is there something I could check or do?
I am using the app to launch the OS and it has my over-clocking set at "Medium" ("Hi" froze my phone.) I'm planning on trying "Normal" tomorrow to see if there is any difference in battery life.
thanks in advance,
Jordan
Click to expand...
Click to collapse
As long as I observe, in my case at least, the screen's backlight never turns OFF. The screen became black, but the light behind it is always ON, the only way to see this is in complete dark, otherwise all you can see is a black screen. Try it. In my case I'm shure this is at least one reason for short battery life under xandroid on my tp2. Interesting under windows the screen backlight is turning OFF in stand by mode.
As long as I observe, in my case at least, the screen's backlight never turns OFF. The screen became black, but the light behind it is always ON, the only way to see this is in complete dark, otherwise all you can see is a black screen. Try it. In my case I'm shure this is at least one reason for short battery life under xandroid on my tp2. Interesting under windows the screen backlight is turning OFF in stand by mode.
Click to expand...
Click to collapse
I'm know what you mean i also have this same problem. When I first loaded Android 2.2.1 onto my SD card the sleep mode was working correctly for around 1 week or so. During that time I had a few crashes of Android, due to applications etc, and now its like u said. The screen is black but still 'on' in sleep mode.
Sent from my MSM using the XDA mobile application powered by Tapatalk
Just to add another field report...
I installed the "Battery Left" Widget, wich logs battery life and calculates an average. I'm always running on 3G or even WiFi if I am at Home and my average is about 30 hours a charge. If i'm doing nothing it gets this maximum battery life. But in normal day use with writing an email sometimes and doing a call it's about 10-12 hours. If i am at work and i use Navigation between my customers (between 1 and 3 hours one way), i always charge the phone while navigating and deactivate GPS when i'm not using it, i get 10 hours with a full charged battery at the morning. Currently i'm using the 11/24 kernel and the 11/08 rootfs modified to fit my german keyboard layout. Furthermore i'm using the newest combination of [ACL]'s tweaked 3D Driver and gralloc. No overclocking (no need for that, caus android is running good at stock speed) and pm.sleepmode set to 1.
Hope that is not a useless reply
Cheers
Hi sounds Nice.
Can u send me your updates files ?
German keyboard is nice for me.
Mit freundlichen grüssen

Life of a Battery

Hello guys, I am experiencing some troubles with the battery of my beloved Desire. I am using Oxygen 2.3.2 right now. The problem: every time the battery reaches 20% of charge the phone dies. But when I plug it and it start charging it says it's at like 2-3%. Now, one of my friend suggested that since the battery is quite old (I charged it every day since april 2010), it can have problems when it reaches low voltages, so I should change it. Do you have the same opinion or you think it's just a calibration problem?
Calibrate. If there is no change, replace the battery. Isn't that simple enough?
via xda app
Install spare parts . Go to Battery information . Check Battery health . If it doesn't say "Good" then you need to replace the battery .
Also try a calibrate as stankyou suggested .
I'm having the same issue. Tried calibration a few times and my battery health says good. Glad that my new ROM is better on battery so I don't get down there as often, but it is still annoying.
Hello,i had the same problem with my desire's battery,it went down at 20%.
what i did was to follow an tutorial from Oxygen rom forum,an user called paschadee posted this:
Advanced Battery Calibration (tested and verified on Oxygen + bravoGSM)
Intro:
This will actually calibrate your battery, unlike other methods out there. After calibration, empty will be at 0% not some arbitrary value like 18%. For added comfort, you can perform steps 1-5 until you are comfortable with the routine; on the first run stop at step 5, don’t plug in and watch where your battery dies to give you an idea of the time window available – then on the next run you will know when to plug in. This ensures a smooth and error-free routine. You don’t actually need to do this since the app will tell you when to plug in. Once you’ve done a dry run, plug in, charge for a few minutes until the phone doesn’t shut off when you disconnect the charger, and repeat the process.
Caveats:
When entering the values for the battery registers, pay particular attention that the entered values are the correct ones which are shown below. Failure to enter these values correctly could result in your battery being permanently bricked. You have been warned!
Pre-requisites:
• _thalamus kernel >= 2.6.35.14_r2 RC1, installed (check kernels section)
• A functioning brain (ask your parents about this)
• Patience
• Jon Richards’ “Nexus One Battery Calibrator” application a.k.a. NOBCAP (available on android market), installed
• An almost dead battery (that is mis-reporting its capacity) with what you think is about ~2% remaining – i.e. if your battery dies at 18%, get ready at about 20%
• AC battery charger at the ready
Process:
1. Set your screen time-out to 10 minutes.
2. Run NOBCAP
a. If General tab displays fields but no values, kernel is wrong, see pre-requisites
b. If General tab displays fields filled with values, kernel is right, enable airplane mode on the phone
3. In NOBCAP, menu --> settings -->
a. Check: GPS polling, ACR adjustment, advanced options
b. UNcheck: Airplane and Wake lock. Go back.
4. Go to LearnPrep tab
a. Set age: 100% --> save
b. For
i. OEM batteries ; Set mAh: 1452 --> save
ii. Aftermarket batteries ; Set mAh: 1650 --> save
c. Register: 0x66
Value: a4 --> save
d. Register: 0x65
Value: 06 --> save
e. Register: 0x10
Value: 04 --> save
5. Go to LearnMode tab
6. Scroll down and Set Detect Learn Mode to ON.
7. When Real-Time Voltage (µV) <= 3201000, i.e. when the battery is “empty”, the app will prompt you to quickly plug in your charger.
8. If you were successful here, the learn-flag LEARNF will now be lit and your battery charging.
9. LYPTFA - Leave your phone the .... alone.
10. When charging completes, the CHGTF flag will be lit, Battery Status Register 0x81 displayed, your battery calibrated.
11. Unplug. Reboot.
Supplementary:
The application monitors the battery chip registers. As charging nears completion the pulse current (mA) sent to the battery gradually diminishes in amplitude. This will tail off at about -20mA which the battery interprets as “charging complete” and the battery registers are stamped with its newly determined capacity values. Activating the screen, or any function which subsequently draws current pulls the charge current above -20mA and which the battery detects as charge complete – this is why you should LYPTFA. It’s okay to set an extended screen-timeout and occasionally touch the screen to reset the screen-off timer (i.e. keep the screen on) to keep an eye on charging without affecting charge current.
As an additional experiment, install JuicePlotter, run it once, and enable graphing. This will also monitor dis/charge cycles and give you an idea of the memory effect that the battery suffers from.
Click to expand...
Click to collapse
I did everything said there and now my battery dies at exactly 1%.
It also appears to last much longer than it used to.
All credits for what i qouted goes to paschadee
Good Luck!
I just tested it and my learn flag turn of after a couple minute? does it mean that it's not working? Also, in "message" it's telling me " -to re-calibrate your battery..."
Thank for answer.

Long charging, short battery life

Hello.
I have bought a used desire a couple of months ago, and one thing has been really bothering me.
I need to charge the device for like 12 hours via AC, to get it to 100% (yes, I have tried several chargers), and after that, the battery life is like ~12 hours if I use it only a little. I have also bought a spare HTC genuine battery, nothing changed. The warranty is not valid in my country, so that's not an option. Anyone have any suggestions?
I also have ordered a battery charger from ebay (that would charge a battery without the phone), I'll post when I receive it.
How long does it take the charger to get to 90%
Sent from my Desire using XDA App
It's about 10%/hour, and there is no difference what the percentage is.
Check battery health:
Type *#*'4636#*#* in dialer, > Battery information.
A full charge here takes ~ 3 hours. Till 90% nearly 2 hours, the rest 10% "need" the last hour.
Are you using a custom rom as some of these may drain battery FAST!
I'd check the running apps
reset phone to factory
if you are using clockworkmod recovery, then try clearing battery stats
---------- Post added at 01:09 PM ---------- Previous post was at 01:01 PM ----------
oh, also try getting one of those $15 brand new batteries from eBay.
I got one, and it's been working like a charm for 3 months now
charges in less than 2.5 hours, and lasts for 1.5 days (average calls, SMS, music player...)
stormleader said:
then try clearing battery stats
Click to expand...
Click to collapse
Some enlightenment for you.
What settings do you have for data connection? Wifi, sync etc
These can effect not only battery life but charge time also..
I use a custom ROM with juice defender ultimate..knocks the data off when the screen is off,, but with a sync'd check every 30 mins
Sent from my HTC Desire using XDA
erklat said:
Some enlightenment for you.
Click to expand...
Click to collapse
lol thanks
You should do this procedure every time you replace the battery (tested working on HTC Desire GSM):
Advanced Battery Calibration (tested and verified on Oxygen + bravoGSM)
Intro:
This will actually calibrate your battery, unlike other methods out there. After calibration, empty will be at 0% not some arbitrary value like 18%. For added comfort, you can perform steps 1-5 until you are comfortable with the routine; on the first run stop at step 5, don’t plug in and watch where your battery dies to give you an idea of the time window available – then on the next run you will know when to plug in. This ensures a smooth and error-free routine. You don’t actually need to do this since the app will tell you when to plug in. Once you’ve done a dry run, plug in, charge for a few minutes until the phone doesn’t shut off when you disconnect the charger, and repeat the process.
Caveats:
When entering the values for the battery registers, pay particular attention that the entered values are the correct ones which are shown below. Failure to enter these values correctly could result in your battery being permanently bricked. You have been warned!
Pre-requisites:
• _thalamus kernel >= 2.6.35.14_r2 RC1 or CyanogenMod kernel.
• A functioning brain (ask your parents about this)
• Patience
• Jon Richards’ “Nexus One Battery Calibrator” application a.k.a. NOBCAP (available on android market), installed
• An almost dead battery (that is mis-reporting its capacity) with what you think is about ~2% remaining – i.e. if your battery dies at 18%, get ready at about 20%
• AC battery charger at the ready
Process:
1. Set your screen time-out to 10 minutes.
2. Run NOBCAP
a. If General tab displays fields but no values, kernel is wrong, see pre-requisites
b. If General tab displays fields filled with values, kernel is right, enable airplane mode on the phone
3. In NOBCAP, menu --> settings -->
a. Check: GPS polling, ACR adjustment, advanced options
b. UNcheck: Airplane and Wake lock. Go back.
4. Go to LearnPrep tab
a. Set age: 100% --> save
b. For
i. OEM batteries ; Set mAh: 1452 --> save
ii. Aftermarket batteries ; Set mAh: 1650 --> save
c. Register: 0x66
Value: a4 --> save
d. Register: 0x65
Value: 06 --> save
e. Register: 0x10
Value: 04 --> save
5. Go to LearnMode tab
6. Scroll down and Set Detect Learn Mode to ON.
7. When Real-Time Voltage (µV) <= 3201000, i.e. when the battery is “empty”, the app will prompt you to quickly plug in your charger.
8. If you were successful here, the learn-flag LEARNF will now be lit and your battery charging.
9. LYPTFA - Leave your phone the .... alone.
10. When charging completes, the CHGTF flag will be lit, Battery Status Register 0x81 displayed, your battery calibrated.
11. Unplug. Reboot.
Supplementary:
The application monitors the battery chip registers. As charging nears completion the pulse current (mA) sent to the battery gradually diminishes in amplitude. This will tail off at about -20mA which the battery interprets as “charging complete” and the battery registers are stamped with its newly determined capacity values. Activating the screen, or any function which subsequently draws current pulls the charge current above -20mA and which the battery detects as charge complete – this is why you should LYPTFA. It’s okay to set an extended screen-timeout and occasionally touch the screen to reset the screen-off timer (i.e. keep the screen on) to keep an eye on charging without affecting charge current.
As an additional experiment, install JuicePlotter, run it once, and enable graphing. This will also monitor dis/charge cycles and give you an idea of the memory effect that the battery suffers from.
I'm trying the guide above me, thanks.
In the Nexus One Battery Calibrator app you can see charging current in miliamps, could you please tell me what is the value for you guys while charging?

Wrong state of charge calculation by android

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.
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...
Instead of making any advanced config, have you tried this little app (needs root privileges)?
https://play.google.com/store/apps/details?id=com.nema.batterycalibration
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).

Question [SOLVED] Wireless charging issue, is it me or A13 ?

Hello,
I was looking for a way to use Battery charg limit on my pixel 6 Pro, using a pixel stand 2. (because I'm using it a lot)
So when A13 came out, I rooted the phone, and started my research.
I found a message in a thread that specified a way to do what I want.
[APP][ROOT][4.0+]Battery Charge Limit v1.1.1​
jazic said:
I finally found the ability to 'pause' charging on the Pixel 5, 6 and maybe 6 Pro?
This work only with wireless charging but I'm sure the /dc/ folder for wired.
I use tasker to control the file:
/sys/class/power_supply/wireless/current_max
I did figure out how to have it always have the file set to rw with the profile itself by using "run shell" and enabling root:
chmod 0777 /sys/class/power_supply/wireless/current_max
Obviously you can set up a profile to control it with tasker but personally I have mine set to start charging full speed when the battery is 0 to 65% then start trickle charging half speed until it reaches 72%. Once it reaches 72% you can set the current level really low and it'll basically keep the charger cycling on and off at a very low input voltage so the battery will hang at whatever you set it at without dropping then charging back up all the time which imo is better than cycling power off at a certain level then charging back up.
I'm still experimenting with current levels but if you set it to higher than your charger can handle then it will just simply charge at max speed of your charger.
For trickle half speed charge I use: "500000" (500mA?)
For full speed charging I use: "2200000" (2200mA?)
For Battery Charge Limit I'm sure you can set the file to:
/sys/class/power_supply/wireless/current_max
Enable: 5000000
Disable: 1000
You will need to set the file as writeable maybe?
Any questions hit me up. Maybe it's another source to look for other phones.
Click to expand...
Click to collapse
I was thinking it all worked but in fact not...
For me now, wireless charging is very buggy.
Using Amper, i'm often in "not charging" or I'm charging at 4V and max 600mA.
I don't know if it's my fault or if it's related to the bug with the Pixel 6 wireless charging issue ?
Also, can someone give me the default value of this file "/sys/class/power_supply/wireless/current_max" mine is now set at 250000, to double check.
Thank you !
I found a solution on reddit !
Going to App > See all apps + show system apps > Search "pixel stand" > clear cache + clear storage
This fixed my issue so I guess it was A13 and not BCL.
Hops it cals help someone.
That's awesome! Thanks for letting us know.

Categories

Resources