Last updated: November 8, 2026. Mi Flash Tool (XiaoMiFlash) is Xiaomi’s own Windows program for flashing Fastboot ROMs on Xiaomi, Redmi and POCO phones. You use it to fix a bootloop, return to stock after a custom ROM, change the ROM region or do a clean install of HyperOS.
Need firmware for your phone? Find official HyperOS Recovery and Fastboot ROMs for Xiaomi, Redmi and POCO devices, for every region: Xiaomi firmware download.
Looking for Mi Flash Pro? It’s a different tool (MiAssistant mode, ROM downloads, SP Flash built in): Mi Flash Pro 7.3.706.21 download.
The latest version is MiFlash 20220507. Xiaomi hasn’t released a newer public build since then. Mi Flash runs the flash_all scripts that come inside each Fastboot ROM.
Download Mi Flash Tool
| Version | Release | Size | Download |
|---|---|---|---|
| MiFlash 20220507 (latest, portable ZIP) | May 2022 | 93.8 MB | Download MiFlash 20220507 |
| MiFlash 7.4.25 (legacy installer) | April 2017 | 46.6 MB | Download 7.4.25 |
SHA-256 of MiFlash20220507.zip:f9b20fae4b031d94fd2f2fbd8be7b7dd96010ec3212292416b8bc3cddf4b4b50
This is the hash of the file on our server. Compare it after downloading (PowerShell: Get-FileHash MiFlash20220507.zip).
Only use 7.4.25 for very old phones (around 2017 and older) if the new version gives errors. For newer phones, use 20220507.
Before You Start
- Unlocked bootloader. Mi Flash can’t flash a phone with a locked bootloader in Fastboot mode. See our HyperOS bootloader unlock guide.
- The right Fastboot ROM for your exact model. It is a
.tgzfile (about 6–14 GB), not the.zipRecovery ROM. Check your codename withfastboot getvar product. - A Windows 10/11 PC, a good USB cable and a USB 2.0 port if possible.
- A charged phone. Charge it before you start.
- A backup. Clean all erases everything on the phone.
How to Install Mi Flash 20220507
- Extract the ZIP to a short path without spaces, for example
C:\MiFlash. - Run
XiaoMiFlash.exeas administrator. There is no installer, the tool is portable. - On first start, click Driver → Install to add the Xiaomi/Qualcomm USB drivers. If Windows asks to trust the drivers, confirm.
- Restart the PC if the drivers were newly installed.
How to Flash a Fastboot ROM with Mi Flash
- Extract the Fastboot ROM
.tgzwith 7-Zip (usually twice:.tgz→.tar→ folder). Move the folder to a short path likeC:\rom. The folder must containimagesandflash_all.bat. - Turn the phone off, hold Power + Volume Down until the Fastboot screen appears, and connect it to the PC.
- In Mi Flash, click Select and choose the ROM folder (the one with
flash_all.bat, not theimagesfolder). - Click Refresh. Your phone should appear with a serial number.
- Pick a mode at the bottom right: Clean all (wipes data, recommended for region changes and fixing bootloops), Save user data (keeps data, only for the same region and a newer version), or Clean all and lock (see the warning below).
- Click Flash. Don’t touch the cable until the status shows success. It usually takes 5–15 minutes. The phone reboots by itself, and the first boot can take up to 10 minutes.
Warning: only use Clean all and lock with an official, unmodified Fastboot ROM that matches the hardware: a China ROM on a China unit, or any official international ROM (Global, EEA, Russia and others) on an international unit. Never relock with a China ROM on an international unit, an international ROM on a China unit, a modified ROM, a custom recovery or root. Don’t relock a phone that was unlocked with an unofficial exploit. A wrong relock leaves the phone unbootable. If it still reaches Fastboot, you can unlock it again with Mi Unlock (this wipes it). Otherwise only an authorized EDL repair helps.
Common Mi Flash Errors and Fixes
| Error | Cause and fix |
|---|---|
| Mismatching image and device | The ROM is for a different model. Check fastboot getvar product and download the ROM for that codename. |
| Current device antirollback version is greater than this package | Anti-rollback protection: you are trying to install an older ROM than allowed. Use a ROM with the same or a higher anti-rollback index. Don’t edit flash_all.bat to skip this check: on phones that enforce anti-rollback, that can hard-brick the phone. |
| Erase is not allowed in Lock State / Flashing is not allowed in Lock State | The bootloader is locked. Unlock it first with Mi Unlock. |
| Can not found file flash_all.bat | You selected the wrong folder. Pick the folder that directly contains flash_all.bat. |
| Length cannot be less than zero | The path contains spaces or non-English characters. Move MiFlash and the ROM to C:\MiFlash and C:\rom. |
| Phone not shown after Refresh | Driver is missing. Use Driver → Install in Mi Flash or the Google USB driver from our ADB & Fastboot page. Try another port and cable. |
| Stuck at flashing for a long time | Some partitions (super, userdata) are large, so wait 15 minutes. If nothing moves, reconnect to a USB 2.0 port. AMD Ryzen PCs often lose the phone in Fastboot. 4PDA’s unlock FAQ links a registry fix, or use a PC with an Intel CPU. |
| Sign-in prompt, authentication failed or Unauthorized for this operation (EDL) | The phone is in EDL (9008) mode. On most models from 2018 on, EDL needs a Xiaomi-authorized account. Use Fastboot mode instead if the phone can still reach it. See our Qualcomm 9008 guide. |
Mi Flash Alternatives
- flash_all.bat inside the ROM folder: run it with Platform Tools in the path. It does the same thing as Clean all in Mi Flash.
flash_all_except_storage.batkeeps your data, andflash_all_lock.batwipes the phone and relocks the bootloader. Only use it under the conditions in the warning above. - Recovery ROM + Choose update package: no PC and no unlock needed, but only for the same region. If the option is missing, tap the HyperOS logo 7–10 times. Pilot builds are often refused. Never use a China ROM on an international phone. Example: Xiaomi 17 HyperOS 4 update guide.
- Mi Flash Pro / Mi Assistant: can install an official Recovery ROM of the same region through Connect with MiAssistant, even on a locked phone. It checks the package and refuses ROMs older than the phone allows. Back up first.
FAQ
Does Mi Flash work on Windows 11?
Yes. Run it as administrator and install the drivers from the Driver menu. If the drivers are rejected, temporarily disable driver signature enforcement.
Is there a Mi Flash for Mac or Linux?
No. On Mac and Linux, run the flash_all.sh script from the Fastboot ROM folder with Google’s Platform Tools.
Do I need Mi Flash for MediaTek phones?
Fastboot flashing works the same on MediaTek models. For BROM/EDL-level repairs on MediaTek, Xiaomi uses SP Flash Tool, which also needs an authorized account on newer models.
Sources: 4PDA Xiaomi FAQ, Dima_Apatity (2, 3, 4); 4PDA unlock FAQ, devserg / Temnik_777.
Xiaomi firmware & news on Telegram
New firmware, HyperOS 4 rollout updates, guides and Xiaomi news, all in one channel.

