yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] SiNJiN76:
Thanks guys. It's almost time for me to check if my phone learned its lesson. Question tho... 0x81 --- where do I see this value (instruction #3h)? (using mtw4991's method)

Am I supposed to look for this (0x81) before I unplug and manually restart the phone? So after the phone restarts...what % value should I see (instructions say Fail = 94% or 100% if it's a new battery)

Edit: Okay...says 0x83. Am I cool?
[Nexus One Android Development] carblanco:
Finally done! Let's see.

Is a battery age of 86% after the calibration normal?
[Nexus One Android Development] temasek:
Yes. Let me guess, its a stock battery about 8-10 months +/-
[Nexus One Android Development] temasek:
Don't worry about whether its 0x81 or 0x83, its shown in the 3rd tab of the app. In the Battery Calibrator's 3rd tab (LearnMode), if the CHFTF flag is turned on, it means you have a fully charged battery.

If your battery age shows 94% there is a few possibilities

1. A failed learn cycle and battery resetted to 94% (stock or non-stock battery)

2. You power off charging resulting to battery resetting itself to 94%. If u know your battery age, simply return to the app and set your age back. No nid to redo learn cycle.

3. Your phone auto shutdown due to battery flat (either depleted mAh or u hit empty voltage value). If you manual power off/on, you battery age will remain intact.

Now if your battery is a non-stock battery, after a successful learn cycle, you battery age may remain at 100. This is highly possible. To test, simply drain your battery and your battery should be able to drain till 0%.

Remember your battery age will drop in time. Don't expect your battery age to remain eg, at 100 forever.
[Nexus One Android Development] carblanco:
Yes, a +12 months

I had 2 failed learn processes (always getting a 94% battery age) and finally yesterday I got it, I had to close almost all running process (battery indicator, widgets, etc.)

Thanks, let's see the new behavior.
[Nexus One Android Development] temasek:
So basically your battery is rather old. Learn cycle one of its objective is to have the ability to use battery till 0%. So you may now see your battery % dropping faster than before. Its not high battery drainage but a more even out battery usage from 100% to 0%.

Anyway fyi, a battery age of 80% = BUY NEW BATTERY. :p
[Nexus One Android Development] carblanco:
Yes, the battery now seems to drain faster but really I have won an extra 10% (at 10% my phone always turned off)

I'll try to extend my battery life ;-) but if I see a good offer...
[Nexus One Android Development] temasek:
Great!

A Tip,

You may wanna retard your battery age dropping (ie slow down) thru changing the Aged Capacity. I set my Aged Capacity = full40. Its been almost 2 months+ since I got my new battery and today my battery age still at 100. LOL :D

I don't feel battery weaker than b4............yet. Its great so far. :)
[Nexus One Android Development] carblanco:
I undertand... so which registry should I change and which value? Can't find a list.
[Nexus One Android Development] temasek:
Use Battery Calibrator to set the following registers and values

0x62 xx

0x63 yy

xx & yy being the vaules, in this case the recommended values = full40 value
[Nexus One Android Development] temasek:
How to calculate the hex values for Age Capacity use?

Firstly idk how! lmao :p

So what I did was a workaround.

1. Use Battery Calibrator set full40 to your desired value.

2. Open app like os monitor log and it will show full40 just changed value in hex as eg xx and yy. Copy down for your use as Age Capacity

3. Back to Battery Capacity and revert full40 to previous value if necessary.

There u go. Hex value for Age Capacity.

Then set Age Capacity from setreg

0x62 xx

0x63 yy

Both xx and yy being hex values.

OR.......................simply view the dumpreg in the /sys/devices/platform/ds2784-battery for its registers & hex values.
[Nexus One Android Development] carblanco:
Current Full40 = 1452 mAh

So xx & yy should be 5AC, right? but I can't type letters using battery calibrator, just numbers, can't select letters...
[Nexus One Android Development] temasek:
Ah ha! nvr realise that cuz I use setreg in the battery folder

I check with the app dev later. In mean time u go to the battery folder and key in the register & hex value into setreg, one at a time.
[Nexus One Android Development] temasek:
Oh no....its not 5AC

1452mAh = 0d 9d

So proceed to setreg and edit and save as follows, one line at a time

0x62 0d

0x63 9d
[Nexus One Android Development] carblanco:
DOUH!!!

Done, great tip, thx.
[Nexus One Android Development] temasek:
Yw.

If u ever get an after-market battery its even more fun in calibrating it.

Cheers. :)
[Nexus One Android Development] dvgrhl:
Oops, I'll make an adjustment to the advanced option inputs to accept letters as well. Forgot that it was hex values being used.
[Nexus One Android Development] temasek:
Great! U saw my post b4 me requesting to u.

Thanks!
[Nexus One Android Development] eruben:
I failed calibrating my Desire's battery first time as I forgot to write setreg settings. After that I've got 94% age and I decided to calibrate again but now I can't drop voltage to 3200 as phone switches off before.

It's quite strange but firstly battery percent shows around 5% so I continue to drain battery but then it changes to 19% and switching off around 14% with no voltage dropped.

Help please!
[Nexus One Android Development] temasek:
U are using Desire to calibrate? or using desire battery onto nexus one to calibrate?

cuz this can be done on Nexus One with a supported kernel only.
[Nexus One Android Development] eruben:
**** ) I was using Desire. But app worked well thats why I thought I can do it.

Can there be any damage or is there anything I should do to reset all this process and come back to default values?
[Nexus One Android Development] temasek:
There should be no harm done as the values are inputed directly to the EEPROM of the battery.
[Nexus One Android Development] eruben:
Is there a way to check it to be sure?
[Nexus One Android Development] temasek:
Hmm....

What values u managed to change? Try rebooting your desire and see if your value change remains.
[Nexus One Android Development] eruben:
I entered values in setreg but as I understand it does not matter. Also I make changes in Calibrator for battery age (100%) and mAh (1452). It seems ok also.

What concern me most of all is that I get 5% charge and then it becomes 19%.
[Nexus One Android Development] temasek:
Ooooooo

Setreg? Pls check if u have the battery drivers in your system. Idk for sure but perhaps someone did port these drivers to desire.

Battery drivers in

/sys/devices/platform/ds2784-battery
[Nexus One Android Development] eruben:
How can I check it?
[Nexus One Android Development] temasek:
Use a file editor and navigate to that folder. See if it exists.

How and where u input setreg?
[Nexus One Android Development] eruben:
Sure it is. I just opened setreg in text editor and did everything as it was written in guide here.
[Nexus One Android Development] temasek:
That's new and if its true, its great.news!

Ok back to your topic.

Turn off ACR adjustment as maybe it confuses u.

U did not manage reach empty voltage value and your phone shutdown? If yes it means your mAh died b4 u hit empty voltage point.

Try manual bump of your mah by inputting register 10 into the app with values of "01" for about 100 more mah, "02" for about 200 mAh, etc
[Nexus One Android Development] eruben:
I didn't mention that in the end I managed to reach minimum and I went through all learn process. Now I just want to know If i need to do anything so my Desire won't harm.
[Nexus One Android Development] temasek:
Ic.

Nothing. As I said its in the EEPROM of the battery so nothing gotta do with your desire.

Don't worry.
[Nexus One Android Development] eruben:
Thanks. But u know it seems that calibration worked. U finished the process and now it shows age at 93 and battery life improved :) or it's just my imagination
[Nexus One Android Development] martinl1030:
so i tried again and i think i got it to work. I guess my battery age is just 89 cause I got that number twice. Anyways I just called up HTC and theyre sending me a new battery so hopefully ill get a lot better battery life with it.
[Nexus One Android Development] temasek:
If it reads 93% then its good. See if u can drain to 0%. If yes then congrats! :)
[Nexus One Android Development] RogerPodacter:
the reason your battery jumped from 5% to 19% is because the app did it, the ACR adjustment setting is enabled. that's a good thing, because the app worked like it was supposed to so you could reach the empty volt. otherwise you would have run out of mAh and shut down.

so the desire uses the identical battery model and chip, so its compatible but only if you are using one of the ROM's we added the driver to, like cyanogen or pershoot. it wouldnt work on stock desire ROM, obviously.
[Nexus One Android Development] temasek:
For 1st time users a jump like that would probably scare most users .... :D

Back to desire topic. I always knew that desire uses same batteries cuz in shops and ebay it is always desire/nexus one battery for sale. So if desire uses CM based rom meaning they could probably use this. Nice.

So congrats Roger! U have double yourself potential userbase of using the fruits of your hardwork. :)

Maybe can confirm once more and if really good then perhaps this thread header and the app itself could include desire info so that more could potentially use your app.
[Nexus One Android Development] theloginwithnoname:
re the Desire bits, tried a manual shutdown-to-learn-mode a couple of times on it but no joy. The desire in question is unrooted and exhibits cut-off at 10%

I have swapped batteries before and attempted learn mode with the app, but (and this is a general gripe that I have privately shared with Jon and Roger) I cannot maintain < 200mAh without using other apps in the foreground, that I have subsequently missed the learn hit popup!

[One possible suggestion to keep it in-app is to embed a google map with GPS on in a new tab, but I dunno if Jon's already tried that and it won't work]

One idea I'm trying is using the N1 trackball to flick between the first two tabs - seems to draw enough current (-240 ish)!!
[Nexus One Android Development] theloginwithnoname:
LOL, worked like a dream, flicking to last tab when < 3170! Now we wait...
[Nexus One Android Development] theloginwithnoname:
Lost it. Seems to have gone from 0x71 to 0x31 when display turned off. Trying again...
[Nexus One Android Development] mtw4991:
I thought it was supposed to go from 71>31>11 while in learn mode, depending on the level of charge attained?

Also I just turn on wifi hotspot and it maintains current draw above -200 mV
[Nexus One Android Development] mtw4991:
3170? What do you have aEv set to? mine is 3201
[Nexus One Android Development] theloginwithnoname:
on the desire battery, same as you - it surprised me too.

on the N1 battery I have it at ~3080
[Nexus One Android Development] RogerPodacter:
honestly i just scroll up and down on the screen in the learn mode tab, and the scrolling seems to pull enough current to be around -250mA. Jon tried to enable the GPS as an option, but surprisingly it didnt make a whole lot of difference if the phone is just sitting idle.

bringing in a MapView certainly would work, but I think the effort to code that in will be rather extreme given the result. if i was better at code i would do it.

so i added in a tracking the learn flag boolean so that once you hit learn mode, the flag turns true, and now you can leave your phone alone. if the learn flag turns off, i.e. fails, before full charge, you will get an alert so you KNOW you failed without having to guess the result. i still need to test it though.

and the graphing is working great still, but seems the service might not stay running in deep sleep, so might have to work on that. now it's just a matter of merging in the code with dvgrhl. i'd like to send out a few betas first though just to get feedback first. maybe i'll put together an apk tonight.
[Nexus One Android Development] carblanco:
Upss, my battery age has changed from 86% to 94% by itself, why? Due to flashing a new nightly?

Should I change it to 86% because I know it's the real value?
[Nexus One Android Development] RogerPodacter:
yes you should change it back to your "learned" value of 86% because you know that is correct. the stock battery has a bug where it resets itself sometimes if you remove it from the device, or flash a ROM, etc. just set it back manually.
[Nexus One Android Development] temasek:
No need to redo learn cycle. Use app to set age back to 86%. Sometimes age will reset on certain conditions.
[Nexus One Android Development] carblanco:
Ok, I see, thanks.
[Nexus One Android Development] eruben:
I use Oxygen ROM. It has nothing to do with CM or stock.
[Nexus One Android Development] k3vink3vin:
I have a workaround for that.

I did a learn cycle and found that my stock battery (Full40 1452mAh)'s age is 85%.

Since the battery resets itself to 94% age whenever the device is powered off, I set the battery's Full40 to 1312mAh and set age to 94%.

Both 1452*0.85 and 1312*0.94 equals to about 1233mAh usable capacity.

Please correct me if the maths don't work like that :p
[Nexus One Android Development] temasek:
Correct. Someone I knew did just that sometime back. But I never tested that personally.
[Nexus One Android Development] theloginwithnoname:
veeeeerrrrry nice - great thinking. Will try that on the desire (which regularly gets charged whilst powered down).
[Nexus One Android Development] theloginwithnoname:
Yep, of course you're right - it's been so long since I did my last one and I was being lazy not reading my own posts :rolleyes:

It was successful though - learnt age is same as my N1 (bizarrely), 89%, even though the phone is newer by at least 6 months.

Now for the app to save that value, and set it on device boot...
[Nexus One Android Development] imfloflo:
Just receive my 1800 mAh new battery, what do you think it's better, should i put it in phone off and full charge, or just start using it and drain it to 0% ?
[Nexus One Android Development] eruben:
It worked! :) It means that this app could work on Desire also, at least with Oxygen ROM.
[Nexus One Android Development] Smokeaire:
Agreed ...been waiting for that feature. Kind of a pain to have to reset %. I assume the hex values don't have to be reset?
[Nexus One Android Development] mtw4991:
If you charge while off, you should see a jump to 100% at the end as in a capacity test. The jump point is your full40 point. I would drain completely and do a learn cycle a couple of times for consistency.
[Nexus One Android Development] temasek:
I don't think the jump point is the max that the battery may provide. That to me is not I called a capacity test.

I don't recommend off charging though.

I smell a debate coming. ;)
[Nexus One Android Development] temasek:
I am curious too. Will find time to crack open the Oxygen Rom and have a good look inside. :D
[Nexus One Android Development] temasek:
I would do a learn cycle with your existing full40 first then a capacity test then a final learn cycle with the new found full40 from your capacity test results.
[Nexus One Android Development] imfloflo:
@temasek Capacity test never works on my phone ^^ even if i follow steps by steps tuto on first page
[Nexus One Android Development] mtw4991:
No debate T, you are right...I still got the flu, lol. Imfloflo, I'd just set full40 to something like 2000mAh, age 100% and do a learn cycle and see how full it gets. If it goes over 1800mAh, then you'll know what your full point is and you can do another learn by setting that new full40+age 100 and you should be good to go.
[Nexus One Android Development] temasek:
Sorry, the so-called capacity test is what I called it when I first experimented with my battery to max its potential. It is not covered in the instructions. I don't estimate the max capacity of a battery but to test out the max capacity.

1. Firstly you need to perform a learn cycle so that your battery knows what is its empty point.

2. Then perform another learn cycle. While the 2nd cycle at its peak about high 90s% its capacity may exceed your full40.

3. Once it reaches its peak at around 99%-100% that is your new full40.

4. When fully charged after 2nd cycle, your capacity will drop below your full40 as full40 is also considered your manually set ceiling point.

5. 2nd cycle whether fail or success is not important as what u need is to see the log as to what is the max capacity achieved before it dropped below the full40.

6. Use the new max value as your new full40.

7. Now perform a final learn cycle based on new full40.

Previously some were doing estimates while others kept bumping up full40 bit by bit to test. I don't consider the method I use is legit but that is what I determined as "Capacity Test". - this test is not covered in the official instructions.
[Nexus One Android Development] imfloflo:
Do you think this settings are dangerous for my phone, juste put in it a new battery from ebay 1800mAh see picture below

http://twitpic.com/3u72o5

http://twitpic.com/3u72k8
[Nexus One Android Development] temasek:
Not exactly dangerous but I suppose u can't perform calibration.

Can u try set the full40 to 1800mAh and reboot see if it stick?
[Nexus One Android Development] mtw4991:
seems like several pages back, Roger or Login confirmed that numbers like these are wrongly programmed in the battery and can't be undone, iirc. Maybe a replacement?
[Nexus One Android Development] musashiken:
Ok I'm still learning how to do this calibration thing.

But I have problems editing my setreg file.

I used astro file manager to open up the setreg file as a text file with text editor.

But I get an "Error loading file:java.io.IOException: I/O error"

Is that supposed to happen? I still get into the file for editing, but the error message bugs me.
[Nexus One Android Development] temasek:
U nid a root accessable file editor like Root Explorer. If not u can use terminal and navigate to the directory and echo the register and its hex values to setreg

Eg.

echo xx YY > setreg

xx being a register

YY being a hex value

Btw I am not sure what error msg is that.
[Nexus One Android Development] madjsp:
I'm having some issues with doing this too.

To start with, the setreg wont save my values.

I am starting to use the program, and my battery went from 13 - powering off in 10 minutes.

I charged it for about 2 minutes, started it up. it said it was at 3% but still had 3552 voltage left.

It stayed at 3, and then went up to 18% with 3449 voltage.

I'd say, that is a bit odd.
[Nexus One Android Development] temasek:
ACR adjustment is probably doing the auto bumping of mAh for u. For new users it would be rather odd but it serves its purpose by providing sufficient mAh for u to last till your empty voltage point.
[Nexus One Android Development] madjsp:
so how can i calibrate the battery if it keeps dying before it hits 3201?
[Nexus One Android Development] temasek:
ACR adjustment needs tweaking. For now u can manually bump up your mAh by entering 10 to register and 03 to value (03 will provide around 300mAh). Keep bumping up your mAh when necessary till u hit empty voltage point.
[Nexus One Android Development] madjsp:
Thanks i'll do this and hope it works!
[Nexus One Android Development] temasek:
Woot!

My battery age auto drop to 99% today. That means one thing...... learn cycle is a one time affair if u did it right. No need to periodically redo learn cycle.

Nice! I am still learning battery calibration .......lmao. :p
[Nexus One Android Development] imfloflo:
Ok so i need to ask a replacement off the battery and ask for one which can be calibrate, or one which should be already calibrate with which values ? (1800mAh)

BTW haven't try to set full40 manually to 1800mAh
[Nexus One Android Development] temasek:
Tell them the scarry figures. Your full40 around 27000++mAh and your capacity of more than 100000mAh. Maybe ask for 1600mAh rated battery as a replacement. But don't put too high hope cuz seller may not replace. If seller does replace then its great!

Also tell them u will use the battery calibrator for nexus one to check the battery.
[Nexus One Android Development] RogerPodacter:
nice! my 1600 did the same thing, dropped to 99 about 2 weeks ago. so realistically it should be pretty accurate, but it follows the standard method in the data sheet of every 300 full charge cycles it drops like 2% or something. so i think every once in a while we can do a learn cycle to see how its matching up.

haha damn mine is at 98% now. i do use the hell out of my battery though. remember aged capacity is "supposed" to slow down or speed up the age decrease. so higher than full40 slows it, lower than full40 speeds it up. my aged capacity is still at 1395 lol, i forgot to fix it. i bet that is why mine is dropping so fast, because my full40 is set to 2550 and my aged capacity is like half of that!
[Nexus One Android Development] temasek:
Lol. My age capacity = full40 = 2500mAh

Since the recent drop to age 99%, I tried to drain down to 0% and yes it did - and tested 3 times, all strikes.

By draining to 0% with an auto drop age, its a good test itself so I don't think its necessary to redo learn cycle.

Btw, what u have done for this battery stuffs = fantastic job! I had fun in testings and still having fun. I hope more will appreciate your work, Roger.

Simply speechlessly thankful. :)
[Nexus One Android Development] discostu1:
I'm trying to do a learn on my phone but I'm having some troubles.

Running CM 6.1.1 and using Calibrator v1.1.1.

I'm trying to send 0x66 a4 to set battery min voltage to 3.201V through the Learn Prep tab, but when I touch the Value field, it only opens up a T9 keyboard, rather then my usual full keyboard. It seems that the letters are greyed out, all I can type is numbers, so I can't type in the letter 'a' for a4.

I've tried long pressing, holding, changing keyboard settings, everything I can think of, but there's no way I can type a letter in that field. I've even tried sending 164 (the decimal equivalent of a4) but that doesn't work.

I know the commands work because I sent 0x65 06 to set min charge current to 20mA just fine.

I just can't figure out for the life of me how to type a letter with this damn T9 keyboard. I'm sure there's a really simple way to do it, and I'm going to kick myself in the ass for not being able to figure it out myself, but for now, I need help. :/
[Nexus One Android Development] temasek:
The developer, dvgrhl is aware of this. It is suppose to be able to input as hex values but apparently it was an oversight cuz currently it only accept numerical values. Dvgrhl should be updating the battery app soon. As its a free app, I don't think we should rush him.

You can use File Editor with root access like "Root Explorer" to edit the setreg file inside the battery folder or, use terminal to push the value to setreg, for now.

Battery Folder

/sys/devices/platform/ds2784-battery

If you use terminal, the command will be

Eg.

echo xx YY > setreg

xx being a register

YY being a hex value

If you edit using an editor with root access, input the following, saved it and exit the editor

0xAA BB

AA being a register

BB being a hex value
[Nexus One Android Development] ellesshoo:
Can someone help me make sense of this? It's the log from my latest learn with my 1600 battery. Looks like it charges up to 1617mAh but when it hits the min charge current (40) it drops to 1603 (which I believe was the full 40 from the factory... what's shown in the last screen cap) . The full 40 I had set during learn was 1630. What should I set my values to?