Important Steps / Information:

  • Necessary Driver Installation: Instructions and downloads here
  • USB Degubbing: on your smartphone, go to "Settings " > "About phone" > tab "build number" 7 times to enable developer options. Go back to "Settings" > "Developer options" > tap "USB debugging"
  • Show File Extensions: open a command prompt window on your computer and run "control folders" without the quotes. On the "View" tab, unmark the check box associated with "Hide extensions for known file types"
  • Battery: You will need at least 60% battery on your smartphone. Also, ensure that your PC is plugged in or that it won't shut down during the process
  • Backup: Unlocking the bootloader will result in loss of all the data stored on the device, including apps, settings and even content such as pictures, music etc. If necessary, create a backup before proceeding.

Fastboot Installation and ABD:

  1. Download the Android SDK (click the link and scroll at the bottom > "Download for other platforms" > "SDK Tools Only". Alternatively, download the slimmed version containing essential components, by clicking this link
  2. Extract the zip file and place the "android-sdk-windows" folder on your desktop. NOTE: if you have downloaded the slimmed sdk, then skip to step No.5
  3. If you've downloaded the full sdk, access the "android-sdk-windows" folder and run "SDK Manager.exe". Install the following packages:
    • "Tools" > "Android SDK Tools" > "Android SDK Platform-tools"
    • "Extras" > "Android Support Library" > "Google USB Driver"
  4. Go back to the "android-sdk-windows" folder, where you should see a folder named "platform-tools". If the folder is missing, repeat step 3.
  5. To confirm that everything works as intended, open a command prompt window (click "Start" > type "cmd" without the quotes ahd hit enter), and enter the following command:

    cd Desktop/android-sdk-windows/platform-tools
    adb version

In case you receive the message "Android Debug Bridge version x.x.xx", then everything works fine. If you get an error regarding abd and not being recognized as a command, then the process has not been successful. Repeat the steps above.

NOTE: leave the command prompt open as you will need it later. If you close it, you will need to enter the above commands again.

Necessary Downloads:

Download a custom recovery such as SuperSU and place both the recovery image and root zip in the "platform-tools" folder located in the "android-sdk-platform" tools folder that should be located on your desktop (see above!)

Custom Recovery Downloads:

Root Downloads:

Unlocking Bootloader:

  1. Turn off your phone
  2. Reboot it in bootloader / fastoob mode by pressing and holding "volume down" and the "power" buttons
  3. Connect your phone to your PC
  4. Open a command prompt window and enter "fastboot devices" without the quotes. Your phone's serial number should show and then you are able to continue. If the phone is not listed, then the drivers are not installed correctly.
  5. Once your phone has been recognized, unlock the bootloader by typing "fastboot oem unlock" without the quotes and hitting the Enter key. On your smartphone you should see a pop-up asking whether or not you wish to unlock the bootloader. Use the volume key to highlight "Yes" and press the "Power" button to confirm
  6. DO NOT SKIP: in command prompt, type "fastboot reboot" without the quotes and hit enter

Installing a Custom Recovery:

  1. Turn off your phone and reboot it in bootloader / fastboot mode by pressing and holding "volume down" and "power"
  2. Rename the recovery file that you have downloaded to "recovery.img" without the quotes. (NOTE: make sure that the final name looks like this "recovery.img" and not "recovery.img.img".
  3. Place the file in the "platform-tools" folder located in the "android-sdk-windows" folder which should be on your desktop
  4. Open a command prompt window and enter the command: "cd Desktop/android-sdk-windows/platform-tools" without the quotes. Then, type "fastboot flash recovery recovery.img" without the quotes and hit Enter
  5. On your smartphone, use the volume keys to highlight "Restart Bootloader", then press the "Power" button to select this option. After the bootloader reloads, highlight "Recovery Mode" and select it. You should see a greeting with the newly installed custom recovery

Rooting:

Now that you have unlocked the bootloader and you've installed a custom recovery, you can gain root by following one of the options below.

Method A – Flashing SuperSU Binaries:

  1. Copy SuperSU on your phone and remember the location
  2. Turn off your phone and boot into the bootloader by pressing and holding "volume down" and "power" buttons
  3. Once in bootloader, scroll using the volume rockers and highlight "Recovery Mode", then press "Power"

Instructions for TeamWin Recovery Project (TWRP):

  1. Install and browse to the location where you have copied the SuperSU zip file, then select the zip
  2. Swipe to confirm the installation and then reboot

Instructions for ClockworkMod (CWM):

  1. Install zip from sdcard > choose zip from sdcard
  2. Browse for the location of the SuperSU zip and select it
  3. Confirm the installation by scrolling down to "Yes" and selecting it. Once the installation is complete, you can reboot your device

Method B – Flashing a Custom ROM That Comes Pre-Rooted:

NOTE: not all custom ROMs are pre-rooted, but most of them are. Read the information about a given ROM to learn this detail

  1. Copy the custom ROM onto your phone and remember the location
  2. Turn off your phone and boot in the bootloader by pressing "volume down" and "power" buttons
  3. Once in the bootloader, "Recovery Mode" and press "Power" to select the option. This should bring you into the new custom recovery. To install the custom ROM, usually you need to: factory reset > wipe cache + dalvik cache > flash ROM > flash GApps

Recovery Instructions for TeamWin Recovery Project (TWRP):

  1. Wipe > Swipe to Factory Reset
  2. Install > browse for the location where you have copied the ROM zip and select it, then, swipe to confirm the installation
  3. Install GApps using the same process described above (for the ROM) and then reboot your phone

Recovery Instructions for ClockworkMod (CWM):

  1. Wipe data / factory reset
  2. Wipe cache partition
  3. Advanced > wipe dalvik cache
  4. Install zip from sdcard > choose zip > navigate to the ROM and select it > confirm the installation by pressing "Yes"
  5. You can now install the GApps using the same method as the one used for flashing the ROM
  6. You can reboot the phone


Congratulations! That is all You now have an unlocked bootloader, a custom recovery and a rooted Nexus 5.


See More: LG Nexus 5: Root, Install Custom Recovery, Unlock Bootloader