[HTC 10 Questions & Answers] cytherian:
Possible Explanation for the Random Shutdown and Boot Looping

My phone was initially fine but then suffered this dreaded random shutdown and boot loop. And then after doing a certain technique, it didn't repeat when the phone got down to below 20%. I have a theory as to why this problem is happening.

After I charged my phone back up to 100%, I then pressed and held the volume buttons and power button simultaneously for about 2 minutes. Upon release, battery level was 89%. I charged it back up to 100% and repeated. Next battery level was 92%. Repeated, and then battery level was 97%. From there I just charged normally back to 100% and let it gradually drain down from there. When I hit 25%, I put the screen on maximum and streamed YouTube videos. The battery level began to drop about 2% after each video. I got to 17%, stopped, and rebooted. 16% and still no shutdown and boot looping. After it got below 15% I got a low battery warning, and still no shut down. At 12% it was still running.

I have a new (to me) theory that what may be happening is some kind of firmware issue, where the "adaptive" monitoring of the battery becomes flawed and thus the percentage battery level becomes misinterpreted. That's why there's that auto-shut down. Because the battery REALLY IS LOW, but the Android OS doesn't know it. And then the battery's safety circuitry kicks in and aborts power to the phone. Where it all goes wrong is when the battery becomes a bit worn after a year or so of use. The firmware starts to collect faulty battery status data and then erroneously report the battery level. THIS IS WHY, the phone tries to "boot loop" after the shutdown because it still has faulty battery data. It keeps trying, but the battery says "NO"... and denies sufficient power to complete. And then when you plug in the phone, the battery won't stop the phone from booting up because now the phone has sufficient power, so it completes. Only somehow at that moment, the firmware finally shows the right battery level. 1%.

What cemented my theory was when I plugged my phone back in to my A/C powered USB charger, but this time I did not use the Quick Charge 3.0 port. I used a normal port. And within about 30 minutes, I check the phone and it's showing a 40% power level. That's too fast. From 12%, it should take about 2~3 full hours to charge back up to 100%, and in about 1 hour with Quick Charge. What it suggests to me is that the firmware is still screwing up the battery power level interpretation.

So ultimately this problem isn't the battery. Batteries do wear down, and that's a fact. But from my observations I think it's the firmware in the HTC 10 that's screwing up in it's sensing of the actual battery power level. It gets "out of sync" and thus, this dreaded shutdown starts happening, anywhere from 20~50% power level, maybe more. It may be the micro code in the kernel... which is why some people who switched to a different kernel aren't suffering this problem.

The HTC 10 firmware (or kernel) is PREVENTING the battery from fully charging, because it decides it's 100%, when it really isn't. And to get it to do so, you have to "force" it to see the actual lower battery level.

Replacing the battery TEMPORARILY solves the problem, because the battery is fresh and new. But once the battery starts to accumulate some wear on it, this problem will repeat again... until the firmware (or kernel) is replaced. And if you stick with this flawed battery management code, what you'll have to do is make sure the battery REALLY IS at 100%, by doing that 3 button press for 2 minutes, then charge again. It's the only way to get the battery fully topped off, because the phone is actually not letting it get high enough. What you see is 100%, but it's probably more like 60~80%. And that's why, when the battery starts getting below 50%, you end up in that precarious situation where the battery is actually now in the "danger zone" of really low, but the phone is not reporting it... and thus, shutdown occurs.

Alternative: Of course, this is all speculation from someone who is not an engineer. It's also possible that perhaps it's not so much the kernel as it could be actual hardware in the phone, somewhere in the interface between the battery and the CPU. And thus a replacement kernel like ElementalX is able to overcome it. HTC should take it upon themselves to figure this out... because if it can happen on a phone like the HTC 10, who knows -- maybe it's going to pop up on newer models too. They should understand what's going wrong so they can prevent it from happening again.