The bootloader on Xiaomi smartphones is a software component that runs in front of the operating system and determines which software will be downloaded. By default, it is blocked by the manufacturer on all Mi, Redmi and POCO devices. However, after unlocking (for example, to install custom firmware), many users face the need to return the original state, which may be required for warranty repairs, security enhancements or error correction after unsuccessful firmware experiments.
In this article, we will discuss the official way to lock the bootloader through the Mi Unlock Tool, alternative methods for older models, as well as nuances that will help avoid a βbrickβ (turning the phone into a βbrickβ). All instructions are relevant for devices on MIUI 14/15 and new versions, including Xiaomi 14, Redmi Note 13 and POCO F6. If you previously unlocked the bootloader to install TWRP or LineageOS, follow the recommendations carefully β the process is irreversible without a complete data reset.
Why you may need to lock the loader
The main reasons for returning a blocked state are:
- π§ Warranty repairs: Xiaomi service centers refuse free service if bootloader unlocked.
- π‘οΈ Security: Unlocked bootloader allows uncertified software to run, which increases the risk of hacking.
- π Some custom builds are unstable, and you can't get back the stock firmware without locking the bootloader.
- π± Phone sales.Buyers often check bootloader status through fastboot oem device-info.
It is important to understand that locking the bootloader will result in a complete data reset (including internal memory), which is due to the Anti-Rollback protection mechanism, which prevents rollbacks to older firmware versions, and if the device has custom firmware installed, you must return the stock version of MIUI before blocking.
β οΈ Note: On devices with a MediaTek chipset (e.g., Redmi) 12C or POCO M6 Pro) the lock process is different from the models on Qualcomm Snapdragon, requiring a special file auth from Xiaomi, which is issued only to authorized service centers.
Preparing the phone for the loader lock
Before starting the procedure, follow the following steps:
Backup your data (photos, contacts, messages)| Make sure battery power > 60%| Install the latest version of the MIUI stock firmware | Disable Mi Account protection (if your phone is not tied to your account) | Download Mi Unlock Tool from the official Xiaomi website
-->
If you have custom firmware installed on your phone (such as Pixel Experience or ArrowOS), you need to replace it with stockware.
- Download the official firmware for your model from the MIUI Downloads website (choose the Fastboot version).
- Unpack the archive in a folder without Cyrillic characters (for example, C:\MIUI\fastboot_rom).
- Connect your phone to your PC in fastboot mode (clip Volume Down + Power when the device is off).
- Launch the file. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac).
Once you've done the firmware, the phone will automatically restart. Don't configure it, go straight to locking the bootloader. If you see an Anti-Rollback error on the screen, you're trying to install a version of MIUI that's too old. In this case, download a newer firmware.
The official method: lock through Mi Unlock Tool
This is the only Xiaomi-supported method that works on most models released after 2018.
- π» Windows computer 10/11 (64-bit).
- π± Phone with unlocked bootloader and stock firmware.
- π Cable USB (preferably original).
- π Mi Account Linked to Phone (if Linked to).
Step-by-step:
- Install Mi Unlock Tool. Download the utility from the official website and unpack the archive. Launch the file. miflash_unlock.exe on behalf of the administrator.
- Sign in to Mi Account, which is linked to your phone. If your account is not tied, skip this step.
- Connect the phone in fastboot mode. To do this, turn off the device, then press Volume Down + Power before the Fastboot logo appears.
It takes 2-5 minutes. When you're done, the phone will restart, and you'll see the screen of the initial setup. If instead the device is stuck on the MI logo, then the firmware is not compatible with the current version of the bootloader, in which case, repeat the procedure with another version of MIUI.
π‘
If the Mi Unlock Tool gives you a "Couldn't unlock" error, try connecting the phone to another one. USB-port (preferably) USB 2.0) or disable the antivirus. Also check that Device Manager displays the phone as Android Bootloader Interface.
Alternative methods for older models
On devices released before 2018 (for example, Xiaomi Mi 5, Redmi Note 4X), the official utility may not work.
fastboot oem lock
fastboot rebootIf the command is not executed, try resetting the userdata section first:
fastboot erase userdata
fastboot oem lock
fastboot rebootFor models on MediaTek (e.g. Redmi 5A) you will need:
- Download SP Flash Tool and stock firmware in.scatter format.
- In the SP Flash Tool settings, select the Download Only option and tick only the preloader section.
- Connect the phone to the PC (without the battery if it is removable).
- Press Download and wait for the process to be completed.
β οΈ Note: On devices with MediaTek Helio (e.g. Redmi) 9A) Incorrect locking of the loader can lead to loss IMEI. Before the procedure, save it through the engineering menu (#4636## β Phone information).
Checking the status of the loader after blocking
To make sure that the bootloader is successfully locked, run the following commands in the terminal (the phone must be in fastboot mode):
fastboot oem device-info
fastboot getvar unlockedIf you answer the first command, you will see:
(bootloader) Device unlocked: falseAnd the second one:
unlocked: noSo the procedure was successful, and you can also check the status through the Mi Flash Tool app.
| Team team. | Response with a blocked loader | Response when unlocked loader |
|---|---|---|
| fastboot oem device-info | Device unlocked: false | Device unlocked: true |
| fastboot getvar unlocked | unlocked: no | unlocked: yes |
| fastboot getvar anti | Displays the Anti-Rollback version | Same answer, but status doesn't affect |
If the phone doesnβt turn on or freezes on the logo after locking, try re-swiping the stock firmware through the Mi Flash Tool in Clean All mode. This will delete all data, but restore the working capacity.
Frequent mistakes and their solutions
When you lock the bootloader, you're going to have a problem, and you're going to see the most common ones.
- π« "Couldn't lock device" error. Cause: incompatible version of Mi Unlock Tool or firmware. Solution: download the latest version of the utility and try again.
- π Phone is not defined in fastboot. ADB/Fastboot. Solution: Install Mi PC Suite or drivers manually through Device Manager.
- β‘ The phone turns off during the process. Cause: battery is dead or the cable is broken. Solution: charge the phone to 100% and use the original cable.
- π Once locked, the phone requires a password from Mi Account, and the reason is that the account was tied before unlocking. Solution: enter the account details or wait 72 hours for automatic unlock (if the device is new).
If none of these methods worked, contact Xiaomi Service Center and tell them that you need a relock bootloader, which is a standard procedure that takes 1-2 days.
What to do if your phone turns into a brick?
Security after blocking the loader
After successful blocking, it is recommended to:
- π Enable Mi Account protection. Go to Settings β Xiaomi account β Security and activate the Find the Device option.
- π Update the firmware. Go to Settings. β The phone. β Update the system and install the latest version MIUI.
- π‘οΈ Install antivirus. Unlocked bootloader could allow malware to enter the system.
If you plan to sell the phone, complete a full reset via Settings β Additional β Restore and Reset β Reset. This will delete all data, including accounts and apps.
π‘
Locking the bootloader isnβt just a βbackwardβ unlocking procedure; it requires a stock firmware compatible with the current version of Anti-Rollback, otherwise the phone may stop turning on.