Samsung has released the official Android Lollipop software update for the Snapdragon 600 driven Galaxy S4 model (GT-I9505). Installing the stock firmware will remove the root access on your phone.
But for those who have not updated their device to Android Lollipop firmware fearing that they could lose root, or have updated the new firmware and are seeking root access, senior XDA member Tyxerakias has a perfect solution for them.
Tyxerakias has shared a procedure which installs Samsung's stock Android Lollipop firmware, which is rooted without tripping Knox warranty void. This particular procedure needs Mobile Odin Pro app, Odin v3.09 for Windows and the bootloader .tar file for Android Lollipop firmware. Performing this will not void manufacturer's warranty but keep the root.
Check out the following guide if you want to install rooted Android 5.0.1 Lollipop Samsung firmware on Galaxy S4 I9505 keeping Knox flag at 0x0. IBTimes UK will not be held liable for any damage to the device during the process.
How to install rooted Android 5.0.1 Lollipop stock firmware on Galaxy S4 I9505 without tripping Knox
Step 1: Download Android 5.0.1 firmware for your Galaxy S4
Step 2: Download SuperSU v2.46
Step 3: Download Bootloader for firmware accordingly
Step 4: Download Odin 3.09
Step 5: If you don't have Samsung drivers, download from here
Step 6: Copy Android Lollipop and SuperSU v2.46 files to the SD card of the phone
Step 7: Perform factory reset of your phone
Note: You can create a backup through Titanium backup app.
Step 9: Launch Mobile Odin Pro, accept the download of the required file, the press OTA>> Update ZIP and locate the UPDATE-SuperSU-v2.46.zip file, which you saved earlier on the external SD card
Step 10: Press Open File and choose the .tar.md5 firmware file. Mobile Odin will automatically find and separate different parts
Step 11: Tick Enable EverRoot and leave other options unticked. Now install the firmware file
Step 12: It will ask to check the md5 file, click Yes. Mobile Odin will now do the job automatically and upgrade the firmware to Android Lollipop. The phone will then enter recovery and it will upgrade all applications, which are about 215 of them. This step will take about five minutes
Step 13: After the device reboots, turn off the phone and enter Download mode
Step 14: Run Odin 3.09 on your PC, click BL tab in Odin and load the bootloader file
Step 15: Connect the phone to the PC using USB cable, press Start button and wait for the Pass message (Check the image below)
Step 16: After the phone reboots, perform another factory reset, then redownload SuperSU from Play Store and go through the initial set up
Now your Galaxy S4 should be running Samsung's stock Android Lollipop firmware which is rooted, with Knox flasg at 0x0.
Disable the Knox app, which can be done with Titanium Backup by freezing all the Knox-related things or, delete the files manually.
Using a root editor, edit the file/system/build.prop and change the line ro.securestorage.support=false (This is normally set to= true). This will solve issues related to SELinux.