Xiaomi Firmware via Fastboot: Full Guide from Preparation to Installation

Installing firmware through Fastboot is one of the most reliable ways to bring back to life the โ€œbrickโ€ Xiaomi smartphone, upgrade to the latest version of MIUI or upgrade to custom firmware like LineageOS. Unlike the recovery method, Fastboot works at a low level, which allows you to restore the device even when the boot partition is damaged. However, the process requires accuracy: an error at any stage can turn the gadget into a โ€œbrickโ€.

In this guide, we will look at all the steps from unlocking the bootloader to the final restart, taking into account the nuances for different models (Redmi Note 12, POCO F5, Mi 11, etc.). Particular attention will be paid to the problem of authorization of the Mi Account after the firmware, which blocks access to the device for 30% of users, and you will find a table of firmware and tools compatibility, relevant for 2026.

What is Fastboot and When to Use It

Fastboot is an Android bootloader interface protocol that allows you to install firmware, unlock the bootloader, and even repair damaged partitions. Unlike Recovery Mode, where firmware is installed via a GUI, Fastboot runs through the command line, which gives you more control but also requires technical training.

This method should be used in the following cases:

  • ๐Ÿ”„ Downgraid version MIUI (For example, 14 to 13 due to bugs).
  • ๐Ÿ› ๏ธ Recovery after failed "over-the-air" updateยป (OTA).
  • ๐Ÿš€ Installation of custom firmware (Pixel Experience, ArrowOS).
  • ๐Ÿ”“ Unlocking the bootloader for rooting or modifications.
  • ๐Ÿ’€ ยซDisticking" device that does not turn on or hung on the Mi logo.

It is important to understand that the Fastboot erases all data on the device, including internal memory (/data).So make sure to back up important files before starting the procedure. Also note that some models (Redmi K50, Xiaomi 13) have Anti-Rollback protection, which blocks the installation of older versions of firmware.

โš ๏ธ Note: If your device was purchased in China (C-suffix version in the model, for example Redmi Note 12 Pro)+C), global firmware version MIUI Fastboot will block the network (it wonโ€™t work) SIM-For such cases, you need a persist patch or firmware through EDL.

Preparation for firmware: tools and drivers

Before you start your firmware, gather everything you need, and without the right tools, you can end up with fastboot: error: cannot load, or more serious problems.

You'll need:

  • ๐Ÿ–ฅ๏ธ Computer on Windows 10/11 (for Mac/Linux Additional drivers will be required).
  • ๐Ÿ”Œ Original. USB-cable (cheap cables often donโ€™t transmit data to Fastboot).
  • ๐Ÿ“ฑ Battery charge at least 50% (when discharged during firmware, the device may turn off).
  • ๐Ÿ” Mi Account with a linked phone number (required to unlock the bootloader).

Download and install:

  1. Mi Unlock Tool (official utility for unlocking the bootloader) โ€“ link.
  2. Platform Tools (includes fastboot and adb) โ€“ download from Google.
  3. Xiaomi drivers for Fastboot (if Windows does not recognize the device) โ€“ an archive with drivers.
  4. Firmware in.tgz or.zip format (official or custom).

For official firmware use the site MIUI Downloads. Choose the version of Fastboot (not Recovery!). For example, for Redmi Note. 11 It's gonna be a file of sorts. spes_global_images_V14.0.4.0.TGCMIXM_20231012.0000.00_12.0_global_1234567890.tgz.

๐Ÿ“Š What Xiaomi model are you using?
Redmi Note 10/11/12
POCO F3/F4/F5
Mi 11/12/13
Another model
Tool.AppointmentDownload linkNotes
Mi Unlock ToolUnlocking the loaderOfficial websiteRequires authorization in Mi Account
Platform ToolsTeams fastboot and adbGoogle DevelopersUnpack to the root of the disc C:\
Xiaomi Flash ToolGraphical interface for firmwareXiaomiFlash websiteSupports only official firmware
Qualcomm driversTo recognize the device in EDLXDA DevelopersNeeded for โ€œbricksโ€ with damaged Fastboot

Unlocking the bootloader (Bootloader)

Without an unlocked bootloader, it is impossible to flash Xiaomi through Fastboot - the system simply will not accept commands for installation. The unlock process takes from 3 to 7 days due to Xiaomi restrictions (you need to wait for an SMS with confirmation).

Step-by-step:

  1. Turn on the smartphone Developer Mode: go to Settings โ†’ About Phone โ†’ MIUI version and tap 7 times on the build number.
  2. Back to Settings โ†’ Additionally. โ†’ For developers and activate: ๐Ÿ”“ Unlocking OEM (OEM Unlocking). ๐Ÿ”Œ Debugging by USB (USB Debugging).

Mi Unlock Tool

Mi Account

Fastboot

Fastboot

Wait. SMS with confirmation (usually in 72 to 168 hours), and then unlocking will take 1-2 minutes.

If the Mi Unlock Tool is a Cann't unlock error or Current account is different from the account info on the device, check:

  • ๐Ÿ“ฑ One account is used on the phone and in the tool.
  • ๐ŸŒ The account region is the same as the firmware region (e.g., a global account for a global account). MIUI).
  • โณ Enough time has passed since the account was linked to the device (at least 3 days).

โš ๏ธ Note: On some models (POCO X3 Pro, Redmi K40) When you unlock the bootloader, you get a risk warning every time you turn it on, and you can only remove it by locking the bootloader again, but it erases all the data.

โ˜‘๏ธ Preparation for unlocking the loader

Done: 0 / 4

Installation of firmware through Fastboot: a step-by-step process

When the bootloader is unlocked, you can start firmware. We'll look at two ways: through the command line (universal method) and through the Xiaomi Flash Tool (graphic interface).

This method gives full control over the process and works even with custom firmware.

  1. Unpack the archive with the firmware in the folder platform-tools (where fastboot.exe and adb.exe are located).
  2. Open the Command Prompt in this folder (Shift + right mouse button โ†’ Open the command window).
  3. Turn your phone into Fastboot mode: Turn off the device. Press Volume down + Power before the Fastboot logo appears.
fastboot devices

The serial number of the device must be displayed.

  • For official firmware (file) flash_all.bat): flash_all.bat
  • For custom firmware (alternate partition firmware): fastboot flash boot.img fastboot flash system.img fastboot flash vendor.img fastboot flash vendor.img fastboot flash dtbo dtbo.img fastboot reboot
  • Press Flash and wait until it is completed.

If the program gives you a flash not done error, check:

  • ๐Ÿ”Œ Cable and port USB (Try the port USB 2.0 on the back of the PC).
  • ๐Ÿ“ The path to firmware does not contain gaps or Cyrillic.
  • ๐Ÿ”„ Xiaomi Flash Tool (new models require version 2023)+).

๐Ÿ’ก

If the firmware is interrupted during the sending 'system' phase, try disabling the signature check in the Fastboot settings with the fastboot oem disable-verity command (does not work on all models).

Solving common errors in firmware

Even with the right instructions, there can be errors, and we've collected the most common problems and ways to solve them.

Mistake.Reason.Decision
fastboot: error: cannot load 'system.img'Damaged firmware file or not enough space on the PCDownload the firmware again, unpack it to the root of the C:\ disk.
device not foundNo drivers or cable problem installedInstall Mi Flash drivers, try another cable/port
This package is for "spes" devices; this is a ""The firmware is not suitable for your model.Check the code name of the device with the command fastboot getvar product
Anti RollbackTrying to install an old version of MIUISweep through the intermediate version first (see Anti-Rollback table)
Up to 40% Freezing in Mi Flash ToolConflict with antivirus or driversDisable the antivirus, install drivers manually through Device Manager

If the phone does not turn on after firmware or hung on the Mi logo, try:

  1. Remove and reset the battery (if removable).
  2. Press Volume up + Power for 20 seconds for forced reboot.
  3. Repeat the firmware with full cleaning (fastboot erase userdata).
What to do if you need a Mi Account password after the firmware?
If you have stitched through the official firmware and the phone is requesting the data of the old Mi Account, it means that the device is tied to the previous owner: 1. Contact the previous owner and ask to untie the device via account.xiaomi.com. 2. If your device is yours, but you forgot your password, restore access to your account through email/phone. 3. You need to bypass the lock. EDL-mode and authorized service center account (independently not recommended).

Firmware custom ROM (LineageOS, Pixel Experience)

Installing custom firmware opens up new possibilities: clean Android without MIUI, regular updates and no advertising, but the process is more complicated than with official firmware and requires additional steps.

What you need:

  • ๐Ÿ”“ Unlocked loader.
  • ๐Ÿ“ Custom firmware (e.g. LineageOS).
  • ๐Ÿ›ก๏ธ Custom Recovery (TWRP Or OrangeFox).
  • ๐Ÿ”‘ Magisk (optional, for root rights).

Instructions:

  1. Please. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_12-0-spes.img fastboot reboot recovery
  2. In TWRP, make a backup of the current firmware (optional).
  3. Sweep through custom firmware: Click Install โ†’ select a firmware file. Sweep through GApps (if you need Google services).

Wipe โ†’ Format Data

Reboot to the system.

After installing custom firmware:

  • โš ๏ธ Do not upgrade "over the airยป (OTA) โ€” This can lead to bootloop.
  • ๐Ÿ”„ For updates, download the full packages and stitch through TWRP.
  • ๐Ÿ”‹ Turn off Battery Optimization for Magisk if you use the root.

โš ๏ธ Note: On some models (Xiaomi 12, Redmi) K50) Custom firmware may not support cameras due to the closed source driver code. Before installing, check the list of supported features on the forum XDA Developers.

What to do after firmware: setup and optimization

Once the firmware is successful, it will be like new, with all the pros and cons. Here's what you should do first:

  1. Check out MIUI version: Go to Settings โ†’ About phone. Compare to the expected version (e.g. V14.0.4.0.TGCMIXM).
  2. Set up accounts: Add Google Account to sync contacts and apps. Link Mi Account (if you have stitched through the official MIUI).

Check the operation of key functions

  • ๐Ÿ“ถ Mobile network and calls.
  • ๐Ÿ“ท Camera (especially on custom firmware).
  • ๐Ÿ”‹ Fast charging.
  • ๐Ÿ”Š Speakers and microphone.

If you have a custom firmware, install:

  • ๐ŸŽฎ GCam for improved shooting (if the camera is not working properly).

For official MIUI, it is useful:

  • Disable Advertising: Settings โ†’ Memory โ†’ Clean โ†’ Advertising (or via ADB by adb shell pm uninstall --user 0 com.miui.analytics command).
  • Install Xiaomi.eu instead of the global MIUI for advanced settings.

๐Ÿ’ก

After you have firmware through Fastboot, always check the sensors (gyroscope, compass, proximity sensor) using the Sensor Test app from the Play Market. Faults may indicate improperly stitched partitions persist or vendor.

FAQ: Frequent questions about Xiaomiโ€™s firmware through Fastboot

Can I flash Xiaomi through Fastboot without unlocking the bootloader?
No, official and custom firmware via Fastboot is installed only on the unlocked bootloader, except for firmware via EDL (emergency mode), but this requires an authorized account of the Xiaomi service center.
How do I find out the code name of my device for choosing firmware?
Codename can be found by: Fastboot getvar product (Fastboot mode). Settings โ†’ About Phone โ†’ MIUI โ†’ Full Specification (Look for Model or Device string). XiaomiUI website by device model. Examples of codenames are spes - Redmi Note 12 Pro, alioth - POCO F3, venus - Xiaomi 12S.
Why is the mobile network not working after the firmware?
This problem is typical for: ๐Ÿ“ฑ Chinese-made devices with global firmware MIUI (You need to patch persist). ๐Ÿ“ก Modem-fixed models (e.g. Redmi Note 10 Pro requires a separate modem firmware). ๐Ÿ”„ Incompatible versions MIUI (Solution: run the correct modem through Fastboot or use the Xiaomi Modem Tool.
How to return the official firmware after custom?
To get back to stock. MIUI: Download Fastboot firmware for your model from the site MIUI Unpack it and swipe through the Xiaomi Flash Tool with the Clean all and lock option (this will block the bootloader back). If the bootloader is not blocked, use the command: fastboot oem lock โš ๏ธ Warning: Locking the bootloader erases all data and can result in Mi Account being blocked if the device was linked to another account!
Can I flash Xiaomi via Fastboot on Mac/Linux?
Yes, but more action will be needed: ๐Ÿง On Linux, install fastboot via package manager: sudo apt install fastboot ๐ŸŽ Homebrew: brew install android-platform-tools ๐Ÿ”Œ To recognize the device, you may need to manually configure the udev rules (instructions here). Mac/Linux Windows is identical, but specify paths to files based on the syntax of your OS (for example,./flash_all.sh instead flash_all.bat).