How to Flash Xiaomi Firmware Using Mi Flash Tool (Complete Guide)
Mi Flash Tool is Xiaomi's official Windows utility for flashing MIUI Fastboot ROMs onto any Xiaomi, Redmi, or POCO device. This guide walks you through the entire process โ from unlocking your bootloader to a successful first boot โ with troubleshooting for the most common errors.
Pre-Flight Checklist
Complete ALL items before proceeding. Skipping any step increases the risk of bricking your device.
-
Backup all data (contacts, photos, apps, internal storage)Mi Flash Tool wipes your device completely. Use Mi Cloud, Google Backup, or manually copy files to your PC before proceeding.
-
Battery charged to at least 60%A dead battery mid-flash is one of the most common causes of a soft brick. Charge your device fully if possible.
-
Downloaded Mi Flash Tool (latest version from xiaomiflashtools.com or official Mi source)Use Mi Flash Tool 2020.3.14 or newer. Always download from a trusted source โ avoid third-party mirrors.
-
Downloaded correct MIUI Fastboot ROM for your exact deviceMust be the Fastboot ROM (.tgz), NOT the Recovery ROM (.zip). Verify the codename matches your device (e.g., redmi_note12, marble, whyred).
-
Xiaomi USB Drivers installed on PCInstall the Xiaomi ADB/Fastboot drivers. Without them, Mi Flash Tool will not detect your device.
-
Bootloader unlocked on the deviceMi Flash Tool requires an unlocked bootloader. If not unlocked yet, apply via Mi Unlock Tool (wait period of up to 7 days applies). The "clean all" option can flash to a locked bootloader but will not work for custom ROMs.
-
PC running Windows 7, 8, 10, or 11 (64-bit)Mi Flash Tool is Windows-only. Linux/macOS users should use fastboot command-line tools instead.
-
Disabled antivirus temporarily (including Windows Defender)Antivirus software sometimes blocks Mi Flash Tool from writing to your device or interferes with USB driver communication.
Guide Steps
Run the Mi Flash Tool installer (MiFlash_Setup_xxx.exe) as Administrator. The installer automatically includes Xiaomi USB drivers and Qualcomm HS-USB drivers required for fastboot communication.
After installation, open Device Manager (Win + X โ Device Manager) to verify the driver was installed. You should see no error entries under "Universal Serial Bus Controllers" after a successful install.
Download the correct Fastboot ROM for your Xiaomi device from xiaomifirmwareupdater.com or the official MIUI firmware archive. The file will be a .tgz archive, typically 2โ5 GB in size.
To identify the correct ROM, go to Settings โ About Phone โ MIUI Version and tap repeatedly to enter developer info. Note your device codename (e.g., merlinx, gauguin, curtana).
Extract the .tgz using 7-Zip or WinRAR. After extraction, the folder structure should look like:
images/โ contains all partition images (boot.img, system.img, vendor.img, etc.)flash_all.batโ batch script for command-line flashingflash_all_except_storage.batflash_all_lock.bat
images/ folder.Power your device off completely. Once it is fully off, enter Fastboot Mode using:
- Standard Xiaomi fastboot combo: Hold Power + Volume Down simultaneously for 5โ8 seconds.
The screen will display the Mi Bunny / FASTBOOT logo โ a small cartoon rabbit with the word "FASTBOOT" underneath. This confirms you are in fastboot mode.
adb reboot bootloader from a command prompt while the device is connected and powered on.Connect your device (already in Fastboot mode) to your PC using a USB cable. Use the original Xiaomi cable or a high-quality data cable โ charge-only cables will not work.
Open Mi Flash Tool (right-click โ Run as Administrator). After a moment, your device serial number should appear in the device list at the bottom of the Mi Flash Tool window.
If the device does not appear:
- Open Device Manager and look for a Qualcomm HS-USB QDLoader 9008 or Android Bootloader Interface entry
- If it shows with a yellow warning icon, right-click โ Update Driver โ point to the Mi Flash Tool driver folder (
C:\Xiaomi\Xiaomi Flash\Driver) - Try a different USB port (USB 2.0 ports often work better than USB 3.0 for fastboot)
- Click the Refresh button in Mi Flash Tool
In Mi Flash Tool, click the \"Select\" button (folder icon). Browse to the folder where you extracted the Fastboot ROM โ select the root folder that contains the images/ subfolder and the flash_all.bat files.
Mi Flash Tool will scan the folder and display the ROM path in the text field. You should see the device listed in the device panel below.
images/ subfolder itself โ select the parent folder containing it. If you select the wrong folder, Mi Flash Tool will show an error when you try to flash.At the bottom of Mi Flash Tool, choose one of three flash modes:
- Clean all โ Wipes everything including user data and flashes the full ROM. Recommended for most users. Use this if you are fixing a bootloop, upgrading firmware, or doing a fresh install.
- Clean all and lock โ Same as Clean all but also re-locks the bootloader after flashing. Use this only if you want to return to a fully stock, locked state (e.g., for warranty purposes). You will not be able to flash custom ROMs after this without unlocking again.
- Save user data โ Flashes firmware partitions only, attempts to preserve user data. Not recommended unless you are doing a minor update and fully understand the risks. Can cause issues if upgrading across major MIUI versions.
Verify everything one more time:
- Your device serial number is visible in Mi Flash Tool
- The ROM path is correctly set
- You have selected the correct flash mode
Click the Flash button. Mi Flash Tool will begin flashing all partitions. You will see a progress bar and status log at the bottom showing each partition being written (system, vendor, boot, recovery, etc.).
The process typically takes 5โ20 minutes depending on ROM size and USB speed.
- Unplug the USB cable
- Press any buttons on your phone
- Close Mi Flash Tool
- Put your PC to sleep or let its battery die
When flashing is complete, the Mi Flash Tool log will display:
- A green bar next to your device in the list
- The status message: "Flash done" or "success"
If you see a red bar or error message, do NOT disconnect your device. Note the error message, check the Troubleshooting section below, and retry.
After a successful flash, your device will reboot automatically into the MIUI setup screen. The first boot takes 5โ15 minutes while MIUI optimises apps and sets up the system for the first time. This is completely normal.
Do not panic if the boot animation plays for longer than usual โ just let it complete. Once setup appears:
- Select your language and region
- Connect to Wi-Fi and sign into your Mi Account
- Complete the MIUI setup wizard
- Restore your data from Mi Cloud or Google Backup
Congratulations! Flash Successful!
You've successfully completed all steps. Your device should now be running the new firmware. If it's booting normally โ you're done! Check the troubleshooting section below if you encounter any issues.
Troubleshooting & FAQ
Common errors and their solutions. Read this before asking for help.
This usually means one of the following:
- Wrong ROM folder selected โ you must select the parent folder containing
images/andflash_all.bat, not theimages/subfolder itself. - Bootloader is locked โ Mi Flash Tool with "Clean all" requires an unlocked bootloader. If you used "Clean all and lock" on a previous flash, unlock it again via Mi Unlock Tool.
- Wrong ROM for your device โ double-check the device codename. Flashing the wrong ROM is one of the most common mistakes.
- Corrupt ROM file โ re-download the Fastboot ROM and verify the SHA-256 checksum if provided.
Try these steps in order:
- Make sure your device is in Fastboot mode (Mi Bunny logo on screen)
- Reinstall Xiaomi USB Drivers from the Mi Flash Tool install directory (
C:\Xiaomi\Xiaomi Flash\Driver) - Try a different USB cable (must be a data cable, not charge-only)
- Switch to a USB 2.0 port โ USB 3.0 ports (blue) sometimes cause detection issues
- Run Mi Flash Tool as Administrator
- Check Device Manager for a "Qualcomm HS-USB QDLoader" or "Android Bootloader Interface" entry with a yellow warning icon, and manually update the driver
A bootloop after flashing with Mi Flash Tool usually has one of these causes:
- Wrong ROM used โ verify your device codename exactly and download the matching ROM. Even similar devices like Redmi Note 11 and Note 11S have different codenames.
- Flash was interrupted or incomplete โ re-flash using "Clean all" mode. Do not use "Save user data" for this recovery attempt.
- ROM is corrupted โ delete the downloaded file and re-download. Verify the file size matches the source listing.
Do NOT let the device sit in a bootloop for extended periods โ repeated reboot attempts can drain the battery faster than it charges.
This error typically appears when:
- You are trying to flash an A/B (seamless update) ROM on an A-only device, or vice versa
- The ROM partition table does not match your device's hardware
Check your device's partition scheme: A/B devices have no separate recovery partition listed in fastboot getvar all. Download a ROM that matches your device's slot configuration.
For the "Clean all" mode, yes โ the bootloader must be unlocked. This is the mode most users will use.
The "Clean all and lock" mode can flash to a locked bootloader, but only with official MIUI Fastboot ROMs from Xiaomi. This is mainly used by service centers to restore devices to factory state.
To unlock your bootloader, use the official Mi Unlock Tool and apply at unlock.update.miui.com. Note: Xiaomi enforces a mandatory waiting period (168 hours / 7 days for most devices) before the unlock is granted.
If the progress bar stalls for more than 10 minutes:
- Do NOT force-close Mi Flash Tool or unplug the cable yet โ wait a full 10 minutes first as some large partitions (system, vendor) take time
- If still frozen after 10+ minutes, it is safe to close Mi Flash Tool and reboot your device into fastboot mode again (hold Power + Vol Down)
- Try using a different USB cable and port
- Re-extract the ROM to a path with no spaces or special characters (e.g.,
C:\MiROM\) - Temporarily disable antivirus and Windows Defender real-time protection
No. Mi Flash Tool flashes firmware only โ it does not bypass Mi Account (Find My Device / MIUI Account lock) or Google FRP. After flashing with "Clean all", you will still need to sign into the previously linked Mi Account on first boot if the device was locked.
If you have purchased a second-hand Xiaomi device and it asks for a Mi Account you don't know, this requires contacting Xiaomi support with proof of purchase โ it cannot be bypassed by re-flashing.
In most cases, yes โ as long as the hardware codename is identical. Many Xiaomi devices are sold in China and Global variants with the same hardware but different software regions.
For example, you can flash a Global ROM onto a China Redmi Note 12 if the codename is the same. However, some devices have hardware differences between regions (different modem bands, NFC, etc.) โ always verify your exact model on kimovil.com or the XDA Developers forum before cross-region flashing.
Common causes and fixes:
- Missing Visual C++ Redistributable โ Install Visual C++ Redistributable 2017 x64 and x86 from Microsoft
- .NET Framework โ Ensure .NET Framework 4.6.1 or newer is installed
- Antivirus blocking launch โ Add Mi Flash Tool folder to antivirus exclusions
- Run as Administrator โ Right-click the Mi Flash Tool shortcut โ Run as administrator
- Try an older version โ Some newer Mi Flash Tool versions have compatibility issues on certain Windows builds. Try version 2018.5.28.0 or 2019.2.26.0 as a fallback