This is a guide on how to unroot the Galaxy S4. Both GT-i9500 and GT-i9505 versions are supported. Here are the pre requisites.
1-You should have latest version of Samsung Kies installed.
2-You need to enable USB debugging mode enabled on your phone.
3-Your Galaxy S4 should have more than 70 percent charge.
4-It should be factory unlocked.
Unrooting procedure.
1) Turn OFF your phone and go to Download Mode. Do this by pressing and holding the Volume Down + Home Buttons together for few seconds followed by Power button. Then, press volume up to proceed.
2) Open ODIN on computer and connect the phone to your computer.
3) Once your phone is successfully connected to your PC, the ID:COM box on ODIN will turn blue and will show the COM port number.
4) Download the correct firmware for your phone from the list given below. This will give you home.tar file.
5) Click on pda (in ODIN app) and choose the file downloaded in previous step.
6) Check "Auto Reboot"; "F. Reset Time" options and make sure that "Re-Partition" is unchecked.
7) Click on Start button in ODIN window to start the flashing process. It will take just a couple of minutes. It will restart after success is shown in ODIN.
Galaxy S4 i9505 firmwares
Poland XEO (May 2013)
PDA: I9505XXUAME2
CSC: I9505OXXAMDB
Version 4.2.2
South East Europe SEE (May 2013)
PDA: I9505XXUAME2
CSC: I9505OXXAMDB
Version 4.2.2
Sweden VDS (May 20130
PDA: I9505XXUAME2
CSC: I9505VDSAMDB
Version 4.2.2
Singapore MM1 (May 2013)
PDA: I9505XXUAME2
CSC: I9505OLBAMDM
Version 4.2.2
Switzerland AUT (May 2013)
PDA: I9505XXUAME2
CSC: I9505AUTAMDB
Version 4.2.2
Open Austria ATO (May 2013)
PDA: I9505XXUAME2
CSC: I9505OXXAMDB
Version 4.2.2
Nordic countries NEE (May 2013)
PDA: I9505XXUAME2
CSC: I9505OXXAMDB
Version 4.2.2
Nordic countries NEE (April 2013)
PDA: I9505XXUAMDE
CSC: I9505OXXAMD8
Version 4.2.2
United Kingdom BTU (April 2013)
PDA: I9505XXUAMDM
CSC: I9505OXXAMDB
Version 4.2.2
Italy ITV (April 2013)
PDA: I9505XXUAMDM
CSC: I9505ITVAMDB
Version 4.2.2
Spain PHE (April 2013)
PDA: I9505XXUAMDN
CSC: I9505OXXAMDB
Version 4.2.2
France XEF (April 2013)
PDA: I9505XXUAMDN
CSC: I9505OXXAMDB
Version 4.2.2
Brazil ZTO (April 2013)
PDA: I9505VJUAMDM
CSC: I9505ZTOAMDM
Version 4.2.2
Germany DBT (April 2013)
PDA: I9505XXUAMDM
CSC: I9505OXAAMDM
Version 4.2.2
Slovenia SIO (April 2013)
PDA: I9505XXUAMDE
CSC: I9505OXXAMD8
Version 4.2.2
Sweden VDS (April 2013)
PDA: I9505XXUAMDE
CSC: I9505VDSAMD8
Version 4.2.2
Netherlands PHN (April 2013)
PDA: I9505XXUAMDF
CSC: I9505PHNAMD8
Version 4.2.2
Poland XEO (April 2013)
PDA: I9505XXUAMDE
CSC: I9505OXXAMD8
Version 4.2.2
Australia XSA (April 2013)
PDA: I9505XXUAMDE
CSC: I9505XSAAMD8
Version 4.2.2
Switzerland AUT (April 2013)
PDA: I9505XXUAMDF
CSC: I9505AUTAMD8
Version 4.2.2
Galaxy S4 GT-i9500 Firmwares
Brazil ZTO (May 2013)
PDA: I9500UBUAMDK
CSC: I9500ZTOAMDK
Version 4.2.2
Uruguay UPO (May 2013)
PDA: I9500UBUAMDK
CSC: I9500UUBAMDK
Version 4.2.2
Taiwan BRI (May 2013)
PDA: I9500ZSUAMDK
CSC: I9500OZSAMDK
Version 4.2.2
Colombia COO (May 2013)
PDA: I9500UBUAMDE
CSC: I9500UUBAMDE
Version: 4.2.2
Germany MBC (May 2013)
PDA: I9500XXUAMDK
CSC: I9500MBCAMD6
Version 4.2.2
Kazakhstan SKZ (May 2013)
PDA: I9500XXUAMDK
CSC: I9500OXEAMD9
Version 4.2.2
Uzbekistan CAC (May 2013)
PDA: I9500XXUAMDK
CSC: I9500OXEAMD9
Version 4.2.2
Guatemala TGU (April 2013)
PDA: I9500UBUAMDE
CSC: I9500TFGAMDE
Version 4.2.2
Argentina ARO (April 2013)
PDA: I9500UBUAMDE
CSC: I9500UUBAMDE
Version 4.2.2
Brazil ZTO (April 2013)
PDA: I9500UBUAMDE
CSC: I9500ZTOAMDE
Version 4.2.2
Russia SER (April 2013)
PDA: I9500XXUAMDK
CSC: I9500SERAMDK
Version 4.2.2
China CHN (April 2013)
PDA: I9500ZCUAMDG
CSC: I9500CHNAMDG
Version 4.2.2
India INS (April 2013)
PDA: I9500XXUAMDK
CSC: I9500ODDAMDK
Version 4.2.2
Indonisia XSE (April 2013)
PDA: I9500XXUAMDL
CSC: I9500OLBAMDK
Version 4.2.2
United Arab Emarates XSG (April 2013)
PDA: I9500XXUAMDE
CSC: I9500OJVAMDC
Version 4.2.2
Egypt EGY (April 2013)
PDA: I9500XXUAMDE
CSC: I9500OJVAMDC
Version 4.2.2
Chile CRC (April 2013)
PDA: I9500UBUAMDE
CSC: I9500UWAAMDE
Version 4.2.2
Bangladesh TML (April 2013)
PDA: I9500XXUAMDK
CSC: I9500ODDAMDK
Version 4.2.2
Colombia COL (April 2013)
PDA: I9500UBUAMDE
CSC: I9500UWMAMDE
Version 4.2.2
South Africa XFA (April 2013)
PDA: I9500XXUAMDE
CSC: I9500OJVAMDC
Version 4.2.2