官术网_书友最值得收藏!

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.

Determining boot loader unlock status on Sony devices

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#*#*

Note

Note: These device codes could vary from manufacturer to manufacturer and could be obtained from the respective manufacturer if they provide support for it.

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

  1. Click the Service Info button. It shows the following screen:
  2. Click the Configuration button to see the status of your boot loader. If boot loader unlock is supported by the vendor, it will show the following output under Rooting status:
  3. If the boot loader is already unlocked, then it will show the following output:

Unlocking boot loader on Sony through a vendor specified method

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:

  1. Check if boot loader unlock is supported. This was shown earlier.
  2. Open up the following link:

    http://developer.sonymobile.com/unlockbootloader/unlock-yourboot-loader/

  3. Choose the device model and click Continue:
  4. This then shows us a prompt for entering an e-mail address. Enter a valid email address here:
  5. After entering a valid email address, click the Submit button. We should receive an email from Sony as shown in the following screenshot:
  6. The email consists of a link that takes us to another link, where Sony verifies the IMEI number of the device whose boot loaders have to be unlocked. Enter your IMEI number here:
  7. This IMEI number is required to generate the unlock code. Once we enter a valid IMEI number and click Submit, we should be greeted with a screen with an unlocking code followed by the steps to unlock:
  8. Once we receive the boot loader unlock code, we connect our device in fastboot mode. The steps to enter into fastboot mode could vary from model to model. Most of the time it is the difference with, which hardware keys have to be pressed to get into fastboot mode.

For Sony devices, follow these steps:

  1. Power off the device.
  2. Connect your USB cable to the device.
  3. Hold the volume up button and connect the other side of the USB cable to the laptop.

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

We can check the devices connected using the following command:

fastboot devices

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

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.

Note

Warning: This process sometimes may cause damage to your device. While writing this book, this boot loader unlock process provided by the manufacturer has lead my Sony device to get into boot loop. Looking at the stack overflow questions, we have noticed that this happened to many other people on these models (C1504, C1505). We had to flash the device with a stock OS provided by the vendor later to get our device working again. Finally, it is safe! Apart from this, an unlocked boot loader is nothing but a door without lock. So it is possible for an attacker to steal all the data from the lost/stolen device.

Rooting unlocked boot loaders on a Samsung device

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.

主站蜘蛛池模板: 凤山县| 云霄县| 绥阳县| 息烽县| 宁波市| 河池市| 财经| 修水县| 寿光市| 镇雄县| 江川县| 镇雄县| 山丹县| 石林| 廊坊市| 肇州县| 弋阳县| 郸城县| 淄博市| 友谊县| 鄂尔多斯市| 巨野县| 弋阳县| 珲春市| 湖口县| 鄱阳县| 青冈县| 鹤岗市| 江津市| 宁城县| 精河县| 濮阳县| 馆陶县| 洛扎县| 电白县| 房产| 乌拉特中旗| 玛沁县| 微博| 开江县| 红河县|