Restore the lock of the Xiaomi bootloader: official and alternative methods

Unlocking the bootloader on Xiaomi smartphones gives users access to custom firmware, root rights, and advanced system settings. However, over time, many face the need to return the factory lock β€” whether to sell the device, warranty repairs, or security improvements, a process less documented than unlocking, and often accompanied by the risks of β€œbricking” the phone.

In this article, we will discuss all the current ways to return bootloader lock on Xiaomi, Redmi and POCO devices in 2026 – from official methods through the Mi Unlock Tool to alternative solutions for devices with damaged EFS. Particular attention will be paid to the nuances for models based on Qualcomm and Mediatek, as well as changes in the company’s policy after the introduction of new security rules.

It’s important to understand that the procedure doesn’t always go smoothly: some devices may require authorization through the Mi Account account tied to the phone at the time of first unlocking; others will refuse to be blocked due to modified boot or recovery sections. We’ll go through each scenario in detail so you can choose the best path without risking losing the gadget’s performance.

═══

Why you may need to return the lock loader

At first glance, locking the bootloader seems like a step backwards β€” a limitation on the functionality of the device.

πŸ”Ή Warranty repair: Xiaomi service centers refuse free repairs if they detect an unlocked bootloader.Even if the breakdown is not related to the firmware (e.g., a broken screen), the absence of lock automatically voids the warranty.

πŸ”Ή Data security: An unlocked bootloader allows attackers to access system partitions via fastboot or EDL-The mode, even if the phone has a password, is critical when you sell or lose a device.

πŸ”Ή Stability: Castom firmware and modifications often lead to accidental reboots, overheating or rapid battery discharge. Returning to stock firmware with bootloader lock helps bring back factory optimization.

πŸ”Ή Updates by air" (OTA). On unlocked update devices via Settings β†’ System updates may not come or be installed with errors. Locking the bootloader restores this function.

⚠️ Note: If you unlocked the bootloader through informal tools (such as Sunshine or exploits for Mediatek), the standard method of blocking through the Mi Unlock Tool may not work. EDL logged-in.

The official method: locking through the Mi Unlock Tool

The most reliable and recommended way is to use Xiaomi's official Mi Unlock Tool, but since 2023, the company has tightened the requirements for this process.

Preparation of the device:

Make sure the phone has the latest stable version of MIUI (not beta!). Check in Settings β†’ About Phone β†’ MIUI version.

- Link your Mi Account to your device in Settings β†’ Xiaomi Account. This must be the same account that was used to unlock!

- Enable USB debugging: Settings β†’ About Phone β†’ MIUI version (click 7 times), then Settings β†’ Additional β†’ For Developers β†’ Debugging over USB.

2. Downloading of the utility:

The official version of the Mi Unlock Tool can only be downloaded from the Xiaomi website (authentication is required).

Do not use utilities from third-party resources - they may contain malicious code or outdated certificates.

The locking process:

Connect your phone to your PC in fastboot mode (turn off the device, then press Volume Down + Power).

Start the Mi Unlock Tool and log in to the same Mi Account.

Press Lock Now (in some versions of the button utility may be called Relock Bootloader).

Wait until the process is completed (usually takes 1-3 minutes) and the phone will automatically restart.

Install the latest version of MIUI| Link Mi Account to the device | Enable debugging via USB| Download Mi Unlock Tool from the official website | Connect your phone in fastboot-->

πŸ”Ή What to do if the utility makes an error?

Error 10008: Account is not tied to the device Solution: Re-assign and wait 72 hours (new 2026 requirement).

Error 20031: The device is not supported, solution: check if your model is blacklisted by Xiaomi.

Error 500: Server problems Solution: Try later or use a VPN with a region in India or China.

⚠️ Warning: Once the bootloader is locked, all data on the device will be erased! backup via Settings β†’ Additionally. β†’ Backup and Reset or Xiaomi Cloud.

Alternative methods of blocking

If the official method didn’t work (for example, because of a change in IMEI or damage to the modemst1 partition), alternatives can be tried.

πŸ”Ή Method 1: Fastboot commands (for Qualcomm)

This method is suitable for devices on Snapdragon chipsets (for example, Xiaomi 12 Pro, POCO F4 GT):

fastboot flashing lock


fastboot flashing lock_critical




fastboot reboot

Important:

Mi

Mi Flash Tool

πŸ”Ή Method 2: Flashing through EDL (brick-to-brick")

If the device is not turned on or the bootloader is damaged, the firmware in EDL (Emergency Download Mode) mode will help:

Download the firmware for your model from the Xiaomi Firmware Updater website.

Use the Mi Flash Tool with the clean all and lock option (this will automatically block the bootloader).

- For the entrance EDL On the phone turned off, press the volume up. + Loud down and plug in. USB-cable.

πŸ”Ή Method 3: Through TWRP (Only for experienced users)

Some versions of TWRP allow you to block the bootloader through the Advanced β†’ Flash Current TWRP menu, but this method does not work on all devices and can lead to data loss.

What if the phone doesn’t turn on after locking?
If the device is stuck on the Mi logo or left in the bootloop, follow the following steps: 1. Boot in fastboot (Loud down + Power). 2. Squeeze stock recovery via the command: fastboot flash recovery recovery.img 3. Reboot to recovery and wipe data (Wipe Data β†’ Format Data). 4. Refuse the device through the Mi Flash Tool with the clean all option (no lock to avoid re-hanging).

Features for devices on Mediatek

Xiaomi smartphones on Mediatek processors (for example, Redmi Note 11, POCO M4 Pro) have other mechanisms for blocking the bootloader.

πŸ”Ή Mi Unlock Tool is not officially supported, and Mi Unlock often fails to deliver an error for Mediatek. SP Flash Tool or MCT (Mediatek Control Tool).

πŸ”Ή The need for authorization through DA-For firmware in mode BROM (analogue EDL Mediatek requires unique DA- Auth files that can only be obtained through authorized service centers.

πŸ”Ή Risk of damage IMEI. On some models (e.g. Redmi) 9A) lock-in SP Flash Tool can be reset IMEI. It can only be restored through the engineering menu (#36446337##) or specialized boxes such as UFi.

πŸ”Ή Instructions for Mediatek:

1. Download stock firmware in.zip format for your model.

2. Unpack the archive and find the scatter.txt file.

3. In the SP Flash Tool, download scatter, select Download Only mode, and flash only the preloader, lk, and boot sections.

4. After firmware, reset via fastboot:

fastboot erase userdata


fastboot erase cache




fastboot reboot

πŸ“Š What brand of smartphone do you use?
Xiaomi
Redmi
POCO
Another brand

Problems and solutions when blocking the loader

Even when following instructions, users often encounter errors, and consider the most common cases and ways to solve them:

Problem.Possible causeDecision
Couldn't lock in Mi Unlock ToolSection changed modemst1 or IMEIRestore the original IMEI through the engineering menu or stitch the stock firmware to EDL
The phone will not turn on after locking.The boot or dtbo section is damagedSwitch to stock recovery and wipe data via fastboot
The utility does not see the device in fastbootQualcomm HS-USB QDLoader 9008 drivers are missingInstall drivers manually through Device Manager or use the Mi Flash Tool to install automatically
It takes 168 hours (7 days) to wait.Xiaomi’s new requirement for accounts not linked to the deviceWait for the specified time or use an authorized service center account

πŸ”Ή What to do if Mi Unlock Tool requests an old account?

If you bought the phone with your hands and do not know the previous owner’s details, contact Xiaomi support with proof of purchase (check, box with IMEI). In 30% of cases, the account can be reassigned to a new owner.

πŸ”Ή How to check if the loader is blocked?

Turn off the phone, press Volume Down + Power to log in to fastboot. The bottom of the screen should be either Locked (if the bootloader is locked) or Unlocked (if unlocked).

πŸ’‘

If after blocking the bootloader, the phone stopped seeing SIM-maps, check the integrity of the modem partition. It can be restored by checking the stock firmware with the modem tick in the Mi Flash Tool (without formatting other partitions).

Locking the bootloader on devices with damaged EFS

The EFS (or modemst1/modemst2) partition stores critical data for the modem to work, including IMEI and calibration files. If this partition is corrupted (for example, after a failed firmware), the standard methods of blocking the bootloader will not work, in which case you will need:

1. Recovery of EFS from backup:

If you have a backup of a partition (made via TWRP or QPST), swipe it back:

fastboot flash modemst1 modemst1.img


fastboot flash modemst2 modemst2.img

Generation of the new IMEI:

For Qualcomm devices, you can generate a new IMEI through the engineering menu (#717717##) or the QCN Rebuilder utility.

- Attention: Change IMEI This method is illegal in some countries (for example, in Russia it is regulated by Article 272 of the Criminal Code of the Russian Federation). IMEI!

3. firmware through an authorized account:

Some Xiaomi service centers have special accounts with firmware rights for devices with damaged EFS. Contact them if independent attempts were unsuccessful.

⚠️ Note: If you sell your phone after recovery IMEI, Be sure to inform the buyer about the manipulations, otherwise the device can be blocked by the operator as a fake".

Frequent questions and myths about the bootloader lock

There are a lot of rumors surrounding the bootloader lock procedure, and we'll look at some of the most popular questions and misconceptions.

πŸ”Ή Myth 1: "bootloader Block Removes Root Reality: bootloader Blocking Does Not Remove Root Rights by Itself, But Makes Them Useless – Modified Core (boot.img) To completely remove root, you need to flash the stock boot and make unroot through Magisk or SuperSU.

πŸ”Ή Myth 2: "Once locked, the phone will be like new" Reality: Locking the bootloader does not reset the anti-rollback counter (if it has been enlarged by custom firmware). This can lead to problems with future updates. Check the current value through the command:

fastboot getvar anti

πŸ”Ή Myth 3: "You can lock the bootloader without losing data" Reality: Any locking of the bootloader leads to a reset /data (The only way to save data is to make a full backup through the TWRP or ADB before the beginning of the procedure.

πŸ’‘

Locking a bootloader is not just a β€œbackward” operation to unlock; it requires checking the integrity of system partitions, especially modemst1, keymaster, and frp. Without this, the device may lose communication, Wi-Fi, or not turn on at all.

❓ Can I block the bootloader on a device with custom recovery?
No, you need to flash stock recovery beforehand, otherwise, after locking the phone will not be able to boot and will need firmware via fastboot or EDL.
❓ Why Mi Unlock Tool asks you to wait 7 days, even though your account is tied?
Since 2026, Xiaomi has introduced additional verification for accounts that have not previously been blocked by downloaders, a measure against fraud, and you can only get around the wait through an authorized service account.
❓ Will Google Pay work after blocking the bootloader?
Yes, but only if you also delete root rights and return the stock kernel.Google Pay checks the integrity of the system through SafetyNet, and locking the bootloader does not in itself guarantee certification.
❓ Can I lock the bootloader on a device with a broken screen?
Yes, but you will need to connect via fastboot or EDL. The main condition is the work USB-port and ability to enter emergency modes (for example, by pressing the power and volume buttons).
❓ What to do if the camera or sound is lost after blocking?
This indicates damage to dsp or vendor partitions, and the solution is to flash stock firmware with the clean all option into the Mi Flash Tool, pre-downloading the full package for your model.