Blocking the Xiaomi bootloader: official and alternative ways

The bootloader (or bootloader) in Xiaomi smartphones is low-level software that runs to the operating system and controls the boot process. By default, the bootloader is locked on all devices, which protects the system from unauthorized changes, but many users will unlock it to install custom firmware, obtain root rights or modify software. However, there are situations when you need to return the bootloader to a locked state - for example, before selling a phone, to restore warranty or fix errors after unsuccessful experiments.

In this article, we will analyze all the current ways to lock the bootloader on Xiaomi, Redmi and POCO, Including the official Mi Unlock Tool method, alternative solutions for devices without manufacturer support, and the nuances of working with different versions of firmware, we will pay special attention to the risks of turning the phone into a β€œbrick” if you do not do it correctly and how to avoid them. If you previously unlocked the bootloader and now want to return everything β€œas it was” this guide will help you do it as safely as possible.

Why might I need to lock the bootloader?

At first glance, the idea of blocking the bootloader after unlocking seems strange, but in practice there are good reasons for this:

  • πŸ”„ Warranty Recovery: Most Xiaomi service centers refuse warranty repairs if they find an unlocked bootloader, even if the problem is not software related.
  • πŸ’° Buyers often check the status of the bootloader through fastboot oem device-info, and a locked bootloader increases the credibility of the phone.
  • πŸ› οΈ Fixing software failures: Some errors (e.g. cyclical reboot or data encryption problems) can only be solved by returning to stock firmware with the bootloader locked.
  • πŸ”’ Security: An unlocked bootloader allows attackers to access data even when the screen is locked if the phone falls into the wrong hands.

It is important to understand that locking a bootloader is not just a β€œreverse” operation of unlocking.

  • ⚠️ On some models (such as the Xiaomi Mi 11 or Redmi Note 10 Pro), locking can cause all data to be reset even if you don’t perform a full wipe.
  • ⚠️ If the device has custom firmware installed (for example, LineageOS or Pixel Experience), locking the bootloader without returning to the stock firmware is guaranteed to turn the phone into a β€œbrickΒ».
  • ⚠️ The procedure requires authorization in the Mi Account account associated with the device, and if you forget the login details, unlocking the phone after locking will be extremely difficult.
πŸ“Š Why do you want to block the bootloader on Xiaomi?
Preparation for sale
Restoration of the guarantee
Resolving errors after firmware
Enhancing security
Another option

Preparation of the device for blocking the bootloader

There are several critical steps that need to be taken before you start blocking, and neglecting them can lead to data loss, loss of access to your phone, or even physical breakdown (in rare cases).

1. Check the current status of the bootloader

Make sure the bootloader is actually unlocked.

  1. Turn off your phone and press the Power button + Volume down to enter Fastboot mode.
  2. Connect the device to the PC and execute the command in the terminal: fastboot oem device-info
  3. Find the Device unlocked: true string. If it's present, the bootloader is unlocked.

If you see false instead of true, no lock is required – the loader is already in a drain state.

2.Return to stock firmware

Locking the bootloader on custom firmware or modified stock firmware will cause the device to fail.

  • πŸ“₯ Download the official firmware for your model from the Xiaomi Firmware website (choose the Stable version, not the Developer, if you are not sure).
  • πŸ”„ Swipe it through Fastboot or Recovery (depending on the model). For most new devices (Xiaomi) 12/13, Redmi Note 11/12) Use the Mi Flash Tool to use the.
  • 🧹 Perform wipe data (reset to factory settings) after firmware, even if the system boots.

β˜‘οΈ Preparation for the bootloader lock

Done: 0 / 5

3. Authorization in Mi Account

Locking the bootloader requires you to link the device to your Mi Account.

  • πŸ“± Xiaomi account added and confirmed on the phone (check Settings) β†’ Xiaomi account).
  • 🌍 The account is not blocked and has the status of "Confirmed" (otherwise Mi Unlock Tool will not work).
  • πŸ”— The device is tied to the account for at least 72 hours (for new models.

If you have previously changed firmware or performed a reset, you may need to re-associate the device to your account and wait 3 days.

πŸ’‘

If the Mi Unlock Tool gives you a β€œCouldn’t unlock” or β€œDevice not bound” error, try removing the device from the Mi Account list, then re-add it and wait 72 hours.

The official method: lock through Mi Unlock Tool

Xiaomi’s most reliable and recommended method is the Mi Unlock Tool, which works on most models released after 2016, but there are nuances for new devices (for example, Xiaomi 14 or Redmi). K70).

Step 1: Download and install Mi Unlock Tool

The official version of the utility can be downloaded from the Xiaomi website:

  1. Go to the Mi Unlock page.
  2. Download the latest version of the Mi Unlock Tool (at the time of writing, version 6.5.224.24 is current).
  3. Install the program on PC (Windows is required) 7/10/11).

Avoid downloading the utility from third sites – this can lead to the installation of malware or the use of an outdated version that does not support your model.

Step 2: Device Connection and Authorization

Connect your phone in Fastboot mode:

  1. Turn off the device.
  2. Press the power button. + Loudness down until the Fastboot logo appears (Mi Bunny robot with the inscription) FASTBOOT).
  3. Connect your phone to your PC through the original USB-cable (it is desirable to use the port) USB 2.0 for stability).
  4. Launch the Mi Unlock Tool and log in to the same Mi Account that is linked to the device.

If the utility does not recognize the phone, check:

  • Are Fastboot drivers installed (can be downloaded via Mi Flash Tool or SDK Platform Tools).
  • Whether the original cable is used (cheap cables may not support data transfer to Fastboot).
  • Are antiviruses that can block the work of the utility disabled?

Step 3: Locking the Bootloader

After successful connection:

  1. In the Mi Unlock Tool, click the Unlock button (yes, the same button is used to lock).
  2. Confirm the action in the pop-up window.
  3. Wait until the process is completed (usually 10–30 seconds).
  4. The phone will automatically restart. After download, check the bootloader status with the fastboot oem device-info command - it should be Device unlocked: false.

If the process is in error, check:

  • πŸ”Œ Connection stability (try another one) USB-port).
  • ⏳ Is it 72 hours since the device was last linked to your account.
  • πŸ“± Is the stock firmware installed (castom firmware cannot be blocked!).

πŸ’‘

If the Mi Unlock Tool gives an error "Current account is different from the one on the device", then the phone is linked to another account. EDL-Regime (requires an authorized account).

Alternative methods of blocking the bootloader

If the official method didn’t work (for example, due to errors in the Mi Unlock Tool or lack of support for the model), alternative methods can be tried. ADB.

Method 1: Fastboot commands (for older models)

Some devices (Xiaomi Mi 5, Redmi Note) 4X Support blocking via direct Fastboot commands:

fastboot oem lock


fastboot reboot

However, this method does not work on all models, for example, on the Xiaomi Mi 9 or newer, the fastboot oem lock command can return the error. FAILED (remote: 'Not allowed in Lock State.

Method 2: Through EDL-The mode (for experienced users)

EDL-The Emergency Download Mode allows you to flash the device at a low level, including locking the bootloader:

  • The phone does not turn on (hangs on the logo or enters the bootloop).
  • Mi Unlock Tool gives an account link error.
  • Restore the device after a failed firmware.

Working in EDL will require:

  1. Special cable or adapter for entry into EDL (You can do it yourself by closing contacts on the board).
  2. Mi Flash Tool or QFil (for Qualcomm devices)
  3. The official firmware in.tgz or.mbn format.

Firmware-through process EDL It's complicated and risky, and if you make a mistake, it can completely fail. If you're not sure about your skills, you should go to the service center.

What to do if the phone does not come out EDL-regime?
If, after the firmware is through EDL The phone is not turned on and remains in Qualcomm mode. HS-USB QDLoader 9008", try: 1. Repeat firmware with another version of the software. 2. Use the Miflash utility with the clean all and lock option. 3. Contact the service - memory may be damaged (eMMC).

Some users are trying to block the bootloader through a custom recavery TWRP, But it's extremely dangerous, even if you're in TWRP There is a Lock Bootloader option, its use on most Xiaomi devices leads to the following:

  • 🚨 Data loss (including internal memory).
  • 🚨 Bootloope (cyclical reset).
  • 🚨 Needs to be scalable through EDL.

If you still decide to take a risk, first make a full backup through TWRP Be ready to recover via Fastboot.

Common mistakes and their solutions

Even when following instructions, users often encounter problems, and let's look at the most common errors and how to fix them.

Mistake.Reason.Decision
Couldn't unlock the Mi Unlock ToolThe device is not tied to an account or less than 72 hours have passed.Link the device to your account in Settings β†’ Xiaomi account and wait 3 days.
FAILED (remote: 'Device is locked. Cannot flash images')Trying to flash custom firmware on a locked bootloader.Unlock the bootloader through the Mi Unlock Tool, then stitch the stock firmware.
The phone will not turn on after locking.The bootloader is locked on the custom firmware.Sweep the stock firmware through Fastboot or EDL.
Mi Unlock Tool doesn't see the deviceThere are no drivers or problems with USB-connection.Install drivers via the Mi Flash Tool, try another cable/port.
Mistake. 0x80004005 or 0xc000000dProblems with Xiaomi servers or firewall.Turn off the antivirus, try it later or use it. VPN (for certain regions).

If none of the methods worked, it's possible that your Xiaomi model has lock features. POCO (for example, POCO F5) Additional authorization is required through Mi Community.

πŸ’‘

If the Mi Unlock Tool gives you an error called β€œThis device is not supported,” try using an older version of the utility (e.g. 3.5.511.24) or contact Xiaomi to unlock the right to lock (yes, that sounds absurd, but that’s how their system works).

What if the phone turned into a brick?

If the bootloader locks the device, don't panic - in most cases it can be restored. The main thing is not to try to turn on the phone repeatedly so as not to drain the battery.

Scenario 1: The phone hangs on a logo or in a bootloop

This means that the bootloader is locked, but the firmware is incompatible with the locked state.

  1. Enter the Fastboot (Power button) + Loudness down).
  2. Swipe the stock firmware through the Mi Flash Tool with the clean all option.
  3. If the firmware does not help, use it. EDL-regime.

Scenario 2: Phone does not respond to buttons (full brick)

This is a more serious problem, often associated with damage to the boot or modem partition.

  • πŸ”Œ Connect your phone to charge for 30 to 60 minutes – the battery may be dead.
  • πŸ”§ Try to get in. EDL via testpoint (requires disassembly of the device).
  • πŸ“ž Contact the Xiaomi Service Center – some models (e.g. Xiaomi 13 Ultra) require authorized access to the service. EDL.

If the phone is not detected in Fastboot or in EDL, It's probably the motherboard that's damaged, and then only repairs to the service will help.

How to enter EDL testpoint?
For most Xiaomi devices on a Qualcomm processor: 1. Turn off the phone. 2. Open the back cover (need a mediator or suction cup). 3. Find contacts on the motherboard with the inscription EDL or TEST POINT (usually next to the battery. 4. Close the contacts with tweezers or wires while connecting USB-cable to PC. 5. in the Device Manager should appear Qualcomm device HS-USB QDLoader 9008.

FAQ: Frequent questions about blocking Xiaomi bootloader

Can I block a bootloader without losing data?
No, locking the bootloader on most Xiaomi models results in automatic data reset. Even if the system boots up, some features (such as Mi Account or Google Pay) may not work properly. Always back up before the procedure.
Will Google Pay work after the bootloader is blocked?
Yes, but only if: The device has official firmware installed (not custom) Bootloader is locked officially through Mi Unlock Tool. You have performed a data reset after blocking. If at least one condition is not met, Google Pay may refuse to work due to a violation of SafetyNet.
Is it possible to block a bootloader on Xiaomi with custom Recovery (TWRP)?
Technically, it's possible, but it's extremely risky. Most devices have a bootloader locked with a bootloader installed. TWRP This leads to: System loss (bottle) and firmware needing to be installed through EDL. If you need to lock the bootloader, return the stock recavator first, run the official firmware, and then lock it.
How long does it take to lock the bootloader?
The process itself takes 10 to 30 seconds through the Mi Unlock Tool, but the full process (including preparation) can take 3 days if you need to link your account, 1-2 hours if you need to stitch stock firmware, 30 to 60 minutes if you have errors and need to fix them.
Can I unlock the bootloader after blocking?
Yes, but with reservations: If you blocked the bootloader through the Mi Unlock Tool, unlocking is possible through the same utility, but you will need to re-assign the account and wait 72-168 hours (depending on the model). EDL Unlocking can be difficult, requiring authorization through Mi Account or contacting the service. On new models (Xiaomi 14, Redmi) K70) Xiaomi tightens unlock policy, so the process can take up to 30 days.