Introduction: Why to block the bootloader on the Mi8 and when it is necessary
The bootloader on Xiaomi smartphones is low-level software that starts the operating system when the device is turned on. On the Mi8, as on other models of the brand, it is initially blocked by the manufacturer. However, many users will unlock it to install custom firmware, obtain root rights or remove system applications. But what if you had to return everything “as it was”?
Locking the bootloader can be necessary in several cases: before selling the phone (so that the new owner does not face problems with updates), to restore the official warranty, after unsuccessful experiments with firmware, or if the device began to work unstable. It is important to understand that the process is irreversible without re-unlocking through official Xiaomi channels, and also fraught with the risk of “bricking” the phone if errors occur.
In this article, we will discuss two main methods of blocking: through the Mi Unlock Tool (the official method) and using fastboot commands (for experienced users), and you will learn what pitfalls await at each stage and how to avoid them.
Preparation of the device: what to do before blocking
Before you start blocking the bootloader, you need to follow a number of mandatory steps, neglecting them can lead to data loss, inability to turn on the phone, or even hardware damage.
First, back up all your important data. Locking the bootloader will reset the device to factory settings by removing photos, contacts, messages, and installed apps. Use Mi Cloud, Google Drive, or local copy on your PC.
- 📱 Contact (export to) VCF-file)
- 📸 Photo and video (copy to external drive)
- 🔑 Passwords and tokens (save from password manager)
- 🎮 Game saving (if you use emulators or mobile games)
Second, check the MIUI version and the status of the bootloader.
- Go to Settings → About Phone → MIUI version and write down the current firmware.
- Turn off the phone, then press Volume Down + Power to log into fastboot.
- Connect the device to your PC and type the command: fastboot oem device-info If you see Device unlocked: true in the answer, the bootloader is unlocked.
Third, make sure that your phone has disabled your Mi Account binding (if you plan to sell the device).
- Go to Settings → Xiaomi Account → Security.
- Click “Delete Account” and confirm the action.
💡
If the phone is not turned on because of a damaged firmware, locking the bootloader may be the only way to “resuscitate” it, but in this case, first restore the stock firmware through the Mi Flash Tool.
The official method: locking through the Mi Unlock Tool
The most reliable and recommended way Xiaomi is to use the utility Mi Unlock Tool, which automates the process and minimizes risks, but requires strict conditions.
To start, download the latest version of the utility from the official Xiaomi website (link: en.miui.com/unlock). Make sure you have ADB and Fastboot drivers installed (you can download from Mi PC Suite or manually from Google site).
Follow the instructions:
☑️ Preparing for locking with Mi Unlock Tool
- Sign in to Mi Unlock Tool under the same account that is linked to your phone.
- Turn off the Mi8 and turn it into fastboot (Loud down + Power buttons).
- Connect your phone to your PC through the original USB-cable (important!).
- In the utility, click Unlock (despite the name, it works for blocking).
- Confirm the action and wait for the process to be completed (usually takes 5-10 minutes).
Once successfully locked, the phone will automatically restart and reset to factory settings. The first turn on can take up to 15 minutes - that's normal.
What to do if the Mi Unlock Tool is in error?
Alternative method: blocking through fastboot commands
If the official tool doesn’t work (for example, due to errors in Xiaomi servers), you can lock the bootloader manually through fastboot.This method requires experience with the command line and is only suitable for confident users.
Before starting, make sure that:
- 🔧 PCs are installed. ADB Fastboot (check the fastboot command) --version).
- 📱 The phone is charged at least 50 times%.
- 🔒 You know the password from the Mi Account tied to the device.
Instructions:
- Put the Mi8 into fastboot mode (Loudness down + Power).
- Connect the phone to your PC and check for detection by the command: fastboot devices must display the serial number of the device.
- Enter the lock command: fastboot flashing lock or (for older versions of fastboot): fastboot oem lock
- Confirm the action on the phone screen (if you receive a request).
💡
The fastboot flashing lock command only works on devices with MIUI 10 and later. For older versions, use fastboot oem lock, but this can cause errors.
Note: Once locked through fastboot, the phone may not boot if it has custom firmware installed, in which case you will need to flash the official MIUI through the Mi Flash Tool.
Common mistakes and their solutions
The process of locking a bootloader rarely goes smoothly. Below is a table of the most common problems and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Couldn’t lock (999) | Xiaomi servers are temporarily unavailable or time-limited (72 hours). | Wait 3 days and try again. Check the Internet connection. |
| Device not found | The PC does not see the phone in fastboot mode. | Try another USB cable/port, reinstall the drivers, disable the antivirus. |
| The phone will not turn on after locking. | Installed unofficial firmware, incompatible with the blocked loader. | Sweep the official MIUI through the Mi Flash Tool in clean all mode. |
| Mi account not bound | The Mi Account is not tied to the device. | Link your account in your phone settings (Settings → Xiaomi Account). |
If after locking the phone is stuck on startup the Mi logo or reboots in a loop, perform a forced reset:
- Turn off the device (clip Power + Volume up for 10 seconds).
- Enter Recovery (Loudness Up + Nutrition).
- Choose Wipe Data → Wipe All Data.
💡
If you have lost your IMEI or mobile network, restore it via the engineering menu (#4636##) or swipe the nvram module through the SP Flash Tool.
What to do after blocking: check and restore functionality
Once the bootloader is successfully locked, you need to make sure the phone is working correctly.
- 🔄 System Updates: Go to Settings → The phone. → Update MIUI and install the latest patches.
- 📶 Mobile Network: Check if the phone catches the operator's network (if not, restore it) IMEI).
- 🔒 bootloader states: log in to fastboot again and execute the command fastboot oem device-info.
- 🎯 Sensors: Test the camera, GPS, fingerprinter.
If you blocked the bootloader before selling, do the full reset again:
- Go to Settings → Additional → Recovery and Reset.
- Select “Reset Settings” and select “Empty internal memory”.
- After reset, disable the Mi Account in the settings.
To restore functionality after blocking may require:
- 🔄 Flashing through the Mi Flash Tool (if the phone is not turned on).
- 🔧 Installation of stock recovery (if customized).
- 📥 Data recovery from backup (only after system stability check!).
💡
After blocking the Xiaomi bootloader Mi8 automatically receives the status of an "official" device, which unlocks access to the device. OTA-Updates and Service Centers.
Risks and consequences: what you lose when you block
Locking the bootloader is not a harmless procedure, but it entails a few irreversible changes that you should know about beforehand:
⚠️ Note: Once locked, you will not be able to install custom firmware (such as LineageOS or Pixel Experience), obtain root rights, or modify system files without re-unblocking. The process of re-unblocking will take 7-14 days due to Xiaomi restrictions.
In addition, the lock resets:
- 🔐 All data including internal memory).
- 🔧 Developer settings and debugging USB.
- 🛡️ Superuser rights (if previously obtained).
- 📱 Established TWRP or other recovery (to be replaced by stock recovery).
Another nuance is encryption issues, where if the phone has been encrypted and then the bootloader is locked, the device may require a password even after reset, in which case only a complete flashing through the Mi Flash Tool with the clean all and lock option will help.
Finally, locking the bootloader does not guarantee restoration of warranty. Xiaomi service centers can check the unlock history through the device logs, even if the bootloader is currently locked. If the warranty is critical, check the policy of the specific service center before the procedure.