How to reflash the locked Xiaomi: unlock the bootloader and install firmware

A locked Xiaomi smartphone is a problem that users face after buying a device from hand, resetting settings or trying to install custom firmware. Mi Account locking or a locked bootloader does not allow you to perform flashing using standard methods, and official unlocking methods often require waiting or confirmation from the previous owner. In this article, we will discuss legal and semi-legal methods of bypassing locks, choosing the right firmware and installing it Step-by-step through Fastboot or EDL.

It is important to understand that the procedure involves the risk of losing warranty, turning the device into a brick or activating hardware protection (for example, Anti-Rollback on new models).We do not call for violation of Xiaomi license agreements, but describe the technical possibilities for owners who legally purchased the device. If the phone is stolen, unlocking through informal methods can lead to blocking IMEI.

The article is relevant for Redmi, POCO and Mi models based on Qualcomm and MediaTek processors released before 2026. New devices (for example, Xiaomi 14 or Redmi Note 13 Pro+) may require additional steps due to tightening of protection.

Why is Xiaomi blocking the flashing?

Xiaomi has implemented several levels of protection against unauthorized access:

  • πŸ”’ Mi Account - linking the device to the owner's account. After resetting the settings (Hard Reset) requires entering the username / password of the previous user.
  • πŸ” Locked bootloader – new devices have the bootloader closed by default. Unlock requires a wait time (from 72 hours to 30 days) through the official Mi Unlock Tool.
  • ⚠️ Anti-Rollback: Reversed from older firmware versions, and if you try to install an earlier version, the device can lock permanently.
  • πŸ“± IMEI-locking – on some models (for example, Redmi Note 10 Pro) when the firmware is incorrectly reset IMEI, What makes your phone unsuitable for calls.

The main purpose of these restrictions is to combat theft and fraud, but legitimate users often suffer from excessive protection, especially when buying used devices, for example, if the previous owner forgot to unplug the Mi Account or sold a phone with a locked bootloader.

⚠️ Note: On devices with MediaTek processor (e.g. Redmi) 9A, POCO C31) unlock EDL This may cause hardware damage to the memory module. Before the procedure, check the model of the chipset in the application. CPU-Z.

Preparation for unlocking: what to do before the firmware

Before you start flashing, follow the mandatory steps:

  1. Check the device model. You can find out the exact modification in the settings (Settings β†’ About Phone β†’ Model) or through the command: adb shell getprop ro.product.model For example, Redmi Note 8 Pro has the code name begonia, and POCO X3 NFC is surya.
  2. Download the necessary tools: πŸ–₯️ Official Mi Unlock Tool (to unlock the bootloader). πŸ“± Unofficial Xiaomi Flash Tool (for firmware through the EDL). πŸ”§ ADB Fastboot (from the Platform Tools package). πŸ“ Firmware for your model (about where to get it - in the next section).

Prepare the computer.

Mi Unlock Tool

Xiaomi

here

Fastboot

If the device is locked on Mi Account, try contacting the previous owner to unblock it, otherwise you will have to use workarounds (about them below).

πŸ“Š What Xiaomi model are you trying to unlock?
Redmi (Note, K-series)
POCO (X, F, M-series)
Mi (11, 12, 13)
Another model

Where to download firmware for locked Xiaomi

Choosing the right firmware is a critical step, and installing the wrong version can lead to a hard-brick.

Type of firmwareSourceFor what occasions?Risks.
Official (Fastboot)Xiaomi websiteUnlocking the bootloader, recovery after failureRequires unlocked bootloader, may not bypass Mi Account
Castomium (TWRP)XDA DevelopersInstallation of unofficial firmware (for example, LineageOS)Possible loss of features (NFC, camera), risk of blocking
EDL-firmwareXiaomi Firmware UpdaterMi Account recovery after hard-brickRequires an authorized Qualcomm account or a patched EDL
Anti-Rollback fixTelegram channelsAnti-Rollback protection bypasses on new modelsHigh risk of becoming a brick

For most users, the best option is the official Fastboot firmware from Xiaomi, which is suitable for unlocking the bootloader and restoring functionality. EDL-patch-patch.

⚠️ Note: Firmware from unknown sources (such as torrent trackers) may contain spyware or viruses. Always check hash files (MD5) post-download.

Example of the official firmware name for Redmi Note 9 Pro (codename joyeuse):

joyeuse_global_images_V12.5.1.0.RJWMIXM_20211012.0000.00_11.0_global_1d1a1a1a1a.tgz

Where:

  • joyeuse is the code name of the device.
  • Global is the firmware region.
  • V12.5.1.0.RJWMIXM - version of MIUI
  • 11.0 is the Android version.

Method 1: Unlock the bootloader via Mi Unlock Tool (official method)

If the bootloader is locked but the Mi Account is not tied (or you know the previous owner's details), use the official Mi Unlock Tool.The process takes 3 to 30 days due to Xiaomi's policy.

β˜‘οΈ Preparation for unlocking the loader

Done: 0 / 4

Steps:

  1. Activate Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Enable USB Debugging and OEM Unlocking in Settings β†’ More β†’ For Developers.
  3. Connect your phone to your PC, launch the Mi Unlock Tool, and log in to the same Mi Account as your phone.
  4. Follow the instructions of the program. At the unlock stage, the device will reboot to Fastboot (black screen with a rabbit).
  5. When you first unlock, Xiaomi requires a wait (usually 168 hours).

After successful unlocking, you can flash the device through Fastboot:

fastboot flash boot boot.img


fastboot flash system system.img




fastboot reboot

⚠️ Note: On devices with MediaTek (e.g. Redmi) 9T) Unlocking the bootloader via the Mi Unlock Tool may not work. SP Flash Tool or EDL.

πŸ’‘

If the Mi Unlock Tool gives you a "Couldn't unlock" error, try connecting the phone to another one. USB-port (preferably 2.0) or use another PC. Sometimes it helps to disable the driver signature in Windows.

Method 2: Firmware through EDL (bypass Mi Account and blocked bootloader)

EDL (Emergency Download Mode) allows you to flash a device even with a locked bootloader and a Mi Account tied. This method works on most Xiaomi devices with Qualcomm processors, but requires a special cable or short circuit contacts on the board.

What you need:

  • πŸ”Œ EDL-cable (or ability to solder to close test point).
  • πŸ’» Mi Flash Tool or QFil (for Qualcomm).
  • πŸ“ Firmware in.mbn or.elf format (you can download it on Xiaomi Firmware Updater).
  • πŸ”‘ Qualcomm Authorized Account (or Patched Account) EDL community).

Instructions:

  1. Turn off the phone to enter the room. EDL use one of the methods: πŸ”§ Special cable: connect USB-cockpit+ and D- (sold on AliExpress). πŸ”₯ Test point: disassemble the device and close the contacts on the board (for each model they are different, look for schemes on the board). XDA or 4PDA).

Qualcomm HS-USB QDLoader 9008

here

Mi Flash Tool

Refresh

COM-port

Flash

If the firmware is successful, the device will reboot in standard mode without being tied to the Mi Account. However, on new models (such as the Xiaomi 12T), Anti-Rollback can work, and the phone will lock permanently.

What if the phone doesn’t turn on after EDL?
If the device doesn't respond to the power button, plug it into charging for 30 minutes. If the screen stays black, try flashing it back through EDL or contact the service center. In some cases, blind firmware via Fastboot helps with volume button retention.

Method 3: Bypassing Mi Account without firmware (for older models)

If the device is locked on Mi Account, but the bootloader is unlocked, you can try to bypass the check without completely flashing it.This method works on Xiaomi until 2019 release (for example, Redmi Note 5, Mi A1).

Method 1: Through TWRP

  1. Install custom TWRP recavators via Fastboot: fastboot flash recovery twrp.img fastboot boot twrp.img
  2. In TWRP, go to Advanced β†’ File Manager.
  3. Delete files: /data/system/locksettings.db /data/system/locksettings.db-wal /data/system/locksettings.db-shm /data/system/gesture.key /data/system/gatekeeper.password.key
  4. Reboot the device. The Mi Account lock should disappear.

XDA Developers has themes that are bypassed, but they often stop working after MIUI updates.

What if IMEI disappeared after the firmware?
Dropped. IMEI β€” frequent problem with the scaling of EDL or SP Flash Tool. To recover: Download SN Write Tool or Maui META (Find the original one. IMEI (It's usually on the box or under the battery. Restore the nvram partition or write it down. IMEI manually. ⚠️ In some countries, self-change IMEI forbidden.
How do I know if my Xiaomi bootloader is unlocked?
Turn off your phone and press Volume Down + Power to log in to Fastboot. If the bottom of the screen says Unlocked, the bootloader is unlocked. If Locked is locked. You can also check with the command: fastboot oem device-info Look for the lines Device unlocked: true/false.
Can I use Xiaomi without a computer?
Theoretically, yes, but with serious limitations: through MIUI Local Update (only official firmware, without bypassing Mi Account); through TWRP (if already installed); with apps like Flashify (risky, can lead to brick).
What Xiaomi models can’t be flashed through EDL?
On new devices (2022 and later), Xiaomi has implemented additional protections: Xiaomi 12/13 series – lock EDL at the hardware level. Redmi Note 11 Pro+ 5G – requires Qualcomm authorization. POCO F4 GT – protection against rollback of firmware (Anti-Rollback 4). These models often require authorized accounts or contact service.