How to Sweeten Xiaomi through Fastboot: From Unlocking to Installing Firmware

Fastboot flashing is one of the most reliable ways to upgrade or restore a Xiaomi smartphone when standard methods don’t work, a method that can be used to install official and custom firmware, fix bugs after a failed air update, and return to the stock version of MIUI after experimenting with alternative builds, but it requires caution: wrong actions can turn the phone into a brick or take away warranties.

Unlike an update via Recovery, Fastboot’s firmware interfaces directly with the hardware, which gives you more control but also increases the risk. In this article, we will discuss the entire process from preparation to final installation, including the nuances of unlocking the bootloader, choosing the right version of the firmware and solving typical errors, POCO F5 Xiaomi 13, where the procedure has its own features.

1. Firmware Preparation: What to Do Before Starting

Before you start firmware, make sure that all the preliminary steps are followed. Skipping at least one item can cause failures or inability to complete the process.

First, back up all your data. Fastboot completely erases your device's internal memory, including photos, contacts, and apps. Use Mi Cloud, Google Drive, or physical copying on your PC. This is especially critical for devices with a locked bootloader, since once unlocked, the data will be lost irretrievably.

Second, check the current firmware version and device model. This can be done from Settings β†’ Phone β†’ MIUI version and Device Model. Write down this data, which you will need to select the correct firmware file. For example, Redmi Note 11 Pro+ 5G (codename veux) and POCO X5 Pro (codename redwood) require different packages.

  • πŸ“± Find out the code name of your device (for example, surya for the device). POCO X3). You can find the list on sites like Xiaomi Firmware Updater.
  • πŸ”‹ Charge the phone to at least 60%. interruption of the process due to battery discharge can make the device inoperable.
  • πŸ–₯️ Prepare a PC with Windows 10/11 You can have driver problems on macOS. ADB/Fastboot.
  • πŸ”Œ Use the original. USB-Cheap cables may not provide stable connectivity.

⚠️ Note: If your device was purchased in China (market version) CN), firmware MIUI It can block the network due to differences in modem software. Before firmware, check compatibility on forums like 4PDA or XDA Developers.

πŸ“Š What Xiaomi model do you plan to use?
Redmi Note Series Series Series
POCO F/Pro series
Xiaomi 12/13 Series
Another model

2 Unlocking the bootloader: a mandatory step for firmware

Most Xiaomi smartphones are sold with a locked bootloader, a security measure that prevents unofficial software from being installed. To flash the device through the Fastboot, the bootloader must be unlocked, with the exception of some models for the EEA market (Europe), where unlocking may not be required for official firmware.

The unlocking process involves two steps: linking the Mi Account to the device and actually unlocking through the Mi Unlock Tool. Importantly, Xiaomi has introduced a restriction - after linking the account, you need to wait 72-168 hours (3-7 days) before unlocking, this rule has been in effect since 2022 and applies to all new models.

Instructions for unlocking:

  1. Turn on Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Back to Settings β†’ Additionally. β†’ For developers and activate OEM-unlocking and debugging USB.
  3. Connect the phone to the PC, confirm the debugging permission on the device screen.
  4. Download Mi Unlock Tool, log in to your Mi Account (should match the one tied to your phone).
  5. Turn the phone into Fastboot mode (turn it off, then press Volume Down + Power).
  6. In Mi Unlock Tool, press Unlock and wait until the end (if the wait time has not expired, an error message will appear).

⚠️ Note: Once the bootloader is unlocked, all data, including accounts and files in internal memory, will be deleted from the device, and this will also void Xiaomi’s warranty in most regions. For Redmi Note 10 Pro (sweet) and newer models, unlocking can lead to blocking data encryption (FDE), This will require additional steps when installing custom firmware.

What if the Mi Unlock Tool gives you a "Couldn't unlock" error?
This error most often means that it has not been 168 hours since the account was assigned. Less commonly, problems with drivers or antivirus blocking the tool. Try: - Disable antivirus and Windows firewall. - Use another PC or virtual machine with Windows 10. - Make sure that the device manager displays the phone as Android Bootloader Interface (if not, install drivers manually).

3. Selection of firmware: official vs custom

Not only does the type of firmware affect the functionality of the device, but also the stability of its operation. Xiaomi offers several types of official firmware:

  • 🌍 Global Stable is the official firmware for the international market, supports Google Services, but is updated less often.
  • πŸ‡¨πŸ‡³ China Stable is a firmware for the Chinese market, without Google Services, but with more recent updates MIUI.
  • πŸ§ͺ Global/China Beta – test builds with new features, but bugs are possible.
  • πŸ“¦ Fastboot ROM β€” complete firmware package via Fastboot (extension.tgz or.zip).
  • πŸ”„ Recovery ROM β€” Package for installation via Recovery (not suitable for our task).

Fastboot requires a file marked Fastboot in the title, and it is recommended to download firmware from official sources:

  • The official MIUI website (select Download full ROM package).
  • Xiaomi Firmware Updater (alternative source with archived versions)

Custom firmware (e.g. LineageOS, Pixel Experience) requires additional knowledge and often does not support all of the device’s features (e.g. NFC or full-power camera) and may require a TWRP or modified Fastboot script to install them.

Type of firmwareAdvantagesDeficienciesSuitable for
Official Global StableMaximum stability, support OTA-updateLong wait for updates, regional restrictionsUsers who need reliability
Official China StableMore recent features, frequent updatesNo Google Services, language problems are possibleEnthusiasts ready to install GApps manually
Castomic (AOSP)Pure Android, no Bloatware, advanced settingsThere is no guarantee of stability, possible bugs with ironAdvanced users, developers

πŸ’‘

If you are flashing a device with MediaTek (like the Redmi Note 11 or POCO M4 Pro), download the firmware strictly for your version of the chipset. Installing firmware for Snapdragon on MediaTek (and vice versa) will cause the device to fail.

4. Installation of drivers and tools on the PC

For successful firmware through Fastboot, the PC must have:

  1. ADB/Fastboot drivers provide communication between the PC and the phone in boot mode.
  2. Platform Tools is a set of utilities from Google, including fastboot and adb.
  3. Mi Flash Tool (optional) is the official utility from Xiaomi for firmware through Fastboot.

Download Platform Tools (unclick to the root of the C:\platform-tools drive) and Mi Flash Tool. Drivers can be installed automatically via the Mi Flash Tool or manually:

For manual installation of drivers:

  1. Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
  2. Open Device Manager on your PC, and find a device with an exclamation point (usually Android or Other devices).
  3. Update the driver by specifying the folder with drivers from the Mi Flash Tool or Platform Tools.

Check the functionality of the connection by performing in the command line (from the platform-tools folder):

fastboot devices

If the device is displayed (for example, 1234abcd fastboot) – the drivers are installed correctly.

The device is more charged. 60%|Drivers. ADB/Fastboot fixed|The firmware file is downloaded and unpacked|Backup copy of data created|The bootloader is unlocked (if required)-->

5. Step-by-step instructions for firmware through Fastboot

Now, to the firmware process itself, we'll look at two methods: through the Mi Flash Tool (recommended for beginners) and through the command line (for power users).

Method 1: Firmware with the Mi Flash Tool

  1. Unpack the downloaded firmware (.tgz or.zip) into a folder without Cyrillic characters (for example, C:\MIUI\proshivka).
  2. Run the Mi Flash Tool on behalf of the administrator.
  3. Connect the phone in Fastboot mode (the screen should display the hare in the hat-eared).
  4. In the Mi Flash Tool, click Select and specify the folder with the unpacked firmware.
  5. Select firmware mode: Clean all - complete cleaning (recommended for changing the version of MIUI); Clean all and lock - cleaning + lock bootloader (only for official firmware!); Save user data - data storage (not always working correctly).

Flash

Method 2: Firmware through the command line

This method gives you more control, but requires knowledge of commands. Open the command line in the firmware folder and do:

fastboot flash boot boot.img


fastboot flash recovery recovery.img




fastboot flash system system.img




fastboot flash vendor vendor.img




fastboot flash dtbo dtbo.img




fastboot flash vbmeta vbmeta.img




fastboot erase userdata




fastboot reboot

Some devices (such as Xiaomi 12) may require an additional command to run modem and bluetooth firmware:

fastboot flash modem modem.img


fastboot flash bluetooth bluetooth.img

⚠️ Note: If the firmware is interrupted at the stage system.img or vendor.img, Try repeating the command or restarting the PC and phone, then start over. Interrupting at this stage often leads to a bootloop cycle).

πŸ’‘

Always check the integrity of the downloaded firmware (compare the MD5 hash amount). A damaged file can cause firmware errors or unstable device performance.

Typical errors and their solutions

Even if you follow the instructions, you can make mistakes, and let's look at the most common ones and how to fix them.

Mistake.Reason.Decision
fastboot: error: cannot load 'boot.img'The firmware file is damaged or not unpackedCheck the integrity of the archive, unpack again
Mi Flash: "Flash done. Unlock fail"The bootloader is not unlocked or the account is not tiedRepeat the unlocking with the Mi Unlock Tool
The phone does not turn on after the firmware (bootloop)Incompatible firmware or interrupted processRepeat the firmware by selecting Clean All
fastboot: error: Failed to boot into fastbootdProblems with drivers or cableReinstall the drivers, try another one. USB-port/cable

If the device does not boot after firmware or hangs on the MI logo, try:

  1. Perform a hard reset (clip Volume up + Power for 10-15 seconds).
  2. Switch the device over again by selecting a different mode in the Mi Flash Tool (e.g. Clean all and lock).
  3. Install firmware through Recovery if Fastboot doesn't help.

For models with Dynamic Partition (e.g. Xiaomi 11T Pro, vili), an additional command may be required:

fastboot flash super super.img

7.After firmware: first settings and verification

Once the firmware is successful, the device will automatically restart, and it can take up to 10 minutes to start up, which is normal.

  • πŸ”„ Do not restore data from the backup immediately. First check the stability of the firmware.
  • πŸ“Ά Check the network and mobile Internet. If there is no signal, it may be that the firmware is incompatible with your region (especially for Chinese versions).
  • πŸ”‹ Charge the device to 100% and let it run for 1-2 hours to assess stability.

If you have a custom firmware, you may need to:

  • Install GApps (Google Services) via Recovery.
  • Set up Magisk to obtain root rights (optional).
  • Calibration of the battery (discharge to 0% and charge to 100% without interruption).

To check the correctness of the firmware:

  1. Go to Settings β†’ About the phone and make sure that the version of MIUI matches the installed one.
  2. Test the basic features: calls, camera, Wi-Fi, Bluetooth, NFC (if any).
  3. Check for updates in Settings β†’ System Update.

πŸ’‘

If after firmware the device began to discharge faster, reset the battery statistics through Recovery (wipe β†’ Battery Stats).

FAQ: Answers to Frequent Questions

Can I flash Xiaomi through Fastboot without unlocking the bootloader?
No, for most Xiaomi models (except for some devices in the EEA market), unlocking the bootloader is mandatory. Without this, the Fastboot will not allow you to write system, boot, or recovery partitions.
How to return the official firmware after custom?
To return to stock MIUI, download the official Fastboot firmware for your model and run it through the Mi Flash Tool, select Clean all mode. After that, the bootloader can be blocked back (the Clean all and lock option), but this will return the warranty restrictions.
Why does the Mi Flash Tool not see the device?
There are several reasons: drivers are not installed ADB/Fastboot. It's not original. USB-The device is not in Fastboot mode (check the screen - there should be a hare in the hat). Antivirus blocks the Mi Flash Tool. Try reinstalling the drivers manually or using another PC.
Can I use Xiaomi on MacOS or Linux?
Yes, but with reservations: Linux requires fastboot installation via a packet manager (e.g. sudo apt install fastboot). MacOS requires manual ADB drivers (e.g., Homebrew). Mi Flash Tool does not officially support MacOS/Linux, but you can use alternatives like XiaomiTool V2. The command line firmware process is identical to Windows.
What if the sensor or camera doesn’t work after the firmware?
This is a typical problem when installing incompatible firmware (e.g., firmware for Snapdragon on MediaTek or vice versa). Solution: Make sure the firmware is for your model and version of the chipset. Re-sweep the device with the right package. If the problem persists, try flashing only the vendor and persist partitions separately. Custom firmware may require additional patches (e.g., Camera Fix for GCam).