[GUIDE] Nexus 4 - Unlock & Root

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Thanks for this guide again. Given the delay in receiving my phone I'm more prepared to unlock and root this device then ever before. All the setup files are ready and waiting to go on my desktop. I've read through the instructions, all I need is the phone....the phone....

It's worth the wait.. Got mine last night :)

Sent from my Nexus 4 using Tapatalk 2
 

Saiga

Well-known member
Jul 22, 2011
153
1
0
Visit site
Alright the official TWRP Recovery is out and I've linked it in the OP. I decided to leave the CWM option in there as well, because options and choices are fine, that's why we love Android, right? :)

Going forward expect me to be using TWRP only though, so if you have recovery issues and you are using CWM, I suggest switching. You will boot to TWRP the same way as we did CWM (rename the .img file to recovery.img, fastboot boot recovery.img, etc..), but if you are comfortable with CWM you don't need to feel pressured to switch it. S'aight??

I booted to TWRP and I really like it. I especially like the talk about added support for USB host mode. Well I was impressed with it. So I went a head and flashed it. " fastboot flash recovery.img" and I had to rename a couple of files to make it stick. But now when I boot into recovery I go to twrp and not the red triangle.

Only concern I have is while I was doing it. I just thought about if I could do it. Never really stopped to think if I should Lol. So I was wondering if flashing it is a good idea or not.

Thanks again for all your help. I really like messing with this stuff. My wife is getting annoyed and told me to stop tinkering so much Lol.
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
I booted to TWRP and I really like it. I especially like the talk about added support for USB host mode. Well I was impressed with it. So I went a head and flashed it. " fastboot flash recovery.img" and I had to rename a couple of files to make it stick. But now when I boot into recovery I go to twrp and not the red triangle.

Only concern I have is while I was doing it. I just thought about if I could do it. Never really stopped to think if I should Lol. So I was wondering if flashing it is a good idea or not.

Thanks again for all your help. I really like messing with this stuff. My wife is getting annoyed and told me to stop tinkering so much Lol.

Its fine.. Which files did you rename in your system exactly?
If everything works alright, then the only thing flashing it does will be to prevent you from being able to install an OTA. This can be undone by just reversing the renaming of the files, and flashing the stock recovery back, which I mention in the Q&A.

And don't worry about the wife.. There's worse things you could be doing with your downtime :)

Sent from my Galaxy Nexus using Tapatalk 2
 

Saiga

Well-known member
Jul 22, 2011
153
1
0
Visit site
Its fine.. Which files did you rename in your system exactly?
If everything works alright, then the only thing flashing it does will be to prevent you from being able to install an OTA. This can be undone by just reversing the renaming of the files, and flashing the stock recovery back, which I mention in the Q&A.

And don't worry about the wife.. There's worse things you could be doing with your downtime :)

Sent from my Galaxy Nexus using Tapatalk 2

Everything is behaving completely normal. :)

I wasn't aware that it would prevent me from using OTAs. Lol oops. Flashing the stock recovery won't erase anything will it?

To be honest, I'm not sure which files were renamed. I downloaded the nexus 4 tool to use for back ups. When I did I seen an option that renames two files to prevent the custom recovery from reverting to stock once the device is rebooted. So I did that option and flashed the recovery with cmd prompt and adb/fastboot. It does work, because the other times I tried to flash it didn't work and always brought up red triangle.


Do you flash the custom recovery to your devices? If I can go back to stock at anytime the same way I went to custom without losing data then I will probably just keep twrp on it and change recoveries as needed when a new OTA comes out.
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Everything is behaving completely normal. :)

I wasn't aware that it would prevent me from using OTAs. Lol oops. Flashing the stock recovery won't erase anything will it?

To be honest, I'm not sure which files were renamed. I downloaded the nexus 4 tool to use for back ups. When I did I seen an option that renames two files to prevent the custom recovery from reverting to stock once the device is rebooted. So I did that option and flashed the recovery with cmd prompt and adb/fastboot. It does work, because the other times I tried to flash it didn't work and always brought up red triangle.


Do you flash the custom recovery to your devices? If I can go back to stock at anytime the same way I went to custom without losing data then I will probably just keep twrp on it and change recoveries as needed when a new OTA comes out.

Flashing a recovery won't wipe anything, you can change them out all day, lol. I prefer to flash it actually so you can boot into it on the go without a computer..that's why I wanted to know which files you renamed?

Sent from my Nexus 4 using Tapatalk 2
 

Saiga

Well-known member
Jul 22, 2011
153
1
0
Visit site
Oh you wanted to know so you can flash it also. Ok I see. I looked on xda and the file names are:

/system/recovery-from-boot.p
/system/etc/install-recovery.sh


Again, I used Nexus Toolkit for that. So I guess those two files were renamed, but since I didn't do it personally myself, there is no way for me to know for sure.
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Oh you wanted to know so you can flash it also. Ok I see. I looked on xda and the file names are:

/system/recovery-from-boot.p
/system/etc/install-recovery.sh


Again, I used Nexus Toolkit for that. So I guess those two files were renamed, but since I didn't do it personally myself, there is no way for me to know for sure.

Ah ok.. That second file was the one I needed to clarify, that's new to me lol. Thanks!

Sent from my Galaxy Nexus using Tapatalk 2
 

squadz

Well-known member
Nov 6, 2012
155
0
0
Visit site
Fantastic instructions. I followed them to the T, but for some reason it's saying that I don't have root privileges. I'm already customized my phone, so I'm scared to repeat the Root It step, but is there another way to find out what went wrong? I didn't receive any errors, or anything. (SuperSU didn't ask to update binaries, by the way)

Any help is appreciated.
 
Last edited:

mzanette

Zee
Aug 22, 2012
826
14
18
Visit site
Just wanted to say a big THANKS for this guide. Right as soon as I got my Nexus 4 out of the box, I unlocked and rooted before I even installed my SIM card. LOL. All good, superuser working, even put on OTA rootkeeper and managed to keep root after an OTA update that was pushed to my phone right away. :)
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Fantastic instructions. I followed them to the T, but for some reason it's saying that I don't have root privileges. I'm already customized my phone, so I'm scared to repeat the Root It step, but is there another way to find out what went wrong? I didn't receive any errors, or anything. (SuperSU didn't ask to update binaries, by the way)

Any help is appreciated.

What exactly is saying that you don't have root privileges? If you need to repeat the root steps again it won't wipe anything or hurt you at all, only the bootloader unlocking wipes the device.. so you can always just try re-rooting if something did not go properly :)
 

squadz

Well-known member
Nov 6, 2012
155
0
0
Visit site
What exactly is saying that you don't have root privileges? If you need to repeat the root steps again it won't wipe anything or hurt you at all, only the bootloader unlocking wipes the device.. so you can always just try re-rooting if something did not go properly :)

Titanium Backup and Root Checker both did. I'll try re-doing the Root It! tab.
 

ragnarokx

Well-known member
Apr 20, 2010
6,915
1,696
0
Visit site
Titanium Backup and Root Checker both did. I'll try re-doing the Root It! tab.

From your previous post it sounds like you have SuperSU. If you do, try opening it and looking at the list of apps. Make sure SuperSU just isn't denying root permission to Titanium Backup and Root Checker. If the apps are listed in SuperSU, they should have a green hash tag symbol to the right of them.
 

squadz

Well-known member
Nov 6, 2012
155
0
0
Visit site
From your previous post it sounds like you have SuperSU. If you do, try opening it and looking at the list of apps. Make sure SuperSU just isn't denying root permission to Titanium Backup and Root Checker. If the apps are listed in SuperSU, they should have a green hash tag symbol to the right of them.

Everything works again. Re-did it using the same SuperSU zip that was on my phone, and all is working now.
 

corolla90

Well-known member
Jan 12, 2011
266
1
0
Visit site
Question about the drivers. I downloaded the universal naked drivers, and unzipped it. Have the folder on my desktop. I'm running windows (not 8, embarrisingly vista!!!) but which file am I supposed to install?
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Question about the drivers. I downloaded the universal naked drivers, and unzipped it. Have the folder on my desktop. I'm running windows (not 8, embarrisingly vista!!!) but which file am I supposed to install?

I believe when you plugin the phone in fastboot mode you can direct Windows to just search that directory for the driver it needs..

Can anyone confirm that? Again I don't use Windows for these things here..
 

corolla90

Well-known member
Jan 12, 2011
266
1
0
Visit site
I believe when you plugin the phone in fastboot mode you can direct Windows to just search that directory for the driver it needs..

Can anyone confirm that? Again I don't use Windows for these things here..

Ok, thanks. That makes sense. I did this when I rooted my NS4G, but it's been so long now I couldn't remember.

Sent from my Nexus S 4G using Android Central Forums
 

peejay1977

Well-known member
Mar 26, 2010
207
0
0
Visit site
Looks like I guessed correct about the Windows USB drivers side of things, seems the old right-click and Update Driver Software method should work if the preinstalled ones aren't the ones needed to root :

OEM USB Drivers | Android Developers

Windows 7

To install the Android USB driver on Windows 7 for the first time:

Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Devices in the left pane.
Locate and expand Other device in the right pane.
Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
Select Browse my computer for driver software and click Next.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
Click Next to install the driver.
Or, to upgrade an existing Android USB driver on Windows 7 with the new driver:

Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Device Manager in the left pane of the Computer Management window.
Locate and expand Android Phone in the right pane.
Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
Select Install from a list or specific location and click Next.
Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
Click Next to upgrade the driver.

:)
 

Trending Posts

Forum statistics

Threads
943,123
Messages
6,917,378
Members
3,158,834
Latest member
asha_kanta_sharma