Well, the LG Nexus 4 has been on sale for two days now, and a few (mind you, very few) have got their hands on one and are enjoying the latest Google and Android have to offer. And, like always, the Android development community have not waited too long and have already found a way to root the Nexus 4.
For those wondering what rooting does, well, it basically lets you access the system files and make changes that are otherwise not possible, giving you full access to the device. XDA forum member HQRaja was able to put together the necessary files and made them available for rooting the Nexus 4, and it has been tested by a few users and confirmed to be working, and we’ve created a thorough step-by-step how-to guide to help you root your Nexus 4.
However, keep in mind that rooting the device, you will need to unlock the bootloader on your Nexus 4. This will wipe all data from your phone and reset it to factory settings (and will also void warranty, though it is easy to re-lock the bootloader to get warranty back), so you will need to backup and restore anything you have installed/copied on your device.
Continue reading to find out how you can root your LG Nexus 4.
Compatibility
The procedure described below is only for the LG Nexus 4. Do not try it on any other device.
Warning!
The methods and procedures discussed here are considered risky, so try them out at your own risk, and make sure to read each step carefully before attempting anything. We will not be held responsible if anything goes wrong.
How to Root LG Nexus 4
- The procedure to root involves unlocking the bootloader on the device, which causes all the data on the device to get wiped, including everything on your internal storage. So, backup installed apps and other data such as contacts, messages, bookmarks, etc, by referring to our Android Backup Guide for help. Then, copy everything from the SD card to your computer, which will also include the apps and data you backed up.
- Your phone’s bootloader will need to be unlocked to root. You can unlock the bootloader on your Nexus 4 by following the guide → here. Make sure you took a backup in step 1 as this will wipe all data from the phone and reset it to factory settings. Skip this if you already have the bootloader unlocked.
- Download and install the Android SDK → from here. This will install the necessary drivers for the phone on your computer. Skip this if you have already installed the SDK while following step 2.
- Download Fastboot. Fastboot is what will be used to flash the recovery on the phone.
Download Fastboot | Filename: Fastboot.zip - Extract the Fastboot.zip file you just downloaded to a convenient location on the computer to obtain a folder named Fastboot which will have four files inside it. To keep things easy, extract the Fastboot folder to drive C.
- Download the unsecure boot image, which needs to be flashed on the phone to temporarily boot it into an unsecure developer mode, which will enable us to root it. .
Download Boot image | Filename: boot.img - Copy the boot.img file you downloaded in step 6 to the Fastboot folder that you obtained in step 5.
- Download the Superuser package. This includes the files needed for rooting the phone.
Download Root files | Filename: Root_Files.zip - Now, extract the files inside the Root_Files.zip file and copy them to the Fastboot folder you obtained in step 5. These files should go into the Fastboot folder directly and should not be inside another directory inside the folder. That is, there should be a total of 8 files in the Fastboot folder. Check screenshot below for reference.
- On the phone, go into the Settings » About phone menu. Then, scroll down and tap on the “Build Number” field 7 times. This will enable the “Developer options” menu in the main Settings screen. Now, go back to the main settings menu, open “Developer options”, then enable Android Debugging (or USB Debugging).
- Turn off your Nexus 4. Then, boot into fastboot mode by holding down the Volume down and Power buttons together till the screen turns on and shows “Start” written in big green letters.
- Then, connect your Nexus 4 to the computer with your USB cable, then wait for Windows to finish installing the drivers (drivers will be installed only the first time). For reliability, ensure that you use a USB port at the back if you are using a desktop computer, as the front panel ports can be loose and cause problems.
- Click on Start menu » All Programs » Accessories, right-click on Command Prompt and click on Run as administrator. If you are using Windows 8, this can be done by right-clicking on the extreme bottom left corner of the taskbar, then selecting “Command Prompt (admin)”.
- Now, we need to flash the unsecure boot image (downloaded in step 6) on the phone to boot it up into unsecured mode. Follow the steps below to do so.
- Navigate to the Fastboot folder which you obtained in step 5. For example, if the Fastboot folder is in drive C on your computer, enter cd C:Fastboot in command prompt (and press Enter) to navigate to the folder.
- Then, enter fastboot devices. If your Nexus 4 has been detected properly, you will see a device ID show up in command prompt. If nothing comes up, make sure you have installed the drivers (see step 3).
- Now, flash the boot image on the phone by entering fastboot boot boot.img in the command prompt.
- [Important] After the boot image has been flashed, the phone will reboot. Keep the phone connected and keep the command prompt open as well, then go to the next step.
- Once the phone boots up into Android, enter the follow commands in the command prompt, pressing Enter after each command to root the phone:
adb shell mount -o remount,rw /system adb push su /system/bin/ adb push Superuser.apk /system/app/ adb push busybox /system/xbin/ adb shell su chmod 06755 /system/bin/su chmod 0644 /system/app/Superuser.apk chmod 04755 /system/xbin/busybox cd /system/xbin busybox --install /system/xbin/ exit exit
- After entering the last command, the command prompt will close.
- Now, reboot the phone. You can also disconnect it as the procedure is now complete.
Your Nexus 4 is now rooted and ready to be used. You can do anything that requires root access now, like accessing system files and more. Do let us know how it works!
Discussion