News for hackers. Stuff that matters.
Re:Linux Kernel Fastboot [pdf] by rabidrat on Saturday September 14, 2019 @10:27PM (#20975198)
I think it varies with the age of the battery and the operating temperature (probably other things too). Although if they were clever they could probably incorporate those parameters as well..
Re:Linux Kernel Fastboot [pdf] by Filligree on Sunday September 15, 2019 @12:39PM (#20978040)
They use coulomb counting, along with an estimate of how much safely-usable energy is left in the battery.

That estimate is usually accurate, but it can drift a bit over time if you never fully recharge or discharge the battery. Also, when the battery gets old it starts having trouble delivering full current when mostly discharged, which is why you'll sometimes see shutdowns at 5-15% remaining.