New answers tagged unrooting
Solution Turns out that the stock firmware was failing to write because it was an old version, and Android doesn't like old versions, and it won't work. I downloaded the most recent firmware (6.0.1) overnight, and sure enough, it flashed, and my phone is now functioning again.
You may have to flash stock fimrware on it. which phone is it, I will put latest firmware for you so you can flash it.
Top 50 recent answers are included