Before we proceed, please be advised that the usual disclaimer applies. Playing around the carrier lock is risky business, and more complicated than your average Android modding. Follow these instructions at your own perusal. NewTechie.com cannot be held liable for any loss whatsoever resulting from following this method. Also, this method applies to GT-I9505 only, and not to other variants of Galaxy S4.
Step 1: Launch the Phone app on your Galaxy S4, and dial in: *#0011#
Step 2: Press the Menu button followed by the Back key. Then, hit the Menu button again and select KEY INPUT.
- Enter 1 and press the OK button to enter ServiceMode.
Step 3: Press Menu one more time and tap back again. This will pull up the Main Menu for ServiceMode.
- Tap  UMTS.
Step 4: Now select DEBUG SCREEN, followed by  PHONE CONTROL.
Step 5: From the next screen, pick  NETWORK LOCK.
Step 6: You’ll get three options. Hit the one that says  PERSO SHA256 OFF.
Step 7: Now, you need to get back to Main Menu. To do this, hit the Menu button followed by the Back key. In Main Menu, now pick COMMON, and then  NV REBUILD.
Step 8: The phone will tell you that a Golden Backup exists. Tap  Restore Back-up.
Your device will now go through a series of “conditions”, where it will first freeze, then get on a black screen with Blue LED on and both capacitive buttons on, after which it will reboot automatically. The whole cycle might take a couple of minutes, so be patient. Once it powers back on, it’s network unlocked, permanently.