My stock (unlocked) M7 has been stuck trying to boot up since I turned it off and on again this morning. I have never tried to install any custom OS.
I can get to the recovery screen, but clearing the cache didn't help. When that didn't work, I did a factory reset. When I reboot, I get to a screen that says "Android is updating - Starting apps.", and then that screen gets stuck too.