Xiaomi firmware via Fastboot: a complete guide to unlocking the bootloader

Fastboot is the most reliable way to install official or custom software when standard methods don’t work through Recovery, a method that requires unlocking the bootloader, but gives you full control of the device, from recovery after a β€œbrick” to installing global versions of the MIUI on Chinese devices. Unlike the OTA- updates, Fastboot overwrites all memory partitions, which guarantees the stability of the system.

But the process has nuances: wrong actions can turn a smartphone into a brick, and mistakes when unlocking a bootloader can lock it forever. In this article, we will examine the step-by-step instructions for Redmi, POCO and Mi models, current for 2026, taking into account the latest changes in Xiaomi policy (including mandatory binding Mi Account and restrictions on unlocking), and consider typical errors – from anti-rollback to driver problems – and how to solve them.

1. Firmware Preparation: What to Do Before Starting

Before you put your smartphone into Fastboot mode, make sure all the preliminary steps are followed. Skipping at least one item can lead to the inability to unlock the bootloader or loss of data without the possibility of recovery.

  • πŸ“± Check the device model: firmware for the Redmi Note 12 and POCO X5 are not compatible, even if they share the same platform (e.g., snake). You can find out the exact model in Settings β†’ About Phone β†’ Model or through the fastboot getvar product command.
  • πŸ”“ Unlock the bootloader: without this, it is impossible to flash the device through Fastboot. Xiaomi requires an account to be tied to Mi and wait (7 to 360 hours) before unlocking.
  • πŸ’Ύ Save data: Fastboot erases all partitions, including /data (photos, messages, apps). Use Mi Mover or manual copying on your PC.
  • πŸ–₯️ Install drivers: Windows will require Mi Flash Tool and drivers Qualcomm/Mediatek (depending on the processor). macOS/Linux requires sudo rights to run fastboot.

Pay special attention to the MIUI version: if you are running an older version than the one installed now, anti-rollback protection will work and the device will lock. Check version compatibility on MIUI Downloads (Anti-Rollback Version section).

πŸ“Š What Xiaomi model are you using?
Redmi (Note/Pro/K-series)
POCO (F/X/M-series)
Mi (11/12/13-series)
Another model

2. Unlocking the bootloader: a step-by-step process

Since 2023, Xiaomi has tightened the rules for unlocking: it now requires linking a Mi Account to a device and waiting (3 to 15 days), the process consists of three stages: linking an account, requesting permission and actually unlocking.

Enable USB debugging in Settings β†’ About Phone β†’ MIUI version (click 7 times)

Connect your Mi Account to Settings β†’ Xiaomi account

Attach the device to the account in Settings β†’ Additional β†’ Special. features β†’ Unlocking state

Install Mi Unlock Tool from the official website-->

Step 1: Account binding

  1. Go to Settings β†’ Xiaomi Account and log in.
  2. Enable data synchronization (required!).
  3. Open Settings β†’ Additional β†’ Special. features β†’ Unlock state and link the device to your account. If the button is inactive, upgrade MIUI to the latest version.

Step 2: Requesting permission

Download Mi Unlock Tool from the official website (torrent versions may contain viruses). Launch the utility, log in and connect your smartphone in Fastboot mode (click Volume Down + Power). The program will show a waiting timer - from 72 hours (for new accounts) to 360 hours (if previously blocked devices).

⚠️ Warning: If you previously unlocked the bootloader on another device and blocked it (for example, due to a failed firmware), Xiaomi may permanently disable unlocking for your account, in which case you will need to create a new account with a different phone number.

Step 3: Unlocking

Once the timer has expired, reconnect to the Mi Unlock Tool. If the process is successful, the word Unlocked will appear in the status bar. You can now flash the device. If there is a Couldn't unlock error:

  • Check that you are using the original USB- cable (not all cables support data transmission).
  • Disable the antivirus, it can block the Mi Unlock Tool.
  • Try another PC or Windows version (on macOS/Linux, the utility is unstable).

3. Selection of firmware: official vs custom

Firmware for Xiaomi is divided into three types: official (from Xiaomi), port (adapted for other models) and custom (for example, LineageOS, Pixel Experience). For beginners, we recommend official firmware - they are more stable and do not require additional manipulation.

Type of firmwareAdvantagesDeficienciesWhere to download
Official (Fastboot)Stability, OTA support, warranty maintainedThere may be additional applications, regional restrictionsMIUI Downloads
Official (Recovery)Easy to install, no data erasingNot suitable for recovery after the "brick"MIUI Downloads
Castomic (AOSP)Clean Android, no ads, frequent updatesCamera, NFC, encryption may not workXDA Developers
Port (for other models)New features on older devicesHigh risk of "brick," iron bugsTelegram channels

For Fastboot, download files with the.tgz or.zip extension (for Mi Flash Tool). Pay attention to the device's code name (for example, vili for Redmi Note 11 Pro+) - it should match the folder name in the archive. If you are flashing the global version on a Chinese device, check network support (some models lose 5G after firmware).

πŸ’‘

Before downloading the firmware, check its hash (MD5/SHA1) on VirusTotal. Fake firmware may contain malware masquerading as system files.

4. Install firmware through Mi Flash Tool

Mi Flash Tool is Xiaomi’s official Fastboot firmware utility. It supports all models on Qualcomm and Mediatek platforms, but requires proper configuration. Below is a step-by-step instruction for Windows (on macOS/Linux, use fastboot in the terminal).

Step 1: Preparation of the utility

  1. Download the Mi Flash Tool from the official website (version no lower than 2023.4.1).
  2. Unpack the firmware archive into a folder without Cyrillic characters (e.g., C:\MIUI\vili_global).
  3. Install drivers from the MiFlash\Driver folder (QDLoader for Qualcomm, MTK USB for Mediatek).

Step 2: Firmware of the device

  1. Turn off your smartphone and transfer it to Fastboot (clip Volume Down + Power).
  2. Connect to your PC and run the Mi Flash Tool on behalf of the administrator.
  3. Click Select and point the way to the firmware folder.
  4. Select firmware mode: Clean all - complete cleaning (recommended for changing the region); Clean all and lock - cleaning + lock bootloader (only for official firmware!); Save user data - data storage (not always stable).

Flash

Step 3: First launch

Once the firmware is in place, the device will automatically restart. It can take up to 15 minutes to launch the first time, don't interrupt the process! If the smartphone has been stuck on the MI logo for more than 20 minutes:

  • Try resetting the settings via Recovery (Loudness up + Power).
  • Repeat the firmware with the choice of Clean all.
  • Check firmware compatibility with anti-rollback (see the error section).
What if the Mi Flash Tool can’t see the device?
1. Check USB connection: try another port (preferably USB 2.0) and cable. 2. Update drivers through Device Manager (remove the old device and reconnect). 3. Run Mi Flash Tool in Windows 7. 4 compatibility mode. Disable driver signature in Windows (CMD command: bcdedit/set nointegritychecks on).

5. Firmware through fastboot manually (for experienced)

If the Mi Flash Tool doesn’t work (e.g. on macOS) or you need flexibility (e.g. firmware for individual partitions), use fastboot commands in the terminal.This method requires knowledge of the firmware structure and caution – a mistake in the command can lead to loss of IMEI or damage to the bootloader.

Step 1: Unpacking the firmware

Xiaomi’s official Fastboot firmware is an archive with image files (.img) for each section. Unpack the archive and check for key files:

boot.img


system.img




vendor.img




dtbo.img




vbmeta.img

Step 2: Firmware by section

Open the terminal (or CMD on Windows) and execute commands in turn. Example for the Redmi Note 10 Pro firmware (sweet):

fastboot flash boot boot.img


fastboot flash dtbo dtbo.img




fastboot flash recovery recovery.img




fastboot flash system system.img




fastboot flash vendor vendor.img




fastboot flash vbmeta vbmeta.img




fastboot erase userdata




fastboot reboot

Step 3: Integrity Testing

After the firmware check the performance of the key functions:

  • πŸ“Ά Network: If there is no signal, swipe modem and fsg sections separately.
  • πŸ“· Camera: If it doesn't work, check the firmware compatibility with your device revision (e.g. Redmi Note 9 Pro has joyeuse and curtana versions).
  • πŸ”‹ Charging: If the battery is not detected, swipe the battery partition or reset the settings via Recovery.

⚠️ Warning: Don't flash the persist partition manually, which can cause the IMEI and MAC- addresses to be lost. If it's damaged, restore it from the backup or through the official firmware in the Mi Flash Tool.

Typical errors and their solutions

Even with the right instructions, there can be errors, and here are the most common problems and ways to fix them.

Mistake.Reason.Decision
anti-rollback check failTrying to flash the old version of MIUIUse firmware with the same or newer anti-rollback version (check on xiaomi.eu)
device is lockedThe bootloader is not unlockedRepeat unlocking via Mi Unlock Tool or scrolle through the official firmware with the clean all and lock option
invalid sparse file formatThe file is damaged. system.imgDownload the firmware again or unpack the archive to the ext4 file system (not NTFS)
The device does not turn on after firmwareIncompatible firmware or error when writing bootSelect boot.img and dtbo.img separately or use EDL- Mode (authorized account required)
waiting for deviceDrivers not installed or USB- Ports not workingCheck the connection through fastboot devices, update drivers, or use another PC

If the error is not listed in the table, check the firmware log.

  1. Run the firmware through the CMD with the -v key (e.g., fastboot -v flash system.img).
  2. Copy the output into a text file and find a line with FAILED.
  3. Look for a solution to the error code on XDA or in telegram chats.

πŸ’‘

If after firmware smartphone got stuck on the MI logo, do not panic: in 90% of cases, resetting through Recovery (Wipe Data) helps. If it does not work, re-sweeten with the Clean all option.

7 Firmware in EDL- Mode (Emergency)

EDL- mode (Emergency Download Mode) - the last chance to restore the device, if it is not enabled and is not detected in Fastboot. This method requires an authorized Xiaomi account (for new models) or a special cable (Deep Flash Cable).

When you need an EDL:

  • The device does not respond to buttons and does not charge.
  • After a failed firmware, the smartphone is not defined in fastboot devices.
  • The bootloader is damaged.

Step 1: Transfer to EDL

For this:

  1. Turn off the device (if it does not react - wait for the battery to completely discharge).
  2. Close the contacts Test Point on the board (for each model they are different, look for schemes on XDA).
  3. Connect. USB-cable to PC – the device must be defined as Qualcomm HS-USB QDLoader 9008.

Step 2: Firmware with the Mi Flash Tool

In the Mi Flash Tool:

  1. Choose a firmware (required official for your model!).
  2. Select Clean All mode.
  3. Press Flash and wait until it is completed (the process can take up to 30 minutes).

⚠️ Warning: Firmware in EDL without an authorized Xiaomi account (for models after 2021) will result in device lock. To unlock an account for EDL, contact support with proof of purchase.

8.After firmware: setup and optimization

Once the firmware is successful, the device requires initial configuration.

  • πŸ”„ Update MIUI: Even if you have flashed the latest version, check for OTA- updates in Settings β†’ System Update.
  • πŸ”’ Enable encryption: go to Settings β†’ Additional β†’ Encryption and credits and activate encryption (will protect data when stolen).
  • πŸ“± Set up gestures: in Settings β†’ Display β†’ Full-screen display, choose a convenient way to navigate.
  • 🚫 Turn off ads: in Settings β†’ Xiaomi Account β†’ Advertising deactivate all switches.

If you have flashed the global version on a Chinese device, check:

  • Google Services (if not, install Google Installer from APKMirror).
  • 5G support (some Chinese models lose 5G after firmware global version).
  • Work NFC and IR-port (in some firmware, these functions are disabled by default).

To improve productivity:

  • Activate Game Turbo in Settings β†’ Special. features β†’ Game Turbo.
  • Turn off animations: in Settings β†’ About Phone β†’ MIUI version, click 5 times on MIUI version, then in Settings β†’ Additional β†’ For developers, set Animation = 0.5x.
  • Clear the cache: Settings β†’ Memory β†’ Clear the cache.

πŸ’‘

After firmware global version on the Chinese device may lose support for some bands 4G/5G. To return them, swipe modem and fsg partitions from the original Chinese firmware.

FAQ: Frequent questions about Xiaomi’s firmware through Fastboot

❓ Can I flash Xiaomi through Fastboot without unlocking the bootloader?
No, unlocking is mandatory. Except for the official firmware via the Mi Flash Tool with the clean all and lock option, but this only works to restore the original software.
❓ How do I find out the code name of my device?
There are several ways: Enter the adb shell command getprop ro.product.device (USB debugging required) in the terminal. Look at the box or under the battery (for collapsible models). Use the Device Info app from Google Play.
❓ What to do if there is no network after the firmware?
Causes and Solutions: Incompatible firmware: swipe modem and fsg partitions from the original firmware. IMEI: Restore it with Engineer Mode (#4636##) or SN Write Tool (requires authorization) Not available APN: Add operator settings manually to Settings β†’ SIM-maps and mobile networks β†’ Access points (APN).
❓ Can I go back to an older version? MIUI?
Technically, yes, but with reservations: If the new version has a higher anti-rollback, the rollback will lead to a "brick." To roll back, you need to flash all partitions (including the bootloader), which requires the EDL- Mode. On some models (for example, the Redmi Note 12), the rollback is impossible due to hardware protection. Before rolling back, check compatibility on Xiaomi.eu.
❓ How to flash Xiaomi on macOS or Linux?
Instructions for Unix systems: Install fastboot via brew install android-platform-tools (macOS) or sudo apt install fastboot (Linux). Unpack the firmware and go to the file folder. Run partition firmware commands (see section 5). If permission errors occur, use sudo before commands. For the Mi Flash Tool on macOS, use Wine or a Windows virtual machine.