*** IMPORTANT: These procedure do not works on encrypted device. For encrypted device you need to factory reset the phone to factory state before rooting.
I upgraded my Nexus 5 through OTA on the way to office. And I lost root on the road…
I performed the procedures below and gain my root back during lunch. Quick and easy.
Reminder: Procedures works with my device does not necessary works on yours. Rooting do have risk bricking thing. Take your own risks, pls.
Both the files and procedures were downloading from some blog on Internet. I have absolute no guarantee what actually the software is doing by installing to any device.
You must take your own risk following the procedures and installing software below.
First thing first, always backup everything that is important to you.
- Make sure your Nexus 5 is running 5.0 (LRX210).
To verify, go to Settings > About phone > Build number
- Following the link to install Android SDK and Google USB Driver
- Enable USB Debugging option on your phone: Settings > Developer options> USB Debugging.
- Unlock bootloader (unlock bootloader will erase everything on the phone and return the phone to factory status)
- Download [download id=”2,3,4″]. Unzip nexus5-hammerhead-lpx13d-kernel.zip.
- Copy both .img files to the same directory as fastboot.exe provided by Android SDK.
- Copy SuperSU zip file to the root directory of the of Nexus 5.
- Power off Nexus 5
- Press and hold volume down and press Power button until Nexus 5 is powered on and entered fast boot mode.
- Connect Nexus 5 to the PC with usb cable. Make sure the usb cable capable to transfer data. (Some usb cable only able to provide power to connected device…)
- Open a command prompt and cd to the directory of fastboot.exe
- If you did not unlock bootloader yet, input the command below to unlock bootloader
fasboot oem unlock
IMPORTANT!! Unlocking bootloader will ERASE EVERYTHING and return the device to factory setting.
If your device already have bootloader unlocked, SKIP THIS STEP.
- Make sure your phone in fast boot mode, with usb cable connected. Input the command below to flash custom recovery
fastboot flash recovery recovery-clockwork-touch-220.127.116.11-hammerhead.img
- Make sure your phone in fast boot mode, with usb cable connected. Input the command below to flash modified boot image
fastboot flash boot boot.img
- Press volume key until Recovery Mode shown. Press power button to confirm to the recovery mode.
- Use volumne key to navigate the menu and power button to confirm action.
- Navigate and choose Install zip
- Then navigate and choose choose zip from SD card
- Navigate and choose the SuperSU zip file
- Navigate and choose reboot to reboot the device
- Back to main menu of the custom recovery, it will ask you whether to fix root, choose yes to confirm.
Nexus 5 with Android 5.0 is now rooted.
I’m not sure if I am still able to receive further update from OTA because I’ve custom recovery on my phone. I prefer to rollback the stock recovery instead.
- Download Nexus 5 Android 5.0 Factory Image, choose 5.0 (LRX21P)
- Unzip the factory image until you find the recovery.img. Should be under this path nakasi-lrx21p-factory-93daa4d3\nakasi-lrx21p-factory-93daa4d3\nakasi-lrx21p\image-nakasi-lrx21p
- Copy the recovery.img to the directory of fastboot.exe
- Switch off the phone
- Press and hold volume down and power button until fast boot mode is on
- Connect the phone with usb cable
- Input the command below to flash stock recovery
fastboot flash recovery recovery.img
- Reboot the phone
I can receive Android 5.0.1 OTA. But it failed to installed. Probably because the procedures above installed a custom boot image.
Please follow this blog post for procedures to fix 5.0.1 OTA upgrade issue.