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.
The latest version is MiFlash 20220507. Xiaomi hasn’t released a newer public build since then, and this version works with current HyperOS 3 and HyperOS 4 Fastboot ROMs.
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
Compare it after downloading (PowerShell: Get-FileHash MiFlash20220507.zip). It must match exactly.
Only use 7.4.25 for very old phones (around 2017 and older) if the new version gives errors. For everything from the Redmi Note 7 era onward, 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.
- Battery above 50%.
- 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 the official ROM of your phone’s original region (for example a Global ROM on a Global phone). Relocking a phone that runs a different region’s ROM, a modified ROM, or a China phone unlocked by unofficial means will make it unbootable. In that case, only an authorized service center can repair it.
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 the same or a newer version. Never bypass this check, it hard-bricks 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. On AMD Ryzen PCs, a USB 2.0 hub often helps. |
| Authentication required / Not authorized (EDL) | The phone is in EDL (9008) mode, which needs a Xiaomi-authorized account on most models. 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.batrelocks the bootloader. - Recovery ROM + Choose update package: no PC and no unlock needed, but only for the same region. Example: Xiaomi 17 HyperOS 4 update guide.
- Mi Flash Pro / Mi Assistant: can reinstall the stock ROM in Mi Assistant mode on a locked phone, but only the latest official ROM for the region, and it wipes data.
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.

