How to fix Galaxy S4 stuck at boot screen despite factory reset?
Whoa, hold the phone! Had this problem and thank God I didn't do factory reset. Have a Galaxy S4, my carrier is Sprint if that matters. It's rooted, otherwise stock. My fix, hope it works 4 u:

1) Pull battery, wait 10 secs, put it back in, don't turn it on.
2) Simultaneously press vol down, button below screen, and power.
3) When it powers up, immediately release only the power button, keep
   holding the other 2 for a few seconds.

Boot up normally and you're done, but backup your data now...