The bootloader on Xiaomi smartphones is one of the most talked-about topics among the brandโs device owners, and many people face the need to unlock it when installing custom firmware, obtaining root rights or restoring a brick. But what is it really about? Why does Xiaomi block the bootloader by default, and what are the risks?
For most users, the bootloader is a black box โ they know it needs to be unlocked, but donโt understand the working mechanisms. Meanwhile, doing the wrong thing with the bootloader can turn your smartphone into a useless brick. In this article, weโll look at everything from basic theory to step-by-step instructions and hidden features that arenโt even written about in official forums.
What is a bootloader and how does it work?
A bootloader (or bootloader) is a special low-level program that starts immediately after the smartphone is turned on, even before the Android operating system loads, its main task is to initialize the hardware components and transfer control to the OS kernel.
Xiaomi devices use a modified bootloader from Qualcomm (for Snapdragon processors) or MediaTek (for Dimensity/Helio chips).
- ๐น Primary Bootloader (PBL) โ "The hard-stitched part that can't be changed, is responsible for the basic initialization of the processor and memory.
- ๐น Secondary Bootloader (SBL) โ It's a programmable part that can be modified. It's the part that Xiaomi blocks.
When you turn on your smartphone, the PBL is first launched, which checks the signature of the SBL. If the signature is correct, control is transferred to SBL, which is already loading the Android kernel.Blocking the bootloader means that the SBL refuses to execute any uncertified commands, such as downloading custom recovery or firmware.
Interesting fact: on some POCO models (e.g., the POCO F1), the bootloader can be unlocked without waiting for 720 hours, unlike the main Redmi line, which is due to the fact that POCO was originally positioned as โfor enthusiastsโ.
Why Xiaomi is blocking the bootloader by default
Xiaomi has been blocking bootloaders on all devices since 2016, with the official reason being to protect user data and prevent unauthorized access, but there are other reasons:
- ๐ฑ Fighting grey imports: blocking makes it harder to flash devices for other regions, helping to control the market.
- ๐ Virus protection: Closed bootloader prevents malware from being installed at the firmware level.
- ๐ Decreasing the number of bricks, many users breaking phones when they failed to firmware, which ruined the return statistics.
- ๐ฐ Control of the ecosystem: Xiaomi is interested in users using branded services (Mi Cloud, Mi Account), and not third-party solutions.
Technically, the lock is implemented by linking the bootloader to the Mi Account. When the device is first activated, a unique key is generated, which is stored on Xiaomi servers. Without authorization through this account, unlocking is impossible.
It is important to understand that locking a bootloader is not just a "fool protection"; it is part of a multi-layered security system that also includes:
- ๐ Anti-Rollback Protection (Protection against rollback on older versions of firmware)
- ๐ก๏ธ Secure Boot (Signature verification of all downloaded components)
- ๐ Verified Boot (System Integrity Control with Each Enablement)
๐ก
If you are buying a used Xiaomi, be sure to check the bootloader status through the fastboot oem device-info command.A device with an unlocked bootloader can have hidden security issues.
How to check the status of the bootloader on Xiaomi
Before you start unlocking, you need to know the current status of the bootloader, and you can do this in several ways:
Method 1. via Fastboot Mode (works on all models):
- Turn off the phone.
- Press the Power button + Volume down before the Fastboot logo appears.
- Connect the device to the PC and execute the command: fastboot oem device-info
In the answer, look for the line Device unlocked: true/false.
Method 2. Through the developer settings (only for unlocked devices):
- Activate Developer Mode (7 times click on the MIUI version in the settings).
- Go to Additional Settings โ For developers.
- Find the bootloader status or Mi Unlock status.
Method 3. Through applications (e.g., Bootloader Status from Google Play) These utilities simply automate checking through ADB, but can be handy for beginners.
| Method of verification | PC required | It works on a locked device. | precision |
|---|---|---|---|
| Fastboot team | Yes. | Yes. | 100% |
| Developer settings | No. | No (only unlocked) | 95% |
| Third-party annexes | No. | Yes. | 90% |
| Visual inspection (the inscription "Unlocked" when downloading) | No. | No (only unlocked) | 100% |
Note that on some models (e.g. Redmi Note 10 Pro) a warning appears whenever you unlock the device, which is normal and does not affect the operation.
Official unlocking of the bootloader: step-by-step instructions
Xiaomi provides the official unlock tool, the Mi Unlock Tool, which takes a minimum of 7 days (168 hours of waiting) for new accounts.
Link Mi Account to your device|Enable debugging on USB|Permission. OEM-unlock|Download Mi Unlock Tool|Install Fastboot drivers-->
Step 1. Linking your Mi Account
Go to Settings. โ Mi Account and log in. Then go to Settings. โ The phone. โ All parameters. โ Status SIM-card and make sure that the "Mi Account Status" section says "Device is tied".
Step 2: Set up the developer
- Activate Developer Mode (7 times click on MIUI version)
- B Settings โ Additionally. โ For developers, turn on: ๐ง Debugging by USB ๐ Unlocking OEM (point-of-point!)
Step 3: Installation of Mi Unlock Tool
Download the latest version of the utility from the official website (registration is required). Install the program on your PC and run on behalf of the administrator.
Step 4: Connecting the device
Turn off your phone and boot into Fastboot Mode (power button + volume down). Connect to your PC and in Mi Unlock Tool, press "Unlock." If you see a waiting message, your account is new and you have to wait 168 hours.
What if the Mi Unlock Tool canโt see the device?
Step 5: Unlocking
After the waiting time has expired, repeat the procedure. The utility will show the progress bar, and in 10-15 seconds the bootloader will be unlocked. The phone will automatically reset to the factory settings!
โ ๏ธ Note: If you unlock the bootloader and then lock it back through fastboot oem lock, Xiaomi may block your Mi Account for 30 days for "suspicious activity.
Informal Unlocking Methods: Risks and Opportunities
The official way to unlock is not for everyone โ some people don't want to wait a week, some people have problems with the account binding.
- ๐ Exploits in older versions MIUI. Some firmware (e.g, MIUI 10) had vulnerabilities that allowed them to bypass the lock.
- ๐ป Using patched versions of Mi Unlock Tool. Modified utilities can bypass waiting time checks, but there is a high risk of getting a ban account.
- ๐ฑ Flip-through EDL. Emergency Download Mode allows you to stitch the device around the bootloader, but requires an authorized Qualcomm or MediaTek account.
- ๐ง Hardware methods. Some models (e.g. Redmi) 4X) You can close test points on the board to unlock, but it requires soldering skills.
The cleanest informal method is to exploit the DirtyCOW vulnerability (CVE-2016-5195), which allowed to obtain root rights without unlocking the bootloader on Android 6-7. However, on modern devices with MIUI 12+ This method doesn't work.
On the forums, there are often offers to unlock the bootloader "in 5 minutes" through paid services.
- ๐ธ Most of these services simply use stolen Qualcomm authorized accounts that can be revoked.
- ๐ต๏ธ Some โmastersโ ask for your Mi Account to link your device to your account โ after that you will lose control of your phone.
- ๐จ There are cases when after such unlocks the device received hard-brick (irreplaceable brick).
๐ก
Any unofficial method of unlocking can result in a loss of warranty, a ban of Mi Account or permanent damage to the device.The official method through the Mi Unlock Tool remains the safest despite restrictions.
What can be done after unlocking the loader
An unlocked bootloader opens up a lot of customization options, but it also increases the risks.
- ๐ฑ Installation of custom firmware: ๐ LineageOS, Pixel Experience, HavocOS โ firmware with pure Android. ๐ง MIUI Pro, MIUI Mix - Modified versions of the standard shell. ๐ Project Elixir, DerpFest - firmware with advanced settings.
- ๐ง Installation of custom recovery: ๐ง TWRP (Team Win Recovery Project is the most popular solution. ๐ ๏ธ OrangeFox Recovery โ an alternative with advanced features.
- ๐ Getting root rights through Magisk (without unlocking the root bootloader is impossible on modern Xiaomi).
- ๐ Restoration of โbricksโ โ unlocked loader allows you to sew the device even after serious failures.
However, there are limitations:
- ๐ต Some functions are not working: ๐ Mi Pay (Contactless Payments) ๐ฎ Game Turbo (can be unstable) ๐ก Wi-Fi Direct and Miracast (Problems with Certificates)
- ๐ Problems with OTA-updates โ custom firmware usually does not support updates over the air".
- ๐ก๏ธ Reduced security โ the device becomes more vulnerable to attacks.
Interesting fact: on devices with MediaTek processors (for example, Redmi Note 11) after unlocking the bootloader, support for some codecs (for example, Dolby Vision) may disappear, since they are tied to the manufacturerโs closed binary options.
How to lock the bootloader back and whether to do it
Sometimes users want to get things back โas they wereโ โ for example, before selling a phone or to restore the functionality of Mi Pay.
Instructions for locking:
- Sweep through the official firmware via the Mi Flash Tool with the clean all option.
- Download to fastboot and execute the command: fastboot oem lock
- Wait until the process is completed (the phone will restart).
However, there are important warnings:
- ๐ Once blocked, you will not be able to unlock the bootloader again for 30 days (Xiaomi restriction).
- ๐ฑ On some models (e.g. Xiaomi Mi 11), locking can lead to loss of power. IMEI.
- ๐ง If you block the bootloader with custom firmware installed, the phone will turn into a โbrick".
โ ๏ธ Note: On devices with Anti-Rollback Protection (e.g, POCO F3) locking the bootloader after firmware of the old version MIUI It can lead to a permanent brick that cannot be restored even through a EDL. Always check the anti version before manipulation!
Should we block the bootloader back? It only makes sense in two cases:
- You sell your phone and want to get it back to its factory fortune.
- You are critically important features that do not work with the unlocked bootloader (for example, Mi Pay).
In all other cases, it is better to leave the bootloader unlocked โ this gives more options for recovering the device in case of failures.