Install custom or official firmware on Xiaomi smartphones through USB-The cable from a computer is a process that scares many users, but it is the only way to bring back a brick-and-mortar machine, update outdated software on unsupported models, or gain root rights to deep-tube the system. OTA-Updates, firmware via Fastboot or Recovery gives you full control over the process, but requires care: one wrong action can turn your Redmi or your own. POCO brick-and-brick".
In this article, we will discuss three main methods of firmware via USB: using the official MiFlash tool, using custom recovery TWRP, and using the fastboot utility in manual mode. We will focus on training, from unlocking the bootloader to choosing the right firmware version for your model. And to avoid typical errors, we have compiled a table of compatibility of Xiaomi tools and devices, relevant for 2026.
1. Preparation of the smartphone: unlocking the bootloader
The first and most critical step is unlocking the bootloader. Without this, no firmware will install via USB. Xiaomi officially allows you to unlock the bootloader, but the process involves waiting (3 to 360 hours) and binding to the Mi Account.
Here's what you're gonna need:
- π± Xiaomi smartphone with a battery charge of at least 60% (when discharged during the process, the device can lock permanently).
- π Cable USB Type-C (preferably original β cheap cables often donβt transmit data in fastboot mode).
- π» Windows computer 10/11 (for MiFlash or Linux/macOS (manually).
- π Mi Account linked to the device (required to confirm email and phone!).
The unlocking process:
- Activate Developer Mode: Go to Settings β About Phone and click on MIUI Version 7 times.
- Back to Settings β Additionally. β For developers and include OEM-unlocking and debugging USB.
- Connect the phone to the PC, confirm the debugging permission.
- Download the official Mi Unlock utility, log in and follow the instructions.
β οΈ Warning: Once the bootloader is unlocked, the smartphone will perform a full reset (wipe). TWRP (Also note that some banking applications (e.g. SberBank Online) may no longer work on unlocked devices.
2. Selection of firmware: official vs custom
Before you download the firmware, decide on its type. Official firmware from Xiaomi is divided into:
- π¦ Stable β stable versions with minimal bugs but no new features.
- π§ͺ Developer β weekly builds with the latest updates, but errors are possible.
- π Global/EEA β Firmware for the European market (without Chinese services).
- π¨π³ China β Chinese versions (may not support Google Services).
Custom firmware (e.g. LineageOS, Pixel Experience) gives more freedom, but requires an experienced approach.
- β‘ Higher productivity through optimization.
- π Regular security updates (as opposed to abandoned official versions).
- π¨ Ability to fine-tune the interface.
| Type of firmware | Suitable for | Risks. | Where to download |
|---|---|---|---|
| Official Stable | Beginners, daily use | Minimum | Official website |
| Official Developer | Testers, enthusiasts. | Bugs, unstable jobs | Official website |
| Castomium (TWRP) | Experienced users | Loss of warranty, possible brick | XDA Developers |
| Ported ROM (e.g. Pixel Experience) | Fans of βpureβ Android | Not all functions can work. | Pixel Experience |
Critically, the firmware should be designed specifically for your model and device code (e.g. Redmi Note 10 Pro has sweet and sweetin options for the Indian market). Installing incompatible firmware will result in hard brick (irreparable damage).
π‘
Before downloading the firmware, check its hash amount (MD5) using the MD5 Checker utility. This will protect you from downloading corrupted or fake files.
3. Firmware through MiFlash: the official method
MiFlash is Xiaomi's official fastboot firmware utility, which supports most models but only runs on Windows.
Download MiFlash from the official website |Install Qualcomm/QDLoader Drivers |Unpack firmware into a folder without Cyrillic | Disable antivirus (it can block drivers) |Translate phone to fastboot (Power + Vol Down) mode
-->
Algorithm of action:
- Download and install MiFlash (version 2023.4.2 or later).
- Unpack the downloaded firmware (a file with the.tgz or.zip extension) into a short path folder (e.g., C:\Xiaomi\proshivka).
- Run MiFlash.exe on behalf of the administrator.
- Connect the phone in fastboot mode (press Power + Volume Reduction when the device is turned off).
- In MiFlash, click Select and specify the firmware folder. Then select firmware mode: Clean all β complete clean (recommended for changing the version of MIUI), Clean all and lock β clean + lock bootloader (only for official firmware!), Save user data β save data (not always stable).
Flash
β οΈ Note: If MiFlash gives you a βcouldnβt find android deviceβ error, check: Are Qualcomm drivers installed? HS-USB QDLoader 9008 (download here) Is Windows Defender disabled (it can block unsigned drivers) Is you using the original cable (cheap cables often don't send fastboot commands).
π‘
Clean all and lock mode will lock the bootloader back. Use it only if you have official firmware and you do not plan to make further modifications.
4. Firmware through TWRP: for custom ROMs
TWRP (TeamWin Recovery Project) is a custom recovery that allows you to install informal firmware, make backups and obtain root rights, but to use it, the bootloader must already be unlocked.
Instructions for installing TWRP and firmware:
- Download the image TWRP for your model from the official website (for example, for Redmi Note) 11 it's a file twrp-3.7.0_12-spes.img).
- Rename it to recovery.img and place it in the folder with fastboot (where adb.exe lies).
- Connect your phone in fastboot mode and execute the command: fastboot flash recovery.img
- Then reboot to TWRP: fastboot boot recovery.img
- V TWRP Make a backup of the current firmware (Backup section), then flash a new one. ZIP-file via Install.
Advantages of TWRP:
- π Possibility of rollback to the previous version of the firmware.
- π§ Installation of modifications (e.g. Magisk for root rights).
- π¦ Backup of individual partitions (e.g. data or boot only).
β οΈ Note: Some new Xiaomi models (e.g. Xiaomi) 13 Series) uses dynamic partitions (super.img). They require a special version. TWRP Support for dynamic partitions. TWRP This will cause the error "Unable to mount". /data".
What if TWRP asks for a password when mounting /data?
5. Hand-held firmware via fastboot: for experienced
If MiFlash doesn't work or you want more control, you can manually flash the device through fastboot commands. This method is universal and works even on unofficially supported devices.
Procedure:
- Download the firmware in.tgz and unpack it. Inside it should be a folder with images and script. flash_all.bat.
- Open the command line (Win + R β cmd) in the firmware folder.
- Connect your phone in fastboot mode and check for its detection: fastboot devices (should display the serial number of the device).
- For all the sections, run: 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 reboot
For dynamic partition devices (e.g. Xiaomi 12T), use the command:
fastboot update --skip-secondary file name.zipImportant nuances:
- πΉ Not all firmware contains a file. vbmeta.img. If it is not, skip this step.
- πΉ For devices with A/B-sections (e.g, POCO F4) You need to run both slots: fastboot --set-active=a fastboot flash system system.img fastboot --set-active=b fastboot flash system system.img
- πΉ If after firmware the phone is stuck on the logo, try resetting the settings via fastboot -w.
Typical errors and their solutions
Even with the correct instructions, errors can occur, and we've collected the most common problems and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| fastboot: error: Failed to boot into fastbootd | Incompatible version of fastboot or drivers | Update Platform Tools to the latest version |
| MiFlash: "Flash is not done" | A damaged firmware file or lack of rights | Check it out. MD5-hash firmware and run MiFlash from the administrator |
| TWRP: "Unable to mount /data" | FBE (File-Based Encryption) | Format /data in TWRP or disable encryption in MIUI before installation |
| The phone does not turn on after firmware ("brick") | Incompatible firmware or interrupted process | Try to stitch through EDL-Mode (requires an authorized Xiaomi account) |
| Anti-rollback protection | Reversed to an older version of MIUI | Only run the version that is newer than the current one (check out Xiaomi Firmware Updater). |
If your device has turned into a hard brick, don't panic. In most cases, it can be restored through a computer. EDL-The Emergency Download Mode (ED) is the mode for this:
- Download an authorized firehouse for your model.
- Connect your phone to your PC with the Vol Up + Vol Down button pressed (on the device turned off).
- Use QFil or MiFlash in EDL mode for firmware.
β οΈ Attention: For EDL You need an authorized Xiaomi account (not to be confused with a regular Mi Account). $5-10) and takes up 72 The alternative is to go to a service center.
7. Check the result and the first actions after firmware
After successful firmware, follow the following steps:
- First start: It can take up to 10 minutes - don't interrupt the process.
- System setup: Skip the binding to Mi Account if you plan to install custom firmware.
- Functionality check: πΆ Communication test (calls, mobile Internet). π· Camera operation (some custom firmware requires separate fixes for the camera). π Battery Charging (Indicator must correctly display percentage). π Sound and speakers.
Security update:
Settings β System β Updates
If you have a custom firmware, it is recommended:
- π Install Magisk for root rights management (download on GitHub).
- π‘οΈ Disable Signature Verification in TWRP, If you are planning to make modifications.
- π± Install Google Apps (if not in firmware) through Open GAPPS.
To check the current firmware version and the status of the bootloader, use the commands:
adb shell getprop ro.miui.ui.version.name # MIUI version
fastboot oem device-info # bootloader status