Installing custom firmware on Xiaomi smartphones via Fastboot mode is one of the most reliable ways to get advanced functionality, updates or get rid of preinstalled software. However, the process requires care: an error at any stage can turn a device into a βbrick.β Unlike the recovery method, firmware via Fastboot allows you to work with partitions directly, which is especially important for devices with a locked bootloader or damaged recovery partition.
This guide will be suitable for most Xiaomi, Redmi and POCO models released after 2018, including the Mi 11/12/13, Redmi Note 10/11/12 and POCO F3/4/5 lines. We will take all the steps from unlocking the bootloader to checking the system after the firmware. If you are a beginner, we recommend that you first familiarize yourself with frequent errors at the end of the article - this will save time and nerves.
Preparation of the device: unlocking the loader
The first and most critical step is to unlock the bootloader, which Xiaomi blocks by default to protect against unauthorized changes, without which custom firmware cannot be installed.
The unlocking process includes:
- π± Linking the Mi Account to the device (required! without this, unlocking will not pass).
- π Request permission via the official Mi Unlock Tool app (you can download it on Xiaomi website).
- β³ Waiting 7β168 hours (depending on model and region) Xiaomi artificially delays unlocking to "cool" users.
Important: Once unlocked, all data on the device will be erased! back up via Settings β Additional β Backup or Mi Cloud. Also check if your model supports unlocking - some devices for the Chinese market (China ROM) may have restrictions.
β οΈ Warning: If you bought a smartphone with your hands, make sure the previous owner untie his Mi Account. otherwise unlocking will be impossible without his participation.
2. Selection of custom firmware: what to consider before installation
Not all firmware is equally useful.
- π§ Compatible with your model (look for firmware by device code, such as raphael for Redmi) K20 Pro).
- π Update of build (firmware older than 6 months may contain vulnerabilities).
- π‘οΈ Google Certificates (without them Google Pay, Netflix will not work) HD and other services).
- π Type of firmware: GSI (Universal, suitable for many devices) or specific (optimized for a specific model).
Popular firmware for Xiaomi:
| Firmware | Features | Support for GSI | Reference |
|---|---|---|---|
| LineageOS | Clean Android, minimalist design, regular updates | Yes. | lineageos.org |
| Pixel Experience | Google Pixel interface, optimized performance | Yes. | pixelexperience.org |
| MIUI Pro | Modified MIUI without advertising, with additional features | No. | miuipro.ru |
| ArrowOS | Balance between customization and stability, support themes | Yes. | arrowos.net |
Critical: Unofficial firmware may contain bugs or unstable communication modules, and use them only if your model does not have an official build.
π‘
Before downloading the firmware, check the reviews on the XDA Developers forum β there are often discussed the hidden problems of specific builds.
Installation of drivers and preparation of PC
To work with Fastboot you will need:
- π₯οΈ Computer running Windows 10/11 (on macOS/Linux Possible problems with drivers).
- π Cable USB Type-C (preferably original β cheap cables can cause data transmission errors).
- π οΈ Tools: Mi Flash Tool, ADB & Fastboot, drivers Qualcomm/QUSB.
Step-by-step training:
- Download and install Android SDK Platform Tools (includes adb and fastboot).
- Install drivers for your model through the Mi Flash Tool (you can download it on the official website).
- Disable the driver signature in Windows (instruction below).
To disable the driver signature verification:
- Open the Command Prompt (Administrator).
- Enter the command: bcdedit /set nointegritychecks on
- Restart the PC.
β οΈ Note: If the device is βUnidentified Deviceβ displayed in Device Manager after connecting the device, manually update the driver by specifying the folder with the Mi Flash Tool.
4. Transfer the device to Fastboot mode and check the connection
To put Xiaomi into Fastboot mode:
- Turn off your smartphone.
- Press the buttons Loud down + Power for 10-15 seconds until the Fastboot logo appears.
- Connect the device to the PC.
Check the connection via the command line:
- Open the terminal in the folder with the platform-tools.
- Enter the command: fastboot devices
- If the device is determined (the serial number will appear), you can continue. If not, check the drivers or cable.
Device in Fastboot | Drivers installed | Cable original | Data backup created | Firmware downloaded and unpacked-->
5. Fastboot Firmware Process: Step-by-step instruction
For firmware, we use the Mi Flash Tool (for official firmware) or the manual fastboot (for custom ones).
Method 1: Mi Flash Tool (for official and modified MIUI)
- Unpack the downloaded firmware (.tgz or.zip format) into a folder without Cyrillic.
- Open the Mi Flash Tool, press Select and point the path to the firmware folder.
- Select firmware mode: Clean all - complete cleaning (recommended for custom firmware); Clean all and lock - cleaning + lock bootloader (only for official firmware!); Save user data - data storage (not always working correctly).
Flash
Method 2: Fastboot manual commands (for AOSP-firmware)
If the firmware is in.img or.zip format for Fastboot, use the commands:
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash dtbo dtbo.img
fastboot rebootFor firmware with support for dynamic partitions (for example, Android 12+), use:
fastboot update name firmware.zipβ οΈ Warning: If the process has been stuck in the flashing phase for longer than 20 minutes, do not turn off the device! USB-port or start the command.
What to do if the Mi Flash Tool gives you a "can't find" error 'flash_all.bat'?
6. First start and setup after firmware
After a successful firmware:
- The device will automatically restart. The first start can take 10 to 20 minutes β don't interrupt the process.
- If the system does not load for more than 30 minutes, try resetting your settings via Fastboot: fastboot -w.
- After downloading, check: πΆ Mobile network and Wi-Fi. π Sound and microphone. π· Camera (some custom firmware requires separate modes for the camera).
If you're dealing with bugs:
- π Go back to another assembly.
- π₯ Install additional fixes (e.g. GCam for camera or Magisk for root rights).
- π¬ Contact the forum. XDA or 4PDA fault-logged.
π‘
Once you have custom firmware installed, update Magisk (if you need a root) and check SafetyNet certificates through the SafetyNet Checker app.
7. Frequent errors and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| fastboot: error: Failed to boot into fastbootd | Incompatible version of fastboot or drivers | Update Platform Tools and reinstall drivers |
| Mi Flash: "This package is for "xxx" devices" | The firmware is not suitable for your model. | Download the firmware with the correct device code |
| The device does not turn on after firmware | Boot or system partition damaged | Repeat the firmware with full cleaning (fastboot -w) |
| Invalid sparse file format at header | Firmware file damaged | Download the firmware again, check the checksum (MD5) |
If the device does not respond to buttons and is not detected by the PC:
- Try to pinch Volume up + Volume down + Power for 30 seconds (emergency reboot).
- Connect to the other one. USB-port (preferably) USB 2.0).
- Use a different cable and PC.