You may have just bought your self a brand new Samsung Galaxy S IV and enjoyed being the object of envy among your friends, colleagues and neighbours. After the initial exuberance has worn of, you did better get down to the basic things. S IV ships with a lot of gloatware or Apps which are needless and hog your memory. You also may wish to customize your phone to suit your own identity and needs. I will present to you the safest way of rooting a Samsung Galaxy SIV model i9500 and Build "XXUAMDK". Under no circumstances should you use this method to root any other build or model, it may brick the phone.
Remember rooting a phone is a serious business and will void your warranty. Improper rooting may cause the phone to break down. Now lets get down to business. First verify that the Galaxy SIV you have purchased is indeed using i9500 (Exynos). Some SIV are shipped with i9505(Qualcomm). This process will not work with i9505. To check which model and build your phone has, you go to Settings > More > About Device. You can get both the details here.
Next thing is to check the build number. For this process, it should read as "XXUAMDK" as the last few digits. After you have verified both the above, you need to get your phone ready for USB Debugging mode. However the new OS will not show you the "Developer options" menu nor enabled in the settings by default.
To enable it, click on "About Device" and scroll down till you see the "Build number". Tap continuously on the "Build Number" field till you see some messages on the screen; go down to enable the Developer options. After a while, you will see a message informing you that the "Developer mode" is enabled.
Hit the back button and you will find the Developer options field available. Click on it and enable it with the toggle switch on the top right. Now head below to the "Debugging" section and enable "USB debugging". Finally, go back to the "Security" options and click on the field "Unknown sources" to allow third-party apps to be installed.
If you have completed the above steps, congrat, your phone can now be rooted. Now all you will need are two files and a simple utility to be downloaded from the Internet. Download the files from the links below
Odin 3.07 : Android Flashing utility
Samsung SGS4 drivers : USB drivers required for the PC to recognise your phone.
ClockworkMod Recovery : Recovery utility that you need to install on your phone to flash ROMs and take backups of your existing operating system.
Adam’s kernel : Kernel to root the phone for you in a single step.
Download the above files and store them in a separate folder name. You will have to unzip them from within the folder. Store the folder on your desktop for easy access.
Now to the rooting process : Switch off your SGS4 and wait for a few seconds. Now press the "Volume down" button and the "Home button" together and keeping the two buttons held down, press the power button. Release the buttons when you see the Samsung logo on the screen. You shall see a message stating that the phone is in download mode and asking you to continue by pressing the "Volume Up" button. Go ahead and press the Volume Up button once. Your phone is now in download mode and ready for being flashed with new files. Next plug in the USB cable into your phone and the PC. Windows will start installing the necessary drivers. Wait till all the driver installation work is done. Now open the desktop folder where you have saved your above files. In the Odin folder, double click on Odin.exe executable file. Odin will start up and you should see the phone connected to the utility and ready for flashing. To confirm this, the field "ID:COM" should have a light blue colour with "0:(ComXX)" written in it. (the XX can be any number and will vary from PC to PC). This states that your phone is recognised by Odin and is ready.
Now click on the button "PDA" and choose the file "GT-I9500_AdamKernel.V1.2.Odin.tar" from the Adam Kernel folder. Next, ensure that the check boxes "Auto Reboot", "F. Reset Time" and "PDA" are the only check boxes checked, leave the rest unchecked as per image below :
Hit the "Start Button". Watch the "Message" box on the lower left side to see if everything runs fine and there are no errors. This process will take a few seconds and the phone should reboot on its own. After the phone restarts, you should see the "Superuser" app installed and the phone already rooted automatically by this kernel. To confirm that the phone is successfully rooted, download any app that needs superuser permissions (such as Titanuim backup, ROM manager or Root explorer) and you should be prompted for the root access, which means that you have successfully rooted the phone. Shut down the Odin window.
Next process is to install the Clockwork Recovery Mode. This process is also simple and involves the same procedure you used for Adams' kernel.
Switch off the phone and restart as per above process, when you get to download mode screen restart Odin. This time, click the PDA button and choose the file "recovery-clockwork-220.127.116.11-i9500.tar.md5" from the folder. Once again, ensure that the check boxes "Auto Reboot", "F. Reset Time" and "PDA" are the only check boxes to be checked. Hit the "Start" button and wait a few seconds till it gets done and the phone restarts automatically.
Disconnect the phone from the PC and shut down the phone. Now press the Volume Up button and the Home button together, and keeping the two buttons held down, press the power button. The phone should now enter the recovery mode automatically.
Congratulations! You have successfully rooted your phone. Now first of all things, take a complete backup (Nandroid) of your existing operating system from the recovery mode to ensure that the operating system can be safely restored in case of a mishap. This is really important.
Now you can search for good custom ROM you want to install and install several root level Apps. You can even remove the gloatware that SIV ships with as per your requirement.
Remember this is a tutorial for only qualified technicians, if you are not comfortable with rooting of phones etc. please don't try this one. Please post in your comments.