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.
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.
- Turn off your phone and press the Power button + Volume down to enter Fastboot mode.
- Connect the device to the PC and execute the command in the terminal: fastboot oem device-info
- 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
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:
- Go to the Mi Unlock page.
- Download the latest version of the Mi Unlock Tool (at the time of writing, version 6.5.224.24 is current).
- 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:
- Turn off the device.
- Press the power button. + Loudness down until the Fastboot logo appears (Mi Bunny robot with the inscription) FASTBOOT).
- Connect your phone to your PC through the original USB-cable (it is desirable to use the port) USB 2.0 for stability).
- 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:
- In the Mi Unlock Tool, click the Unlock button (yes, the same button is used to lock).
- Confirm the action in the pop-up window.
- Wait until the process is completed (usually 10β30 seconds).
- 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 rebootHowever, 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:
- Special cable or adapter for entry into EDL (You can do it yourself by closing contacts on the board).
- Mi Flash Tool or QFil (for Qualcomm devices)
- 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?
Method 3: Through TWRP (not recommended)
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 Tool | The 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 device | There are no drivers or problems with USB-connection. | Install drivers via the Mi Flash Tool, try another cable/port. |
| Mistake. 0x80004005 or 0xc000000d | Problems 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.
- Enter the Fastboot (Power button) + Loudness down).
- Swipe the stock firmware through the Mi Flash Tool with the clean all option.
- 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.