Root Nexus 4 on Android 5.1 LMY47O Lollipop and Install CWM Recovery
How to Root Android 5.1 LMY47O on Nexus 4 with SuperSU
We have put together a detailed step-by-step instructions guide about how to root Android 5.1 LMY47O Lollipop on Nexus 4. Please, read the complete tutorial once before actually proceeding.
Note: This root method it's only for Android 5.1 (LMY47O) installed on Nexus 4 and I am not sure if it will work on the other variants of the Nexus 4 from other carriers.
Your Nexus 4 bootloader should be unlocked.
The Nexus 4 should be on the Android 5.1 LMY47O software version.
Make a backup of your previous phone settings before proceeding – just in case anything goes wrong.
Complete Step-By-Step Guide:
Step 1 – Download Android SDK from the Android Developers website and install it. Set it up by using downloading platform-tools and the USB drivers package in SDK. Check: How to Set up ADB and Fastboot on Windows.
Step 2 – Enable USB Debugging mode in your Nexus 4.
Step 3 – Download Fastboot, depending on your OS, and extract it in the android-sdk-windows\platform-tools directory. Create a directory if it's not already there.
NOTE: Skip Steps 1, 2, 3 if you already have them.
Step 4 – Download SuperSU v2.76 (UPDATE-SuperSU-v2.76.zip) for Nexus 4 on your PC, if you still don't have it .
Step 5 – Connect and mount your Nexus 4 USB memory on your computer using the USB cable.
Step 6 – Copy&paste the UPDATE-SuperSU-v2.76.zip file to your SD card. Make sure that the file is in the SD card root (not inside of any folder).
Step 7 – Turn OFF your phone.
Step 8 – Download CWM 126.96.36.199 or TWRP 188.8.131.52 and save it to your android-sdk-windows\platform-tools directory from your computer.
NOTE: You can use any of the two custom recoveries – CWM or TWRP. If one fails to work, try installing the other one.
Step 9 – Go into Fastboot/Bootloader Mode on Nexus 4. How? Press Volume Down + Power keys for a few seconds until you see some text on the screen. This is the Bootloader Mode.
Step 10 – Access to the android-sdk-windows\platform-tools directory and open Command Prompt (Shift + Right-click > Open Command Prompt).
Step 11 – Type in the following command and press Enter.
fastboot flash recovery recovery-clockwork-touch-184.108.40.206-mako.img
Step 12 – Once completed, choose RECOVERY from the Fastboot menu and enter Recovery Mode.
Step 13 – In ClockworkMod recovery, scroll down to “flash zip from SD card” and press the power button to select it.
Step 14 – Press the Power button again and select “choose zip from sdcard”.
Step 15 – Using your volume keys, access to UPDATE-SuperSU-v2.76.zip and select it using the Power button. Confirm the installation on the next screen and the installation procedure should start now.
Step 16 – After the installation completes, go to “+++++Go Back” and reboot your phone by selecting “reboot system now” from the Recovery menu. The phone will boot and it might take about 5 minutes.
That’s it! Your Nexus 4 is now rooted on Android 5.1 firmware on your phone! Check that SuperSU is already in your apps list.
To make sure that you have correctly installed the above root method and it’s working, you can verify it using a Root Checker.