[GUIDE] Nexus 4 - Unlock & Root

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Koush updated the recovery to version 6.0.1.8... presumably squashing some bugs. I updated the link in the OP - everyone please be sure to use the latest version! :)
 

peejay1977

Well-known member
Mar 26, 2010
207
0
0
Visit site
Nice one, I'll let you know how I get on with the Windows unlocking when I finally get the phone. I might record the screen just in case it helps anyone else and get the GoPro setup to record the phone.


Sent from my iPad using Tapatalk HD
 

peejay1977

Well-known member
Mar 26, 2010
207
0
0
Visit site
Hi just a quick note, I'm possibly doing something very wrong but I just got my Ubuntu install sorted just in case the Windows method doesn't work for me and I can't get the Android SDK mentioned above to work, I downloaded the ZIP file, extracted to a folder but running adb-linux or fastboot-linux with or without sudo returns :

Code:
adb-linux: command not found
fastboot-linux: command not found

Instead I downloaded and unzipped the SDK from here : Android SDK | Android Developers

When running fastboot or adb is states that it is not installed so I installed both using :

sudo apt-get install android-tools-adb

and

sudo apt-get install android-tools-fastboot

Then when running them it worked fine for me. I've yet to try it but just thought I'd mention it, sorry if I'm being a total moron, Linux isn't my normal OS so it could well be huge user error on my part. Feel free to delete this post if it confuses people.....by being wrong!

By the way, the version numbers downloaded from the repo for each were "Android Debug Bridge version 1.0.29" and "4.1.1+git20120801-1" for the Fastboot version. This was running Ubuntu 12.10 64bit.

Thanks


Paul.
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Hi just a quick note, I'm possibly doing something very wrong but I just got my Ubuntu install sorted just in case the Windows method doesn't work for me and I can't get the Android SDK mentioned above to work, I downloaded the ZIP file, extracted to a folder but running adb-linux or fastboot-linux with or without sudo returns :

Code:
adb-linux: command not found
fastboot-linux: command not found

Instead I downloaded and unzipped the SDK from here : Android SDK | Android Developers

When running fastboot or adb is states that it is not installed so I installed both using :

sudo apt-get install android-tools-adb

and

sudo apt-get install android-tools-fastboot

Then when running them it worked fine for me. I've yet to try it but just thought I'd mention it, sorry if I'm being a total moron, Linux isn't my normal OS so it could well be huge user error on my part. Feel free to delete this post if it confuses people.....by being wrong!

By the way, the version numbers downloaded from the repo for each were "Android Debug Bridge version 1.0.29" and "4.1.1+git20120801-1" for the Fastboot version. This was running Ubuntu 12.10 64bit.

Thanks


Paul.

Ahh, I should have linked you to this awesome tool before: The Ubuntu Way: A New, Easier Method for Setting Up ADB and Transferring Files - Articles - RootzWiki - RootzNews - RootzWiki

This script will install the sdk and everything you absolutely need for you, setup adb and fastboot in your PATH properly, and even installs scripts so you can right-click files to push them to your sdcard, among other awesome things. Check it out! :)
 

Saiga

Well-known member
Jul 22, 2011
153
1
0
Visit site
And again Koush pushed an update.. 6.0.1.9 linked in the OP :)

Hey 2defmouze, you've helped me a lot, I really appreciate it. Got another newbie question for you though.

I am rooted, I have the Super SU icon and all of my root only apps are working great, so is there a reason for me to use the 6.0.1.9.img that you just linked to? If so, do I just follow your guide and push it like I did the first .img? Also, if I push this new recovery, do I need to re-install super su?

Thanks for all the help man!
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Hey 2defmouze, you've helped me a lot, I really appreciate it. Got another newbie question for you though.

I am rooted, I have the Super SU icon and all of my root only apps are working great, so is there a reason for me to use the 6.0.1.9.img that you just linked to? If so, do I just follow your guide and push it like I did the first .img? Also, if I push this new recovery, do I need to re-install super su?

Thanks for all the help man!

You will definitely want to grab the updated recovery image and flash it / use it going forward. Koush noted that it fixes errors that happened when restoring backups and when trying to permanently flash the recovery, so you will want to have the latest, bug free version. You won't need to re-root or do anything else though, this is just for your recovery, won't affect your current system at all :)
 

Saiga

Well-known member
Jul 22, 2011
153
1
0
Visit site
Awesome, sounds good! I went ahead and put the new stuff on my phone, the grey screen with a top hat said 6.0.1.9 at the bottom, so I assume I did that part of it right. But I am now wondering how we return to that screen in the future.

Also, While I was on that screen, I went ahead and did a backup, but I have no idea where those back ups go afterwards. Are they stored on the device itself?

Thanks again
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
Awesome, sounds good! I went ahead and put the new stuff on my phone, the grey screen with a top hat said 6.0.1.9 at the bottom, so I assume I did that part of it right. But I am now wondering how we return to that screen in the future.

Also, While I was on that screen, I went ahead and did a backup, but I have no idea where those back ups go afterwards. Are they stored on the device itself?

Thanks again

I don't know if you permanently flashed it (few things I'm not quite clear on and won't be til I get my hands on one of these things, lol)... but to get back to recovery you can:
A. Power down and reboot to the bootloader (volume down and power), use volume to scroll to recovery, and select it. If that gets you there, great, if it gives you the infamous Android with the red triangle then you're looking at stock recovery, and just need to
B. Fastboot boot yourself into CWM just like you did earlier. ROM Manager is another option (though I HATE it and advise against it) that will save you time or if you don't have access to a computer with fastboot. Inside ROM Manager tap Flash recovery, then boot to recovery. Note than unless you buy RM premium I believe it will only flash the non-touch version, which just means you'll need to use the volume keys to scroll around it and power to select things.

Also if (A) is the case and recovery is permanent, you can save steps by downloading an app like Simple Reboot that will give you options to boot straight to recovery or the bootloader if you need.

As for the backups themselves, they are stored in your internal sdcard, under /sdcard/0/clockworkmod I think. Try not to screw around in that folder, lol. I think you will see a "blobs" directory in there that you shouldn't touch at all, while the individual backups are sorted by date and you could delete them if you are in need of space or something, although the blobs feature means that the backups don't take up that much space anymore. Sorry if that doesn't make much sense, I'm going from memory here haha.
 

Saiga

Well-known member
Jul 22, 2011
153
1
0
Visit site
I did what you said, and recovery mode does bring me to the red triangle screen with "no command" in under it. IS that bad?

Also, I'm not finding a clockworkmod folder anywhere on my Nexus 4. I even searched in windows explore and nothing turned up.
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
I did what you said, and recovery mode does bring me to the red triangle screen with "no command" in under it. IS that bad?

Also, I'm not finding a clockworkmod folder anywhere on my Nexus 4. I even searched in windows explore and nothing turned up.

No its not bad at all, the command in the guide isn't supposed to flash it so that's normal, you'll just have to boot into recovery the same way as is in the guide for now. Although while you are in recovery I thought CWM had an option to stick itself and keep you from reverting to stock recovery, you can look around it and see if you cant find it. That and the backup directory I won't know for sure until I get my device and play around with it a bit :)
 

goldentuna

Active member
Jan 11, 2011
36
2
0
Visit site
So.. I don't have my Nexus4 ... yet - supposedly got it ordered but haven't heard anything about shipping yet...

But, my question is... normally if when flashing something and you get a hang on boot - or your phone just won't respond - you 'pull the battery' to get everything back to the start.

So... what/how do we do that on the N4 if we can't remove the battery?
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
0
Visit site
So.. I don't have my Nexus4 ... yet - supposedly got it ordered but haven't heard anything about shipping yet...

But, my question is... normally if when flashing something and you get a hang on boot - or your phone just won't respond - you 'pull the battery' to get everything back to the start.

So... what/how do we do that on the N4 if we can't remove the battery?

If it's like the Nexus 7 just holding the power button for about 20 or more seconds will force a reboot. I assume it will be similar. :)

Sent from my Galaxy Nexus using Tapatalk 2
 

2defmouze

Well-known member
Jul 9, 2011
3,945
1,552
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??
 

mzanette

Zee
Aug 22, 2012
826
14
18
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....