No battery - 1% remaining I've recently installed cm11 (plain CyanogenMod) and the battery indicator showed 1% after a full charge and would not budge.  I decided, 10 minutes later, to wipe and go to another ROM, maybe try a new one.  I did so, changing everything including the kernel - and the battery stays the same at 1%.  The only thing I have not tried is leaving the phone to die, giving it a funeral and a tombstone and doing the "charge trick" but I've heard it's also a myth.  Can somebody please help me avoid a broken phone?

And also, just in case: Phone model is ST18i Xperia Ray.  Warranty voided due to rooting :(
I think Itzik Samara's answer is all you need. But I thought I'd add some information for people without CWM or with a version that can't delete the Battery Stats for some reason (as you had this concern initially yourself). 

This can also be done less elegantly via adb

Firstly ensure your device is FULLY CHARGED. Do not do the below without charging fully! 


Reboot your phone into recovery. 
Mount /system and /data in the partitions menu. 
Open up a cmd prompt:

adb pull /data/system/batterystats.bin batterystats.bin

This command save the batterystats.bin in the same directory as your adb.
Run:

adb shell
And finally:


rm /data/system/batterystats.bin

This removes the entire battery stats file from the device. It will be rebuilt on reboot.