The Google Nexus 4 is getting another software update, this time to build number LMY47O. The new build number is another version of Android 5.1 Lollipop. As long as you have already upgraded the operating system to that build number, you can now follow the guide below to hack the system internals with root access and install a custom recovery image. Here’s how:

Before starting, we recommend you take a complete backup of the data including the Nexus phone contacts, SMS texts, call logs, pictures, music files, video files and other data like the Settings. Now if you need to apply a factory reset you can do that and restore the data you backed up earlier. Without a backup you will lose all data when performing a hard reset or a factory reset. Understand they are the only times we expect to lose data. You don’t automatically lose the data by having root access.

Android 5.0 Lollipop

You should turn on the Nexus 4 and navigate over to the Settings > Developer Options and enable the USB Debugging Mode. If you cannot see any Developer Options menu that probably means it needs enabling. You can do that by tapping on the firmware build number on the About Device menu. Once done, you can go back to the original Settings menu and access the Dev option from there.

Understand that the Developer Options does not mean you are running in a different developer mode. You are still in the normal mode. You don’t need to disable the Dev options list once you have enabled it. However, if you would prefer to lock it up again, you can do that.

Since rooting any Android device is always opening the system internals away from the restrictions the OEM put in place, you are immediately voiding any warranty you might have had left. A warranty on a Google Nexus device can usually be restored by flashing a stock version of Android later such as a future Lollipop OTA update manually.

Check that other people are flashing future over the air updates before you choose to accept yours. It’s generally recommended that you don’t accept OTA’s with root access because you might brick the tablet or smartphone. You want to flash that file manually.

How to root Google Nexus 4 on Android 5.1 LMY47O Lollipop

  1. Install Android SDK and ADB on Windows. If you already have it then you don’t have to install it again. Just use the same ADB and Fastboot you already have.
  2. Download the SuperSU 2.46 zip file to the desktop of the Windows computer. Now connect the Nexus 4 to the same computer with the USB cable and transfer that SuperSU file (zipped) to the root of the SD card internal storage.
  3. Download the TWRP recovery from here. Save the TWRP recovery to where you had the Fastboot.exe file which is usually the C:\adb location on the hard drive.
  4. Now shut down the Nexus 4 completely by holding in the Power key for over five seconds and letting go.
  5. Boot the Nexus 4 back up but this time into Fastboot mode by holding the Volume Down + Power keys at the same time and holding them in until the text appears on the display. Now you are in the Bootloader or Fastboot mode (both the same mode).
  6. Open the Fastboot folder and right-click the mouse and hold down the Shift key to find a new menu. Select to open the command prompt window from that new menu.
  7. Type your first command inside the command prompt: fastboot flash recovery (followed by the name of the recovery img file).
  8. Now you should have the recovery option on the display. Choose to open the recovery mode.
  9. Choose to “install’ from inside the custom recovery and upload the SuperSU zip file you transferred earlier.
  10. Confirm you want to install the SuperSU and do that.
  11. When it’s done, go back to the main recovery menu and select to reboot the system.

Now you have the root access on the LMY47O Android 5.1 Lollipop and you have TWRP recovery installed.