Ramblings of Daniel Graziotin

How to have a rooted Android 5.0 Lollipop on the Samsung Galaxy S5 (SM-G900F) without tripping KNOX

H

Despite having a quite long history of voiding devices’ warranties, with my latest purchase of a Samsung Galaxy S5 16GB (SM-G900F, with the Snapdragon processor), I started a challenge to avoid voiding the warranty.
Therefore, I keep trying rooting my device without tripping KNOX. So far, I have been successful.

However, with the slow arrival of Android 5.0 Lollipop on the Samsung Galaxy S5, it has been difficult to find a way to access the administrator account of our device.
Luckily, _alexndr user at XDA created a Lollipop base ROM with Aroma installer, which can be safely flashed with Odin and Mobile Odin Pro, without triggering a KNOX +1 counter.
That is, it is possible to have Android 5.0 Lollipop on the Samsung Galaxy S5 while keeping a 0x0 KNOX counter.

In this post, I will describe how I did it on my device. But first, three disclaimers.

  1. I am not responsible if you follow these instructions and you brick your device, or if you still trip KNOX in some mysterious ways.
  2. The content of this post was tested on an non-locked Samsung Galaxy S5 16GB, SM-G900F. Although much success has been reported with other variants of the S5, I cannot guarantee success. Not even with the 32GB variant.
  3. I have not written any of the software mentioned in this post. I did not even invented the steps described in this post. All credit goes to the respective content makers. What I am reporting in this post is a convenient summary of scattered pieces of not-so-accessible information found on the Samsung Galaxy s5 XDA forum. I cite the sources whenever possible. Please contact me or drop a comment here if I an acknowledgement is needed, and I will update the post.

Software/ROMs needed

On a Windows PC

  • Odin 3.09 and related Samsung drivers. I am not allowed to link them here. Please avoid the websites odindownload.com/.net, as they contain spyware.
  • SuperSU 2.39-BETA zip file
  • _alexndr Android Lollipop base ROM, plus the extracted flashable Bootloader and Modem:
    • G900FXXU1BNL2_DevBase_alexndr
    • BL_G900FXXU1BNL2
    • CP_G900FXXU1BNL2

The last three files can be found in the official XDA thread [ROM][G900F][ALEXNDR] ★ ANK7 / BNL2 ★ DevBase, Multi CSC, Safe De-Bloat, KNOX 0x0. The ROM should be available in post #2. However, please note that the developer tends to post updated versions along the thread. As of today, the latest versions of all three files can be found in post #454.

On your Galaxy S5

Instructions

Begin with an installed ANE2 stock ROM. Root it using Towelroot.
Install SuperSU from the Play Store. Let it install SU binaries the “normal” way. Make it disable KNOX. Reboot.
Then, extract the BETA-SuperSU-v2.39.zip file on your PC. Put the file common/Superuser.apk in the internal sdcard of the S5. Install the apk, so that it will update the already present SuperSU. Open SuperSU, and let it update.

What follows has been adapted from post #261 of the ALEXNDR XDA topic.

Be sure that reactivation lock is turned off.
Put the file G900FXXU1BNL2_DevBase_alexndr.zip in your phone internal SD card.

Open Mobile Odin Pro on your S5.
Select the file G900FXXU1BNL2_DevBase_alexndr.zip as “OTA/Update Zip“.
Untick the Everroot option.
As “After flash” option, select to go to download mode.
Initiate the flash by tapping “Flash firmware“.

After a while, the phone will reboot and the Aroma installer will show up. Leave every option as it is, with the following exceptions:
Select “Wipe Data” and “Update stock recovery” options.
Let it install.
Right after it finishes installing, untick the “reboot device” option. We want the phone to enter into download mode instead.

When the phone is in download mode, connect it to your PC and open Odin 3.09.
Select the CP file CP_G900FXXU1BNL2.tar.md5 and the BL file BL_G900FXXU1BNL2.tar.md5, so that both get flashed at the same time.
Start the flash. Odin will flash the files sequentially, telling you to wait 2 minutes for both of them. Now, here Odin told me that the process “failed” (“All threads completed. (succeed 0 / failed 1)“). That is not an issue. Wait for 5 minutes.

Now, (these instructions diverge from those of XDA instructions), disconnect the phone.
Take off the battery and put it back in.
Enter the phone recovery mode by holding VOL UP + HOME + POWER buttons. You will notice the message “Applying Multi-CSC” in the bottom. This step is necessary for solving CSC related issues.
Wipe data/factory reset.
Wipe the cache partition.
Reboot the system.

Now, do the actual first boot of the device. Please note that it will take quite some time for the first boot to work. It took about 7 minutes for me.
Perform the first configuration of your phone. Do not open SuperSU and do not install any other app.
Install Root Checker from the Play Store. Restart the phone.
Wait for 2-3 minutes after the boot. Open Root Checker. At this point, root should be working.

Open SuperSU to verify that rooting was successful.
Verify that your KNOX counter is still 0x0 by booting into Download Mode.

Please note that the first boots result in a quite slow device, partially because of all the Google Play updates. On a similar line, the battery life starts short for the first cycles. These issues all go away after a couple of days.

As a side note, I did also flash a PIT file right after flashing CP + BL in Odin, without rebooting the phone. If the procedure of this post fails, try to flash a PIT file, too. I recommend to not flash a PIT file the first time your try the procedure outlined in this post.

Featured Image credits: Wikipedia.

About the author

dgraziotin

Dr. Daniel Graziotin received his PhD in computer science, software engineering at the Free University of Bozen-Bolzano, Italy. His research interests include human aspects in empirical software engineering with psychological measurements, Web engineering, and open science. He researches, publishes, and reviews for venues in software engineering, human-computer interaction, and psychology. Daniel is the founder of the psychoempirical software engineering discipline and guidelines. He is associate editor at the Journal of Open Research Software, academic editor at the Research Ideas and Outcomes (RIO) journal, and academic editor at the Open Communications in Computer Science journal. He is the local coordinator of the Italian Open science local group for the Open Knowledge Foundation. He is a member of ACM, SIGSOFT, and IEEE.

18 comments

By dgraziotin
Ramblings of Daniel Graziotin

About Author

dgraziotin

Dr. Daniel Graziotin received his PhD in computer science, software engineering at the Free University of Bozen-Bolzano, Italy. His research interests include human aspects in empirical software engineering with psychological measurements, Web engineering, and open science. He researches, publishes, and reviews for venues in software engineering, human-computer interaction, and psychology. Daniel is the founder of the psychoempirical software engineering discipline and guidelines. He is associate editor at the Journal of Open Research Software, academic editor at the Research Ideas and Outcomes (RIO) journal, and academic editor at the Open Communications in Computer Science journal. He is the local coordinator of the Italian Open science local group for the Open Knowledge Foundation. He is a member of ACM, SIGSOFT, and IEEE.

News