[T-Mobile Samsung Galaxy S 4] Biker1:
I'm not exactly sure what steps you have taken to get back to Stock, where you're still having random reboots, but I'll let you know what I've done in the past to get to Stock which resolved the issues:

- Factory reset device from device. Save and/or move your Internal files/data prior as you'll be wiping Internal. I'd remove my extSdCard prior to Factory reset and after moving files to it.

- ODIN Samsung Stock Firmware

http://samsung-updates.com/details/9595/Galaxy_S_4_T-Mobile/SGH-M919/TMB/M919UVUAMDL.html

- After the device boots, you'll probably get stuck on the Samsung splash boot screen. After a few minutes - -

- pull the battery, replace the battery but Don't power the device on

- Place device in Stock Recovery mode by pressing Power and Vol up buttons at the same time.

Release the buttons when you see the blue letters appear in the upper left hand corner of the screen.

- Scroll to Factory reset using the volume buttons.

(During the above process, you'll see the Android on its side with a Red X on him/her.)

- press the power button to lock in Factory reset

Let the Recovery scroll through its script

(during this process the Android will come to life :))

- After the script is completed which takes less than a minute or so, scroll to reboot and select it with the power button.

- the device will now boot.

Important: while the device is booting, the screen will stay on the T-Mobilessplash screen for what will seem forever. Don't panic. The screen will show T-Mobile across the screen for about 15 or so minutes. Could be a little more or a little less. The device will then continue and complete the booting cycle.

Some notes:

1) during the above process, I have removed my extSdCard card as I didn't want tottake a chanceiit would be wiped. ODIN doesn't wipe extSdCard card but I don'tbneed it during theiprocess so I remove it in case Murphy decides to pay a visit.

2) during ROM flashes, I've experienced almost every issue youccan imagine. This occurred while using TWRP 2.5.0.2, but only when flashing ROMs with Aroma. For months prior, I had zero issues.

The problems I was experiencing were:

Random reboots, splash screen freezes, bootloops, installation of choices in Aroma which only partially installed, issues which didn't seem to havesan answer, and when you found the solution, that solution wouldn't work when the issue appeared again.

- constantly ODINing back to stock

- sometimes in Recovery, I couldn't get past the TWRP lockscreen, and only wiping Internal SD resolved the issue so I could do a Factory reset. I was doing this so often, that I left all files on my extSdCard so Iewouldn't lose my data when I had to wipe internal. It was faster this way as I didn't have to keep moving stuff back & forth.

After endless hours of troubleshooting and aggravation, I changed Recoveries.

I installed Philz Touch Recovery, and I have had Zero issues since installing it about 3 or so weeks ago, which have included multiple ROM flashes with Aroma.

I didn't want to switch Recoveries as I was very used to TWRP, but I just couldn't deal with the new found issues I was having so I made the switch and haven't looked back. Some people don't have issues with TWRP, but I wasn't one of them ;)

Hopefully you can relate to some of my experiences which I have written above, which may help you to resolve some of the issues you're experiencing.