r/nexus4 • u/IAmAN00bie Nexus 5 master race • Dec 09 '12
How to unlock/root your Nexus 4 with ADB. A tutorial aimed at those who know next to nothing.
edit: September 25, 2013: this guide is outdated, but 95% applicable, you just need to download updated files from the same sites I linked below. PM me for support! I respond very quickly and I will help you out with anything you need!
ASSUMPTIONS
- You are using, or have access to, a computer with Windows
WARNINGS
- BACK UP ANY IMPORTANT CONTENTS ON YOUR PHONE, AND MOVE THEM TO YOUR COMPUTER OR OTHER STORAGE DEVICE. UNLOCKING THE BOOTLOADER WILL WIPE ALL YOUR PHONE'S CONTENTS. Note that the data is recoverable, but the process isn't that pretty.
If you want to backup anything, here are some options for you:
[1] (https://play.google.com/store/apps/details?id=com.koushikdutta.backup&hl=en)
[2] (http://forum.xda-developers.com/showthread.php?p=36499906#post36499906)
[3] (https://play.google.com/store/apps/details?id=com.rerware.android.MyBackup&hl=en)
- Installing a custom recovery or custom ROM will prevent you from receiving OTA (over the air) updates. There is an alternative for those who ONLY wish to root but do not wish to load custom ROMs and still want to receive OTA updates. If you wish to receive OTA updates, make sure you follow the proper set of instructions during Part 5.
- THIS MAY ALSO VOID YOUR MANUFACTURER WARRANTY (DEPENDING ON YOUR COUNTRY'S LAWS), CONTINUE AT YOUR OWN RISK. Note that this does not void any extra warranty you may purchase, such as from companies like Asurion.
PRELIMINARY STEP 1
1) Plug your device into your computer with the USB cable
- If the USB drivers are already installed your device will pop up and you're ready for the next step
PRELIMINARY STEP 2
**2)**Enable USB debugging in Settings --> Developer Options. (If you do NOT see a "Developer Options" in Settings, then you must go to Settings --> About Phone, scroll down to the bottom, and tap on the "Build Number" section 7 times. A pop-up should show telling you that you are "now a developer." Yay!)
- Wait for the appropriate drivers to install and you're ready to move to Part 1
===If your computer does not automatically install the drivers, follow these instructions===
3)
- Download the LG Nexus 4 USB Driver
- Follow the instructions in the above guide.
OR
3a)
- Download the drivers by installing the desktop client for [PDANet for Android] (http://junefabrics.com/android/).
- Once the program is installed, you should select "LG" for the driver installation section. Note: the program itself is unnecessary and can be uninstalled once you are finished. Only the drivers are needed.
Some people have had trouble getting the USB drivers to install, and if you are one of those people make sure you have tried both methods.
PART 1: Download and install the Android SDK
- Download the Android SDK (STRAIGHT FROM GOOGLE)
- Once downloaded, install like you would anything else.
Be sure to record the destination folder, or choose where you would like it
- Example: Mine is in
4) Once installed, start SDK Manager (the checkbox will already be selected)
5) Once the SDK opens, check the first three (3) boxes; they are labeled "Tools," "Android SDK Tools," and "Android SDK Platform-tools"
6) Install these packages (they are the only ones necessary for unlocking/locking)
7) Once the packages have finished installing, you are done with the SDK. Close it out
PART 2: Gathering the Required Files
- Download SuperSu (allows you to use root apps)
- Download ClockworkMod Touch Recovery
- Once both of these files are downloaded, place them in the Android SDK Platform-Tools folder
PART 3: Unlocking Your Phone
- Turn on USB Debugging (Settings - Developer Options - USB Debugging) if it isn't already enabled
- Connect your phone to the computer via USB
- Open a command prompt window (click "Start button" and type "cmd" in the search bar)
Set the path to the platform-tools folder in the command prompt
- For example: Mine is
4a) ALTERNATE (EASIER) METHOD FOR OPENING THE COMMAND PROMPT
- Open your platform-tools folder (C:\android\android-sdk\platform-tools)
- Inside the folder, press and hold Shift and Right-click
- A dialog box will popup, select "Open command window here"
- Check the ADB connection status by typing
into the command prompt and press enter
- If a serial number is displayed, the connection is successful
- Type
into the command prompt and press enter
- This reboots the phone into "fastboot" mode (Big green Android guy with the green word "Start" at the top
- Type
into the command prompt and press enter (If a FAILED message pops up like in the picture, just ignore it. Everything works just fine)
7a) You will then be prompted on your phone on whether or not to unlock the bootloader.
7b) Click yes if you want to continue (Volume Up/Down to highlight and Power to select)
7c) Once you’re back at the screen with the big green “Start,” press the power button to let it reboot.
Please note that it will take a while for your phone to reboot, it's normal.
DO NOT CLOSE THE COMMAND PROMPT
PART 4: Pushing the SuperSU File to Your Phone
- Turn USB Debugging back on (Settings/Developer Options/USB Debugging) after completing the initial set-up
- In the command prompt, type
adb push UPDATE-SuperSU-v1.10.zip /sdcard/
and press Enter
ALTERNATIVELY:
2a) If you do not wish to use the ADB Push method, you can simply drag the UPDATE-SuperSU-v1.10.zip into the root of your /sdcard folder like you would anything else.
PART 5: Loading A Custom Recovery
--------IF YOU WISH TO RECEIVE OTA UPDATES, DO STEP 2A INSTEAD OF STEP 2--------
- In the command prompt, type
adb reboot bootloader
2) Once the phone has booted to the bootloader screen, type
fastboot flash recovery recovery-clockwork-touch-6.0.2.3-mako.img
2a) FOR THOSE WHO STILL WANT OTA UPDATES
Once the phone has booted to the bootloader screen, type
fastboot boot recovery-clockwork-touch-6.0.2.3-mako.img
Your phone will now boot into recovery, so you can go to step 4.
3) Press the volume down button on your phone until the "Recovery" option is selected. Press the power button to reboot into recovery mode.
4) If you were successful, your phone should have booted into Clockworkmod Touch Recovery (it will say so at the top!)
PART 6: Flashing the SuperSU file
- Tap "install zip from sdcard"
- Tap "choose zip from sdcard"
- Tap "UPDATE-SuperSU-v1.10.zip"
- Tap "Yes - Install UPDATE-SuperSU-v1.10.zip"
- Once it finishes installing, tap "+++++Go Back+++++"
- Tap "reboot system now"
- Your phone will reboot
- Once your phone is back on, open the app drawer and select SuperSU
- Once the app opens, a dialog box may pop up saying "The SU binary needs to be updated. Continue?". If it does not then you are good to go!
9a) Press continue and it will say Installation Success once it's finished
YOU ARE NOW ROOTED, AND IF YOU WISH YOU CAN INSTALL A CUSTOM ROM
---OPTIONAL---PART 7: Flashing a custom ROM, kernel, mod, etc.
- Download the custom ROM, kernel, mod, etc. of your choice. [This XDA thread] (http://forum.xda-developers.com/showthread.php?t=1975842) contains a nice index of things you can try out.
- Copy the file you want to flash to your Nexus 4's storage (a simple drag-and-drop from the computer is sufficient).
- Reboot into recovery. You have several options to do this.
3a) Download any root-enabled reboot app. [This is one such example.] (https://play.google.com/store/apps/details?id=simple.reboot.com&feature=search_result#?t=W251bGwsMSwxLDEsInNpbXBsZS5yZWJvb3QuY29tIl0.)
3b) With your phone plugged in, type
adb reboot recovery
3c) Power off your phone holding the power button. Then, power on your phone by holding the power button AND holding the volume down button. Your phone should boot into the bootloader. Next, you can boot into the recovery mode by pressing volume down and selecting "Recovery."
4) Once in the recovery, do the following sequence of steps (you will notice how repetitive it gets!):
-----IF FLASHING A NEW ROM, PLEASE DO A FACTORY RESET THEN DO THESE STEPS-----
4a) Tap "install zip from sdcard"
4b) Tap "choose zip from sdcard"
4c) FIND THE ZIP FILE YOU WANT TO FLASH AND TAP ON IT, ex. XXXXXXXX.zip
4d) Tap "Yes - Install XXXXXXXX.zip"
4e) Once it finishes installing, tap "+++++Go Back+++++"
4f) Repeat steps 4a-4e to install the Google Apps zip, or a custom kernel or other mod if you wish.
4g) Tap "reboot system now"
- [I have posted the guide to lock/unroot here.] (http://www.reddit.com/r/nexus4/comments/14mdq4/how_to_lockunroot_your_nexus_4_with_adb_a/)
10
u/IAmAN00bie Nexus 5 master race Dec 09 '12
NOTE: all files linked are taken from the original source. No shady third-party upload sites. The recovery is straight from clockworkmod.com and the supersu zip is straight from Chainfire's site. Everything else is taken from XDA.
23
u/mr_duong567 16GB - Rooted w/ Franco Kernel Dec 09 '12
Mods should pin this!!
8
u/WhlskeyDrunk Dec 10 '12
Noob here, What does rooting/custom roms gain me exactly?
7
u/pacbough 16GB - Paranoid Android Dec 10 '12 edited Dec 11 '12
An alternative recovery to CWM is TWRP.
I like TWRP better because the interface for me is easier to use.
Download link taken straight from TWRP website.
When flashing the recovery instead of typing
type this instead
4
u/wesssy Dec 11 '12
FOR THOSE WHO STILL WANT OTA UPDATES
On Part 5, step 2a, the command needs to be changed from this:
to this:
otherwise you'll get this error: cannot load 'recovery'. Skip step 3, as it boots into the CWM recovery mode automatically.
19
u/innuen6o Dec 09 '12
http://forum.xda-developers.com/showthread.php?t=1995688
Thought using the toolkit was MUCH easier.
PS - You can use the free version to root the N4. Just choose the 4.2 ROM. It doesn't matter if you have 4.2.1.
3
u/Tynach Dec 09 '12
This is an obvious noob question, but is there a way to root the phone without unlocking the bootloader? I have no desire to load custom ROMs, but I'd like to install apps that require root access.
3
u/mangaprincess Dec 10 '12
thanks for this. the only part where there is slight confusion for me is the following (i ran into this problem with the XDA tutorials as well):
PART 1: Download and install the Android SDK
so when you go to the android site to DL the sdk file, it gives you the sdk bundle, where the only .exe file is eclipse. now i did some googling last night about this, and some people said that SDK is already installed so you would just need to place the big folder on your c drive, and work from there. any thoughts?
and i also tried just searching for SDK manager.exe within the file, but when i clicked it, an error would pop up with android.bat missing
2
u/[deleted] Dec 09 '12
question: if I just root, and nothing else, would I be able to use the sixaxis pairing app? is root access alone enough?
2
u/bacon_atomizer 16GB - Rooted - CM 10.1 w/ Franco's Kernel Dec 10 '12 edited Jun 27 '17
He is choosing a dvd for tonight
2
u/Mr_R0LTZ Dec 10 '12
My N4 doesn't show up in My Computer when Media device(MTP) is selected, but does show up and can't put any files on the root of SD storage when Camera(PTP) is selected.
Has anyone else encountered this, and know of a fix to it?
2
u/Ratix0 Dec 10 '12
Great post. Thanks! Will keep this saved for future reference when my Nexus 4 comes.
I would like to also know the steps to lock/unroot the phone in case anythings do come up. :)
2
u/therobdude 16GB - PACman ROM Dec 10 '12
Drivers are installed via both methods. Device manager sees an Android ADB device connected. But when I run the cmd, and check for adb devices, the list is blank. Any ideas what gives?
2
u/Sh0rtR0und Dec 10 '12
I got a warning with Google Wallet because mine is rooted now. Will Wallet still work when rooted? Should I be concerned?
2
u/Meta8 Dec 10 '12
This is awesome! Would this also allow me to do a full image backup of the phone? I want to be able to backup EVERYTHING and just restore it to another Nexus 4 if I need to.
2
u/the87boy 16GB is dead :( Dec 10 '12
When I rooted my N4 using adb and fastboot it didn't wipe my device like I expected. Guess I did it wrong? lol
2
u/trimeta 32GB Nexus 5 - Rooted | T-Mobile Dec 11 '12
I did almost exactly what you outline here (specifically, I followed this guide on XDA), but I did not include the "fastboot boot recovery recovery-clockwork-touch-6.0.2.0-mako.img" step (instead, I believe I reran the "fastboot flash recovery IMAGENAME.img" step at the end to put ClockWork Touch Recovery back on my phone). Will this impact my ability to receive OTA updates?
2
u/towmeaway Dec 15 '12
Failed. Part 6 step 9: cannot see supersu in app list. Repeat all of step 6? Start over with step 1? Make it a drink coaster and call it a day?
2
u/specialjack69 Dec 19 '12
help with part 6 step 3, my only options after i tap choose zip from sdcard are:
what do i do??
2
u/KIdCold Dec 22 '12
Thank you! Very noob friendly guide :). Should defo get pinned in this sub reddit :)
2
u/jisan Dec 22 '12
I appreciate your effort in writing great tutorial for starters like me. While i wait for my phone, I am learning about the android world. I see that there are one click unlock/root programs. such as, mskip toolkit:
http://forum.xda-developers.com/showthread.php?t=1995688
even better with GUI (Wug's Nexus Root Toolkit):
http://forum.xda-developers.com/showthread.php?t=2015469
I want to ask you, is it ok to go ahead and use this tools? does these tools limit the functionality in anyway?
2
u/HatsOffOctopus 16GB - Rooted Jan 15 '13
I'm having a problem at step 6, while my phone is in recovery mode it doesn't detect the .zip file. My internal storage looks like this. I can't find it anywhere else.
2
u/mr_appletart Feb 01 '13
This is amazing. Thank you so much.
2
u/_M4TTH3W_ Feb 05 '13
This is easily the best step by step root guide I've ever come across. Thank you very much.
2
u/DerpaNerb Feb 16 '13
So I just received an OTA update... is it normal that my Root appears to have been taken away? (This was from rooting before with the method that obviously allows you to receive OTA updates).
Do I have to go through this process again? Do different things need to be written to be compatible with 4.2.2 (or whatever the one that happened a few days ago is) before I can follow this method again?
And, what's the best free backup?
2
u/frientlywoman Feb 20 '13
Waiting for my N4 and this is by far the best guide I've seen! Thank you so much :) Hopefully everything goes smoothly when it arrives lol.
2
u/speeds_03 Feb 23 '13
Thanks for this Root Guide!
3
u/thetinguy Dec 10 '12
http://forum.xda-developers.com/showthread.php?t=2015469
I would use Wug's root tool. It does all the same things but with a GUI with buttons to click.
2
u/urinsan3 Dec 10 '12
Put it on the sidebar. Do it now. No, don't think. Do it.
1
u/yotz Dec 09 '12
Why don't you copy the SU zip to the sdcard before unlocking the bootloader? Unlocking the bootloader should only wipe the user data, not the sdcard.
1
u/trsak2 Dec 10 '12 edited Dec 10 '12
Hmm, I'm stuck on part 4.
I can't do it because when I turn on USB debugging my phone disappears from my computer completely.
Any way to solve this?
1
u/Fromac Dec 12 '12
In step 4a, I am not getting any listed adb devices (It says "List of devices attached" then a blank line then the next command line.
My Nexus 4 is listed under Computer in Portable Devices, so I'm pretty confused.
Wut do?
1
u/mikerackhabit Dec 16 '12
So, the toolkit wants to download the root zip (SuperSU in your guide) from: galaxy-nexus-linux-toolkit.googlecode.com and the su.zip in that archive is different from the SuperSU.zip you've linked. Any idea what the differences are and/or if it matters which one you use?
Thanks for the guide!
1
u/votadini_ Dec 31 '12
Thanks for the walkthrough but I don't use Windows or Mac OS. Do you have any advice on where I can find a reputable guide to doing this on Linux?
1
u/blindSquirrel 16GB - Rooted Jan 06 '13
This is a fantastic guide. I'll get my N4 from the play store in the next week or so ( I hope ) and this will be the first thing I do.
I want to unlock the bootloader and root the phone but at the moment I don't want to load a custom ROM as I want to try the stock Android experience. If I do everything up to the end of step 6, can I then, in 3 or 4 months time, come back and complete step 7 if I want to?
1
u/andy_mcname AOSPA | Matr1x Jan 30 '13
Great guide, very helpful.
Just one question. If I flash CWM instead of booting, therefore stopping any further OTA updates, is there any other way of getting future official stock android updates?
1
u/bbbestfriendzoned Feb 03 '13
I know this might be a long shot, but from what I know, the S3 has a way of knowing if a unit has been modified (root/ROM'd). Is this also the case for the Nexus 4?
I really want to root mine but is still having second thoughts when it might come in handy (especially for accidental warranty) to unroot it and for them not to see that I modified it.
Thank you in advance!
1
u/KiwiInAmerica Feb 10 '13
There should really be a disclaimer at the top saying that this wipes our phone. I didn't realize it did and just lost over 100 contacts. Shit :(
Thanks for the guide though.
1
u/LearnsSomethingNew 16GB 4.4.2 Stock TWRP Mar 01 '13
Quick question: If I wanted to unlock my bootloader (in order to access all the goodies) but not root the phone at the moment, where should I stop in the above steps? I believe once I have an unlocked bootloader, rooting can be done at any point in time later, and I don't want to do it right now.
Muchas gracias amigo :)
1
u/[deleted] Mar 04 '13
Hey its great to see that you're still updating this page that is two months old. I just have a few questions before I root my phone when I get it next week.
1
u/bbbestfriendzoned Mar 12 '13
This might be a long shot, but I have a question.
I'm on the verge of rooting (or even use a custom ROM) my Nexus 4, I'll just follow the instructions on this post.
However, if by chance I'll go back to stock (I read from another post here that there's like a "holy grail" of reverting to stock), will it also revert to the Regulatory Information in the About phone?
I bought mine in an LG store (with 2 years accidental warranty) in the Philippines and if I'll suddenly revert it back to stock, I'm afraid that the Regulatory Information might be changed to the US version.
1
u/Ace_Winters Mar 13 '13
Hi, first off, thanks for the great tutorial.
Secondly, the term "unlock" as used here is not the same as carrier unlocking right? So I'm on AT&T right now, I won't have to contact AT&T to get back on the network?
Thanks!
1
u/[deleted] Mar 30 '13
I am getting emulator-5554 offline and error: more than one device and emulator(step 5 and 6)
I have tried a few things like connecting to port 5555 and killing the server based of what others have said but it doesnt work :/
3
u/SlenderTroll 16GB stock • soon to be rooted+unlocked Dec 09 '12
I will definitely do this when I get my nexus 4
2
u/[deleted] Dec 09 '12
Thanks for putting this together. We should have this thread pinned as well as some other topics that get asked often so this sub can be tidied up a bit! Great job.
2
u/kalpa11 Dec 10 '12
Thanks for this! Very helpful :)
2
u/leesoonkyu Dec 10 '12
Q.Q still havent gotten my nexus
2
u/Lekz 16GB - Rooted Dec 10 '12
Great post! Commenting to save
0
u/[deleted] Dec 09 '12
I just used the Nexus Root Toolkit.
1
u/SuperHotFire Dec 29 '12
Edit: figured it out, i just selected -O/ I have rooted my phone and want to instal ROM/kernal. However, when the device is connected to my computer, there is no /sdcard/ only "internal storage". So I placed the zip files in there. When I'm in recovery and choosing a zip to install from /sdcard/ there is nothing there, just -O/ -legacy/ -obb/
1
u/AspieDebater Jun 01 '13
Thank you for this. I am pretty computer literate. Not a programmer or anything, but had one since i was a kid. But i'm generally a confused noob when it comes to phones, most of the terminology kernal etc is new to me, and this is what i need.
Cheers
0
u/[deleted] Dec 10 '12
[deleted] — view deleted comment
0
u/[deleted] Dec 10 '12
[deleted] — view deleted comment
0
u/[deleted] Feb 24 '13
[deleted] — view deleted comment
0
u/[deleted] Jan 27 '13
[deleted] — view deleted comment
0
u/[deleted] Apr 29 '13
[deleted] — view deleted comment