yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] Nighthound:
Thanks for the link, shall buy it... hope it's a good one.
[Nexus One Android Development] zeus_chingon:
Mine end up being 1580. So don't expect something like temasek's(2400?) like I did lol. By the way temasek, where did you get yours? Ebay? Which seller.

Sent from my Nexus One
[Nexus One Android Development] mtw4991:
Be glad you got a good one! 1560/1580 is great fire a new ..it's a product and probably sat in the bin for a while lol but it is better than stock!
[Nexus One Android Development] chowlala:
Second charge was like 1470 before it jumped 5% to 100. Might need to do a little more calibration. Sadly. It still had the continuous -1 mv once it guys full charge though.
[Nexus One Android Development] k3vink3vin:
just wondering what are the standby current draw for you guys?

it averages out to around -9mA for me.
[Nexus One Android Development] heinz gruber:
so far it seems to work for me. after the calibration i've used this tutorial: http://xdaforums.com/showpost.php?p=9583271&postcount=340

the app shows me after the reboot:

Batt Age 100

Full40 1452

...

Aged Capa 1393

i bought the nexus one used. maybe this is the reason for the age?

one more question:

just a few days before the battery calbriation i wiped the battery stats. so whats the relationship between battery wipe and the calibration app?

maybe it is smart to wipe again after the calbration to get the full power?

EDIT:

ARGL! It turns of at 10% so it didn't work :( but i thought i've made everything right and the values above seems to be ok, or not?
[Nexus One Android Development] mtw4991:
Learn mode failed. Set full40 to 1600, age to 100 and try again in airplane mode
[Nexus One Android Development] heinz gruber:
Okay, i will try it again. But i think my values are allright, or not?

And what is the relationship between wipe the battery stats and the calibration process?

EDIT:

wierd! now the menu shows me 94%

so, next i will do the following:

set your age to 100% using the battery app under the Learn Prep tab

set your full40 to 1600 using the app in the same tab

in settings, check both Wake Lock & ACR Adjustment boxes.

type 0x66 a4

type 0x65 06

WHY IS THAT? to hit learn mode you must keep your current mA above -200mA draw! Turn on some apps but make sure the current (mA) is >200mA in Learn Mode tab

then i will start the learn mode at about 10% battery, put the loader in if mentioned.

then i put the phone in flight mode and leave till the next day

right?
[Nexus One Android Development] RogerPodacter:
From what we found at the beginning of all this, the battery stats file and wipe really doesn't do anything at all. When opened, that stats file is just like a history file that you see in the main phone battery settings, like android system 23%, display 50%, etc. So really wiping battery stats does nothing from what I can tell.
[Nexus One Android Development] RogerPodacter:
That's really good standby current. I see anywhere from -9 to -20mA during idle.

It also depends on which type battery you have. Stock is normal, and the people who got the 2500mAh battery that is only 1600 actually show near double current readings because of the different offset values set in the register. But It's all the same really.
[Nexus One Android Development] RogerPodacter:
So you guys see that -1mA all the time too when fully charged, but still plugged in? I see that on mine too.

I think it only happens to those of us who have the super 2400 batteries that are only 1600, because the current readings are so much higher than supposed to be which causes minor full charge readings to register as an actual reading, but on a stock battery this reading is small enough to appear as zero. That's my take at least.

Once full charge is hit, the nexus is supposed to run off the charger and take the load off the battery. I think we are just seeing small residual current readings during this time because the offset value is much higher than stock batteries. Almost like a rounding type issue.
[Nexus One Android Development] chowlala:
Yeah. I have that all the time. Mentioned it since I received my battery the first time. Not sure what it is. But it's reducing away the mah while the phone is plugged in. haha. Unsure why it's discharging.
[Nexus One Android Development] RogerPodacter:
Ha ha you may be right. Related note, my battery age now just dropped to 96% yesterday. Insane, I'm hammering this thing badly. Maybe charging 3 times a day is the problem!
[Nexus One Android Development] chowlala:
Maybe the discharge -1 ma is the problem. Stock doesn't do that at all. It kinda disconnects and goes on the wire for juice. The discharge seems to be make me feel uneasy. Like it's still drawing power or doing something weird.
[Nexus One Android Development] temasek:
Mine still holding strong at 99% :p
[Nexus One Android Development] heinz gruber:
I want to start the calibration again and want to ask at which battery i should start. Maybe 10%?
[Nexus One Android Development] temasek:
Any % can start, so long u know your real full40. Set your full40 and age 100 and get your job done.

Good Luck
[Nexus One Android Development] heinz gruber:
^^ okay, thanks, already started.

now i put in airplanemnode and wait about four hours till 0x81 right?
[Nexus One Android Development] temasek:
Make it 5-6 hrs
[Nexus One Android Development] temasek:
Awww my battery just auto drop another 1% to 98% age.

That's a good sign of proper calibration. :)
[Nexus One Android Development] heinz gruber:
i don't get it!

made the whole process again and let the phone overnight in flightmode.

this is what i get:

4177,53 -0,268

28 100

100 1600

20 4099

200 3201

1579 1393

handy shut down at 20% :mad:

before i do it with 1452 and it shut down at 10%

i don't know what i'm making wrong:confused:

so here is what im doing:

a. set your age to 100% using the battery app under the Learn Prep tab

b. set your full40 to 1452/1600 using the app in the same tab (i.e. stock capacity of OEM battery)

c. in settings, check both Wake Lock & ACR Adjustment boxes.

a. set your aEvolts to 3201 (type 0x66 a4)

b. set your stop charging current to <20mA (type 0x65 06)

a. NOTE: to hit learn mode you must keep your current mA above -200mA draw! Turn on some apps but make sure the current (mA) is >200mA in Learn Mode tab I don't get this. Why i've to do that?

b. turn learn mode on in Learn Mode tab

c. wait for mV to drop to <3201mV (learn popup will appear & learnf button will light up)

d. insert charger QUICKLY! (You will see a message saying Learn Mode is active on Learn Mode tab.)

e. turn off and close any open apps.i'm using advanced task killer. should i tunr it off during the process? And means it i've to exit the Battery Calibration Tool? Would'nt that end the process?

f. you can use the phone normally until charging current drops to <100mA I don't get this value. Is this the same value like above (200mA) because it changing every second? , then put phone into airplane mode so that you don’t get unexpected current draw near the full point and prematurely end the learn cycle I do'nt use the phone and put at instant in flightmode when the process started and charged it overnight

g. (optional) set setcpu profile to disable overclocking. (set min/max to the same value, ie. 998\998max)

h. charge to full 4hrs.(0x81 will show in battery status register when current drops below <20mA for 2 consecutive cycles) Everytme it shows 0x81 and 100% but the handy shut down at 10/20%

i. unplug and manually power off/on, your new age should be set automatically. Learn is now complete. Your phone should now charge to 100% and die at <1%.
[Nexus One Android Development] warpaper:
Hi guru,

I following the above procedure but I failed to complete steps 2a, 2b.

I use root explorer to make change and confirm the permission is rwx.

However after changed i open the setreg file and found there is nothing there.

Anyone can help? Thanks
[Nexus One Android Development] temasek:
No need to use setreg. Everything can be input from within the app itself.
[Nexus One Android Development] heinz gruber:
maybe i've set the full40 to 1393 because of the aged capa that show me the app?
[Nexus One Android Development] heinz gruber:
i've tried it again with 1452. x81, reboot, and capacity was at 1234!!!!

after the reboot battry age was at 87!!!!

i really don't get it :mad:
[Nexus One Android Development] temasek:
Where and when u got the battery?
[Nexus One Android Development] heinz gruber:
i bought the nexus used a few weeks ago. i've no idea how old it is.
[Nexus One Android Development] zeus_chingon:
After 1 week break in the capacity stayed the same at 1563 vs 1560 from last week.

Sent from my Nexus One
[Nexus One Android Development] temasek:
Ic so your nexus one is a 2nd hand set. Say the original bought his n1 on its very first month, your battery age of 87% is acceptable.

U may wanna think of getting a new battery and hope its good.
[Nexus One Android Development] temasek:
U may wanna input age capacity = full40 to retard the battery ageing.
[Nexus One Android Development] zeus_chingon:
Yes I did that already, thanks.

Sent from my Nexus One
[Nexus One Android Development] RogerPodacter:
This here looks like you did finally do a successful learn cycle. I think you're all good.
[Nexus One Android Development] heinz gruber:
yeha! i think so too :) long way...
[Nexus One Android Development] RogerPodacter:
Yeah what you prob wanna do is try to find one of the good 1600 batteries we found, and buy it. The stock battery for the nexus one seems to always be at 87% age, rather weak, so its often better to get the 1600 since it has better range and capacity and age 100%.
[Nexus One Android Development] heinz gruber:
do you have a link for me? or a name?

thx
[Nexus One Android Development] warpaper:
Do you mean in the LearnPrep tab, by enabling the Advance Options in Setting, I ca n see an extra column for me to "Send a value to setreg........ ":confused:
[Nexus One Android Development] temasek:
Yes.

Its the same as inputing into setreg. The dev had added this option for convenience to users.
[Nexus One Android Development] uoY_redruM:
I don't seem to understand this.

My phone never dropped to the 3201mV threshold that's required to achieve the LearnMode..

I let it go till it died and it never dropped below even 3500mV.

It died at 20% also, which was really odd. Usually it goes to 2% and dies but after I messed with the reg and everything, it died at 20%.

Any help would be great.
[Nexus One Android Development] temasek:
Did u enable ACR adjustment?
[Nexus One Android Development] uoY_redruM:
Sure did.

Right now I did a complete recharge and tried again. I'm at 83% battery and mV is sitting at 3952 and dropping slowly.

What battery % is about average for achieving the mV required?

Also, the advanced reg settings what do I type in Register: 0x and value? Do I do

0x: 66

Value: 3201

<Save>

then

0x: 65

Value: 06

<Save>

??
[Nexus One Android Development] temasek:
Your input is wrong.

In the app except for full40 input as numerical figure, the rest of register values input as hex values.

For Empty Voltage at 3201mV

- register 66

- value a4

For min voltage charged at 20mA (this u did it right)

- register 65

- value 06

There is no average % to achieve Empty Voltage point cuz all users situation are different.

Your objective is to achieve Empty Voltage point before your mAh deplete. That will enable u to start a learn cycle.

Basically the battery don't know where is its empty point, ie 0%. By performing a successful learn cycle, it will then know its empty point.
[Nexus One Android Development] uoY_redruM:
I actually didn't do any input because I was afraid I'd **** it up. I did mine before I realized you could do it from the app (I used RootExplorer and went into the appropriate folders).

I just now did though

66

a4

<Save>

65

06

<Save>

I already previous did

Age: 100

Full40: 1452

Wake Lock On/Off (On)

ACR Adjustment (On)

So, everything should be set and ready to roll, correct?

Just let the battery drain until my Voltage (mV) reading in the General tab reads 3201 then click the LearnMode tab and make sure LEARNF is lite up at which time I plug it in, turn to airplane mode and just let her charge for 4 hours...correct?

EDIT

Of course, also making sure my Current (mA) in general tab doesn't drop below -200.

If it fails, I basically just charge and try again?
[Nexus One Android Development] temasek:
Yes u are good to go.

One point to note. There may be a situation where the auto bump of mAh does not kick in. You may have to manual bump up your mAh to prevent depletion before u hit Empty Voltage point.

Golden rule - your capacity (mAh) must not die before you hit Empty Voltage point

Manual bump of mAh

- register 10

- value 03 (for approximately 300mAh)

Any doubts pls revert.

Good Luck!
[Nexus One Android Development] mtw4991:
yes, I think you have it now.;-) make sure you have GPS polling in settings turned on also and uninstall Dewonkificator app if you have it installed as it can kill learn at the end.
[Nexus One Android Development] uoY_redruM:
Sounds good, I'll see what I get now!

Also

That helps drain the battery faster? Then, after I hit 3201mV I turn that GPS polling back off, turn airplane mode on and let it charge?

After full charge, turn phone off then back on?
[Nexus One Android Development] temasek:
Do whatever u like to maintain above -200mA. What Mtw4991 is a general suggestion that works great.

After completion, try reboot. If age doesn't change then turn off/on phone.
[Nexus One Android Development] uoY_redruM:
One last question, when charging you don't want to turn the screen on right? Just wait for the green light?

Also, does it matter if I don't reset right away and just let it keep charging? Basically, its almost 9pm here. I figure by the time I hit the 3201mV (if I get it) it'll be around 10pm or so. 4 hours charging is obviously late lol.

Could I let it charge over night, then when I get up, reboot it?
[Nexus One Android Development] temasek:
Yes overnight is good. There is a remote chance u peep at the critical time and it will fail even if it hits 100% cuz of the draw current of the screen usage.

Patience is a virtue ......especially for battery calibration! :D
[Nexus One Android Development] heinz gruber:
i'Ve achived an age of 87% percent for my tock battery and yesterday it died at 1%, perfect!

i'll leave the phone off and charged it over night. tommor i turned it on and my battery life was at 94%. Full40 was 1452 and Capacity (mAh) was 1360. so thats 93,6% is it sitll okay? and will it die now forever at 1%? because i thought the calibration app write the values directly into the battery.
[Nexus One Android Development] temasek:
Remember this

1. If your phone auto shutdown, upon next power up your battery age will become 94%. You have to manually set age back to 87%. No need for further learn cycle.

2. If you manually power off, upon next power up your battery will remember its age.

Once successful on achieving a learn cycle, your battery will auto drop its age in time. No need for further learn cycle.

My battery is an aftermarket battery. After learn cycle age is 100%. It auto drop to 99% and now auto drop again to 98%. :)
[Nexus One Android Development] heinz gruber:
a, good to now.

but what about Full40 was 1452 and after it loaded Capacity (mAh) was at 1360 and thats 93,6%. now i've switched back to age 87%. so what will happen now? becuase i often let the phone auto shutdown and you write it'S auto drop its age in time. and when i manually set it back to 87% and it dropped to 86%, you know what i mean?
[Nexus One Android Development] temasek:
It will auto drop its age in time. You don't have to drain/use the battery till it auto shutdown at 0%. Actually its not that good to always drain till 0%. Just know that u can do it.

Stock battery starts its age at 94% (battery that comes with n1). Its more or less a known fact that stock battery sucks.

At age 80% is considered battery end of life. So u might wanna consider a new battery.

Edit: if age reset to 94% you set age back to its actual age accordingly.
[Nexus One Android Development] heinz gruber:
first thanks for your answers!:D

with that you mean back to 87%?

can you recommend me a battery?
[Nexus One Android Development] temasek:
Back to whatever last age before it reset itself to 94%.

I really don't wanna recommend any cuz many cases of getting bad batteries from ebay that cannot be calibrated. U may wanna try your luck. Search "nexus one 1600mAh battery" in ebay. I bought at about $10 USD.
[Nexus One Android Development] theloginwithnoname:
Correct. The actual reason for this is not because it auto-shutdown, but because you have to charge it before it will switch on. As I and others have said many times, if you charge your battery whilst phone is off, it will reset age to 94%. **This is probably why we often hear the phrases "stock battery is supplied at 94%" - cos you *have* to charge it off before using it, it resets itself**. Stupid, stupid, stupid!

I think that's only true with after-market; stock doesn't auto-drop IIRC.

I recently did a successful calibration with the app, using GPS to keep below 200mAh. I did this because my power button has stopped working so my charge patterns have been a bit "irregular" ;)

Got to end of calibration, new value 87%. Powered off to get correct age setting before realising I'd have to USB-power boot my battery! DOH!!

Anyways, app worked great; shame my power button does not - a major PITA and will likely make me purchase new phone (Incredible S or Thunderbolt - whoo hoo!)
[Nexus One Android Development] RogerPodacter:
Damn you too are getting a new phone soon. Sad times nexus one users moving away. I've struggled and think I decided on getting the desire s when it releases. Next gen snap dragon Qualcomm, normal size slcd screen, nexus one-like build, large battery and sense UI. Course an ATT version prob won't come out. I'll be stuck with the n1 forever:-(
[Nexus One Android Development] RogerPodacter:
Have some interesting news. Just played with the HTC inspire at the ATT store, and son of a ***** it uses the exact ds2784 battery driver as our nexus one. So this thread and our app finally may be able to live on and expand to other devices. I'm now wondering about the desire HD or z also having the same driver. I'm so close to buying the inspire since I'm out of contract and It's only 99 dollars. And It's freaking gorgeous.

Also I did some power tests on the inspire huge 4.3 inch screen, and I'm now sold on slcd over amoled. The current readings with max brightness wouldn't break 250mA even with that huge screen. My amoled here crushes at 700mA on white web pages. Screw that. Now I really can't wait for the desire s.
[Nexus One Android Development] Nighthound:
I recently bought a 1600mAh battery from this link:

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=270650209530

It shipped last Friday, so I'm expecting it some time this week or the next. If you can wait, I'll be posting my calibration results using the new battery to see if it can be properly calibrated.
[Nexus One Android Development] ellesshoo:
I have a seidio 3200 mAh battery and a seidio 1600 mAh battery. I'd be willing to generate some logs/data for you guys but I need some step-by-step directions as to what I need to do to give useful results.

On a side note, I have 2 OEM batteries. If fully charge them (phone off, OEM wall charger) overnight one of them shows 1440 (maybe 1404) mAh at full and the other shows 1376 mAh. Is this normal? I bought the spare OEM along with my nexus so they were likely manufactured around the same time. The only difference b/w them is I dremeled the tab by the SD card on one so I could root w/out unlocking the bootloader. After I did that, for whatever reason, I tended to use the undremeled batt exclusively for about a month. Then I got a battery charger so I've been simply swapping in a full battery for a low one which means I'm basically alternating between the two equally now.

The dremeled battery is the one that gets up to 1440 (or 1404, can't remember) and the uncut one is the one that goes to ~1376.
[Nexus One Android Development] RogerPodacter:
when you get a free moment lets talk about this post above you made. i'm curious about your script cause i'm in the process of putting a simple one together to do the exact same thing. what you could have done is when you "ran out of capacity there towards the end, just echo 0x03 to register 0x10 which is the ACR register, and it would have tricked the phone into thinking you had another 300mAh capacity suddenly, and hence you would not have shut down due to lack of capacity. instead then it would have waited for VAE to br crossed.

that's what i've been experimenting with this weekend, re-writing the ACR and also setting AE mAh point to zero to give us extended time to see the status register switch.

i was successful at one point where i was able to get the status register to flip WITHOUT shuting down. but i've been unable to reproduce it for some reason cause i forget the values i had used because i was just winging it. but its gonna be a combination of those 3 that should do the trick i'm thinking.

now i just need a good script. i'm thinking of outputting the status reg to a virtual file and setting up a script that will continually read that file till the result indicates learn mode, and pop up a message or something. but i'm learning so thats a big project for me to figure out!

hit me up next week when you've got some time.

EDIT: i've never written a script before, so if anyone has any helpful advice for me to get started. basically i just need to learn how to write a script that continually reads a file in real time, and when a certain result is read from the file a message or pop up occurs to the user to tell them learn mode is active and to plug in. sounds so simple but i'm a noob with this stuff.
[Nexus One Android Development] dvgrhl:
How "real time" do you need to be? I would think the following type of outline would work for you:

boolean done = false
while(!done) {
read file contents
if(file contents == desired result) {
done = true;
}
}

print message to user

That's just some rough pseudo-code, but should get you in the right direction. Do you need more language specific type syntax? I'm headed to bed, but I can work with you on this tomorrow if you want. Hit me up in a pm if you need anything.
[Nexus One Android Development] RogerPodacter:
figured i would update this thread. We basically got this project working fully now. We modified the battery driver and can now fully interact with the battery. We have a working:

setreg - let's us set any register value we want

dumpreg - returns all register addresses in one file

status register - let's us monitor the status register in real time, to hit learn mode successfully.

agescalar - let's us monitor the age of the battery

we made a good amount of progress, so hopefully the next step is getting it out there in the community.

basically i've been able to hit learn mode pretty much all the time. and i've experimented with setting my age scalar to different values, i leave it at 100% right now. also changed our <80mA down to <20mA during charging and it squeezes some extra juice out of our battery.

so basically the proof of concept is working excellent, fully functional if you can believe it:D.
[Nexus One Android Development] overground:
Been following this thread on and off. Glad to see some functional progress is being made and will be usable soon. Keep up the great work!
[Nexus One Android Development] theloginwithnoname:
continued from the other thread

grab it from your phone /proc/config.gz, unzip it on your build machine, and rename.

The best HOW-TO I used for cooking your own was from http://wiki.cyanogenmod.com/index.php?title=Building_from_source

Me and RP are both a bit new to git so we're still figuring out the best setup. As our enhancements are likely to be based on CM's kernel, I'm guessing best way to do it is fork from that, make our mods, and send pull requests.