Reflashing Xiaomi phone via Fastboot: a complete guide to unlocking the bootloader

Fastboot flashing is one of the most reliable ways to install official or custom firmware when standard methods don’t work through Recovery, which requires unlocking the bootloader but gives you full control over the upgrade process, which is especially important when you restore the bricks, change region or switch to another version of MIUI. Unlike an OTA update, Fastboot allows you to bypass the system’s limitations and install even lowered versions of the software β€” if supported by the manufacturer.

But the process has its nuances, from getting permission to unlock to the risk of turning a device into a brick if you do the wrong thing. In this article, we’ll take a look at the step-by-step instructions for Xiaomi models (including Redmi, POCO, and Black Shark), the latest tools from 2026, and the typical bugs and solutions.

What is Fastboot and Why it is needed for Xiaomi firmware

Fastboot mode is a low-level protocol that allows you to interact with the bootloader of an Android device via USB. Unlike Recovery Mode, where the firmware is installed via a GUI, Fastboot works through the command line, which gives you more options:

  • πŸ”§ Installation of official firmware (Fastboot) ROM) Even on locked devices (after unlocking the bootloader).
  • πŸ“± Restore "bricks" (devices that are not included or hang on the Mi logo).
  • πŸ”„ Transition between Global (Global), Chinese (China) and European (EEA) version MIUI.
  • πŸ› οΈ Install custom firmware (such as LineageOS or Pixel Experience) after unlocking.

It is important to understand that Fastboot does not bypass the bootloader protection - it must be pre-unlocked through the official Mi Unlock Tool. Without this, firmware through Fastboot will not be possible (except for some older models up to the previous one). 2016 Also, Fastboot mode requires PC connection and use of utilities. ADB/Fastboot, This makes the process more technically complex than upgrading through OTA.

⚠️ Note: Fastboot resets all data on the device, including internal memory (userdata).If you need to save files, back up via Mi PC suite ADB backup before the start of the process.

πŸ“Š Why you want to reflash Xiaomi through Fastboot?
Install a new version of MIUI
Restore the brick.
Change the firmware region
Install custom firmware
Other

Preparation for firmware: what to do before unlocking

Before you start firmware, you need to follow a few critical steps, and skipping any of them can lead to errors like anti-rollback or complete failure of the device.

Download the official Fastboot firmware for your model|Install drivers ADB/Fastboot PC-only|Allow debugging by USB developer-setting|Link your Mi Account to your device (required for new models)|Make a backup copy of the data|Charge your phone at least to 60%-->

The first thing to do is to make sure that the firmware is compatible. For Xiaomi, firmware is divided into:

  • 🌍 Global – International version with support for Google services.
  • πŸ‡¨πŸ‡³ China – Chinese version without Google Play, but with branded services Xiaomi.
  • πŸ‡ͺπŸ‡Ί EEA β€” European version (similar to Global, but with some limitations).
  • πŸ“± Stable/Developer β€” stable-version MIUI.

You need to download the firmware only from official sources:

  • The official MIUI Downloads website (choose the Fastboot version!).
  • Xiaomi.EU Forum (for custom firmware).
  • Telegram support channels (e.g. @miuiofficial).

⚠️ Note: Install firmware with a lower version MIUI, The anti-rollback protection can be triggered by the anti-rollback protection, which will lock the bootloader forever, V14.0.5.0.TKMCNXM) Compare it to the current one through the settings β†’ The phone. β†’ Version. MIUI.

Xiaomi modelSupported Fastboot FirmwareFeatures
Redmi Note 12 Pro+Global, EEA, ChinaRequires a Mi Account binding before unlocking
POCO F5Global, India (IN)Supports Dynamic RAM Expansion only on official firmware
Xiaomi 13 UltraChina, Global (limited)Ban on downgrading MIUI below V14.0.10
Redmi 10AGlobal, Russia (RU)No anti-rollback protection on older versions

Unlocking the Xiaomi bootloader: step-by-step instructions 2026

Xiaomi has tightened the rules for unlocking the bootloader since 2021, and new models (released after 2020) require a Mi Account to be linked to the device 72 hours before unlocking, meaning that if you just bought a phone or dropped it before factory settings, you’ll have to wait 3 days to actively use your account (sign in to Mi Cloud, sync contacts, etc.).

Instructions for unlocking:

  1. Turn on Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Activate USB Debugging and OEM Unlock in the Settings menu β†’ Additional β†’ For developers.
  3. Download Mi Unlock Tool (version no lower than 5.5.224.30 for Windows 10/11).
  4. Connect your phone to your PC in Fastboot mode (turn off the device, then press Volume Down + Power).
  5. Launch Mi Unlock Tool, log in to your Mi Account and follow the instructions. If the error "Couldn't unlock" appears, it is 72 hours after the account was linked.

For older models (until 2018), unlocking is immediate, but new devices (Redmi Note 11, Xiaomi 12, POCO X5 and newer) require waiting.

  • πŸ”“ All data will be reset (as in the reset to factory settings).
  • πŸ›‘οΈ Encryption will go down. FBE (File-Based Encryption, which may affect the performance of some banking applications.
  • πŸ“± On some models (Xiaomi 13, POCO F4) The ability to use Mi Pay and Face Unlock is blocked.

πŸ’‘

If Mi Unlock Tool gives an error "Current account is different from the account info on the device", then another Mi Account is attached to the phone. To fix this, go to Settings β†’ Mi Account and log in under the same login as on your PC.

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

When the bootloader is unlocked, you can start the firmware.

  • πŸ–₯️ Windows PC 10/11 Linux (macOS is not recommended due to driver issues).
  • πŸ“‚ Unpacked firmware in.tgz or.zip format (not Recovery) ROM!).
  • πŸ”Œ Cable USB Type-C (preferably original to avoid connection breaks).
  • πŸ› οΈ Utilities. ADB Fastboot (can be downloaded as part of Android) SDK Platform-Tools).

Firmware instructions:

  1. Unpack the firmware in a folder without spaces (for example, C:\MIUI\fastboot_rom).
  2. Open the command line (Win) + R β†’ cmd) and go to the firmware folder: cd C:\MIUI\fastboot_rom
  3. Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
  4. Check the connection command: fastboot devices If the device is displayed (e.g., 1234abcd fastboot), you can continue.
  5. For models with split slots (A/B, for example, Xiaomi 12, POCO F4) Use the command: fastboot update rom_file.zip For older models (one slot) β€” flash_all.bat (Windows or flash_all.sh (Linux).

The firmware process will take 5-15 minutes. Upon completion, the phone will automatically restart. The first run can last up to 10 minutes - don't interrupt it! If after the firmware the device has hung on the Mi logo, try resetting the cache via Recovery (click Volume up + Power and select Wipe Cache).

What if the firmware is interrupted by 99%?
If the process stopped at 99% with the error "FAILED (remote: 'Not allow in Lock State')", then the bootloader was not unlocked. Go back to the unlock step. If the error is "anti-rollback", then the firmware is not compatible with your current version - you need to look for a newer build.

Typical Fastboot Firmware Errors and Their Solutions

Even with strict adherence to the instructions, errors can occur, and here are the most common ways to correct them:

Mistake.Reason.Decision
FAILED (remote: 'Flashing is not allowed in Lock State')The bootloader is not unlockedReturn to the unlock step through the Mi Unlock Tool
anti-rollback check failTrying to downgrade the MIUI versionInstall firmware with a higher version number
Invalid sparse file format at headerFirmware file damagedDownload the firmware again and check the MD5 checksum
Device not foundProblems with drivers or cableInstall Google USB Driver or change the cable/port

If the phone doesn’t turn on or hangs on Mi Logo after firmware, try:

  1. Go to Recovery (Loudness up + Power) and do Wipe Data.
  2. Repeat the firmware with another version of MIUI (e.g. Stable on Developer).
  3. Check if the anti-rollback is working (the information is in the Mi Unlock Tool logs).

πŸ’‘

If after the firmware lost IMEI or the network does not work, then the modem partition was damaged. The solution is to flash only this partition with the command fastboot flash modem NON-HLOS.bin (the file is in the folder with the firmware).

How to flash Xiaomi through Fastboot without unlocking the bootloader

Some older models (Redmi 4X, Redmi Note 4, Mi A1) can flash the official Fastboot ROM without unlocking the bootloader using the EDL (Emergency Download Mode) bypass method.

  • ⚠️ It only works on Qualcomm processors (not Mediatek!).
  • ⚠️ Requires an authorized Xiaomi account to access the EDL.
  • ⚠️ Can lead to hard-brick when you do wrong things.

Instructions for Qualcomm devices:

  1. Download the Mi Flash Pro and Firehose files for your model.
  2. Transfer the phone to EDL mode: adb reboot edl If the command does not work, short the test points on the board (requires disassembly of the device).
  3. In Mi Flash Pro, select a firmware file (.mbn) and press Flash.

⚠️ Attention: Method through EDL It does not work on new models (Xiaomi 12, Redmi Note 11 and later) due to the hardware protection of Qualcomm Secure Boot!

What to do after firmware: setup and optimization

Once you have successfully run your Fastboot firmware, the device will be in a post-purchase state. Here's what you need to do first:

  • πŸ”„ Check the version. MIUI In Settings β†’ On the phone - it should match the sewn.
  • πŸ“± Sign in to your Mi Account (if you don’t do it right away, some features may not work).
  • πŸ”’ Enable encryption in Settings β†’ Protection and confidentiality β†’ Encryption (optional, but recommended for security).
  • πŸ”‹ Calibrate the battery: fully discharge and charge the phone 2-3 once.

If you have swiped China ROM and want to return Google Play, install the services manually:

  1. Download Open GApps (select arm64, Android 12/13, pico).
  2. Flow through TWRP (If installed, or use the command: adb sideload open_gapps-arm64-13-pico.zip

To improve performance after the firmware:

  • πŸš€ Turn off animation: activate developer mode and install window animation = 0.5x, Animation of transitions = 0.5x.
  • πŸ—‘οΈ Clear the cache with Recovery (Wipe Cache).
  • πŸ”„ Update all apps via Google Play or Mi App Store.

πŸ’‘

If root access (for example, Magisk) is lost after firmware through Fastboot, it must be installed again through the patch. boot.img. Instructions: fastboot flash boot magisk_patched.img.

FAQ: Frequent questions about Xiaomi’s firmware through Fastboot

Can I flash Xiaomi through Fastboot without a computer?
No, Fastboot requires a PC connection, as commands are sent via USB. The alternative is to use Recovery ROM (via TWRP or standard Recovery), but that's a different method.
Why does Mi Unlock Tool show β€œ50% and stop”?
This means that the Mi Account was not tied to the device 72 hours before unlocking Solution: Use the phone with an authorized account for 3 days (synchronize data, log in to Mi Cloud), then try again.
How to know if the bootloader is unlocked on Xiaomi?
Turn off the phone, then press Volume Down + Power. If you see "Unlocked" under the Mi logo, the bootloader is unlocked. If Locked, you need to unlock.
Can I return the official firmware after the custom?
Yes, but you have to consider anti-rollback. Switch the official Fastboot ROM of the same or newer version than it was installed before. If custom firmware was based on Android 13 and the official firmware was on Android 12, protection may work.
What if the sensor or camera doesn’t work after the firmware?
This is a typical problem when firmware is incompatible with hardware. Solution: Run the correct version of MIUI for your model (check the codename of the device). If you flashed China ROM on a global model, go back to Global. Check the integrity of the firmware files (compare MD5).