To connect your phone to a computer and control it, the adb utility is suitable. This is quite a useful command, but if you want to flash root rights, third-party recovery menu or other firmware to the device, you will first have to unlock the bootloader of the device.
For this purpose, more and more often users engage fastboot and computer. But everyone should understand that unlocking or locking the bootloader from the phone erases all data and settings. In this article we will look at how to unlock bootloader via Fastboot on the example of Xiaomi Mi A2.
The first thing you need to do is to install the fastboot utility on your computer. In Ubuntu, you can install it with the following command:
$ sudo apt install android-tools-fastboot
Or the utility is automatically installed along with the android-tools-adb
package
If you have not yet obtained developer rights on the system, you need to get them. To do this, open Settings, go to About phone and tap seven times on the inscription. Build number:
After that, you will see a subsection called For Developers in the System section. This is where USB debugging is enabled, and this is also where you can enable bootloader unlocking.
Now, to allow unlocking the adb bootloader, open System, then Developers. Next, look for the Factory Unlock switch there and turn it on. The system will ask you to enter your password and then tell you that the device security features will be disabled. You should agree with it:
Your phone is now ready to be unlocked.
If you have enabled USB debugging, you can use the command to reboot your phone:
$ adb reboot bootloader
If you don't want to use debugging, then you can reboot your phone by pressing the volume key down and the power button. The smartphone should reboot into fastboot.
After the fastboot inscription appears on the phone screen, you can proceed. The phone should be connected to the computer via USB. It is better to use USB 2.0 port. In order to see the connected devices run:
$ fastboot devices
The command should detect your smartphone and one device should appear in the list. Then to unlock the bootloader run the command:
$ fastboot oem unlock
If everything was done correctly, OKAY will be displayed and the phone will reboot.
The final step - confirm the unlock on the smartphone. To do this, select UNLOCK THE BOOTLOADER in the opened menu using the volume keys, and use the power button to confirm the selection.
After confirmation, the system will reboot and now when you boot up, you will be notified that the bootloader is unlocked and you will be able to flash the phone using fastboot. As you can see unlocking fastboot bootloader is not that difficult task. In the next article we will talk about how to flash TWRP recovery menu with fastboot using Xiaomi as an example