This is a guide with which you can SIM unlock your Samsung Galaxy S4 for free. This way you will not have to pay extra dollars on eBay. Keep in mind you need your authorized SIM for it to work. Follow these steps carefully to SIM unlock it.
1. Dial *#0011# in the dialer app.
2. Then, press Menu. Tap BACK
3. Press the Menu key again and then, tap KEY INPUT then enter 1, (wait a few seconds). It will auto jump now into service menu.
4. Press Menu key again and then tap BACK.
You will now enter SERVICE MODE MAIN MENU
Press DEBUG SCREEN
Tap PERSO SHA256 OFF
Now, go back to the UMTS MAIN MENU by pressing Menu then Back. You will have to press several times for that.
Then tap COMMON
Then NV REBUILD (if this does not work next time)
Do RESTORE BACK UP
The device will now freeze, black screen, Blue LED Light, Menu and Back key ON. Wait for it to reboot (about a minute).
Your Samsung Galaxy S4 i9505 is now SIM-Unlocked.
Also Check out how to sim unlock HTC Desire C.