How to unlock Xiaomi bootloader and work with it


What is Bootloader

A bootloader is a special program that runs every time you turn on or reboot your smartphone and checks the installed operating system for errors and then launches it. Bootloader also protects user files and OS components from outside interference.

Most manufacturers, including Xiaomi, lock the bootloader, protecting it from changes. In terms of security, this is good, but blocking deprives users of the ability to fully control their gadget.

An unlocked bootloader allows you to install a custom recovery, get root rights, or flash a custom build of the OS. It is for installing unofficial firmware that it is usually unlocked.

Unlocking Bootloader deprives the smartphone of OTA updates. In addition, services such as Google Pay refuse to work on smartphones with an unlocked Bootloader.

In most cases, the Mi Flash Unlock program is used to unlock the Xiaomi bootloader. It allows you to log into your Mi account, send an unlock request and carry out the procedure using a PC and a USB cable.

Official and unofficial unlocking method

There are two ways to unlock Bootloader:

  1. Official - works fine on all smartphones.
  2. Unofficial unlocking requires special skills, there is a high chance of turning the phone into a “brick”.

The official way is to link your Mi account to your phone and unlock it using the Mi Flash Unlock program. However, from the moment you apply to unlock the Xiaomi bootloader (sent a request to the server), at least 360 hours . Only after this the account will receive permission to unlock. In some cases, the maximum possible time of 720 hours is assigned.

It is also worth noting that if the phone and account have been used little, Xiaomi may refuse to unlock and advise the user to use the phone more often. In this case, the unlocking process must be repeated after a few weeks.

Unofficial unlocking allows you to unlock the Xiaomi bootloader without an account and requires a modified version of the Mi Flash Unlock program for a specific phone model. You will also need to install all ADB and Fastboot drivers for subsequent work with the command line.

Many phones, in case of unofficial unlocking, are flashed using contact closure (the so-called EDL mode). This is strictly not recommended. Even in workshops. The risk of getting a “brick” is extremely high.

Attention! An unlocked bootloader allows hackers to access the device even remotely. Therefore, after carrying out all the actions, it must be blocked again.

Both options require a computer with ADB drivers and software installed. It is impossible to unlock Xiaomi bootloader without a PC. On a phone without a PC, you can only check the status of the bootloader: open or closed.

Below is the official Xiaomi bootloader unlock procedure for Redmi, Mi and POCO.

Boot partition and kernel

If, when turning on the device, you did not hold down the volume up key or did not intentionally reboot the smartphone into recovery mode (for example, using the extended reboot menu in custom firmware), at the last stage of its work, aboot loads the Linux kernel and the RAM disk from the partition into the device memory boot, and then transfers control to the kernel.

The boot section itself does not contain any file system, but is a kernel and RAM disk compressed using gzip and written one after another, preceded by a small header of two kilobytes in size (it contains kernel boot options, as well as image location addresses and other information) . The RAM disk, in turn, is a small virtual file system containing a set of directories to which Android will connect the file systems of other partitions (system, data, sdcard), as well as the system and initialization script and init.rc. The RAM disk is loaded directly into the RAM and continues to exist as long as the smartphone is turned on.

Thanks to its simple structure, the boot partition image (boot.img) is quite easy to unpack. This can even be done using a HEX editor, but it is easier to use the imgtool tool. Example for Linux (x86_64):

$ imgtool.ELF64 boot.img extract $ cd extracted $ mkdir ramdisk_ext $ cd ramdisk_ext $ gunzip -c ../ramdisk | cpio -i

The packed kernel and RAM disk will be in the extracted directory, and the contents of the RAM disk will be in the ramdisk_ext subdirectory. This is ideal. In fact, as in the case of the bootloader, there is no standard for the format of the boot partition, and the manufacturer can show his imagination. Often the kernel and RAM disk are located on different partitions. This configuration can be found in older Samsung models and Rockchip-based devices.

Nevertheless, in 95% of cases the format of the boot partition is standard, and if you have ever flashed a custom kernel on your device, then there was probably a boot.img image inside the ZIP archive with the kernel, so along with the kernel you also flashed the RAM - disk. When you did this, you had to be careful, because the RAM disk of the stock firmware is different from the RAM disk of the same CyanogenMod. By flashing the kernel for AOSP in CyanogenMod, you could get a bootloop and many other troubles.

To get around this problem, CyanogenMod developer and ClockworkMod Recovery author Koushik Dutta (or Koush) created the AnyKernel system, which allows you to install kernels separately from the RAM disk (by rebuilding the boot partition on the fly). Today it is used by many developers of custom kernels, but not all. So before flashing the kernel, I recommend either finding its version for the custom one you have installed, or making sure that it uses the AnyKernel mechanism.

Whatever kernel you choose, you will in any case need a custom recovery to install it.

Unlocking the bootloader

To allow unlocking the OS bootloader, you need to go through 2 steps:

  1. Link your smartphone to your Mi account.
  2. Unlock Bootloader.

The first stage is preparatory and consists of linking the smartphone to the Mi account (if this has not been done). This action is required. Skip it if your phone is already linked to a Mi account.

Attention! During unlocking, all user files and applications will be deleted. The smartphone will be reset to factory settings. Therefore, before performing the unlocking procedure, it is recommended to backup your data.

Linking your phone to your Mi account

If your phone is linked to a Mi account, proceed to the next step - working with the Mi Flash Unlock program.

  1. Log out of your account. This is a necessary step, otherwise the system will not be able to check the phone and link it.
  2. Switch from Wi-Fi to mobile Internet.
  3. Go to the "About Phone" section.
  4. Click on the “MIUI Version” line 7 times to activate the developer settings.
  5. Return to the main settings menu and find “Advanced settings.”
  6. Tap on the “For Developers” item.
  7. Tap "Mi Unlock Status".
  8. Confirm your actions by agreeing to the warning that appears.
  9. Select "Link account to device."
  10. MIUI will require you to log in to your account. Sign in.

The binding process will begin, which will not take much time. You will see the appropriate message when it is completed.

Wait until the required 360 or 720 hours have passed. You can check how much time is left before unlocking by going to “Mi Unlock Status” - the third screenshot above.

As soon as official permission is received, we move on to the second stage with the Mi Flash Unlock program.

Unlocking using Mi Flash Unlock

Step-by-step instructions on how to quickly unlock Xiaomi bootloader:

  1. Enable developer mode: to do this, go to settings, go to the “About phone” section and tap the MIUI version column 7 times.
  2. Then return to the list of options, select “Advanced settings”, go to the “Developer options” section and move the slider next to “USB debugging”.
  3. Launch the Mi Flash Unlock program to unlock the bootloader on your PC, enter your Mi account username and password, and then click “Login.”
  4. The unlock permission check will begin. Turn off your smartphone completely and start Fastboot mode (by holding down the power and volume down buttons).
  5. Connect your phone to your PC via cable and click the “Unlock” button in the Mi Flash Unlock program window. Once your smartphone is connected, it will become active.

Pay attention to what happens after the operation (second screenshot).

During unlocking, the smartphone will reboot. You will be taken directly to the operating system. After unlocking Bootloader, you can begin installing a custom recovery, obtaining root rights, or installing alternative firmware.

TOP 5 productive Xiaomi smartphones according to AnTuTu rating:

Risks of using the “Reboot to bootloader” function

When using the system partition Reboot to bootloader, it is important to be aware of the possible risks before making any changes to the system. After performing operations, errors may appear in the operating system that will affect the stable operation of the device. For example, important files may be deleted from the gadget, causing it to stop turning on.

There is a risk of damaging important data such as contacts or photos. After this, it will be difficult to restore access to information. Before using the “Reboot to bootloader” function, you need to make backup copies of your main files and personal data.

It is also important not to confuse different “types of reboots” on Android. Here is a detailed article.

In the recovery section and in some other applications, the option reboot to bootloader is available, which translated into Russian means “reboot into bootloader mode.” What it is and why it is needed, you will learn in this material.

Xiaomi firmware without bootloader unlocking

If the Bootloader is locked, then there is only one way to flash Xiaomi with a locked bootloader - install stock MIUI using the official Mi Flash Pro program. Installing a custom system will not work this way.

Step-by-step instructions for flashing firmware without unlocking the bootloader:

  1. unzip to any location on your PC.
  2. Launch Mi Flash Pro, go to the Mi Flash tab.
  3. When you launch it for the first time, the program will prompt you to install the necessary drivers. Click the Install button.
  4. After installing the drivers, click on the Select button and in the Explorer window, select the folder with the unpacked firmware.
  5. Turn off your smartphone and then hold down the Power and Volume Down buttons at the same time to enter Fastboot mode.
  6. Connect your smartphone to your computer using a USB cable.
  7. In the program window, click Refresh.
  8. At the bottom of the window, check the clean all and lock option and click on the Flash button.


The firmware will begin, which takes 5–10 minutes. After its completion, Bootloader will remain locked. You will be able to use OTA updates, there will be no problems with contactless payment and other Google services.

Flashing Xiaomi firmware via Fastboot with a locked bootloader is only possible in this way. All user data will be deleted.

How to lock the bootloader

There are two ways to lock Xiaomi bootloader. We looked at the first one above - this is standard firmware using the Mi Flash Pro program with the clean all and lock . We will not consider this option again.

The second method is based on working with the Windows console or the PowerShell command line. It is more complex, but does not require a complete firmware change.

This unlocking method uses ADB drivers and is not suitable for Xiaomi smartphones released before 2021. If you have just such a phone, you will have to use the first option with full firmware.

First, you will need to install all ADB drivers for your smartphone on your PC.

  1. With your phone turned off, press the power and volume down buttons to enter Fastboot.
  2. Connect your smartphone to your PC using a USB cable.
  3. On your computer, go to the directory with the ADB and Fastboot drivers installed.
  4. Right-click while holding down the Shift key on an empty space in the folder and select “Open PowerShell window here” from the menu that appears.
  5. In the console, write fastboot devices and press Enter. The console will show the status of the bootloader.
  6. Type fastboot oem lock and press Enter. This is the command to lock the bootloader. If everything is fine, OKAY will appear in the console.
  7. Reboot using the fastboot reboot .

This blocking option in some cases allows you to save user data. The chance that all files will be deleted is approximately 50%. However, during the firmware they will be removed with a 100% guarantee.

Basics of using Reboot to bootloader

What this means – I explained above. And now - important recommendations:

  • Everything you do in the Bootloader (the main Android bootloader) is done at your own peril and risk. I do not bear any responsibility for problems that arise during the manipulation process. The probability of device failure is quite high if incorrect operations are performed;
  • The risk of data loss is also considerable. It is advisable to create backup copies on third-party media in advance. Otherwise, you may lose important information when trying to unlock your phone using RtB.

The shell should be launched when the smartphone is turned off. Next, simultaneously press and hold two keys – Power (Power, On/Off) and Volume down . For Samsung, the sound control button can be replaced with Home .

Thus, we find ourselves in the Recovery menu, from where we go to RtB:

This method works on almost any model, regardless of the manufacturer (only the appearance may differ. The screenshot above is an example on HTC).

There is a second option . If you have Developer Mode unlocked, then with the device turned on, open “Advanced settings” - “For developers” and activate “Factory unlocking” (relevant for Android 5 and higher):

Then hold down the power button, select “Reboot” and modes should appear, including Bootloader.

Please note that in this article I did not delve into the specifics of the firmware and advanced application of the described functionality. The fact is that each situation is individual, and advising one thing is the wrong approach. I told Reboot to Bootloader what Android is, and if you want to find out specifically about your smartphone (how, what is done), I recommend visiting the most authoritative forum w3bsit3-dns.com.

Sincerely, Victor!

12/15/201710:019033 Victor Felk Information portal IT Technician

Reboot to Bootloader what is it ? Good day! Few users of the Android operating system know that their devices have the ability to reboot and then enter the “Bootloader” menu. This is a very useful functionality that is not available on all devices, but it’s worth learning about. Reboot to Bootloader – what Android is, how to use it – you will learn from this publication.

Purpose Bootloader

To describe the functionality briefly, it is a kind of BIOS on a computer. That is. This is a kind of intermediate state, a shell before launching a full version of the system. Designed to gain access to the recovery mode with subsequent loading of the normal operating mode of the OS. This can be useful when Android was blocked for some reason or the firmware crashed. By executing the command “ Reboot to Bootloader ” (RtB), you can get to the menu where actions to update the software and remove the lock will be available.

It is worth noting that mobile device manufacturers are making every effort to prevent users from installing third-party (unofficial) firmware. But with the use of Bootloader it is possible to bypass all the prohibitions. This is a kind of boot record from which information is taken about the startup order of the smartphone - which services and hardware components should be loaded and put into operation first, and which should come later.

With this functionality, gadget owners can not only change the version of the operating system, but also remove any pre-installed applications, activate root access, reset settings to factory settings, and more.

It is worth noting that the “ Reboot to Bootloader ” option is not available for every model, and the appearance of the menu may vary significantly.

By the way, if Root access is open on the device, then there is no need to enter Recovery mode for RtB. All you need to do is use the free Holo Reboot utility.

Another advantage of Bootloader is the ability to eliminate software failures. This is useful when you rarely restart the system (and it is advisable to do this at least once a week). Also, the option will help eliminate viruses in the form of uninstallable software or Android pop-up ads.

You are probably already confused in the theory and would like to move on to the practical part. Everything will be now!

Basics of using Reboot to bootloader

What this means – I explained above. And now - important recommendations:

  • Everything you do in the Bootloader (the main Android bootloader) is done at your own peril and risk. I do not bear any responsibility for problems that arise during the manipulation process. The probability of device failure is quite high if incorrect operations are performed;
  • The risk of data loss is also considerable. It is advisable to create backup copies on third-party media in advance. Otherwise, you may lose important information when trying to unlock your phone using RtB.

The shell should be launched when the smartphone is turned off. Next, simultaneously press and hold two keys – Power (Power, On/Off) and Volume down . For Samsung, the sound control button can be replaced with Home .

Thus, we find ourselves in the Recovery menu, from where we go to RtB:

This method works on almost any model, regardless of the manufacturer (only the appearance may differ. The screenshot above is an example on HTC).

There is a second option. If you have Developer Mode unlocked, then with the device turned on, you can open “ Advanced Settings ” - “ For Developers ” and activate “ Factory Unlock ” (relevant for Android 5 and higher):

Then hold down the power button, select “ Reboot ” and modes should appear, including Bootloader.

Please note that in this article I did not delve into the specifics of the firmware and advanced application of the described functionality. The fact is that each situation is individual, and advising one thing is the wrong approach. I told Reboot to Bootloader what Android is, and if you want to find out specifically about your smartphone (how, what is done), I recommend visiting the most authoritative forum w3bsit3-dns.com.

Sources used:

  • https://talkdevice.ru/reboot-to-bootloader-chto-eto-na-android.html
  • https://androidlime.ru/reboot-to-bootloader-android
  • https://androfon.ru/article/chto-znachit-reboot-to-bootloader
  • https://it-tehnik.ru/androids/bootloader.html
  • https://upgrade-android.ru/stati/stati/4527-reboot-to-bootloader-chto-eto.html

SHARE Facebook

  • tweet

Previous articleTop 5 best smartphones with Qualcomm Snapdragon 845 processor

Next articleRoot Genius 2.2.83 Rus for Android – ROOT rights Android

If the phone does not boot after unlocking the bootloader

If, after unlocking the bootloader, you experience a bootloop (endless loading) and your Xiaomi phone does not boot beyond the logo, the situation can be corrected in several ways.

The first is to flash the phone according to the standard scheme via Fastboot using Mi Flash Pro. We talked about this option earlier in the article.

The second method is to install a custom TWRP recovery. After this, you can roll out custom firmware or reset the phone to factory settings.

First you need to download the script for automatic installation of TWRP (look on the same w3bsit3-dns.com) and the firmware itself. The process is divided into several stages.

Stage 1: installing custom recovery

  1. Turn off the phone and start fastboot mode (by holding down the power and volume down buttons).
  2. Go to the folder with the downloaded recovery installation script and double-click on the “TWRP-Installer.bat” file.
  3. Select the appropriate recovery edition and press the appropriate button (for example, 1), confirm the action with the Enter button.

Once the installation process is complete, the phone will reboot into recovery. You can start working with it.

If you have a Xiaomi Mi A series, then after installing the recovery, immediately flash Magisk to obtain root rights. Otherwise the phone will not start.

Stage 2: Factory reset

  1. Turn off your phone, then hold down the Power and Volume Up buttons.
  2. In the main menu, go to the “Cleaning” section.
  3. Tap the “Selective Cleaning” button.
  4. Check all the boxes except Vendor , OTG and SD card .
  5. Confirm the action by moving the slider to the right.
  6. When the process is complete, click on the “Reboot to OS” button.

After completing these steps, the phone should boot into the OS. If this does not happen, then only full firmware of the device will help.

Stage 3: installing custom firmware

  1. Turn off the phone and go into recovery in the standard way (by holding down the power and volume up buttons).
  2. Go to the “Cleaning” section and move the slider to the right to perform it.
  3. Return to the main menu and select Install.
  4. Click on the "Select Drive" button at the bottom of the screen.
  5. Check the Micro SD Card item and tap OK.
  6. Find the downloaded ZIP file and click on it.
  7. Move the slider to the right to confirm the action.
  8. Click on the “Clear Dalvik/cache” button.
  9. Install Google services in the same way (if required).
  10. Click on the “Reboot to OS” button.


The first boot after the firmware can take from 5 to 15 minutes. You need to be patient. Next, you'll need to set up your phone. Unfortunately, user files will not be saved in this case.

Why do we need the “Reboot to bootloader” function?

Controlling the “Reboot to bootloader” functions and switching between available tools is done via the volume keys. You can navigate the menu in two directions: up and down. In the section you can view detailed information about the phone, as well as test the operating system. Available features include:

  • Unlocking the bootloader to obtain Root rights to the smartphone.
  • Installing a third-party program on your gadget—you don’t need to use the official Google Play app store for this.
  • A tool for debugging applications and removing programs that cannot be removed using standard operating system tools (so-called “built-in” software from the manufacturer).
  • Clearing the smartphone cache (there are simpler methods) from the accumulation of “junk” files that reduce the performance of the smartphone.
  • Reset your smartphone to factory settings (there is also an easier way). When performing this action, you need to remember that all data and settings of the phone will be deleted.

Possible mistakes

During unlocking the Xiaomi bootloader, various errors may occur. Below are common errors and their solutions:

  • Current account is not bound to this device indicates that this account is not bound to this device. You must first link your phone to your account, and then repeat the unlocking procedure.
  • Your device isn't supported by Mi Unlock says that the phone is not supported by a specific version of Mi Flash Unlock. You probably have Chinese firmware or a custom version. You need to flash it to Global Stable and then repeat the procedure.
  • Unknown error 90000 occurs if 5 devices have already been unlocked on the PC. The program will not allow you to carry out the same procedure with 6. You need to change your PC or operating system.
  • Error 501 - ADB drivers need to be reinstalled. They are the ones that cause an error with this code. After reinstallation, restart your PC and start again.
  • Network Error - network error. Try turning the VPN on/off and repeating the procedure. If this does not help, then the problem is on the Xiaomi servers. You just need to wait.
  • Mi Unlock not connected to the phone - to solve this error, you need to move the Mi Flash Unlock program to the root of the disk. And make sure that there are no Cyrillic characters in the path to the EXE file.
  • Unlock failed return to fastboot says that unlocking failed. Reinstall the drivers, turn the VPN on/off and repeat the procedure. If all else fails, try replacing the USB cable.

An unlocked bootloader gives users freedom of action. But at the same time, it negatively affects security and does not allow you to receive the necessary updates. So there is no need to unlock Bootloader unless absolutely necessary.

Rating
( 1 rating, average 4 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]