Unlocking Xiaomi bootloader via ADB on Windows: Expert Guide

The bootloader procedure on Xiaomi devices is a fundamental step for users planning to deep customize their gadget. It is the unlocked bootloader that opens the door to install third-party firmware such as LineageOS or Pixel Experience, and also allows you to obtain the rights of the Root superuser. Without this procedure, any attempts to modify the system partition will be blocked at the hardware level.

Many beginners mistakenly believe that it is enough to enable debugging over USB, but the reality requires a more complex approach using specialized software. ADB (Android Debug Bridge) and Mi Unlock Tool utility is the industry standard for safely performing this operation on the Windows operating system. It is important to understand that the process will irreversibly delete all data from the device, so pre-backup is a prerequisite.

In this detailed guide, we’ll break down every step from setting up a developer environment to entering critical commands into a console.You’ll learn how to properly put your smartphone into Fastboot mode, install the necessary drivers, and avoid common errors that can lead to account lockdown. Following the instructions will help you gain full control over your Xiaomi, Redmi, or Poco device.

Preparation of software environment and drivers

The first step before you start any manipulation of the system partition is to prepare the workplace in a good way. You will need a Windows computer that is working properly. USB-cable (preferably original) and stable Internet connection, critically important is installing current drivers ADB Fastboot, which provides low-level communication between PC and smartphone.

To work with the command line, it is most convenient to use the ready-made Platform Tools package from Google, which contains all the necessary binary files. After downloading the archive, it must be unpacked into the root of the disk, for example, in the C:\adb folder, to avoid problems with long paths and character encoding. Also at this stage, make sure that the device has the option β€œDevelopers” enabled.

  • πŸ“₯ Download the archive. SDK Platform Tools from the official Android Developers website.
  • πŸ’Ύ Unpack files in the root directory of the C disk: to simplify access.
  • πŸ”Œ Connect your smartphone to your PC and install Google drivers USB Driver via Device Manager.
  • βœ… Check the connection by entering the adb device command in the command line.

⚠️ Note: If the device is defined as β€œUnknown Device” or Β«QHSUSB_BULKΒ», Install drivers incorrectly. Force the driver to update by selecting your CPU model (Qualcomm or MediaTek) from the list, otherwise commands ADB will not be carried out.

Once the drivers are successfully installed, the system must correctly display the connected device. In the command line, when you enter the adb device command, you should see the serial number of your gadget. The absence of the device in the list indicates a problem with the cable, USB port or drivers, which requires immediate elimination before continuing.

πŸ“Š What experience do you have with working with ADB and Fastboot?
I'm new and I'm seeing it for the first time.
I tried once or twice.
I'm checking out the devices regularly.
I'm an expert, I know all the teams by heart.

Setting up a smartphone and linking a Mi Account

The hardest part of the process for many users is to properly configure the settings inside the Android operating system. You need to not only enable debugging, but also activate hidden features that allow unlocking. Go to Settings β†’ About phone and quickly click on the MIUI build number seven times to activate the developer menu.

In the menu that opens, you need to turn on the USB Debugging Toggle, but that's not enough: you need to find OEM Unlocking and activate it, and that's what allows the bootloader to verify signatures from other than Xiaomi.

The key is to link the device to your Mi Account. In the Factory Unlock menu, click Add Account and Device. The system will require an Internet connection via a mobile network (Wi-Fi is better off to avoid binding errors). Once successfully linked, a message will appear that the device has been added.

adb shell pm grant com.miui.securitycenter android.permission.WRITE_SECURE_SETTINGS

Sometimes, standard menu binding can fail or give a timeout error. In such cases, experienced users use ADB commands to force binding, although the official method through settings is more reliable for beginners. Make sure that the anchor status indicates that the device is associated with the current account, otherwise the Mi server will reject the request to unlock.

  • πŸ”“ Turn on "Debugging by" USBΒ» and "Factory Unlocking" in the Developer Menu.
  • πŸ“² Link your Mi Account using the mobile internet (3G/4G/5G).
  • ⏳ Wait for the waiting timer to expire (7 to 168 hours).
  • πŸ“ Write down the username and password from the Mi Account, they will be needed in the utility.

πŸ’‘

After linking the account, do not leave it and do not reset the phone settings, otherwise the waiting timer will zero, and the procedure will have to start again.

Fastboot Mode and Device Translation

To interact with the bootloader at a low level, the standard Android mode is not suitable. You need to transfer the smartphone to a special diagnostic mode Fastboot. In this mode, the operating system does not boot, and the device is controlled directly through the protocol sent from the computer.

There are several ways to go into this mode. The most common is hardware: turn off your smartphone completely, then press the volume button and hold it, plug it in. USB-The Fastboot logo should show up on the screen with a rabbit fixing an android, or a sign that says, FASTBOOT orange.

Entry methodUser actionsVisual indicator
Hardware (Buttons)Volume Down + USB ConnectionFastboot logo (Hare)
Through ADBAdb reboot bootloaderReboot to Fastboot Mode
Through the menuSettings β†’ Advanced β†’ RebootSelecting mode in the menu

If you use the software method through ADB, make sure the phone is in debugging mode. Enter adb reboot bootloader into the console. The device automatically restarts and goes to the desired mode. Check the success of the transition can be done by the fastboot device command, which must output the serial number of the device.

β˜‘οΈ Checking before unlocking

Done: 0 / 1

Unlocking process with Mi Unlock Tool

The official tool for removing the lock is the Mi Unlock Tool. Despite the existence of third-party scripts, using official software ensures that you do not damage the security partitions (TEE) and do not get a "brick" due to incorrect commands. Download the latest version of the utility from the official website miui.com/unlock.

Run the program on behalf of the administrator and log into your Mi Account account, which was linked to the phone. The utility will automatically check the status of the device. If the wait timer has not expired, the program will show the remaining time in the clock. No third-party methods will speed up this process, since the timer is stored on Xiaomi servers.

When the waiting time is over, reset your phone to Fastboot mode and press the Unlock button in the program, a warning will appear that all data will be deleted, confirm the action. The process will take a few minutes, the progress bar will reach 100%, and the device will automatically restart.

⚠️ Attention: During the unlocking process (progress bar) 0-100%) strictly forbidden to turn off USB-interruption in the final stage may cause damage to the bootloader and inability to boot the system.

After successfully unlocking the phone, the Fastboot logo or the words "Unlocked" under the Mi logo will appear for a few seconds when booting the phone. This is a standard behavior that confirms that protection is removed. The first start of the system may take more than usual, as user data is cleaned.

Alternative methods and working with the command line

In some cases, the Mi Unlock Tool GUI can be bugged or not see the device, and then you can use the console directly through the Fastboot commands, and this requires high accuracy, because one incorrect command can cause the device to fail.

For manual unlocking (if the device supports such a mode, for example, some global versions or devices without a hard-to-bind server), the command fastboot oem unlock or fastboot flashing unlock is used. However, for most modern Xiaomi smartphones, these commands without authorization through the Mi server will not work.

fastboot oem unlock


fastboot flashing unlock_critical

There are also bypass tools that try to emulate the authorization server, which carry high risks: you can get an IMEI lock or a motherboard software lock, and experts recommend using them only on older devices that are no longer officially supported.

  • πŸ›  Use the fastboot getvar all command to get full information about the bootloader's status.
  • πŸ” Look for the line (unlocked) or (locked) in the output command to check the status.
  • ⚑ The fastboot reboot command will remove the device from Fastboot mode.
What if the Mi Unlock Tool is 99% locked?
If the process is 99 percent over 10 minutes, try reconnecting the cable to another USB port (preferably USB 2.0). If it doesn't work, interrupt the process by holding the power button for 15 seconds, and try again. Often the problem lies in the antivirus or Windows firewall.

Possible problems and solutions

Unblocking rarely goes perfectly smoothly for all users. One of the common problems is the "Couldn't verify device" error, which occurs when the account in the program and on the phone mismatches. Make sure you log in to the same account that was tied to the developer menu.

Another common problem is the endless reboot after unlocking, which often happens if you have a custom recavator installed but you have not done a Wipe Data cleanup. + Power and make a complete reset (Wipe Data) β†’ Wipe All Data).

⚠️ Warning: Once the bootloader is unlocked, some security features, such as Google Pay (now Google Wallet) and bank apps, will stop working.

Also worth mentioning is the driver problem on Windows 10/11. The system can block the installation of unsigned drivers. If the device is not detected in Fastboot mode, try restarting your PC in Troubleshooting mode β†’ Boot Options β†’ Disable Mandatory Driver Signature Verification.

πŸ’‘

Successful unlocking of the bootloader is just the beginning of the journey, with the main advantage of the ability to install custom recaps (TWRP) and full firmware, giving the device a second life.

Frequently Asked Questions (FAQ)

Will the warranty be reset after unlocking the bootloader?
In most regions, unlocking the bootloader is not officially prohibited, but service centers can refuse free repairs if they prove that the breakdown is caused by interference with the software.
Can I lock the bootloader back?
Yes, it's possible. You need to download the official firmware for your model, transfer the phone to Fastboot, and use the fastboot oem lock command or the feature in the Mi Flash Tool. Importantly, the firmware must be the same version and region as the current one, otherwise the device will go into the bootloom.
How long do I have to wait after the account is linked?
The standard waiting time is 168 hours (7 days), in rare cases, the system may require up to 30 days to wait, starting with the first successful attachment to the developer menu.
Does NFC and Google Pay work after unlocking?
Once unlocked, no. Payment system security is compromised, but by installing the root rights (Magisk) and hiding them from security (Zygisk, DenyList), contactless payment can be restored.