Fastboot is one of the most reliable ways to restore the device to work, update software or install custom firmware. Unlike Recovery mode, Fastboot allows you to work with system partitions directly, which is especially true when the phone βbricksβ updates or need to roll back on the old version of MIUI. However, the process requires accuracy: an error at any stage can lead to complete loss of data or even the device fails.
In this article, we will look at the whole process from A to Z, from unlocking the bootloader (without which Fastboot is impossible) to installing the official or custom firmware. We will focus on common errors, such as anti-rollback, which often occur when you try to roll back to the old version of MIUI. You will also find relevant commands for fastboot and tips on choosing the right firmware for your Redmi, POCO or Mi model.
What is Fastboot and When to Use It
Fastboot is a low-level interface for interacting with the bootloader of an Android device. Unlike Recovery Mode, where the firmware is installed via a graphical interface, Fastboot runs through the command line on a PC, which gives more control, but also requires knowledge of specific commands.
When should I use Fastboot?
- π Recovery after a crash: if the smartphone does not boot, got stuck on the Mi logo or hit the bootloop.
- π Reverse to the old version MIUI: If the new firmware is unstable (but remember the anti-rollback!).
- π Install custom firmware (such as LineageOS or Pixel Experience) after unlocking the bootloader.
- π§ Unlocking the bootloader: a must-do step before any firmware through Fastboot.
- π± Reflashing to official global/Chinese version (e.g. China) ROM Globally ROM).
Itβs important to understand that Fastboot isnβt suitable for installing minor updates (like monthly security patches) β thereβs OTA or Recovery for that.
β οΈ Note: On Xiaomi devices with MediaTek processors (e.g. Redmi Note 11 or MediaTek) POCO M4 Pro) firmware via Fastboot may be blocked by the manufacturer, in which case the use of a proprietary tool is required. SP Flash Tool.
Preparation for firmware: what to do before the start
Before you go to firmware, make sure that all the preliminary steps are followed. Skipping at least one item can lead to errors like fastboot: error: cannot load or device not found.
Install ADB/Fastboot drivers on PC| Download the correct firmware for your model |Unlock the bootloader (if not unlocked) | Charge the phone at least 50% | Disable Mi Account protection (if account is tied) | Backup important data-->
Special attention is paid to the choice of firmware. Official files for Fastboot can be downloaded from the Xiaomi Firmware Updater site or through the Xiaomi Flash Tool. The file name should correspond to your model and region.
- π± tucana_global_images_V12.5.3.0.RFDMIXM_20211029.0000.00_11.0_global β Global firmware for Redmi Note 8 Pro (codename tucana).
- π± umi_global_images_V12.0.10.0.QJBCNXM_20201020.0000.00_10.0_global β firmware 10 (umi).
If you plan to install custom firmware (such as LineageOS or ArrowOS), you will additionally need:
- π Unlocked bootloader (more on this below).
- π¦ Established custom recovery (TWRP Or OrangeFox).
- π‘οΈ Disabled dm-verity check (otherwise the device will not boot).
Official MIUI (Fastboot)|TWRP)|Return to old MIUI |I don't know, I need to advise-->
Unlocking the bootloader: a mandatory step before the firmware
All Xiaomi smartphones have a locked bootloader by default, a security measure that prevents unofficial software from being installed. To flash the device through Fastboot, the bootloader must be unlocked.
The unlocking process includes several stages:
- Mi Account Link: The phone must have a Xiaomi account attached (necessary to confirm the right to unlock).
- Application: via the official Mi Unlock Tool (download here).
- Waiting for approval: It usually takes 3 to 7 days (on new devices it can be longer).
- Directly unlock: Connect your phone in Fastboot mode to your PC and start unlocking through the Mi Unlock Tool.
Important nuances:
- π In some models (for example, POCO F3 or Redmi K40) Unlocking may require additional confirmation through SMS.
- π΅ If the device was purchased in China, a Chinese phone number may be required to unlock it.
- β³ After unlocking, you can not immediately sew custom software - you need to wait 168 hours (7 days), otherwise the bootloader will be blocked again.
What happens if you run a blocked bootloader?
After successful unlocking, the boot screen will display the words Unlocked (formerly This device is unlocked).
Step-by-step: how to flash Xiaomi through Fastboot
Once the bootloader is unlocked and the firmware is downloaded, you can start installing, and below is a general-purpose instruction that is suitable for most Xiaomi, Redmi and POCO models.
Step 1: Transfer your phone to Fastboot mode
Turn off the device. Hold the buttons.
- π Loudness down + Food for most models.
- π Loudness up + Power for certain devices (e.g, POCO X3 NFC).
You're going to have a hare in a hat, a Fastboot logo, and you're going to connect your phone to your PC through the phone. USB-cable (preferably original).
Step 2: Checking the connection
Open the command prompt (Windows) or terminal (Linux/macOS) and type:
fastboot devicesIf the device is identified, you'll see its serial number. If it's not, check the drivers or the cable.
Step 3: Firmware through Fastboot
Unpack the downloaded archive with firmware in a folder (for example, C:\MIUI\). There's gotta be a file inside. flash_all.bat (for Windows or flash_all.sh (for Linux/macOS).
For Windows:
- Launch it. flash_all.bat double-click.
- Wait until the process is completed (usually 5-15 minutes).
For manual firmware (if the script does not work):
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash recovery recovery.img
fastboot flash dtbo dtbo.img
fastboot flash vbmeta vbmeta.img
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot erase userdata
fastboot rebootThe last command (fastboot reboot) will restart the device. The first launch can take up to 10 minutes β that's normal.
β οΈ Attention: If you are flashing custom firmware, you must manually disable the dm-verity after installation, otherwise the phone will not boot. --disable-verity --disable-verification. Step. 4: Check the result after the reboot: π± Make sure the device is booted (you may need to adjust as after resetting). π Check the version. MIUI In Settings β The phone. π Charge the phone before 100% β After the battery is installed, it can quickly drain. π‘If the phone does not turn on after firmware, try to go to Recovery (Loudness up). + Power) and make Wipe Data. This often solves the problem of logo getting stuck. Common errors and their solutions Even with accurate follow-up to the instructions, errors can occur. Error Reason Fastboot: Error: Cannot load Damaged firmware file or wrong path Download firmware, check path to device not found Drivers not installed or cable faulty Install Mi Flash Tool or check USB-Anti-rollback port: Trying to roll back to an older version MIUI Use the newer firmware or use the Anti-Rollback Patch This MIUI version cannot be downgraded Recoil ban from Xiaomi Use XiaomiTool V2 To bypass the restriction Hanging on the Mi logo Incompatible firmware or installation error Replicate firmware or make Wipe Data in Recovery Especially insidious is the anti-rollback error. It occurs if you try to install the version MIUI It's older than the one on the phone before, like if you had a firmware indexed on the device. V12.5.3.0, And you're trying to sew V12.0.1.0, You get a brick". Decisions: π Switch a newer version (for example, V13.0.5.0). π οΈ Use the Anti-Rollback patch (risky, can lead to unstable work). π Contact the service center (if the phone is guaranteed). π‘If you see an anti-rollback error, do not try to flash the same version again, it will not help. You either need to look for a newer firmware or use specialized tools like XiaomiTool. MIUI You may not be satisfied with custom firmware (e.g. LineageOS, Pixel Experience or HavocOS) but it is more complex and risky: π An unlocked loader is required and installed TWRP. π¦ You need to download firmware specifically for your model (for example, Davinci for Redmi). K20/Mi 9T). π‘οΈ You need to turn off dm-verity and forceencrypt, otherwise the phone will not boot. π Possible problems with the camera, NFC Or sensors (depending on firmware). Example of commands for installing custom firmware via Fastboot (if TWRP Not available: fastboot flash boot magisk_patched.img fastboot flash recovery twrp.img fastboot reboot recovery is now in the TWRP: 1. Wipe β Format Data (enter "yes") 2. Install β choose ZIP firmware 3. Install β choose ZIP GApps (if you need Google services) 4. Reboot System Before Installing Custom Firmware: π Check the feedback on the stability of a particular build on the forum XDA Developers. π‘ Make sure the firmware supports your region (for example, for Russia, it is important to support frequencies). LTE Band 20). π Charge the phone on. 100% β It can take up to an hour. What is Magisk and why is it needed? Magisk is a tool for obtaining root rights without changing the systemless root partition). It also allows you to bypass SafetyNet checks, which is important for banking applications and games (for example, for example, for the operation of the system, PokΓ©mon GO). Installed through TWRP If something went wrong and the phone doesn't turn on (called a "brick"), don't panic. In most cases, the device can be restored. Recovery methods: Fastboot Firmware re-run: Sometimes it helps to just repeat the process with another version. MIUI. Using Mi Flash Tool: Download Mi Flash Tool from the official website. Select Clean all mode. Connect your phone in Fastboot mode and press Flash. EDL-Mode (emergency): Suitable for hard bricks when Fastboot is not identified.Requires an authorized Xiaomi account and cable for EDL. MiFlashPro or QFil is used. Contacting the service center: if nothing helps, especially for devices with warranty. For models with a Qualcomm processor (most flagships of Xiaomi), you can use the mode EDL (Emergency Download Mode. To enter it: Turn off the phone. Press Volume up. + Loud down and plug in. USB-Hold the buttons for 10-15 seconds until the PC identifies the device as Qualcomm. HS-USB QDLoader 9008. β οΈ Attention: Firmware through EDL Without authorization, Xiaomi may lead to a lock IMEI. On new devices (released after 2021) for EDL An official service center account is required. FAQ: Can I flash Xiaomi through Fastboot without unlocking the bootloader? No. Without unlocking the bootloader, you will get fastboot error: error: cannot flash locked device. The exception is the official firmware through the Mi Flash Tool in Clean all and lock mode, but this does not work on all models. How to find out the code name of your Xiaomi model? There are several ways: Enter the code in the phone ##4636## And you can find the Device line. Look at the Settings. β The phone. β Version. MIUI β Assembly number (e.g, tucana_global β codename Redmi Note 8 Pro) Use the Device Info app from Google Play. What to do if the sensor or camera doesn't work after the firmware is installed? This is a typical problem when installing custom firmware. Solutions: π Swipe through another firmware version (maybe the build is unstable). π₯ Install a patch for sensors (look for the XDA Developers for your model). π§ Get back to the official one. MIUI via Fastboot. If the problem occurred on the official firmware - most likely, a version was installed for another modification of the device (for example, firmware for Redmi Note). 10 Pro on the Redmi Note 10 Pro Max. How to flash Xiaomi through Fastboot on Mac or Linux? The process is similar to Windows, but there are nuances: Install fastboot via brew install android-platform-tools (Mac) or sudo apt install fastboot (Linux). Uncrack the firmware and launch flash_all.sh via terminal (chmod) +x flash_all.sh, later./flash_all.sh). If the script doesnβt work, use fastboot commands manually (see the βStep-by-Step Instructionsβ section). Linux may require running on behalf of a superuser (sudo) or adding rules to the code. USB-Can you roll back the firmware on Xiaomi without consequences? On Xiaomi devices released after the 2019 year, reverting to the old version MIUI It is blocked by the anti-rollback mechanism. This means that if you upgrade from, say, MIUI 12 to MIUI 13, you can't go back to the official methods, the phone will turn into a brick. Bypass: Use XiaomiTool V2 (risky, can lead to loss of IMEI); Switch a newer version, and then try to roll back through TWRP (not always working); Contact the service center (if the device is guaranteed, the rollback will cancel it).