There are 2 root mehods in this thread scroll down to check the second method...
I have found the a root for the new galaxy S4. Kindly follow the instructions in order to root ur galaxy s4.
The root file utilises the system dump of the device. The root method works only on the Samsung Galaxy S4 I9500 running on official Android 4.2.2 XXUAMC6 Jelly Bean but not on the quad-core Snapdragon 600 variant with model number I9505.
Galaxy S4 users who wish to root their handset using the root file may follow my step-by-step guide below.
Let me remind u that I will not be held liable for any mishap, therefore, proceed at your own risk.
1) Download and install USB Driver for Samsung Galaxy S4 on the computer.
2) Verify that USB Debugging Mode is enabled which will allow to connect the phone with the computer and use the Android SDK with it. [Press Menu>> Settings>> Applications. From there navigate and click on Development option and ensure the USB Debugging Mode is turned on.]
3) Create a backup of all data of the phone.
4) The battery of the device should have above 80 per cent charge.
5) The root method works only on the Samsung Galaxy S4 I9500 running on Android 4.2.2 XXUAMC6 Jelly Bean; applying this root to incorrect variants will brick the device.
Steps to root Samsung Galaxy S4 I9500 on Android 4.2.2 XXUAMC6 Jelly Bean
1) Download I9500XXUAMC6 pre-rooted firmware for Samsung Galaxy S4 to the computer and extract the zip file
2) Download Odin v1.85 which will help to root the Jelly Bean firmware
3) Turn off the Galaxy S4 and enter Download Mode. Press and hold Volume Down + Home buttons together and then press the Power button until the construction Android robot and a triangle are seen. Press the Power button again to enter Download Mode
4) Run Odin on the computer
5) Connect the phone to the computer using USB cable while it is in Download Mode. If the device is connected successfully, one of the ID: COM boxes will turn yellow with the COM port number. This step might take some time
6) Select the files mentioned below to install on the phone
a) Click on 'PDA' and select file with 'CODE' in its name
b) Click on 'Phone' and select file with 'MODEM' in its name
c) Click on 'CSC' and select file with 'CSC' in its name
d) Click on 'PIT' and select the .pit file
[Note: Ignore the last three steps in case such files are not found.]
7) Ensure the 'Auto Reboot' and 'F Reset Time' options are selected in Odin. Also ensure the 'Re-Partition' option is selected in case the .pit file is being used
8) Double check everything and finally click the 'Start' button in Odin. The installation process will begin and take a few minutes to complete
9) After the installation process is completed, the phone will restart automatically. Once the home screen appears on the device, unplug the USB cable
Samsung Galaxy S4 I9500 is now successfully rooted on Android 4.2.2 XXUAMC6 Jelly Bean firmware. Open the app drawer in the phone and search for an app called Superuser. To ensure that the above root method is installed and working correctly, verify with the Root Checker app from Google Play Store.
If u found this guide useful/helpful kindly hit the thanks button
thank u for ur appreciation and support
and please let me know if this method worked for u.. coz if it didnt i might be able to find another way to help u.