FORUMS
Remove All Ads from XDA

[ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery

490 posts
Thanks Meter: 435
 
Post Reply Email Thread
I originally posted this method at AddictiveTips. The method I posted there is targeted at everyone including the absolute beginners and I have also included instructions there for setting up the required tools, and for reverting back to the original recovery and boot image in case anything goes wrong. All external credits should be given to that guide (it does link back to this thread). Here is the link: How To Root Nexus 4 and Install ClockworkMod Recovery on it.

To my knowledge, this is the first confirmed working rooting method for Nexus 4 posted here at XDA. Though my knowledge is limited, so please correct me if I am wrong.


UPDATE: There is an official ClockworkMod recovery for Nexus 4 now available directly by Koush, so this should all be easy as pie now and you can now safely install CWM too. I am updating the CWM method with the updated instructions.

This method requires an unlocked bootloader. You can find instructions for unlocking it at XDA, or at the AddictiveTips guide linked above (the link to the bootloader unlock guide is in the requirements section there).

UPDATE 2: If your device does NOT get wiped after unlocking the bootloader, fret not. While this isn't expected behavior, several users have experienced the same on the Nexus 4. This could be due to some error at Google's end, but unlocking still works perfectly fine.

That said, let's get on with rooting and flashing CWM.

ClockworkMod Recovery Method:
  1. Download the latest official ClockworkMod recovery from CWM website and rename it to recovery.img
  2. Enable Android Debugging from Settings > Developer Options. (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
  3. Connect the device to your computer via USB, and install the required drivers.
  4. Download the recovery flashable SuperSU package with Busybox and transfer it to your phone's internal SD card.
  5. Reboot into fastboot/bootloader:
    Code:
    adb reboot bootloader
    You can also power off the phone and then use power + volume-down key combination to get into bootloader.
  6. Unlock the bootloader if you haven't done so already. WARNING: This command will wipe all data on your device.
    Code:
    fastboot oem unlock
  7. Enter this command in a command prompt to flash the ClockworkMod recovery (making sure you are in the directory where you downloaded the recovery file):
    Code:
    fastboot flash recovery recovery.img
    OR

    If you simply want to root without flashing a custom recovery and want to stick to your stock recovery, simply boot this recovery once using this command:
    Code:
    fastboot boot recovery.img
  8. If you flashed the recovery in the previous step, you can now boot into recovery by pressing volume-up or volume-down twice to select the recovery option, and then the power button to enter it. If you simply booted into the recovery file without flashing it in the previous step, you should already be in recovery now.
  9. Once in recovery, take a backup to be on the safe side.
  10. Flash the downloaded SuperSU and busybox package zip file from recovery.
  11. Clear cache and dalvik cache just in case (not required but won't hurt).
  12. Reboot the device.

ADB and Insecure Boot Image Method:
  1. Grab the insecure boot image from this thread.
  2. Also download these root files. This package includes the latest SuperSU 0.98, latest su binary that comes with it, and working busybox (not sure if latest).
  3. Extract the contents of the downloaded zip 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. Connect the device to your computer via USB, and install the required drivers.
  6. Reboot into fastboot/bootloader:
    Code:
    adb reboot bootloader
    You can also power off the phone and then use power + volume-down key combination to get into bootloader.
  7. Unlock the bootloader if you haven't done so already. WARNING: This command will wipe all data on your device.
    Code:
    fastboot oem unlock
  8. Get back into bootloader mode and boot into the downloaded insecure boot image:
    Code:
    fastboot boot boot.img
    Don't worry, this will not replace your existing boot image and will only boot from the insecure one once.
    If it does NOT work for you and you get stuck in a boot loop, simply reboot your phone into bootloader and use the above command again. Some users had issues with booting from it the first time, but a second attempt worked.
  9. Once booted into Android successfully using the insecure boot image, simply enter these commands one by one in command prompt (making sure you are in the directory where you downloaded the files):
    Code:
    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
  10. Reboot your device.

You will now have root access. Tested and confirmed working by Stryder5 and many others.

Credits:

Stryder5 for testing, confirming, tipping me about working CWM, providing the required drivers, and helping others on the thread.
Harry GT-S5830 for the insecure boot image.
fkrone for his recovery revert disabler script and his unofficial working CWM before an official one became available.
Kstarz for posting this same recovery method with his own working CWM in this thread before an official one was out.
evaradar for informing about the release of official ClockworkMod recovery.
Koush for developing ClockworkMod recovery.
Chainfire for developing SuperSU.
Everyone else on this thread for testing, providing feedback and hitting the 'THANKS' button. =)

I have tried my best to give everyone the due credit but if I have missed out on anyone, please do remind me.
The Following 156 Users Say Thank You to HQRaja For This Useful Post: [ View ] Gift HQRaja Ad-Free
 
 
15th November 2012, 05:41 AM |#2  
Recognized Contributor
Flag Texas
Thanks Meter: 1,143
 
More
Yep, worked like a charm. Got Titanium running and restored all my apps

Btw, check your PM.
The Following 6 Users Say Thank You to Stryder5 For This Useful Post: [ View ] Gift Stryder5 Ad-Free
15th November 2012, 06:02 AM |#3  
HQRaja's Avatar
OP Retired News Writer
Flag Islamabad
Thanks Meter: 435
 
More
Checked...thanks. =) Added the links.
The Following 3 Users Say Thank You to HQRaja For This Useful Post: [ View ] Gift HQRaja Ad-Free
15th November 2012, 06:03 AM |#4  
StickyEyez's Avatar
Senior Member
San Diego
Thanks Meter: 32
 
More
stem/bin/sh: su: can't execute: Permission denied

that is what i always get when i put in the "su"--permision denied
15th November 2012, 06:18 AM |#5  
Recognized Contributor
Flag Texas
Thanks Meter: 1,143
 
More
Quote:
Originally Posted by jshaw06

stem/bin/sh: su: can't execute: Permission denied

that is what i always get when i put in the "su"--permision denied

You need to boot the unsecure boot.img first.
The Following User Says Thank You to Stryder5 For This Useful Post: [ View ] Gift Stryder5 Ad-Free
15th November 2012, 06:21 AM |#6  
HQRaja's Avatar
OP Retired News Writer
Flag Islamabad
Thanks Meter: 435
 
More
BTW can you confirm me the insecure boot.img you used? I just provided the link to the thread by Harry GT-S5830 but there were multiple ones posted in that thread, so I'm thinking of adding the direct link to the one confirmed working.
The Following 2 Users Say Thank You to HQRaja For This Useful Post: [ View ] Gift HQRaja Ad-Free
15th November 2012, 06:22 AM |#7  
Recognized Contributor
Flag Texas
Thanks Meter: 1,143
 
More
Quote:
Originally Posted by HQRaja

BTW can you confirm me the insecure boot.img you used? I just provided the link to the thread by Harry GT-S5830 but there were multiple ones posted in that thread, so I'm thinking of adding the direct link to the one confirmed working.

I'm pretty sure I used the one Harry GT-S5830 provided.
The Following User Says Thank You to Stryder5 For This Useful Post: [ View ] Gift Stryder5 Ad-Free
15th November 2012, 06:41 AM |#8  
StickyEyez's Avatar
Senior Member
San Diego
Thanks Meter: 32
 
More
I used the one in the OP of that thread.. is there a different one I'm supposed yo use?

Sent from my SGH-T999 using Tapatalk 2

---------- Post added at 06:41 AM ---------- Previous post was at 06:23 AM ----------

It works

Sent from my SGH-T999 using Tapatalk 2
15th November 2012, 06:55 AM |#9  
Recognized Contributor
Flag Texas
Thanks Meter: 1,143
 
More
Quote:
Originally Posted by jshaw06

It works

Glad to hear

Did you install the OTA before doing this? I gained root before installing the OTA.
The Following User Says Thank You to Stryder5 For This Useful Post: [ View ] Gift Stryder5 Ad-Free
15th November 2012, 07:06 AM |#10  
Member
Flag Jacksonville, FL
Thanks Meter: 17
 
More
Quote:
Originally Posted by Stryder5

Glad to hear

Did you install the OTA before doing this? I gained root before installing the OTA.

No issues with installing the OTA after root?

Edit: Just noticed in your sig that you did not install the update.
15th November 2012, 07:09 AM |#11  
StickyEyez's Avatar
Senior Member
San Diego
Thanks Meter: 32
 
More
I installed after ota

Sent from my SGH-T999 using Tapatalk 2
Post Reply Subscribe to Thread

Tags
nexus 4, root

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes