Galaxy S4 restarting and freezing after root I recently made the mistake of rooting my Galaxy S4, accompanied by a few more customizations.

Problems that occur:


TouchWiz freezes. One way to unfreeze is to hold down the Home button to see recently opened apps and then go back, so that Touchwiz wakes up. The other way is to pull down the Notification bar and click Settings or anything else from there that'll send me to a different app so I can avoid it. If I don't do any of these within 5 seconds the freezing occurs, the device restarts.
The device also restarts when the CPU is suddenly expected to work hard. For instance, within the first minute of a call, or when the screen is locked/unlocked, a couple seconds after opening a music file. This happens 3-5 times a day, depending on usage. The restart is not always preceded by a freeze, but often there's a freeze before the restart.


Recent changes that may be causing such behaviour:


Rooting using AutoRoot by Chainfire.
Giving CPU Master root permissions after SuperSU is installed.
Installing busybox.
Patching modded Google Play Store (involves patching Core.jar package)


What I did so far:


Uninstall CPU Master.
Delete cache and data of Touchwiz
Remove busybox
Remove all custom patches from core.jar
Install the original Google Play Store and update to latest version


I don't think Touchwiz is causing the crashes because somethimes the phone restarts while an app is in use.

Thanks in advance.

EDIT: I removed the original Samsung ROM altogether and switched to Cyanogenmod. Thus I may not be able to upvote/tick the replies from then on.
FWIW I've been having a similar problem, but without the modifications you mention. My process was to root, install SuperSU, Titanium Backup and then restore a bunch of apps.

The first time I got the problem, I thought I had restored some system apps or something, so I reverted to stock, and tried again, but being more careful to only restore apps and stuff like wifi access points. This suffered the same problem (but possibly less so).

I've gone back to stock again, and I'm going to try it to see whether I get similar behaviour without rooting. If all is well for a day or so, then I'll root, and see if anything changes. If it's still stable, I'll start using apps that utilise root and see what happens.