Installing unofficial firmware on a Xiaomi smartphone with a locked bootloader is a task that requires not only technical skills, but also an understanding of the risks. The manufacturer deliberately limits the ability to modify the software to protect the device from unauthorized interference. However, enthusiasts and experienced users often look for ways to circumvent these restrictions to get advanced functionality, current updates or unique chips custom builds.
The main problem is that the blocked bootloader does not allow you to directly flash alternative software through standard tools like fastboot or fastboot. TWRP. But there are workarounds β from official unlocking through the Mi Unlock Tool to exploiting vulnerabilities in firmware (for example, through the use of a computer). EDL-In this article we will analyze all current methods, their pros and cons, and also give a checklist for safe preparation of the device.
Important: the procedure can lead to loss of warranty, a βbrickβ (inoperability) of the device or security problems. If you are a beginner, we recommend you first study the theory or consult a specialist.
Why Xiaomi is blocking the bootloader and what it means for the user
A blocked bootloader is a protection against unauthorized firmware changes, which Xiaomi introduced in 2016 after a wave of complaints about viruses and unstable devices after installing custom firmware. Since then, unlocking has become a must for enthusiasts, but the procedure itself has become more complicated.
What does the locked bootloader give you?
- π Virus protection β attackers will not be able to flash malware without physical access to the device.
- π‘οΈ System stability β prevents installation of incompatible or raw firmware.
- π± Preserving warranty β when locked, the device is considered βoriginal".
However, for experienced users, the lock creates barriers:
- βοΈ Impossible to establish TWRP or LineageOS without prior unlocking.
- π Restricted access to alternative cores and fashion chips (e.g. GCam for older models).
- β³ You will have to wait 7-30 days to unlock through the official Mi Unlock Tool.
β οΈ Warning: Unlocking the bootloader resets the device to factory settings. All data (photos, contacts, messages) will be deleted. Backup in advance!
Preparation of the device: what to do before unlocking
Before you start unlocking, make sure your device is ready for the procedure. Skipping at least one step can make it impossible to recover using standard methods (for example, if your Mi Account is blocked or if you crash in the system). EDL-mode).
List of mandatory actions:
Backup your data (via Mi Cloud or locally)
Check the device model (in Settings) β The phone)
Make sure the version MIUI Supports unblocking (not all regions allow it)
Download the official Mi Unlock Tool from Xiaomi website
Prepare. USB-cable (preferably original)
Charge your phone at least 60%
Disable all antiviruses on your PC (they can block drivers)
-->
Pay special attention to the version MIUI. On some devices (for example, Redmi Note 10 Pro or POCO F3) Unlocking is only possible on Chinese or global builds. EEA (European version, you may need to pre-flash through fastboot.
Check the status of your Mi Account:
- π± Account must be tied to the device for at least 72 hours.
- π The phone should be on. OEM Unlock (in the developer settings) and USB-debugging.
- π Make sure your region supports unlocking (in some countries, such as India, the procedure may be restricted).
| Xiaomi model | Support for official unlocking | Alternative methods |
|---|---|---|
| Redmi Note 9 Pro | Yes (7 days wait) | EDL, exploits for older versions MIUI |
| POCO X3 NFC | Yes (30 days wait) | Fastboot firmware with blocking bypass |
| Mi 11 Ultra | Yes (168 hours wait) | Only the official method |
| Redmi 9A | No (hardware-level locking) | EDL + authorized account |
π‘
If your device doesnβt support official unlock, check the forums. XDA Developers or 4PDA Alternative methods for your specific model and version MIUI.
Unlocking with Mi Unlock Tool
The most reliable, but also the longest way is to use the official Mi Unlock Tool, which works on most Xiaomi devices, but requires a wait of 7 to 30 days (depending on the model and region).
Step-by-step:
- Activate Developer Mode: Go to Settings β About Phone and 7 times click on the MIUI Version. Return to the main settings menu and the Developer option will appear.
- Turn it on. OEM Unlock and USB-Debugging: In the developer menu, activate both settings. Without this, the Mi Unlock Tool will not see the device.
- Link your Mi Account: In the same menu, find Mi Unlock Status and link your account. Wait 72 hours (minimum).
- Download Mi Unlock Tool: The official utility is available on the Xiaomi website (authentication required).
- Start unlocking: Connect your phone in fastboot mode (turn off the device, then press Volume down). + Power, run the utility and follow the instructions.
After successful unlocking, you can easily flash TWRP Or custom firmware through fastboot:
- π On new devices (such as Xiaomi 13), the period can be up to 360 hours (15 days).
- π Some models (e.g. Redmi Note 12) require additional authorization via the SMS.
- π« If you previously tried to unlock the device and got a ban, you will have to wait up to 30 days.
β οΈ Warning: If you see a "Couldn't unlock" or "Device not supported" error when unlocking, check: - Mi Unlock Tool version (should be the last). - Account binding (sometimes re-authorization is required). - Firmware region (Chinese builds unlock faster).
π‘
Official unlocking is the safest method, but not for everyone because of the long wait.If you need an urgent custom firmware installation, consider alternatives (see next section).
Alternative methods: EDL, exploits and bypasses the lock
If official unlocking is not available or takes too long, alternative methods may be used. They are more risky, but sometimes the only option.
1. EDL-Mode (Emergency Download Mode)
EDL β It's a service mode that allows you to stitch the device at a low level, bypassing the bootloader lock:
- π Authorized Xiaomi account: You need a login and password from an account with rights EDL (You can buy them or find them on forums).
- π₯οΈ Special Drivers: Install Qualcomm HS-USB QDLoader 9008 via Device Manager.
- π.mbn firmware: Download official or custom firmware adapted for EDL.
The firmware process through EDL:
1. Turn off the phone.
2. Press Volume Up + Volume Down and connect the USB- Cable (the device must be defined as Qualcomm HS-USB QDLoader 9008).
3. Launch the Mi Flash Tool, select firmware and press Flash.β οΈ Note: Incorrect Firmware Through EDL This can lead to a full brik (the device will not even be included in fastboot!
2. Exploits (e.g. DirtyCOW)
Some vulnerabilities in older versions MIUI This allows you to bypass the bootloader lock without officially unlocking it, like the DirtyCOW exploit that worked on Android 6-7 devices:
- π CVE-2020-0041: Vulnerability in the core of Qualcomm, allowing to get root on some models.
- π Fastboot bypass: For MediaTek devices (e.g. Redmi 9) the command fastboot oem unlock-go sometimes works.
Example of exploit usage (for advanced users):
adb push exploit /data/local/tmp/
adb shell chmod 777 /data/local/tmp/exploit
adb shell /data/local/tmp/exploitOnce successfully executed, the device can restart with the bootloader unlocked.
- π Exploits are often βclosedβ in new versions MIUI.
- π οΈ Skills required to work with ADB fastboot.
- π¨ Risk of data loss or device lock.
3. firmware through TestPoint
TestPoint is suitable for devices where blocked EDL (So, for example, Redmi Note 8 Pro on MediaTek, the idea is to close the contacts on the motherboard to force the phone to go to firmware mode.
Instructions:
- Take the phone apart and find TestPoint (a point on the board, usually signed or marked on the circuit).
- Close the contacts with tweezers or wires, simultaneously connecting USB-cable.
- The device will be defined as MediaTek Preloader - after that you can flash through the SP Flash Tool.
Risks of TestPoint Method
Installation of custom firmware after unlocking
After successfully unlocking the bootloader, you can start installing the unofficial firmware.
- π± LineageOS: Pure Android without branded bells and whistles Xiaomi.
- β‘ Pixel Experience: Firmware with interface and Google Pixel chips.
- π§ Havoc-OS: Flexible firmware with many customization settings.
- π MIUI-Ports: Alternative assemblies MIUI with corrected bugs or additional functions.
Step-by-step installation process:
- Install. TWRP: Fastboot: Fastboot Flash Recovery twrp.img fastboot boot twrp.img
- Make a backup: In TWRP Select Backup and save the current firmware (in case of rollbacks).
- Squeeze the firmware: Move it. ZIP-Firmware file on the phone and select Install in TWRP.
- Clear the cache: After installation, run the Wipe β Format Data (if required).
- Reboot: Select Reboot β System.
Important nuances:
- π Battery charge: Make sure the charge level is at least 50% or the process may be interrupted.
- π Compatibility: Check that the firmware is designed for your model (for example, the Redmi Note 10 Pro has sweet and sweetin options).
- π Encryption: Some firmware requires disabling encryption in TWRP (Format Data β yes).
| Firmware | Pluses | Cons |
|---|---|---|
| LineageOS | Stability, clean Android, long-term support | Less customization, may not have camera support |
| Pixel Experience | Interface like on Pixel, quick updates | Sometimes bugs with gestures or sensors |
| Havoc-OS | Maximum customization, support for themes | Can brake on weak devices |
| MIUI-port | Xiaomi chips are saved, better support for iron | May contain bloat (pre-installed annexes) |
β οΈ Note: After installing custom firmware, you may stop working: - Widevine L1 (no HD Netflix, Disney.+). β Banking applications (due to lack of Google certification) β Some sensors (e.g., sensors, NFC To fix this, you may need to use Magisk firmware or patches for SafetyNet.
Frequent Mistakes and How to Avoid Them
Even experienced users face problems when installing custom firmware, and consider the most common errors and ways to solve them:
1. Mistake "Invalid" IMEI" loss of network
The cause is usually damage to the modem or nvram partition when you run the firmware. IMEI:
- πΆ Download the original firmware for your model.
- π§ Run modem and nvram sections through fastboot: fastboot flash modem modem.img fastboot flash nvram nvram.img
- π If IMEI Reset, restore it via the engineering menu (#36446337##) or utility SN Write Tool (requires an authorized MediaTek account).
2. Hanging on a logo or bootloop
If the device does not load beyond the logo MI or custom firmware, the reasons may be as follows:
- π Incompatible firmware: Make sure the firmware version matches your deviceβs code (e.g., raphael for Redmi). K20 Pro).
- π§Ή Uncleaned cache: Get back in TWRP And do the Wipe. β Advanced Wipe β Dalvik/ART Cache, Cache.
- π§ Damaged kernel: Try flashing another kernel or go back to stock firmware.
If nothing helps, run the device through fastboot with the command:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img3. "Device is locked" error in fastboot
If after unlocking you still see a message about the blocked bootloader:
- π Restart your device in fastboot and re-run fastboot oem unlock.
- π§ Check the lock status with the command fastboot oem device-info (must be unlocked: true).
- π± If nothing helps, it may be that the lock is back after the update. MIUI. Try to unlock again.
4.Problems with Google Pay and banking apps
Castom firmware often fails SafetyNet, which causes banking applications to fail.
- π Install Magisk and activate the MagiskHide and Universal SafetyNet Fix modules.
- π± In Magisk settings, add banking apps to the hidden list (MagiskHide).
- π If it doesnβt work, try a firmware with a certified Google Play (e.g. Pixel Experience).
π‘
Most firmware errors are related to file incompatibility or missed steps (such as an uncleaned cache).Always check the instructions for your particular model on the forums. XDA or 4PDA.
How to return the official firmware and block the bootloader back
If custom firmware did not meet expectations or you want to return the warranty, you can roll back to the official MIUI And lock the bootloader:
- Download stock firmware: Use the Xiaomi Firmware Updater or the official Xiaomi website (choose the version for your region).
- Fastboot: Unpack the archive with firmware and launch the script flash_all.bat (Windows or flash_all.sh (Linux/Mac).
- Block the loader: After returning to MIUI The command is: fastboot oem lock β οΈ Attention: Locking the bootloader erases all data! make backup in advance.
What to consider:
- π Once blocked, you will not be able to unlock the bootloader again for 30 days.
- π± Some features (such as Mi Pay) may require additional authorization after blocking.
- π§ If the device was in EDL-You may need to run your firmware through the Mi Flash Tool with the clean all option.
To check the status of the lock, use the command:
fastboot oem device-infoThe output should be unlocked: false.