How to block the bootloader on Xiaomi phones 2022: official and alternative methods

Locking a bootloader on Xiaomi smartphones after unlocking it is not as trivial as it might seem. In 2022, the company tightened its security policy, and the standard methods used in the 2018-2020 models have ceased to work. If you unlocked the bootloader to install custom firmware, but now want to return factory protection β€” for example, before selling the phone or to improve security β€” this guide will help you do this without the risk of β€œbricking” the device.

Unlike unlocking, which requires waiting 7-30 days and binding a Mi Account account, bootloader locking is often done manually via Fastboot or a Fastboot. ADB. However, there are pitfalls here: the wrong command can lead to data loss or even the inability to turn on the phone.We will look at three proven methods (official through Mi Unlock Tool, manual through fastboot oem lock and alternative using the same method). EDL-The mode is also explained why locking doesn’t always go away the first time on 2022 models like the Redmi Note 11 Pro.+ Xiaomi 12T.

Important: locking the bootloader will result in the phone being completely reset to factory settings (including internal memory).If the device has important data, back up in advance via Mi Cloud or locally on the PC. Also make sure the battery is at least 60% charged - interrupting the process can make the phone inoperable.

Why you might need to block the bootloader on Xiaomi

At first glance, the unlocked bootloader gives you more freedom: the ability to install custom firmware (LineageOS, Pixel Experience), get root rights or restore the phone through TWRP. However, there are good reasons to return the factory lock:

  • πŸ”’ Data security: On a device with an unlocked bootloader, an attacker can access the file system even without a password by connecting the phone to a PC.
  • πŸ’° Warranty service: Xiaomi service centers refuse to repair under warranty if the bootloader is unlocked (even if the breakdown is not related to the firmware).
  • πŸ“± Stability: Custom firmware often contains bugs, especially on newer 2022 models (Snapdragon 8 Gen 1, Dimensity 9000), where drivers can conflict with the core.
  • πŸ”„ Updates by air (OTA): Unlocked bootloader official updates MIUI They may not be installed or cause errors.

In addition, some banking applications (such as SberBank Online or Tinkoff) block work on devices with an unlocked bootloader, citing security risks. Even if you did not install root, the mere presence of an open bootloader can cause a refusal of authorization.

⚠️ Note: On Xiaomi 2022 models with MediaTek processors (e.g. Redmi Note 11 on Helio) G96) Locking the bootloader via fastboot oem lock can lead to an error FAILED (remote: 'Not allowed in Lock State'. EDL-mode (emergency firmware).

Preparing the phone for the loader lock

Before you start locking, you need to follow a few critical steps, and neglecting them can lead to a "brick" (inoperable state) of the phone.

First, check the current status of the bootloader.

  1. Turn off the phone.
  2. Press the Power + Volume buttons down to log into the Fastboot.
  3. Connect your phone to your PC and type in the command line: fastboot oem device-info
  4. Find the Device unlocked: true string. If it's present, the bootloader is unlocked.

Second, make sure that the phone has official MIUI firmware installed (not custom) and locking on unofficial builds will cause an error to return the stock firmware:

  • πŸ“₯ Download the latest version of Fastboot-ROM for your model from en.miui.com.
  • πŸ–₯️ Use the Mi Flash Tool to Firmware in Clean All Mode (this will delete all data!).
  • πŸ”„ After the firmware, reset through Settings β†’ Additionally. β†’ Recovery and discharge.

Third, prepare the PC:

  • πŸ’» Install the latest versions ADB Fastboot (you can download from the Android website).
  • πŸ”Œ Make sure Xiaomi drivers are installed (when connecting to Fastboot, the phone should be defined as Android Bootloader Interface).
  • πŸ”’ Disable the antivirus, it can block the Mi Unlock Tool.

Install official firmware MIUI|Download ADB/Fastboot and Mi Flash Tool|Check the status of the bootloader through fastboot oem device-info|Make a backup copy of the data|Charge the phone before 60% more-->

Method 1: Official locking with Mi Unlock Tool

The most reliable way is to use the official Mi Unlock Tool, which is also used for unlocking, but in 2022 Xiaomi limited the ability to block through this tool for certain regions, if your Mi Account is tied to Russia, Ukraine or Belarus, the method may not work.

Instructions:

  1. Download Mi Unlock Tool from the official website (version no lower than 5.5.224.24).
  2. Sign in to the tool under the same Mi Account that was used to unlock.
  3. Connect your phone in Fastboot mode (Power buttons + Volume down).
  4. In the tool, click Unlock – despite the name, it can offer a lock option if the device is already unlocked.
  5. If you see a message that says "Couldn't unlock. Your device isn't supported," try alternative methods.

If the Mi Unlock Tool doesn’t offer a lock option, try the following trick:

  • πŸ“ Manually change the config.ini file in the tool folder by adding a line: [unlock] allow_lock=1
  • πŸ”„ Re-launch Mi Unlock Tool on behalf of the Administrator.

⚠️ Attention: On models POCO F4 GT and Xiaomi 12 Pro with Snapdragon 8 Gen 1 processor official tool can block the bootloader, but after that the phone will stop booting into the system. EDL.

πŸ“Š Have you ever blocked a bootloader on Xiaomi?
Yes, through the Mi Unlock Tool.
Yeah, through fastboot teams.
No, but I want to try.
No, I don't plan on.

Method 2: Blocking through Fastboot commands

If the official tool didn’t work, you can try locking the bootloader manually through Fastboot, a method that works on most 2022 models, but requires caution.

Step-by-step:

  1. Open the command line (Win) + R β†’ cmd) in the folder ADB/Fastboot.
  2. Connect the phone in Fastboot mode and check its detection by the command: fastboot devices (should display the serial number of the device).
  3. Enter the lock command: fastboot flashing lock or (for older models): fastboot oem lock
  4. Confirm the action on your phone using volume buttons (select Yes and press Power).
  5. Wait for the reboot. It can take up to 10 minutes to start.

If the fastboot flashing lock command returns the FAILED error (remote: 'Flashing is not allowed in Lock State'), try:

  • πŸ”§ Use the command fastboot flashing lock_critical (Blocks only critical sections).
  • πŸ”„ Pre-swipe the official firmware through the Mi Flash Tool in clean all and lock mode.
Model Xiaomi (2022)Supported teamPossible errors
Redmi Note 11 Pro/Pro+fastboot flashing lockNot allowed in Lock State (EDL required)
POCO X4 Pro 5Gfastboot oem lockFAILED (remote: 'Command not allowed')
Xiaomi 12/12 Profastboot flashing lock_criticalSuccess, but possible bugs with OTA-update
Redmi K50fastboot flashing lockRequires prior firmware for stock recovery

πŸ’‘

If you stop turning on after fastboot flashing lock, don't panic. Connect it to your PC, launch the Mi Flash Tool, and run the official firmware in clean all mode.

Method 3: EDL-Blocking (for MediaTek and problem cases)

EDL-Emergency Download Mode is a firmware emergency mode that allows you to restore the phone even if it doesn't turn on. It is required for models on MediaTek (for example, Redmi Note 11), where the standard fastboot commands do not work. EDL It will help if after blocking the bootloader the phone stopped loading.

For EDL entry:

  1. Turn off the phone.
  2. Press the Volume Up + Volume Down buttons and connect the USB cable to the PC (hold the buttons for 10-15 seconds).
  3. Install the Qualcomm HS-USB QDLoader 9008 driver (you can download it on XDA).
  4. In Device Manager, check that the phone is identified as a Qualcomm HS-USB QDLoader 9008 (COMX).

To lock the bootloader through EDL:

  • πŸ“₯ Download the Mi Flash Tool and the official firmware in.tgz format for your model.
  • πŸ–₯️ In Mi Flash Tool, select Clean All and Lock mode.
  • πŸ”Œ Put the phone in. EDL-mode and press Flash.
  • ⏳ Wait until the process is completed (the process can take up to 10 minutes).

⚠️ Attention: Use EDL Without official permission, Xiaomi may be blocked. IMEI on certain models, for example, POCO F4 GT). If you are not sure, it is better to contact the service center.

What if the Mi Flash Tool doesn’t see the phone in EDL?
If the Mi Flash Tool does not detect the device EDL, Try: 1. Reinstall the Qualcomm driver manually through Device Manager. 2. Use another USB-3. Run the Mi Flash Tool on behalf of the administrator. 4. Try another PC (on some laptops) USB-The ports do not provide sufficient food for EDL). If nothing helps, it may be damaged. EDL-port on the phone (requires repairs).

Checking the results and possible problems

After locking the bootloader, you need to make sure that the procedure was successful.

  1. Enter Fastboot (Food + Volume Down).
  2. Command: fastboot oem device-info
  3. Check the Device unlocked: false string. If it's present, the bootloader is locked.

Common problems and their solutions:

  • πŸ”΄ Phone does not turn on after locking: run the official firmware through the Mi Flash Tool in clean all mode.
  • πŸ”΄ Invalid partition error: So the stock firmware was not installed before the lock.
  • πŸ”΄ It's not working. OTA-Update: Reset through Settings β†’ Recovery and discharge.
  • πŸ”΄ Mi Unlock Tool shows "Device is locked," but fastboot oem device-info says the opposite: restart your phone and check again.

If you notice that your phone is slowing down or warming up after locking, that's OK -- MIUI can optimize the system within 24 to 48 hours. If problems persist, reset to factory settings.

πŸ’‘

Locking the bootloader on Xiaomi 2022 models often requires pre-running official software through the Mi Flash Tool. Without this, fastboot commands will not work or lead to errors.

Frequent questions and answers

Can I block the bootloader without losing data?
No. Locking the bootloader always results in a complete reset of the phone, including internal memory (/data).This is due to Xiaomi's security mechanism, which encrypts user data when the bootloader is unlocked. When you lock the encryption key is reset, and access to the data is lost. Backup in advance via Mi Cloud or Google Account.
Why does the phone not turn on after locking?
This is a typical problem for the 2022 models with Snapdragon 8 Gen 1 or Dimensity 9000 processors. The reason is the conflict between a locked bootloader and an inappropriate firmware. Solution: Connect your phone to your PC in EDL mode (Loudness up + Loudness down + USB). Swipe the official firmware through the Mi Flash Tool in clean and lock mode. If this does not help, it may be a damaged partition or boot recovery. In this case, you will need to reflash the phone through Test Point (EDL access point on the board).
Will Google Pay work after the bootloader is blocked?
Yes, but with reservations. Google Pay blocks work on devices with unlocked bootloader or root rights. Once the bootloader is blocked, the restriction should be removed, however: If you previously received root, it is possible that the SafetyNet trigger remained activated. Check status through the SafetyNet Test application. Some models (for example, POCO X4 Pro) may require a reset of the Google Services Framework (Settings β†’ Apps β†’ Show All β†’ Google Services Framework β†’ Storage β†’ Clear Data).
Can I re-open the bootloader after blocking?
Yes, but with limitations. Xiaomi introduced new rules in 2022: Once the bootloader is locked, re-unblocking will require a re-wait (from 7 to 30 days, depending on the model). Some devices (such as Xiaomi 12S Ultra) may require confirmation via SMS or email. If you blocked the bootloader through EDL, unlocking may not be possible without contacting the service center. We recommend weighing the pros and cons before locking if you plan to install custom firmware again in the future.
Does this work on Xiaomi 13 and newer?
No. Since Xiaomi 13 (2023), the company has introduced a new security mechanism, HyperOS with an improved Anti-Rollback. Booter lock on these models is only possible through authorized service centers. Self-attempts lead to hard-brick (impossibility of recovery without special equipment). For Xiaomi 12 and older models (2022 and earlier), the methods described in the article remain relevant.