Android is basically a Linux based Operating System developed for the Smartphones, thus deriving its roots from the most secured Linux platform. SELinux is kernel security module in Linux developed by the NSA to enhance the security of the system. The latest Android Lollipop OS comes with SELinux set to enforcing mode to add security to the devices, but this is a huge challenge to the developers as most conventional exploits fail due to this. Changing this to permissive mode fixes the problem but hacks off one important feature of Android Lollipop.
This is where the legendary SuperSU developer Chainfire came into act by rooting the Nexus 5 and Nexus 7 2013 devices on Android Lollipop just after a day of the release of Lollipop preview images. We don’t say that it was for him, as he modified the kernel images to set SELinux to permissive mode only for SuperSU and not system-wide. Today we are going to show how to root Nexus 5 and Nexus 7 2013 on Android 5.0 Lollipop with an easy-to-follow guide.
This Guide is intended only for the Nexus 5 and Nexus 7 2013 WiFi models. Be extra cautious when you choose the firmwares as flashing wrong firmwares might result in a bricked device. You alone are responsible for any consequences that might occur during the process. DroidViews or any of its community members shall not be held responsible for any damage to your device.
PREPARE YOUR DEVICE
- Charge your device above 60% battery level to avoid shutdowns during the process.
- Install proper device drivers on your PC and check if the device is detected. You can find the drivers for your device from our driver downloads page → Click Here
- Enable USB Debugging on your phone from Settings> Developer options. If you do not find Developer option under device settings, read the instructions given here.
- Either setup ADB and Fastboot on your computer, or download the Minimal Fastboot/ADB tool and unzip it: mfastboot-v2.zip
- You should have a bootloader unlocked device.
- Install a custom recovery on your device to flash the SuperSU Zip to gain root permissions.
Download the following files based on your device model:
ROOT NEXUS 5 AND NEXUS 7 2013 ON ANDROID 5.0 LOLLIPOP
- Open a command prompt in the Fastboot folder by right clicking on the mouse in the empty space of the folder while holding the Shift key.
- Connect your device to your computer using a USB cable and reboot your device into bootloader by typing the following command in the command prompt.
- Reboot the device into fastboot mode with the following command:
adb reboot bootloader
- Make sure that your device is bootloader unlocked, else unlock it using the following command:
fastboot oem unlock
- Extract the patched kernels to the fastboot folder, you will get a boot.img file.
- Now enter the following command in the command prompt and press enter to flash the modified kernel:
fastboot flash boot boot.img
- Once the kernel is successfully flashed, boot your device into recovery mode by pressing the Volume Down button twice and then the Power button to boot into recovery mode. (As you’re already in the Fastboot mode)
- Now install the SuperSU Zip file in the custom recovery. Follow our guide for flashing Zip files in recovery mode → Click Here
- Reboot your device after the SuperSU file is flashed.
After the reboot and test the root access on the device using any app that requires root permissions.
Leave your queries and feedback in the comments section below.