Owners of Xiaomi, Redmi and POCO smartphones often face the need to change the software part of the device. Unlocking the bootloader allows access to custom firmware installation, root rights and deep modification of the system. However, there comes a point when you need to return the device to its original state, this can be caused by the desire to sell the gadget, the need to pass bank security checks or the requirement of the warranty department.
The process of blocking the bootloader is reversible, but it carries certain risks that you need to know about before you start manipulating. Unlike unlocking, which requires waiting and binding an account, the reverse procedure is faster, but requires strict adherence to the sequence of actions. If you decide to block the bootloader, you need to be sure of the integrity of your smartphone system files.
In this article, we will go into all the preparation steps, tools and software needed, and not only the standard method through Fastboot, but also the nuances that arise when you have a modified partition system, and understanding these processes will help you avoid turning your device into a brick and save your data.
Why to block the bootloader and what are the risks
The main reason users want to close access to the bootloader is to restore the warranty. Xiaomi's official service centers often refuse free repairs if they see an unlocked Bootloader.
In addition, many high-security banking applications and services (such as Google Pay or enterprise customers) may not work properly on devices with open access to system files. Even if you delete root rights, the unlock flag in the bootloader remains active, and security systems see it.
β οΈ Note: If your smartphone has custom firmware installed (for example, LineageOS, PixelExperience or modified). MIUI), Attempting to block the bootloader will result in an infinite bootloop cycle, and the device will not be able to start because the digital signature of the stock bootloader will not match the modified system partition.
Also worth mentioning is resale: Aftermarket buyers are much more likely to buy closed-loader phones, as this ensures that there are no hidden modifications and viruses that could have been introduced by the previous owner.
Critical check: whether you have stock firmware
Before you go into action, you need to conduct a thorough diagnosis of the current state of the operating system. Locking the bootloader is possible only on the original, stock firmware MIUI or HyperOS. Any changes in the system partitions received through TWRP or Magisk, must be completely eliminated.
Check if you have superuser rights. If you have a Magisk or SuperSU icon on the app menu, it's not enough to simply delete them. You need to completely remove the root rights through the corresponding menu in the app or reflash the original boot.img image. Having a modified boot image when you close the bootloader is a direct path to the phone's downtime.
Make sure you are using a global or Chinese official firmware, a region-specific device, or one that is designed for your region. If you have used custom Recovery, it should be replaced with stockware. Ideally, before blocking, it is recommended to do a full reset (Wipe Data) to eliminate file conflicts.
How to check firmware status through ADB
Necessary tools and device preparation
To do this successfully, you'll need a computer running Windows, and although there are methods for Linux and macOS, the official Mi Unlock Tool and drivers work best in Windows. USB-cable, preferably original, to avoid connection breaks at a critical moment.
You need to install Qualcomm or MediaTek drivers on your computer (depending on your smartphoneβs processor), as well as ADB and Fastboot drivers. Without them, the computer will not be able to properly interact with the phone in bootloader mode. All the necessary software can be found on official resources or in trusted development communities.
βοΈ Preparation for lockdown
Backup is an important step. The locking process is often accompanied by a complete cleanup of the device's internal memory. Save photos, contacts and documents to the Xiaomi Cloud or Google Drive cloud storage, as well as to an external medium. Data loss in this case is a regular situation that you need to be prepared for.
Step-by-step: locking through Mi Unlock Tool
The safest and most recommended way to close the bootloader is to use the official utility from the manufacturer. This method minimizes risks and automatically checks the compatibility of the software. First, run the Mi Unlock Tool program on your computer and log in to the same Mi Account that is associated with the smartphone.
Put your smartphone in Fastboot mode. Turn the device off completely, then press the power and volume buttons at the same time. The screen will show an image of a hare repairing an android and the inscription will appear on the screen. FASTBOOT. Connect your phone to your computer through USB-cable.
The Mi Unlock Tool interface should display a device connection message. If the status is displayed as "Unlocked", click on the three-bar button in the upper right corner (menu) and select Lock bootloader.
The process is as follows:
1. Connecting the device...
2. Status checks...
3.Sending a lockdown command...
4.Reset and reset data.Once confirmed, the lock process will begin, the phone will reboot, and the Mi or Redmi logo with a performance indicator may appear on the screen, at which point it is strictly forbidden to turn off the cable or interrupt power, the process can take from 5 to 15 minutes.
π‘
If the Mi Unlock Tool is in error or freezes during the locking stage, try using another one. USB-port (preferably) USB 2.0) or replace the cable. It also sometimes helps to run the program on behalf of the administrator.
Alternative method: Fastboot command line
For power users who don't have the Mi Unlock Tool GUI, there is a method of manual locking through console commands. This method requires the Platform-tools (ADB/Fastboot) platform installed. Open the command line or PowerShell in the tool folder.
Connect your phone in Fastboot mode and check the connection by entering the command:
fastboot devicesIf you see the serial number of the device in response, the connection is set correctly.
fastboot oem lockOr, for some new models, a command may be required:
fastboot flashing lockA warning will appear on the smartphone screen that the device will be cleaned and the bootloader locked. To confirm, you usually need to press the volume button (up or down, the instruction will be on the screen) or the power button. After confirmation, the formatting and locking process will begin.
| Parameter | Mi Unlock Tool | Fastboot Command |
|---|---|---|
| Difficulty | Low (automatically) | Medium (needs PC and console) |
| Risk of error | Minimum | Medium (human factor) |
| Requirements | Mi Account, Internet | Fastboot drivers only |
| Speed. | Depends on the servers. | Instantly. |
Possible mistakes and ways to solve them
One of the most common errors is Remote: Device not allowed to lock bootloader, which means that the firmware installed on the phone is not the official stock, or its version does not correspond to the region for which the bootloader is intended, in which case you need to reflash the device through the Mi Flash Tool in Clean All mode.
Another common problem is the logo hanging after locking (Bootloop). If the phone is endlessly rebooted, it is a signal that the system partition has been changed. You will have to unlock the bootloader again (if possible), install stock Recovery and reflash the full firmware package. In some cases, only EDL (Emergency Download Mode) mode and paid authorization Mi Auth help.
β οΈ Note: Once the bootloader is blocked, re-unblocking may become impossible within 7 days (168 hours) of the account being linked if you have reset your settings. Plan your actions ahead of time so you don't have access to phone features.
If the fingerprint scanner or proximity sensor stopped working after blocking, the persist or modem partitions may have been damaged. Recovery of these partitions is possible only from a backup copy (which is rarely done in advance) or through a service center using programming boxes.
π‘
The key to success is to have a clean, original firmware before the procedure begins, and any modifications to the system must be eliminated before the lock command is given.