[AT&T Samsung Galaxy S 4 General] audit13:
i337m: How to sim unlock, install TWRP, and root a stock ROM

Download the stock Fido 4.4.2 from: http://www.sammobile.com/firmwares/download/36977/I337MVLUFNI2_I337MOYAFNI2_FMC/

Download stock Fido 5.01 from here: http://www.sammobile.com/firmwares/download/54721/I337MVLUGOH1_I337MOYAGOH1_FMC/

Download Odin 3.07 from here: http://xdaforums.com/attachment.php?attachmentid=1168421

Download Odin 3.10.7 from here: http://odindownloadxda.com/

Link to i337m 4.2.2 modem file: http://xdaforums.com/showpost.php?p=63003693&postcount=75

Link to supersu.zip: https://download.chainfire.eu/696/SuperSU/

The first two files may take a while to download but it is a good idea to have a copy of these files for future use. The firmware files are in a zip format and they should be unzipped only once to produce a tar.md5 file.

Note this will trip the Knox counter from 0 to 1 and void your warranty.

Before flashing, make sure you backup all important files BEFORE flashing anything.

Flash stock 4.4.2 as follows:

Open Odin 3.07, uncheck everything except f.reset time;

click on PDA in Odin and browse to the tar.md5 file for stock 4.4.2;

put the phone into download mode and connect it to the computer via USB cable (I recommend using the USB cable that came with the phone and a USB 2.0 port, not a USB 3.0 port);

flash the firmware;

when you see the word "reset" in the status window, remove the USB cable from the phone, remove the battery, wait 5 seconds, replace the battery; and

use the home, volume up, power button combination to boot into recovery, wipe data, wipe cache, reboot.

The phone should now be running a stock 4.4.2 ROM.

How to install TWRP and root the phone:

copy supersu.zip and regionlockaway.apk files to the phone's internal memory or a micro sd card (the micro sd card should be in the phone before after powering up the phone with the 4.2.2 modem);

power off the phone;

Open Odin 3.07, uncheck everything except f.reset time;

click on PDA in Odin and browse to the tar file for TWRP;

put the phone into download mode and connect it to the computer via USB cable (I recommend using the USB cable that came with the phone and a USB 2.0 port, not a USB 3.0 port);

flash TWRP;

when you see the word "reset" in the status window, remove the USB cable from the phone, remove the battery, wait 5 seconds, replace the battery; and

use the home, volume up, power button combination to boot into recovery which should now be TWRP;

flash supersu.zip from twrp;

reboot the phone and allow supersu to update and disable knox;

go into the phone's security settings and enable the installation of apk files from unknown sources;

power off the phone.

How to flash the 4.2.2 modem and sim unlock the phone:

power off the phone;

Open Odin 3.10.7, uncheck everything except auto reboot and f.reset time;

click on CP in Odin and browse to the modem.bin file (changing the file name may cause Odin to fail, thanks to [MENTION=3565448]droiduzr2[/MENTION] for this hint);

put the phone into download mode and connect it to the computer via USB cable (I recommend using the USB cable that came with the phone and a USB 2.0 port, not a USB 3.0 port);

flash the modem;

when the phone is booted, locate the regionlockaway.apk file, install and run it (this will remove the sim lock);

power off the phone.

Before flashing back to stock 5.01, power off the phone, insert a sim card that was not issued by the carrier to whom the phone was locked, and power up the phone. If you see a prompt for a network unlock code, the phone is still sim locked. If the phone does not ask for the network unlock code, the phone should be permanently sim unlocked.

How to flash back to 5.01:

Open Odin 3.07, uncheck everything except f.reset time;

click on PDA in Odin and browse to the tar.md5 file for stock 5.01;

put the phone into download mode and connect it to the computer via USB cable (I recommend using the USB cable that came with the phone and a USB 2.0 port, not a USB 3.0 port);

flash the firmware;

when you see the word "reset" in the status window, remove the USB cable from the phone, remove the battery, wait 5 seconds, replace the battery; and

use the home, volume up, power button combination to boot into recovery, wipe data, wipe cache, reboot.

The phone should now be running a stock 5.01 ROM.