You are viewing our Forum Archives. To view or take place in current topics click here.

Did this tutorial help you?

Yes
0.00% (0 votes)
No
0.00% (0 votes)

Total Votes: 0

Nexus 4: How to root, unlock, and flash a custom ROM.
Posted:

Nexus 4: How to root, unlock, and flash a custom ROM.Posted:

Bootloader
  • Powerhouse
Status: Offline
Joined: Aug 13, 201310Year Member
Posts: 411
Reputation Power: 20
Status: Offline
Joined: Aug 13, 201310Year Member
Posts: 411
Reputation Power: 20
Nexus devices are notoriously easy to root and unlock. So in this tutorial I will explain how to do so. First things first:

I AM NOT RESPONSIBLE IF YOU BRICK YOUR PHONE, DO THE FOLLOWING AT YOUR OWN RISK

Terminology:

Root- Rooting gives you root permissions, basically, it allows you to have unrestricted access to your phone and it's files/OS. Rooting is good, but can be used in a bad way. Make sure you know what you are doing before giving an app root access, you will always be prompted before anything can happen though.

Unlocking- Unlocking your bootloader, allowing your phone to run a custom Android OS, such as CyanogenMod, SlimBean, Beanstalk, Paranoid Android, AOKP, and countless others.

Custom ROM- A custom version of Android, often times with performance upgrades, battery efficiency improvements, or it might make things worse. They also allow you to be on the latest version of Android as well thanks to it being an open source software. Personally I have tried CyanogenMod, Paranoid Android, AOKP, and SlimBean. So far I like SlimROM the best.

Custom Recovery- This is what you use to flash ROMs and GApps. It's a modified version of Androids recovery partition, the thing that allows your phone to be wiped/flashed/etc. This is one partition of the whole system. It's one piece, and probably the most important; because without a custom recovery there is no custom ROM.

GApps- Google Apps, pretty straightforward really. If you don't flash these you won't have Google Play, thus, no apps. Always use the GApps for your version. If you are running a 4.3 ROM you need 4.3 GApps. If you are running a 4.2.2 ROM, you need GApps for 4.2.2 and so on. Also, most ROMs have their own version of GApps, so make sure you use those if possible.

Unlocking, Rooting, and flashing a custom ROM will all void your warranty.

Now onto the good stuff.

Usually I root the phone, then unlock the bootloader, flash a custom recovery, then the custom ROM and GApps. That's about it. However, most ROMs are rooted already, but that doesn't mean you shouldn't root before unlocking. That's how I do it, so that's how the tutorial will be written.

UNLOCKING AND ROOTING

Download the AndroidSDK onto your computer.
This may perform a factory reset on your device. You might lose all applications. Even the data on your SD Card! I'd recommend making a Backup to your computer BEFORE performing this.
Get the latest drivers for your phone.
Navigate to the "Device Manager" (Control Panel > Device Manager) in Windows and Select the android device. Open the properties and select the "Install Driver" option. Pick the driver with "Install from disk." Ignore any warnings about the driver not being signed properly.
While that is downloading, on your Nexus 4: turn USB debugging on.
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Once the drivers are installed, navigate to the C:\android-sdk-windows\platform-tools folder on your computer.
Hold shift and right click. Select "Open Command Window Here."
Plug your phone into the computer.
Open a command prompt, to do so go to your search bar and type "cmd" and hit enter.
In the command prompt, type in "adb reboot bootloader" and hit enter.
Your phone should now boot into a screen with a green android with his chest exposed.
Next you want to type in "fastboot oem unlock" and hit enter. This is the unlock.
Your phone will ask if you want to unlock it. Select "Yes" by using the volume keys and use power to select it.
Now, navigate to "Recovery Mode" with the volume keys. Use power to select.
A screen with another Android will pop up. Press Volume Up and Power at the same time.
Select Factory Reset. This process may take a few minutes. Be patient and let it work.
Once finished, select "Reboot."
Your phone is now unlocked!

ROOT

Turn on USB Debugging.
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Download the following:
SuperSU.
[ Register or Signin to view external links. ]
CWM (Pick the version for your device)
[ Register or Signin to view external links. ]
Place the recovery-clockwork-VERSIONNUMBER-mako.img file into your C:\android-sdk-windows\platform-tools folder.
Put the SuperSU.zip on your phone.
Open another Command Prompt if it isn't still open. (Navigate to C:\android-sdk-windows\platform-tools and shift + right click. Select "Open Command Window Here.")
With your phone plugged in type "adb reboot bootloader" and hit enter.
Wait for your phone to boot to the Android again.
Now type "fastboot flash recovery IMAGENAME.img" and hit enter. You are now flashing your custom recovery, ClockWorkMod. Just type in the correct file name that CWM was saved as.
I use TWRP (TeamWinRecoveryProject) but it doesn't really matter. If you want to use TWRP just download it and use it inplace of CWM.
Once that is finished: select the "Recovery Mode" option again on your phone.
You should get a new recovery menu here. Select "install zip from sd card" and "choose zip from sd card."
Find the SuperSU.zip that you transferred earlier and select "Yes" to installing.
Navigate back to "Reboot" and reboot your phone.
You're now rooted!
However, ClockworkMod Recovery won't continue to load after this.
To fix this, find "Rom Manager" from the market. (The free version is fine.) Use the "Flash ClockworkMod Recovery" option. (THIS IS WHY I USE TWRP)

CONGRATULATIONS, YOU'RE PHONE IS NOW ROOTED AND UNLOCKED!

I've got homework for now, so I'll post the tutorial for flashing a custom ROM and GApps tomorrow, or later this evening. If you can't wait head over to XDA to learn more.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.