[Sprint Samsung Galaxy S 4 General] vboyz103:
ROMS tested by me:

***************************************

These are the following KitKat based roms that worked really well with this approach:

1. CM 11 Nightly

2. PAC-MAN

3. Slimkat Weekly

I tried with both AT&T and T-Mobile variants, and didn't have to load Sprint specific kernel, the stock kernel came with those worked just fine. But if you get bootloops, go ahead and flash KToonz Sprint AOSP kernel.

IMPORTANT: The listed roms above have ability to detect device type and it will set appropriate settings meaning your default network mode with be CDMA, which you don't want to do that since u r running on unlocked GSM to begin with. So I learned that you can force GSM mode upon starting up by putting these two lines into build.prop:

telephony.lteOnGsmDevice=1

ro.telephony.default_network=9

*******************************************

So thanks to OP on this thread http://xdaforums.com/showthread.php?t=2530610 for the instructions on how to get the SIM unlocking work.

I personally wanted to run pure AOSP on my GS4, but the problem is when I go AOSP, switching over to GSM works but I can't receive any phone calls. If I run stock, I can configure it to turn off roaming guard and whatnot, this is not the case for AOSP.

Therefore, here's how I get around it. WARNING: a little lengthy but it worked.

0. Backup your current Sprint AOSP now you'll need it later.

1. Download TMOBILE AOSP rom of your choice. I chose Gummy 4.4

2. Download Sprint AOSP of your choice (I'm on sprint). I chose Gummy 4.4

3. Once download completed, open the TMO zip and delete the boot.img because it contains the kernel for TMO which we don't want. Keep this window open.

I recommend NOT extracting it because you will have to reassemble later, just use a zip software that allows you to edit in place.

4. Open the Sprint AOSP, copy the boot.img over to TMO. Basically, we are replacing JUST the kernel for Sprint into TMO to make the phone boots.

5. Now we need to get rid of the assertion check for device type in the updater-script.

6. WIth TMO zip window still open, edit the file /META-INF/com/google/android/updater-script, and replace anything that said jfltetmo with jfltespr. UPDATE 3: If you see no "assert" lines described below in your updater-script, simply ignore this step.

From:

assert(getprop("ro.product.device") == "jfltetmo" || getprop("ro.build.product") == "jfltetmo" || abort("This package is for \"jfltetmo\" devices; this is a \"" + getprop("ro.product.device") + "\"."););

To:

assert(getprop("ro.product.device") == "jfltespr" || getprop("ro.build.product") == "jfltespr" || abort("This package is for \"jfltespr\" devices; this is a \"" + getprop("ro.product.device") + "\"."););

7. Save the changes, and upload the TMO to phone and flash. Now you are running completely under TMO settings and calls can be received.

8. Setup everything you need and NANDROID backup.

9. So with this approach, I tested switching back to CDMA, and the EXACT problem happens (can't receive calls). So move on to next step.

10.To switch back and forth, you just need to boot into recovery and wipe system and replace it with the targeted system you want to be on. For instance, if I am on TMO and want to switch to SPR, I reboot into recovery, wipe current TMO /system and restore SPR /system and reboot. This whole process should take about 3 minutes.

If anyone has any better approach, please share.

UPDATE: This approach also will solve my problem of using AOSP dialer. If I run Sprint ROM (CDMA), and switch over to GSM via Mobile Network (in Settings), then upon placing a call and hanging up will NOT hang up. The dialer on Sprint ROM will say the call has ended by it never did if you put it on speaker phone. So with this system switching, it also solves this problem.

UPDATE 2:

If you are in Asia using GS4, flashing Sprint S4 stock kernel will fix issues reported below:

Gummi (Won't mount my external SD card)

Omni (Won't mount my external SD card)

Cyanogenmod (Crashes, can't install apps, bunch of other problems)

AOKP (No wifi, crashes, etc.)

Go to Page 3 to find more info. >> http://xdaforums.com/showpost.php?p=49724403&postcount=21