In this guide we’ll try to explain what is bootloader? Why is it locked and how to unlock bootloader? And how to unlock bootloader of Nexus devices. When it comes to Android hacking or rooting, there are many confusing technical terms that may keep you from tinkering with your device. Bootloader is one of such terms. You need to unlock bootloader before rooting, installing custom ROMs, or doing anything hacks related to your android device.
- What Is Bootloader?
- Bootloader is the code that is executed before any Operating System starts to run. Virtually all the smarphones, PC, laptops and other devices that run an OS has the bootloader. Bootloader basically includes the instruction to boot the OS kernel. Most of the bootloaders has their own debugging or modification environment.Since the bootloader runs before any piece of software, this makes it processor specific and every motherboard has its own bootloader. This is one reason due to which every Android phones and tablet has its own custom roms due to different processor and motherboard.
Android Devices’ Bootloader
Since Android is an open source operating system and all the android device manufactures their devices with different hardware, so all the manufacturers have their own version of bootloader specific to their hardware. Think of your android phone as a hard drive consisting of multiple partitions. One partition holds system files while the other holds your apps data. The basic function of a bootloader on an android phone is to instruct OS kernel to boot normally.
Why Is Bootloader Locked?
Since Android is an open source OS, almost all the manufacturers pushes their phones and tablets with their own flavor of modified version of Android OS. Bootloader is usually locked on an Android device because manufacturer doesn’t want you to change their version of Android specifically designed for the device. With a locked bootloader you won’t be able to modify the OS or flash custom ROMs.
Why to Unlock Bootloader?
The simple answer to this question is that one want toroot its Android device and want to flash a custom rom on it. Forced attempts to flash custom ROMs on a locked bootloader may result in a bricked device. Therefore the first step in Android hacking is to unlock bootloader.
How to unlock Bootloader of Nexus 4/5/7/10
Even the developers-friendly Nexus android devices come with a locked bootloader. While, unlocking bootloader of a Nexus device is very easy, there are many bootloaders that are locked and encrypted, and cannot be unlocked with simple commands.
In this guide we are going to show you how to unlock bootloader of Google Nexus 5/4, Nexus 7, Nexus 10 and Galaxy Nexus devices that comes with stock Android OS. These steps are strictly for NEXUS devices ONLY.
Note: Steps mention below are applicable to Nexus devices running stock Android OS only. If you have a smartphone from Samsung, HTC running modified android, then this guide is not for you.
We’ll be using Nexus 4 for our reference.
Step-1
First of all make sure you’ve properly installed the drive. Download the universal ADB/Fastboot drivers from Koush from here and install it. Windows 8 users must allow installation of unsigned drivers. Mac or Linux users need not to worry about the drivers.
Step-2
Now download fastboot and adb zip file [Windows] and [Mac]. Create a new folder called ‘adb’ on your desktop and extract the zip file inside the root of this folder.
Step-3
Now open the command prompt or Terminal on your computer, and navigate to the folder you created on the desktop by running following command:
cd desktop/adb
Now your Command Prompt will be inside the adb folder on your desktop. You can now easily run the command. However, if you encounter “Command not found” error, it means you navigated to a wrong directory.
Step 4 – USB Debugging Mode
Enable USB Debugging Mode on your Nexus Device [Settings > Developer options > USB debugging]
Step 5 – Bootloader Mode
Connect your device to the computer and type in the following command to put your Nexus 4/7/10 in Fastboot mode:
adb reboot bootloader
You can also do it by turning your device OFF and then press and hold Volume Up + Volume Down + Power button. On the Nexus S and Galaxy Nexus though, you simply need to press and hold the Power + Volume Down buttons. To confirm Whether fastboot has detected the device or not by using the following command:
fastboot devices
Mac users must add ‘./’ before any fastboot command otherwise it’ll return error.
e.g: ./fastboot devices
Command prompt will return some characters as Device ID when it successfully detects the device in fastboot mode.
Step 5 – Unlocking Bootloader
Once your device is in fastboot mode, wait until any automatic drivers installation is done and then type-in following command to unlock the bootloader:
fastboot oem unlock
After executing the command, a prompt should appear on the screen of your phone/tablet. Carefully read the onscreen instructions and confirm by pressing volume up button followed by the power button.
That’s it! You’ve successfully unlock the bootloader of your Nexus android phone/tablet.