Every so often, my phone (Motorola Milestone, firmware 2.1-update1) decides that the battery is almost drained and that I have to turn the phone off. This may happen just a few hours after charging it, and a subsequent restart confirms that yes, the battery does still have a charge, still at 70-80% capacity.
This tends to happen every few weeks, and it's been happening basically ever since I bought the phone a few months ago, so I'm pretty sure it's not a charge memory issue, especially when combined with the fact that the problem is intermittent and very infrequent.
Does anyone know why this might happen, and what I could do to fix it?
I saw this exact same issue on my Motorol DROID v1 (same hardware I believe). With Android 2.0, 2.1, and 2.1 update 1 my phone would sometimes report the battery completely drained just a few minutes after unplugging it. I have not seen this issue again since the 2.2 update. Before the update the way I would get the phone to display the proper charge level was to plug in the USB charger for just a moment. As soon as the phone saw that it was charging the charge level immediately displayed correctly.
Some custom recovery images have a command to clear the battery cache, this has fixed similar problems on different phones for me.
Although not generally recommended for Li-ion batteries, I believe a full discharge and recharge cycle will also clear these statistics.