- Android Phones
How to root, unlock and install custom rom on your Google Nexus 5
So, bought a cool new nexus 5, eh? Not satisfied with the way it's tweaked, eh? Wanna play around a bit, eh? Well, you're in the right place my friend. In this tutorial i'll guide you on how to root your device, unlock the bootloader and install a custom recovery. I'll try to make it as elaborate as I can, but if it so happens that you don't understand any bit of the process or do something wrong, I request you to please stop right there and then. It is very possible that you may screw up your device and then it'll be as good as a paperweight. So whenever in doubt, comment and ask! Let's get on with it then, shall we?
*Disclaimer: Attempt the following on your own risk. I will not be held responsible if your device stops working, behaves in a weird way or gets spontaneously combusted (stops laughing, it's possible!)*
Things that you'll need:
*A windows system with various USB and other phone drivers installed. Here.
You will be required to download some stuff so make sure your internet connection is well and up.
Setting up adb
1) Download the Android SDK components required, here.(Thanks to xda developer El Daddy)
2) Extract and place the android-sdk-windows folder on your DESKTOP.
3) Now, to check if it's working, open a command prompt (start > type "cmd"), and type the following and press enter after each line:
4)If it shows "Android Debug Version x.x.xx", move ahead. If it shows some error that adb is not a recognised command, try again. Make sure you placed the folder on your desktop!
5)Close the command prompt when you're through.
Now, download these two files and put them in the "platform-tools" folder inside the "android-sdk-windows" folder on you desktop.
Rename the clockworkmod recovery file to "recovery.img" without the quotes. Remember it's recovery.img and not recovery.img.img!
*Unlocking your bootloader gives you access to the phone's internal memory. It will also format your internal memory including all apps, settings and all media (photos, music etc). So please make a backup on your PC before continuing. *
1) Make sure your device is at least 60% charged.
2) Go to settings > about phone > tap on build number seven times. Now again go to settings and scroll down to see a new menu option "Developer Options". Tap on it and select Enable USB Debugging.
3) Switch off your phone. Hold volume down + power button. It'll take you to bootloader/fastboot mode.
4) Connect your phone to your PC via USB cable and open a command prompt window. Type the following:
This should show your phone's serial number on the screen and you're good to go. If not, make sure your drivers are properly installed or try re-installing them. DO NOT attempt anything further if your phone's serial number does not appear.
5) If your phone gets recognised, type the following and press enter:
fastboot oem unlock
On your phone screen you will be asked if you want to unlock your bootloader or not. Use the volume buttons to highlight YES and press the power button to confirm.
5) Wait for the above command to finish executing then type the following into the command prompt and press enter:
Your phone will reboot and you'll be greeted with an android logo. Don't panic! Wait for the progress bar to load. This may take sometime so don't panic and try to do something stupid as disconnecting the USB or powering off your device.
6) When your phone has booted up properly ( you can use it normally now), disconnect the USB and close the command prompt window.
Installing custom recovery
1) Switch off your phone and boot into the fastboot/bootloader mode again by holding volume down + power buttons.
2) Make sure that you did rename the recovery file as recovery.img and moved it to the platform-tools folder inside the android-sdk-windows folder on your desktop.
3) Open up a command prompt window and type and press enter after each line:
fastboot flash recovery recovery.img
4) On the phone scroll to "Restart Bootloader" using the volume buttons and press power button to confirm.
5) After it reboots, scroll to "Recovery mode" and press power to select. This is your new custom recovery. Do not play around with it just yet! Scroll to "reboot phone" and power to select. Let your phone reboot and close the command prompt.
Now that you have an unlocked bootloader and a custom recovery installed on your phone, you're ready to root your phone.
1) Flashing Super SU: this will give you root access with the stock android rom which came pre-installed on your phone.
Make sure that you copied the "root" file that you downloaded earlier into the platform-tools folder.
2) Switch off your phone and boot to bootloader mode by holding volume down + power buttons. Scroll to "Recovery mode" and press power to select. Now connect your phone to your PC via USB cable.
3) Open up a command prompt window and type the following commands (where the "X.XX" in the second line is the version number you downloaded, make sure you type it correctly) :
adb push UPDATE-SuperSU-vX.XX.zip /sdcard/
4) Once it's finished executing, disconnect your phone form your PC. In the recovery mode on your phone scroll to "install zip from sdcard" > choose zip from sdcard.
5) Scroll down till you find SuperSU.zip and select it.
6) On the next screen scroll down to "Yes". and select it. It may take sometime.
7) When it's completed you can reboot.