Using this guide, flash back to the stock TAR (not the UVUAMDL TAR). This restores 4.2.2, which allows access to the menu. However, this alone is not enough, as it won't give you access to the perso functions. Attempting to flash the UVUAMDL TAR will result in an error (at least, it did for me).
Second, extract the modem.bin from the UVUAMDL file, and flashed it to the phone using Odin. It's similar to the guide above, but instead of using PDA, you use phone. This gives you access to the perso functions, as it forces the baseband back to UVUAMDL from UVUEMK2. It may be possible to flash the UVUAMDL.tar modem files found in other threads, I haven't tried this out myself though.
Now, at this point you can follow the instructions in this thread, as every option should now be available. If they're not, make sure your Android version is 4.2.2 and that the baseband is UVUAMDL.
If it works at this point, great, go on to the next step (you may have noticed by now that your sound is not working). If not, use RegionLock Away to fully unlock the phone. At this point, your phone should be fully unlocked and you can see it connected to the network. However, dialing/calling lags significantly, and there is no sound.
The next step is to use Odin to fully restore UVUEMK2, which would restore full functionality. You can download the file from here, and flash using the same steps above. This will restore full sound and phone functionality, while your device remains unlocked. If it gets stuck during the boot animation, you simply need to do a factory wipe from recovery (not sure if this works, haven't tested it myself), or just install your recovery of choice from Odin and install whatever ROM you want to use (what I did, which still required a full factory reset from recovery). Skipping restoring UVUEMK2 and installing your ROM of choice does not work, however. You will still have no sound and the phone function will lag considerably.
If everything goes well, you should have a fully unlocked T-mobile Galaxy S4.
Better guide by kali323:
1. Download MDB Tar. Extract from 7zip file and then rename the file (remove the .md5) so the filename should be "SGH-M919-UVUAMDB-k0nane.tar"
2. Odin the MDB Tar in the PDA slot and once it finish go to recovery and factory reset.
3. It will take forever to reboot and it will be stuck at the boot up screen for awhile with this error "Kernel is not seandroid enforcing set warranty bit: Kernel". In about to 5-10 mins it will boot up.
4. Now youre in MDB 4.2.2 with MK2 modem.
5. Odin the .bin file below. Use the PHONE slot in odin and not PDA. Again it will take 5-10 mins to boot up with the error "Kernel is not seandroid enforcing set warranty bit: Kernel"
6. Now you have MDB Rom with MDL modem
7.Odin CF AutoRoot with the link below in the PDA Slot. It will take 5-10 mins to boot up with the error "Kernel is not seandroid enforcing set warranty bit: Kernel"
8.Download RegionLock Away 1.3 App either in the thread below or buy it at the google play store to support the developer
9. Run RegionLock Away and click reboot now. It will take another 5-10 mins to boot up and if you dont ask you for an unlock code with a non tmobile or non tmobile mnvo sim then youre are unlocked.
10. Odin 4.3 or 4.4 and youre done
This method works the only problem I encountered is while flashing the modem i couldn't make it flash, i would flash it but then in settings my baseband would stay mk2 so the way to fix this is to flash in odin with auto reboot off. then when its done flashing unplug the phone then pull the battery and boot straight into download mode and flash the modem.bin once again same drill, auto reboot off then pull the battery then reboot and it should work.
edit: just kidding this method did not work for me, the unlock prompt no longer shows up, but an at&t sim card still will not work, although it does tell me i have five voicemails that i cannot listen to. no texts no calls no data, where it should say at&t in the notification panel it says no service... :/ any ideas? I havent yet updated back to 4.3/4.4 yet could that be the problem?
when I try to call it just says "not registered on network"
turns out that it is just because i havent updated back yet, not even a t-mobile sim works. turns out I have a blacklisted imei! but i think I am unlocked hopefully this (at least the first part) answers a few questions aroused during this process, may be the op could get updated with a couple key peices in this post. also huge kudos for this!