[AT&T Samsung Galaxy S 4 General] jd1639:
The i337, S4 can be a very difficult device to come to grips with. With each firmware version there are new root methods and recoveries that can be used. The purpose of this guide to try to put all those in one place and provide a basic summary. There are many smarter than I who have done the hard work and I'll try to give them credit in this guide. If I've missed anyone please pm me or post here and I'll correct it.

FULL DISCLOSURE, I DON'T OWN THIS DEVICE AND NEVER HAVE. I JUST KNOW A LOT ABOUT IT. IF THERE ARE ANY ERRORS OR IF SOMETHING CAN BE CLEARER PLEASE LET ME KNOW.

The very first thing you need to know is what bootloader version you're on. To determine that go to menu, settings, more, about device. Look at the last three characters of your baseband or buildnumber. You'll be on either mdb, mdl, mf3, mk2, nb1, or nc1. NOTE, if you’ve flashed a modem your baseband may not reflect the current firmware version. Alternately if you’re rooted, for a definitive answer, in a terminal emulator on your phone type the commands:

su (return)

getprop ro.bootloader (return)​

​

1. You're on MDB or MDL, your bootloader is easily exploited and you can use a common custom recovery, TWRP or CWM with loki. See this excellent guide by @ xBeerdrioDx, http://xdaforums.com/showthread.php?t=2314494

2. You're on MF3 or MK2. DON'T TRY TO USE TWRP, CWM, ROM MANAGER, or TWRP MANAGER. My personal recommendation is to upgrade to NB1 (once you upgrade you will not be able to go back). To do that see [MENTION=4708661]muniz_ri[/MENTION] stock odin tar's at http://xdaforums.com/showthread.php?t=2674223 . You'll need to extract the file using winrar or 7-zip. You'll end up with a .tar.md5 file. Use that in odin's PDA slot or AP slot if you're using odin 3.09. For odin I'd use this, http://www.google.com/url?sa=t&rct=...=9V2YMclcePs8PugxewUhmw&bvm=bv.73231344,d.b2U

NOTE: Using odin will wipe your device so backup everything up on your internal sd card that you want to keep to your PC.

To root, install Safetrap and flash your rom:

If you've used the rootable version to upgrade your firmware you can boot into your device and use towelroot to root it. Towelroot by [MENTION=3280118]geohot[/MENTION] can be found here. https://towelroot.com

Now download and install chainfire’s supersu apk from the play store, https://play.google.com/store/apps/details?id=eu.chainfire.supersu&hl=en

Use Safestrap 3.72 as your custom recovery http://xdaforums.com/showthread.php?t=2448925

Before installing safestrap go to the play store and install SELinux Mode Changer, grant it root access and change mode to “permissive”, https://play.google.com/store/apps/details?id=com.mrbimc.selinux&hl=en

Flash your rom and the nb1 modules, https://www.androidfilehost.com/?w=files&flid=17227 Thanks to [MENTION=2982241]guut13[/MENTION]

NOTE: you can only use the stock rom slot

3. You’re on NB1. DON'T TRY TO USE TWRP, CWM, ROM MANAGER, or TWRP MANAGER. I’d take the OTA to NC1 which is rootable. Use towelroot to root and Safestrap 3.72, see above, but flash the nc1 modules.

4. You’re on NC1. DON'T TRY TO USE TWRP, CWM, ROM MANAGER, or TWRP MANAGER. Use towelroot to root and Safestrap 3.72, see above, but flash the nc1 modules

5. You’re on NI1. DON'T TRY TO USE TWRP, CWM, ROM MANAGER, or TWRP MANAGER. Use this by [MENTION=4708661]muniz_ri[/MENTION] http://xdaforums.com/galaxy-s4-att/general/how-to-root-i337ucufni1-t2881298

And the most important link I can give you is the great work of [MENTION=2982241]guut13[/MENTION] which is mandatory reading for everyone on the i337, http://xdaforums.com/showthread.php?t=2616221