I have an HTC Desire 510 and it keeps acting up. When I turn it on, it stays on for about a minute and turns off then turns back on again. It continues to do that until the battery runs out. This wouldn't be a problem if I could just factory reset my phone, right? But I can't because when I try to do that or a recovery the phone turns black for like 5 seconds and then shows a phone with a triangle and exclamation mark in between. I tried rooting it but because the phone won't stay on, it doesn't stay connected to the USB and when the phone does turn back on it doesn't change. I can't add or delete apps or turn on debugging mode because the phone will just turn off and start the same like however it was when it started acting up. It's like it's stuck and I'm contemplating if I just need a new battery.