[T-Mobile Samsung Galaxy S 4] -Mindroid-:
The concepts in this post are already well explained elsewhere. My motivation in writing this is to consolidate the information in one place and to help others who are new or like me might be confused about properly updating their Galaxy S4 T-Mobile (M919). Many thanks to people who take the time to write tutorials and explain concepts. If you see errors or parts that are misleading please point them out and I will correct them.

There is a decent explanation of what Kernel, ROM, Baseband and a Bootloader are over there:

http://www.reddit.com/r/AndroidQues...what_are_all_the_different_pieces_of_android/

The first thing I did after buying my Galaxy S4 was to flash a custom ROM (CyanogenMod) and Recovery (ClockworkMod). I kept current with new updates but after some time I noticed that even though new CM versions were incrementally improving, the overall feel was somewhat sluggish and the cell reception was worse than that of my friends' stock phones. Flashing custom kernels certainly improves the overall handling but the issues persist.

After digging around I discovered that custom ROMs like CyanogenMod only update the ROM and Kernel partitions. Other third parties make custom Recoveries but the Bootloader and Baseband are closed-source and at the exclusive ownership of the manufacturer. The manufacturer only releases source code for parts of the ROM and Kernel. Those get picked by developers and make their way into custom ROMs. The Galaxy S4 was originally released with Android 4.2. Even though the current CyanogenMod version targets Android 4.4 when you flash it on your phone, the Bootloader and Baseband will still be the original 4.2-derived ones. To find out what version Baseband you are currently running head over to http://www.sammobile.com/firmwares/. Put M919 in the "Search device here" box and you will get a list of Baseband names for each official Samsung release. You can view your current Baseband version by looking in your phone's "About phone" section.

WARNING! WARRANTY VOID

Flashing firmware voids the phone's warranty. There used to be a way to erase all traces of such activity but since Android 4.3 Samsung has improved their security (Knox) and flashing Bootloader 4.3 or newer will permanently brand your phone as compromised. It will also lock the bootloader making it difficult to Root your phone if you want to run rooted stock TouchWiz. This guide assumes you want to run a rooted custom ROM.

I hated every phone I got at release as it takes several months to fix problems and get everything running perfectly. At this point I finally feel my S4 is running great and this update is worth voiding the warranty. I think the aforementioned warranty is 1 year so depending on when you bought your phone it could already be expired.

My house and job are in poor signal areas and often I was getting no service and occasionally a single bar. Cell phones boost power to the antenna when signal is weak and dial it down when signal is good. The battery drains quickly when reception is poor in addition to missing calls.

I went from firmware M919UVUAMDL (April 2013, Android 4.2) to M919UVUFNH7 (Sept 2014, Android 4.4).

Issues fixed with this update:

- cell reception is much improved!

- no more unnnecassary battery drain due to weak reception

- better overall performance

- much less heat

New Problems:

- locked bootloader

- impossible to revert back to old bootloader

- warranty void

HOW TO UPDATE

There should be a way to only flash the Bootloader and Baseband but I couldn't do it.

I flashed the latest stock image from http://www.sammobile.com/ with Odin. This overwrites the Bootloader, Baseband, Recovery, Kernel and ROM. Afterwards I flashed a custom Recovery (CWM) with Odin. From Recovery it's easy to flash a custom ROM and Kernel. This method left the Data partition intact so all my pictures and phone numbers were available afterwards. I urge you to back them up anyway as I have wiped them accidently in the past and it's not pretty.

Instructions

Assuming you are already running a custom Recovery:

- Get the latest firmware package from www.sammobile.com

- Boot into Recovery and make a backup (these usualy don't backup your data)

- Put the phone in Download Mode and connect to Odin

- in Odin make sure only Auto Reboot is checked

- in Odin load the firmware in PDA/AP and flash it

- when the phone boots make sure you are running the corect baseband

- go back to Download Mode and Odin

- unzip and flash the attached Recovery file from this thread with the same settings as above

- Boot into recovery and restore your backup

This should do it, enjoy! If you don't understand some of these steps Google them and you will find a ton of tutorials that explain them much better than I can.

If you didn't make a backup or are unable to restore it, download a ROM zip on the phone and use Recovery to flash it.

The attached file is an Odin-flashable ClockworkMod touch Recovery for M919 (Galaxy S4 T-Mobile).