HTC One M8 overheating, random reboots and unable to power it off Last night I forgot to charge my HTC One M8 phone, and when I woke up in the morning, the battery was dead, Unsurprisingly. I plugged it in to charge for about 20 minutes (only to about 30% or so charge) and then left my house (with my phone in my pocket). The device was off during charging, and I only turned it on about an hour ago, putting it back in my pocket after seeing that it booted fine (and that I had about 30% charge left). About 15 minutes ago, I noticed the device against my leg getting very hot, and pulled it out to see the "HTC One" startup screen. I found this strange because I had already turned on the device, so I don't know why it would be rebooting.

After it started up again, I went looking for what may have caused my phone to seemingly reboot as it did, and in the process of using the device to do this, my screen went black and showed the HTC startup screen again, and afterward, back to my lock-screen. I'm pretty sure It's been doing this cycle of starting up and then randomly rebooting since I turned the unit on some hour ago.

I use an OtterBox Defender case on my phone, and noticing that it was extremely hot on its own, I removed the phone from its case. The rear of the phone was even hotter, to say that I wouldn't be able to hold the device that long because of how warm it is. From this, I was able to determine that overheating could be the cause of this cycle, so I tried to shut off the device by holding the power button and selecting "Power off" from the menu, but after it would shut down, the unit would turn back on. I have no explanation for how or why this would happen.

It seems now the device has run itself out of battery, so I'm letting it cool for the next couple hours until I can charge it again at home. Is there any solution to this should it be happening again?

Stock Android 5 Lollipop, Sense 6.0, No S-Off or Root
For a quick fix for it rebooting after you power off, try holding the volume-up button while holding the power button. For the phone, it simulates a battery pull.

Maybe try to wait overnight and wait until the morning to see if the problem still persists. If it does, hold the volume-down button and the power button at the same time, from the shutdown state to enter the Hboot HTC bootloader.

If you have a custom recovery installed, enter it and try to clear the cache and dalvik-cache partitions. If you don't have a custom recovery, use the fastboot command: fastboot erase cache with a simple tool like Minimal ADB and Fastboot while in fastboot in the bootloader.

If this still doesn't work, you're probably going to have to factory reset/format the whole system.

I have an HTC One M8 (writing on it right now), and the only time this happens is when I flash a corrupt ROM, however.

If you're going to have to format it, I suggest flashing the stock Android ROM, it has really nice animations.