Flashing Xiaomi smartphone through the computer is a procedure that can be necessary in a variety of situations, from recovery after a failure to install custom firmware for advanced features (OTA), This method gives you complete control over the process, but requires care and preparation, and without the right actions, the risk of turning the device into a brick increases, especially if it is a matter of informal firmware or unlocking the bootloader.
In this article, we will analyze all the current ways of flashing through the PC: from the official Mi Flash Tool to alternative utilities like Fastboot and other tools. EDL. You'll learn what tools you'll need, how to prepare your smartphone, and what to do if something goes wrong, and for those who are afraid of experimentation, there's a separate section with answers to frequent questions and common mistakes.
Preparation for Flashing: What to Do Before Starting
Before you start flashing, make sure that all the preliminary steps are followed, and ignoring this stage is the main reason for the "bricking" of devices.
First, back up all your important data. The firmware erases your internal memory, and you can't recover photos, contacts or messages after that. Use Mi Cloud, Google Drive, or physical copying on your PC.
- ๐ฑ Contacts (exports to VCF-file)
- ๐ธ Photo/video (check folders) DCIM and Pictures)
- ๐ Passwords and tokens (two-factor authentication, accounts in banking applications)
- ๐ฎ Game saving (if you play mobile games with a device-based connection)
Second, check firmware compatibility with your Xiaomi model. Install firmware from Redmi Note 10 on the POCO X3 You can't do it, it's a guaranteed brick. Check the official list on the Miui Download website or forums like this. XDA Developers. Pay attention:
- ๐ The code name of the model (for example, surya for the model) POCO X3 NFC)
- ๐ Firmware Region (Global, China, EEA, India - you can't mix it!)
- ๐ Version MIUI/Android (Android 11 on 12 may require an intermediate firmware)
โ ๏ธ Note: If your device was purchased in China and is powered by China ROM, flashing on Global ROM without unlocking the bootloader will lead to a network lock (no mobile Internet and calls.
Third, prepare the computer:
- ๐ฅ๏ธ Install. ADB Fastboot (Windows also needs Mi drivers) USB Driver)
- ๐ Use the original. USB-cable (cheap cables may not transmit data to fastboot)
- ๐ Charge of the smartphone battery - at least 60% (when discharged during firmware, the device can turn off)
The official way: firmware through the Mi Flash Tool
Mi Flash Tool is a program from Xiaomi, designed to install official firmware in fastboot mode.
- ๐ Recovery after a soft breech (hang on the logo, bootloop)
- ๐ฅ Downgrade on an older version MIUI
- ๐ Changes in the firmware region (from China to Global and back)
Step-by-step:
- Download the firmware for your model from Miui Download. Choose the Fastboot version (file with the extension.tgz or.zip). Unpack the archive into a folder without Cyrillic characters (for example, unpack the archive in the folder, C:\MiFlash\proshivka).
- Install the Mi Flash Tool from the official website. Check the Install Mi box when you install it. USB Driver.
- Transfer the smartphone to fastboot mode: 1. Turn off the device. 2. Press the buttons Volume down. + Power for 10 seconds. 3. A hare in a hat-eared hat with the words Fastboot will appear on the screen.
- Connect your smartphone to your PC and run the Mi Flash Tool. The program must identify the device (the line with the model will appear at the bottom). If this does not happen, check the drivers or try another one. USB-port.
- Select the firmware folder in the Select field and press Refresh. Make sure your model is displayed in the device list.
- Select firmware mode: Clean all โ complete cleaning (recommended when changing region or after viruses) Clean all and lock โ cleaning + bootloader lock (only for official firmware!) Save user data - saving user data (risky, can lead to errors)
Press Flash and wait until it is completed (usually) 5-10 The green checkmark and the Success sign signifies success.
โ ๏ธ Note: If the device does not turn on after firmware, and the Mi Flash Tool has a critical partition flashing error is not allowed, then you are trying to install the firmware with a lower version of anti-rollback. XDA Anti-rollback bypass for your model).
โ๏ธ Checklist before firmware via Mi Flash Tool
Alternative method: Fastboot firmware manually
If the Mi Flash Tool is not working or needs more flexibility, you can manually flash the device through fastboot using commands in the terminal, which requires knowledge of the basic commands, but gives you control over each step.
What you need:
- ๐ฅ๏ธ Established ADB Fastboot (Folder Platform-Tools)
- ๐ Fastboot firmware (unpacked into a separate folder)
- ๐ Unlocked bootloader (for unofficial firmware)
Instructions:
- Open the command line (Win + R โ enter cmd) and go to the folder with platform-tools: cd C:\platform-tools
- Connect your smartphone in fastboot mode (as in the previous section) and check the connection: fastboot devices Should show a serial number of the device. If it is not, check the driver.
- Go to the firmware folder and start the firmware script: fastboot update name file_proshivki.zip Or scrolle in parts (for power users): fastboot flash boot boot.img fastboot flash system system.img fastboot flash vendor vendor.img fastboot flash dtbo dtbo.img
- After completion, execute: fastboot reboot
This method is useful if:
- ๐ ๏ธ You need to flash only individual sections (for example, boot for root rights)
- ๐ง Mi Flash Tool gives out errors or doesnโt see the device
- ๐ฆ You have custom firmware without Mi Flash support
๐ก
If the firmware is interrupted at the stage system.img, Try using the fastboot command. -S 256M flash system system.img โ This will increase the size of the buffer and may solve the problem.
Firmware in mode EDL (brick-and-brick)
Emergency Download Mode Mode (EDL) โ Last chance to restore Xiaomi that doesn't respond to buttons, doesn't turn on or is stuck in bootloop. In this mode, the firmware is installed directly into the device's memory, bypassing the bootloader.
When you need an EDL:
- ๐ The device does not turn on, does not respond to fastboot
- ๐ Fastboot Firmware Ends with Remote: Partition Table Doesn't Exist
- ๐ง Restore persist or modem partitions after a failed experiment
How to log into EDL:
- ๐ Method 1: Close the test points on the board (requires disassembly of the device). For each model, the points are different - look for circuits on the board. XDA or 4PDA.
- ๐ Method 2: Use the command fastboot oem edl (does not work on all models).
- ๐ฅ๏ธ Method 3: Special utilities like Mi EDL Tool or QFil (requires an authorized Xiaomi account).
Firmware via EDL:
- Download firmware in.mbn or.elf format (look for forums marked with a note). EDL).
- Install Qualcomm HS-USB QDLoader 9008 drivers (manually through Device Manager).
- Run the Mi Flash Tool, select the firmware and press Flash. EDL The port will show COM instead of serial number.
- Wait until it's finished (it can take up to 20 minutes). The device will restart automatically.
โ ๏ธ Attention: Firmware through EDL On models with a MediaTek processor (for example, Redmi Note 11) requires authorization through the Xiaomi server. Without official permission (developer account) you will not be able to flash.
Unlocking the bootloader: a mandatory step for custom firmware
If you plan to install custom firmware (like LineageOS, Pixel Experience, or Havoc) OS), First you need to unlock the bootloader. Xiaomi blocks this feature by default to protect against unauthorized changes.
What unlocking does:
- ๐ Possibility to establish TWRP ornamental
- ๐ฆ Installation of informal firmware and mods
- ๐ ๏ธ Getting root rights through Magisk
How to unlock the bootloader:
- Link your Mi Account to your device: Go to Settings โ Xiaomi account โ Mi Cloud and complete the entrance.
- Activate Developer Mode: Go to Settings โ About the phone and 7 times click on the version MIUI. Then go back to Settings. โ Additionally. โ For developers and include: Debugging by USB Unlocking OEM (It may not be available on new models)
Download Mi Unlock Tool and log in to the program with the same account as on your phone.
Put the device into fastboot mode and connect to your PC. In Mi Unlock Tool, press Unlock.
Wait until the end (usually) 3-5 The device will automatically restart.
Once unlocked, all data will be erased.
- ๐ On new models (Xiaomi) 12/13, Redmi Note 12) wait 7 days after the account is linked.
- ๐ฑ Some banking applications (for example, Sberbank Online) can block work on unlocked devices.
- ๐ Unlocking Resets Widevine L1 on L3 (no HD Netflix, Disney.+ etc.).
What happens if you unlock the bootloader on the warranty device?
Installation of custom firmware: TWRP not only
Custom firmware opens up new possibilities: pure Android without a shell MIUI, Extended settings, updates after Xiaomi's support ends, but installing them requires more steps than the official firmware.
What you need:
- ๐ Unlocked bootloader (see previous section)
- ๐ฑ Castom recavery TWRP for your model
- ๐ Firmware in.zip format (for example, with a XDA Developers)
- ๐ง Magisk (if root rights are required)
Step-by-step:
- Install. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_9-0-surya.img Replace surya with your modelโs codename.
- V TWRP Do the Wipe (clean up): Press the Wipe โ Advanced Wipe Mark Dalvik, Cache, System, Data Swipe for confirmation
- Transfer the firmware to the device: Connect the phone to your PC and copy the firmware.zip file to internal memory. Or use it. ADB Sideload: adb sideload proshivka.zip
- Install firmware: TWRP Press Install and select the firmware file. Wait until it is completed (may take a while). 10-15 minute).
- If necessary, install Magisk for root rights: Download Magisk.zip. Install it through Install. โ Select Zip in the TWRP.
Reboot the device: Reboot โ System.
Popular custom firmware for Xiaomi:
| Firmware | Features | Support for models |
|---|---|---|
| LineageOS | Clean Android without unnecessary apps, regular updates | POCO F1, Redmi Note 7/8, Mi 9 |
| Pixel Experience | Google Pixel interface, Google Camera support | Redmi K20 Pro, POCO X3, Mi 10 |
| Havoc OS | Maximum customization, core with optimizations for games | Redmi Note 9 Pro, POCO F2 Pro |
| ArrowOS | Minimalist design, close to the stock Android | Mi A2/A3, Redmi Note 10 Pro |
โ ๏ธ Note: Dynamic Partitions (e.g. Xiaomi) 12) Installation of custom firmware can lead to loss IMEI Before you run the firmware, back up modem partitions and persist through TWRP: adb pull /dev/block/bootdevice/by-name/modem modem.img adb pull /dev/block/bootdevice/by-name/persist persist.img
Typical errors and their solutions
Even if you follow the instructions strictly, you can get errors, and let's look at the most common ones and how to fix them.
Remote: Partition table doesn't exist in fastboot
Reason: Partition table is damaged or firmware is incompatible with the device.
Decision:
- Try to stitch through EDL (see section above).
- Use firmware marked anti-rollback for your model.
2.The device is not defined in the Mi Flash Tool
Reasons:
- Mi drivers are missing USB Driver.
- It's not original. USB-cable.
- Port port USB 3.0 incompatible (try it out) USB 2.0).
Solution: Install drivers manually through Device Manager by selecting Qualcomm HS-USB Diagnostics 9008.
3. Bootloop after installing custom firmware
Reasons:
- Incompatible firmware or core.
- The Wipe is not executed before installation.
- There are no GApps (for firmware without Google services).
Solution: Go back to TWRP, Run the full Wipe and reinstall the firmware. If it doesn't work, run the official firmware through fastboot.
4. This mistake MIUI version cannot be downgraded
Reason: Trying to install firmware with an older version of anti-rollback than the current one.
Decision:
- Find firmware with anti-rollback bypass (see on the XDA model).
- Use the Mi Flash Tool with the Clean All and Lock option.
๐ก
If it's gone after the firmware. IMEI or the network is not working, restore modem and persist partitions from the backup or manually run them through fastboot.