Friday, November 16, 2012

[Guide] How to root the Google Nexus 4 on Android 4.2 Jelly Bean



The Google Nexus 4 is setting itself up to be a big success. With some great hardware and an undeniably great price it is already sold out on the Google Play Store. If you were one of the lucky users to get your hands on the Nexus 4, it is likely you will be looking for an opportunity to root your device. There is good news for users in that regard, as the device has already been rooted.

Rooting allows several benefits for your Android device including the ability to backup and restore your device, flashing custom ROMs and run special applications.

You can follow our step by step guide on how to root your Google Nexus 4 on Android 4.2 Jelly Bean using ClockworkMod recovery or with ADB and Insecure Boot Image.

[NOTE] You will have you unlock your Nexus 4 bootloader before you proceed. You can find a guide on how to unlock your Nexus 4 bootloader here.

[DISCLAIMER] We do not recommend modifying your device unless you are well aware of the consequences. We will not be responsible for any loss of data or device malfunction which may occur through improper use of this guide. Please proceed at your own risk.

ClockworkMod Recovery Method
  1. Download the ClockworkMod recovery
    -
  2. Download and install the required drivers for your device
    -
  3. Download the recovery flashable SuperSU package with BusyBox
    -
  4. Enable Android Debugging from Settings > Developer Options (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
    -
  5. Connect your device to your computer and transfer the file you downloaded in Step 3 to the internal SD card on your device.
    -
  6. Reboot your device into fastboot or bootloader:
    adb reboot bootloader
    -
  7. Power off your device and then switch it back on using Power + Volume Down key to get into the bootloader.Make sure your bootloader is unlocked before you proceed.
    fastboot oem unlock
    -
  8. Browse to the folder you downloaded recovery in Step 1 on command prompt and enter the following:
    fastboot boot cwm-recovery-mako.img
    -
  9. Boot into recovery by pressing Volume Up or Volume Down twice and select the recovery option, and use the Power button to select it.
    -
  10. Once in recovery perform a backup and flash the SuperSU and busybox files you downloaded in Step 3.
    -
  11. Clear cache and dalvik cache and reboot your device


ADB and Insecure Boot Image Method

[NOTE] The following instructions involve obtaining superuser (root) access on your device using an insecure boot image. Please proceed with caution as your device could malfunction if attempted with a locked bootloader.

Requirements:
  1. Download Insecure boot.img for Nexus 4
  2. Download and install the required drives for your device
  3. Download the Root files for Nexus 4 and extract the contents of the file to your computer
  4. Enable Android Debugging from Settings > Developer Options (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
  5. Reboot your device into fastboot or bootloader:
    adb reboot bootloader
    -
  6. Power off your device and then switch it back on using Power + Volume Down key to get into the bootloader.Make sure your bootloader is unlocked before you proceed.
    fastboot oem unlock
    -
  7. Return to bootloader mode and boot into the downloaded insecure boot image:
    fastboot boot boot.img
    -
    [NOTE] This will not replace your existing boot image and wil only boot from the insure image once.
    [NOTE] If you get stuck in a boot loop, simply reboot your device into bootloader and use the above command again. You may need to do this more than once for it to work.
    -
  8. Once you have successfully booted into Android using the insecure boot image, browse to where you placed the files you downloaded in Step 3 and enter the following commands one by one in the command prompt
    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
    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

    -
  9. Reboot your device
DJRipster Web Developer

Morbi aliquam fringilla nisl. Pellentesque eleifend condimentum tellus, vel vulputate tortor malesuada sit amet. Aliquam vel vestibulum metus. Aenean ut mi aucto.