Locked and unlocked boot loaders

A boot loader is the first program that runs when you boot your device. Boot loader takes care and initiates your hardware and Android kernel. Without this program, our device doesn't boot. Those manufacturers of your devices usually write boot loaders and so usually they are locked. This ensures that the end users cannot make any changes to the device firmware. To run custom images on your device, boot loader has to be unlocked first before we proceed with it. Even when you want to root a device with a locked boot loader, it requires unlocking it first if there is a possible and available way to do it. Some manufacturers provide an official method to unlock boot loader. In the next section, we will see how to unlock a boot loader on Sony devices. If the boot loader cannot be unlocked, we will have to find a flaw that allows us to root the device.

As mentioned earlier, some manufacturers provide an official method to unlock boot loaders.

Specifically on Sony devices, we can type the following code and follow the steps shown:

*#*#7378423#*#*

When we type the preceding number on Sony devices, it opens up the following screen:

Determining boot loader unlock status on Sony devices

The following steps show the process of unlocking boot loader on Sony devices. This gives an idea of how vendors provide support for unlocking boot loaders on their devices:

For Sony devices, follow these steps:

These steps should connect the device to the laptop in fastboot mode.

We can check the devices connected using the following command:

Unlocking boot loader on Sony through a vendor specified method

Once the device is connected in fastboot mode, we can run the following command with the vendor provided unlock code to unlock the device:

Unlocking boot loader on Sony through a vendor specified method

The preceding code shows that boot loader unlock is completed.

Though the process here is shown specifically with Sony devices, this is almost the same with most of the official manufacturer methods.

In this section, we will discuss how to root an unlocked Samsung note 2 which uses Samsung's customized version of Android OS, we will also see what the differences between Stock Recovery and Custom Recovery are, and finally we will install a Custom ROM on our Note 2 device.