As always, giffgaff and I can't be held responsible for these instructions. While in theory everything should proceed smoothly if you follow the directions, there is always the small possibility that things will go badly and you will have to either spend a lot of time getting things fixed or your phone will be destroyed. Again, this is incredibly unlikely but the procedure is not without risk.
Note also that these instructions are for the model currently available in the UK from most retailers and carriers, the i9505 with Snapdragon 600, and not the i9500 with Exynos 5410 Octa. Your phone will say which model it is as it starts up. This information is also available on the box of your phone and in the Settings menu (Settings -> More -> About device -> Model number). Make sure you do have the i9505 model before you proceed, as these instructions will not work on the i9500.
So there are a few different methods to getting root on the Galaxy S4 - we'll be following djembey's method from XDA Developers, which requires a PC running Windows. While the steps listed here are the same as the original thread, I'll go into a little more detail and make things a little more friendly to newcomers.
1. Download the USB drivers you'll need. The easiest way to do this is to install Samsung's official PC software KIES. If this doesn't work for some reason, you can also try to download standalone Samsung USB drivers via XDA Developers.
Once downloaded, you'll need to run KIES or the USB driver setup program and ensure that your phone is recognised when it's plugged in via USB. KIES will ask you to install additional components and update and all of this, so just accept everything and move forward - you can always uninstall everything later.
2. Download the Odin tool via XDA Developers. Version 3.04, which is the third listed as of the time of writing, has been tested and is working. You may have to register for an account on XDA Developers to download the file. Extract the file somewhere, then run the Odin3 v3.04.exe file.
3. Once Odin is running, you'll see the screen above. Look at the Option section, and ensure that only "Auto Reboot" and "F. Reset Time" are checked. This should be how it is by default, but it's good to confirm this.
4. Download your pre-rooted ROM file from XDA Developers. There are a few options listed there, but any of the ones that are are listed as "official stock" and "pre-rooted stock ROM" should work fine. At the time of writing, I'd recommend this one. The files are quite large, between 1.2 and 1.7 GB, so don't download these over giffgaff or on metered internet!
Once downloaded, you'll need to unzip that file (I'd recommend 7-Zip if you need a free program to do so). You should be left with a file with the extension .tar.md5.
5. In the Odin software, click on the 'PDA' button in the Files [Download] section, then select your unzipped file with the .tar.md5 extension. Do not press Start yet.
6. Turn off your Galaxy S4 (press and hold the power/lock button, then select "Power off". Once the phone has been shut down, you'll need to boot it into ODIN mode by pressing and holding three buttons simultaneously: Power + Home + Volume Down.
An easy way to do this is to press and hold the volume down button first, then simultaneously press Power and Home. Hold it until a prompt appears, asking if you want to continue. Press Volume Up once, and you should be in ODIN mode (if you are, this will be listed at the top of the screen and a green Android will be shown).
7. Now, connect your phone to your PC with the USB cable that came in the box with your Galaxy S4. You must wait for the drivers to be installed, which will take anywhere from 30 seconds to a few minutes. Wait until you see a blue or yellow indicator in the top left corner of the Odin PC software, as well as a message stating "Phone connected to port: COM".
8. Press Start in Odin (near the bottom of the page). Wait until you see a green indicator ("PASS") - at this point, flashing is finished. Unplug your phone.
9. Check to see if your phone status is OFFICIAL or CUSTOM (in Settings -> More -> About device -> Status -> Device status (at the bottom)). If it's CUSTOM, then try removing the battery for a few seconds, then booting up once more. If CUSTOM stays put, then perform a Factory data reset (Settings -> Accounts -> Backup and reset -> Factory data reset) to return to OFFICIAL.
I hope everything went well! If everything went to plan, you should now have a rooted Galaxy S4 on what is otherwise stock firmware. You'll be able to receive OTA updates, but these will probably remove the root. You also don't have a custom recovery software installed, but this can be installed later on.
I hope everything worked out. If you have any issues, make sure you're following each step precisely. You could post below if you have problems, but the best place to get support is XDA Developers - I don't have an i9505 model Galaxy S4 so I can't really be of much assistance.
Thanks for reading the article and have a good week - I'll be back soon with more Galaxy S4 articles! You can read the First Impressions and Full Review using the navigation links above and below, too.