How to flash Xiaomi with a locked bootloader through Mi Flash: the full guide 2026

Introduction: Why Xiaomi’s Firmware with a Locked bootloader Is a Challenge

Firmware Xiaomi smartphones through the Mi Flash Tool is standard procedure for power users, but if the bootloader is blocked, the process turns into a multiple quest with the risk of β€œbricking” the device. Xiaomi locks the bootloader on all new devices by default, citing protection from viruses and unauthorized access. However, this creates problems for those who want to install custom firmware, roll back to the old version of MIUI or restore the phone after a crash.

The main difficulty is that the official Mi Flash Tool refuses to stitch the device with the locked bootloader without first unlocking through the Mi Unlock Tool. But even after unlocking, there are pitfalls: improperly selected firmware, driver errors or incorrect firmware mode (clean all vs clean all and lock) can lead to a complete loss of the device’s functionality without the possibility of recovery through Fastboot. In this article, we will discuss legal and safe ways to circumvent restrictions without violating Xiaomi’s policy.

Preparation: What to do before the firmware

Before you start firmware, make sure that all the preliminary steps are followed. Without them, the risk of errors increases significantly, and the chances of successful recovery of the device are close to zero.

  • πŸ”Œ Battery charge is at least 60%. Firmware through Mi Flash can take up to 10-15 minutes, and if the phone runs out in the process, this will lead to a hard brick (unable to turn on even in Fastboot mode).
  • πŸ’» Computer on Windows 7/10/11 With Windows Defender disabled and firewall. Antiviruses often block Xiaomi drivers, which leads to a critical error error in Mi Flash.
  • πŸ“₯ Original. USB-Cheap cables may not provide stable connection in Fastboot mode.
  • πŸ” Mi Account tied to device at least 72 hours ago, without which Mi Unlock Tool will not allow unlocking the bootloader.

Pay special attention to the choice of firmware. For devices with a locked bootloader, only official ROMs from en.miui.com are suitable. Custom firmware (for example, Pixel Experience or LineageOS) require pre-unlocking the bootloader and installing a customized recavestry (TWRP).

πŸ’‘

If your device is not identified in Mi Flash, try connecting it to another device. USB-port (preferably) USB 2.0 on the back of the PC. Ports USB 3.0 sometimes causes conflicts with Fastboot drivers.

Unlocking the bootloader: a mandatory step before the firmware

Without unlocking the bootloader, the Mi Flash Tool will not be able to flash the device - you will get an error This device is locked. The unlock procedure takes from 3 to 15 days (depending on Xiaomi's policy) and requires several conditions:

  1. Linking your Mi Account to your device (minimum 72 hours).
  2. Enable debugging by USB in the developer settings (Settings β†’ About Phone β†’ MIUI version (7 times press) β†’ Additional β†’ For developers β†’ Debugging by USB).
  3. Linking the device to your Mi Account in Settings β†’ Mi Account β†’ Cloud Services β†’ Find the device.

After that:

  1. Download the Mi Unlock Tool and run it on behalf of the administrator.
  2. Sign in with the same Mi Account as you do on your phone.
  3. Connect your phone in Fastboot mode (turn off the device, then press Volume Down + Power).
  4. Press Unlock and wait until the process is complete (it may take several attempts).
πŸ“Š How much time did you spend unlocking the Xiaomi bootloader?
Less than 3 days
3-7 days
1-2 weeks
More than 2 weeks.
I haven't unlocked yet.

Important: Once the bootloader is unlocked, all data on the device will be erased, and Xiaomi can block the ability to unlock for 30 days if you exceed the attempt limit (usually 1 attempt per month).

⚠️ Warning: If you bought your phone with your hands, make sure the previous owner untie your Mi Account from the device. Otherwise, unlocking will not be possible without it.

Selecting a firmware: which version of MIUI to download

For firmware via Mi Flash, only official.tgz ROMs are suitable. Don't confuse them with Recovery ROM (installed via stock receivers) or Fastboot ROM (used in Mi Flash).

Type of firmwareExpansionMethod of installationIs it suitable for a locked bootloader?
Fastboot ROM.tgzThrough the Mi Flash Tool❌ No (unlocking required)
Recovery ROM.zipThrough the stock Recovery (Update)βœ… Yes (but doesn't solve the problem of blocked bootloader)
Global Stable.tgzMi Flash (clean all)❌ No.
China Stable.tgzMi Flash (clean all)❌ No.
EEA (Europe).tgzMi Flash❌ No.

For devices with a locked bootloader, the only legal way to run the firmware is through Xiaomi authorized service centers. However, if the bootloader is already unlocked, you can choose any version of the Fastboot ROM from the MIUI site that matches your model.

  • 🌍 Global – for international versions (e.g. Redmi Note 10 Pro Global).
  • πŸ‡¨πŸ‡³ China – Chinese versions (requires manual installation of Google Services).
  • πŸ‡ͺπŸ‡Ί EEA β€” European devices (supported) GDPR).

⚠️ Warning: Firmware version of China on a global device (and vice versa) can lead to problems with the mobile network, GPS Before you run the firmware, check the phone model in Settings. β†’ The phone. β†’ Model.

Step-by-step: Firmware via Mi Flash Tool

When the bootloader is unlocked and the firmware is downloaded, you can start the process. Follow the instructions strictly by steps to avoid errors.

  1. Install drivers: Download the Mi Flash Tool and install it. Download Xiaomi drivers and install them manually through Device Manager (unless the phone is detected in Fastboot mode).
  2. Connect your phone in Fastboot mode: Turn off the device. Press Volume down + Power until the Fastboot logo appears. Connect the phone to your PC.
  3. Launch Mi Flash Tool: Unpack the downloaded firmware (.tgz) into a folder without Cyrillic characters. In Mi Flash, press Select and specify the path to the firmware folder. Press Refresh - the device must be determined (its Device ID will appear).
  4. Select firmware mode: clean all – complete cleaning (recommended for changing the version of MIUI). clean all and lock – cleaning + lock the bootloader (use if you want to return the stock firmware and block the bootloader back). save user data – save user data (does not always work correctly).

Start the firmware:

  • Press Flash and wait until it is completed (usually 5-15 minutes).
  • At the end of the phone will automatically restart.

Make sure the loader is unlocked|Download the correct version of Fastboot ROM|Disable antivirus and firewall|Use the original USB-cable|Charge your phone at least 60%-->

If the process is stuck in the waiting for device phase, check:

  • πŸ”Œ Connecting a cable (try another port or cable).
  • πŸ–₯️ Correct driver installation (Device Manager should display Android Bootloader Interface).
  • πŸ“ The path to firmware (there should be no Cyrillic symbols or spaces).
What if Mi Flash can’t see the device?
1. Reinstall drivers manually through Device Manager (select Update driver β†’ Search for drivers on this computer β†’ Select from the list β†’ Android Bootloader Interface). 2. Try running Mi Flash on behalf of the administrator. 3. Disable the driver signature in Windows (enable Test Mode via command line: bcdedit /setsigning on). 4. Use another computer (sometimes conflicts with the software prevent you from identifying the device).

Common mistakes and their solutions

Even with accurate follow-up, users often encounter errors, and here is a list of the most common problems and ways to fix them.

Mistake.Reason.Decision
This device is lockedThe bootloader is not unlockedUse the Mi Unlock Tool to unlock the device
critical errorConflict with antivirus or driversDisable the antivirus, reinstall the drivers, try another PC
flash not doneIncorrect firmware mode or damaged firmwareCheck the integrity of the archive, select clean all
waiting for deviceProblems with connection or driversCheck the cable, USB port, reinstall the drivers
anti-rollback checkTrying to stream an older version of MIUIUpdate to the latest version before rolling back

The anti-rollback check error deserves special attention. Xiaomi has implemented an anti-rollback mechanism that blocks the installation of older versions of the firmware. If you try to flash a version older than the one already installed, the phone can permanently lose its functionality without the possibility of recovery even in the service center.

  • πŸ“Œ Always check the Anti-Rollback version in the firmware name (e.g, V12.0.1.0.QJGCNXM | Anti-4).
  • πŸ“Œ Do not flash a version with a lower Anti-Rollback number than the current one.
  • πŸ“Œ To roll back, first upgrade to the latest version, then perform a reset.

πŸ’‘

If you see an anti-rollback check error, NEVER continue the firmware β€” it will lead to an irreversible brick. Instead, download a newer version of MIUI with the same or higher Anti-Rollback number.

Recovery after a failed firmware

If the firmware failed and the phone doesn’t turn on (hang on the Mi logo or doesn’t respond to buttons), try the following steps:

  1. Repeat the firmware: Connect the phone in Fastboot mode (if it is detected). Repeat the process in Mi Flash with the same firmware file.
  2. Use the regimen. EDL: If Fastboot is not available, try to put the device in mode. EDL (Emergency Download Mode) using a test point or adb reboot edl (if ADB It was on. It was for firmware in EDL You will need an authorized Xiaomi account (usually available only at service centers).

Please contact the service center:

  • If the phone is not detected in either Fastboot or EDL, it is impossible to restore yourself, in which case only the official Xiaomi service will help.

In EDL mode, firmware is run using the Mi Flash Pro or QFil tool, but this requires an auth file (authorization from Xiaomi). Without it, the firmware is blocked at the authentication stage.

⚠️ Note: Buying auth files from third parties on forums or marketplaces is fraught with fraud. Xiaomi does not provide these files to end users - only authorized service centers can get them.

FAQ: Answers to Frequent Questions

Can I flash Xiaomi with a locked bootloader without unlocking?
No, officially, it's not possible. The Mi Flash Tool requires an unlocked bootloader to install the firmware in Fastboot mode. The only legal way is to go to Xiaomi's service center, where they will sew the device through EDL with authorization.
What happens if you flash Chinese firmware onto a global device?
The device will work, but there will be problems: No Google services (you will have to install manually); Mobile network malfunction (possible problems with 4G/LTE); GPS and some sensors errors; Inability to update via OTA; Recover global firmware will require re-routing through Mi Flash.
How do I know if my Xiaomi bootloader is unlocked?
Turn off the phone, then press Volume Down + Power to enter the Fastboot. If you see Unlocked at the bottom of the screen and an open lock, the bootloader is unlocked. If Locked and the lock is closed, it's locked.
Can I flash Xiaomi through TWRP with a blocked bootloader?
No. TWRP requires an unlocked bootloader, and without that, you can't boot into a custom recaveri even if you can install it through a Fastboot (the phone just ignores it and loads it into a stock recave).
How long does it take to unlock a bootloader in 2026?
The timeline depends on Xiaomi’s policy: new accounts are 7-15 days (sometimes up to 30 days); old accounts (which are more than 30 days connected to the device) are 3-7 days; if you previously unlocked devices on this account, the process can take 24-72 hours; you can’t speed up the process – Xiaomi servers automatically process requests.