Xiaomiβs Mi Flash Tool is the official tool for flashing the brandβs smartphones through EDL (Emergency Download Mode) and Fastboot modes, which allows you to restore the device to work after crashes, update the software to the latest version or even bring the brick back to life. However, careless actions can turn the phone into a useless piece of plastic β especially if it is about blocking the bootloader on new models after 2021.
In this article, you will find step-by-step picture instructions, a clear all-clean all-lock, Save User Data, and solutions to common bugs like Invalid image format or Flash not done. We'll show you how to prepare your computer, where to download the right drivers, and why the Mi Flash Tool might not see your device. If you've never flashed your smartphone before, start with the risk and preparation section.
What is Mi Flash Tool and Why You Need It?
Mi Flash Tool is the official utility from Xiaomi, designed for low-level firmware devices via Fastboot (boot mode) or EDL (emergency mode for "brick" phones, unlike the standard OTA-Update, it allows for:
- π Restore your phone after a failed firmware or system failure;
- π± Swipe custom software (e.g. Xiaomi.eu or LineageOS) if the bootloader is unlocked;
- π Return the stock firmware and lock the bootloader (on some models);
- π οΈ Avoid errors like endless boot or bootloop".
The main difference between Mi Flash and alternative tools (like Fastboot Enhance or SP Flash Tool) is support for official firmware in.tgz or.zip format, which are downloaded from Xiaomi servers.
- β οΈ Does not work with devices on Mediatek processors (for them you need to use them) SP Flash Tool);
- β οΈ Requires an unlocked bootloader for most operations (except for the EDL);
- β οΈ Can block the bootloader on new models (Redmi Note 10, POCO X3 Pro and newer, if you choose the wrong mode.
Firmware Preparation: What to Do Before Mi Flash Launch
Before you open the Mi Flash Tool, make sure you follow all the preliminary steps. 90% of firmware errors are due to improper preparation.
Download the correct firmware version for your model
Install drivers (Qualcomm or Fastboot)
Unlock the loader (if required)
Charge your phone at least 50%
Disable the antivirus (it can block the utility)
-->
One is to design your device.
- Go to Settings β About the phone β Model;
- Remember the full name (e.g., Redmi Note 9 Pro is joyeuse, and POCO X3 NFC is surya).
Next, download the firmware. Official files are taken from the sites:
- π Official archives MIUI (Choose Fastboot or Recovery);
- π Xiaomi Firmware Updater (alternative source with the latest versions).
Important: The firmware must match the device code (e.g, joyeuse_global For the global version of Redmi Note 9 If you download a file for another modification (e.g, joyeuse_in For the Indian version, the phone may lose the network or not turn on at all.
β οΈ Note: On Xiaomi models 2022-2026 (e.g. Redmi Note 12, POCO F5) The firmware through Mi Flash with Clean All and Lock option will lock the bootloader permanently. Unlock it back will be impossible without an authorized service center.
Installation of drivers and setting up Mi Flash Tool
Without the right Mi Flash Tool drivers, your device wonβt see it. ADB/Fastboot, which are installed with Android SDK. For EDL-The mode will require a Qualcomm driver HS-USB QDLoader 9008.
Download the archive with drivers at this link (choose the version for your OS) and install them manually:
- Connect your phone in EDL mode (how to do this β see the next section).
- Open Device Manager in Windows;
- Find a device with a yellow exclamation mark (usually) QHUSB_BULK qualcomm HS-USB Diagnostics);
- Update the driver manually by specifying the folder with the downloaded files.
After installing the drivers:
- Download the Mi Flash Tool from the official website (select the latest version);
- Unpack the archive in a folder without Cyrillic characters (for example, C:\MiFlash);
- Launch XiaoMiFlash.exe on behalf of the administrator.
In the utility interface, you will see three main buttons:
- Refresh β Update the list of connected devices
- Select - select a folder with firmware;
- Flash, start firmware.
π‘
If the Mi Flash Tool doesnβt see your phone in Fastboot, try switching to another one. USB-port (preferably) USB 2.0) or disable all other USB-device.
Clean All, Clean All and Lock, Save User Data
The Mi Flash Tool has three major firmware modes, and choosing the wrong one can lead to data loss or locking the bootloader.
| Regime. | Description | When to use | Risks. |
|---|---|---|---|
| Clean All | Complete cleaning of all partitions (including userdata) and firmware | If the system fails, switch to another version of MIUI | All data (photos, apps, settings) are deleted |
| Clean All and Lock | Cleaning + firmware + locking the loader | Only to return to stock firmware before selling | The bootloader will be locked permanently on new models |
| Save User Data | Firmware without cleaning the userdata partition | Update without losing data | It can cause errors if the MIUI version is very different. |
On most Xiaomi devices in 2020 and older (e.g. Redmi Note 8 Pro, Mi 9T) you can safely use Clean All. But on new models (Redmi Note 11, POCO X4 Pro and later), choosing Clean All and Lock will lead to irreversible locking of the bootloader.
If you are flashing custom firmware (e.g. Xiaomi.eu), always choose Clean All. Save User Data is suitable for official updates without loss of data, but only if:
- π Current and new version MIUI Compatible (e.g., update to the MIUI 13 on MIUI 14);
- π The device was not unlocked via Fastboot (otherwise errors are possible).
β οΈ Note: On certain devices (e.g, POCO F3 or Redmi K40) Save User Data mode can lead to a logo hanging MI. In this case, you will have to re-shoot with complete cleaning.
Step-by-step: how to flash Xiaomi through Fastboot
Fastboot firmware is the most common method, as it does not require special cables or transitions to EDL.
- Turn off your phone and press Volume Down + Power to enter the Fastboot (a bunny with the inscription Fastboot will appear on the screen);
- Connect your phone to your PC through the original USB-cable;
- Run the Mi Flash Tool on behalf of the administrator.
- Click Select and select the folder with the unpacked firmware (it should contain files). flash_all.bat, images.);
- Select firmware mode in the lower right corner (Clean All β recommended);
- Press Refresh β your device should appear in the list.
- Click Flash and wait until it is completed (usually 5-15 minutes).
If the process is suspended on Waiting for device:
- π Try another one. USB-port USB 2.0);
- π Reinstall the Fastboot drivers;
- π± Reboot your phone in Fastboot again.
Once the firmware is successful, the phone will automatically restart. The first turn on can take up to 10 minutes - don't turn it off or turn it off from charging.
What to do if Mi Flash shows a βFlash Not Doneβ error
Firmware through EDL: when you need and how to enter the mode
EDL (Emergency Download Mode) is an emergency mode for firmware for βbrickβ phones that are not turned on or defined in Fastboot. It works at the Qualcomm processor level and allows you to restore the device even after unsuccessful partition manipulations.
To enter the EDL, there are several ways:
- π§ Hardware method: Turn off the phone, press Volume up + Volume down and connect the cable to the PC (on some models you need to hold the buttons for 10-15 seconds);
- π± Enter the command fastboot oem edl (does not work on all devices);
- π Short circuit: On some models (e.g. Redmi) 4X) You need to close the test points on the board (disassembly is required).
In EDL mode, the phone is identified in Device Manager as a Qualcomm HS-USB QDLoader 9008.
Firmware via EDL is similar to Fastboot, but has nuances:
- π Use only official firmware from Xiaomi (castom may not stand up);
- π Clean All and Lock mode in EDL locks the loader to 100%;
- π In some models (POCO X3 NFC, Redmi Note 9 Pro requires an authorized Mi Account to run through the firmware EDL.
β οΈ Note: If the Mi Flash Tool is running through the firmware EDL It gives you a failed Sahara connection, which means that the phone hasn't switched to 9008 mode. EDL.
π‘
Firmware through EDL is the last chance to restore the brick, but it requires strict compliance with the instructions. If you're not sure, you better contact the service.
Typical errors and their solutions
Even with the right actions, the Mi Flash Tool can produce errors, and here are the most common ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Invalid image format | Firmware is damaged or not suitable for the model | Download the firmware again, check the device code |
| Flash not done | Mismatch of MIUI version or lock of loader | Try a different firmware version or Clean All mode |
| Device not found | Drivers are not installed or the cable is faulty | Reinstall the driver, try another one. USB-port |
| Anti-rollback check fail | Trying to stream an older version of MIUI | Find firmware with the same or newer version of Anti-Rollback |
The Anti-rollback check fail error is particularly insidious: it occurs if you try to flash a MIUI version older than the one you installed earlier, for example, if your phone was running a MIUI 14 with Anti-Rollback 5, and you're trying to put a MIUI 13 with Anti-Rollback 4, the firmware is blocked. The solution is to look for firmware with Anti-Rollback at least the current one.
If the Mi Flash Tool is on Waiting for Device:
- π Turn off all others. USB-PC-based;
- π Restart your computer and phone;
- π οΈ Install drivers manually through Device Manager;
- π Check if the firmware is blocked by antivirus (add Mi Flash to exceptions).