Flashing a Xiaomi smartphone through a computer is a process that can solve many problems, from bugs in the system to a complete change of interface. However, the wrong actions often lead to the โbrickingโ of the device, loss of data or cancellation of warranty, this guide will help to avoid typical errors and conduct the procedure as safely as possible.
Unlike the Air Update (OTA), PC firmware gives you more control: you can choose any version of MIUI (including global, Chinese or European), install custom software like LineageOS, or even bring the device back to life after a failed upgrade, but this will require unlocking the bootloader, preparing special tools and following a strict sequence of actions.
It is important to understand that the process is different for different models Xiaomi, Redmi and POCO. For example, for Xiaomi 13 Pro and Redmi Note 12, different versions of the Mi Flash Tool are used, and older devices (until 2019) may require additional manipulation of the Mi Account. In this article, we will look at the universal algorithm that is relevant for most modern gadgets of the brand.
1. Firmware Preparation: What to Do Before Starting
The first and most important step is data backup, and PC firmware completely erases the deviceโs internal memory, including photos, contacts, and installed apps, and even if you plan to upgrade without a โfastboot update,โ the risk of data loss remains.
Use the official Mi Mover app or third-party utilities like Titanium Backup (requires root rights).
- ๐ธ Photos and videos (including hidden folders) DCIM/.thumbnails)
- ๐ Contacts (export to) VCF-file through Contacts โ Management โ Imports/Exports)
- ๐ Messages (annexes of type) SMS Backup & Restore)
- ๐ฎ Save games (via cloud or manual folder transfer) Android/obb)
Also check:
- ๐ Battery charge (at least 60%, ideally 100%) firmware can be interrupted at low charge.
- ๐ Cable USB (Use an original or certified USB-C/Micro-USB). Cheap cables often cause connection errors.
- ๐ฅ๏ธ Computer on Windows 7/10/11 (Mi Flash Tool is required for 64-bit system. macOS/Linux trickier.
โ ๏ธ Note: If your Xiaomi was purchased in China, the firmware of the global version MIUI can block the modules NFC or 5G. Check the compatibility of the model on the Xiaomi forum EU.
2 Unlocking the bootloader: a mandatory step for firmware
All modern Xiaomi smartphones come with a bootloader locked, a security measure that prevents unofficial software from being installed.
- Link the device to your Mi Account (require to confirm your email and phone!).
- Apply for unblocking through the official website.
- Wait 7-15 days (depending on the model and region).
- Use the Mi Unlock Tool for the final unlock.
Important nuances:
- ๐ For new models (such as Xiaomi 14 or Redmi Note 13), the waiting period can be up to 30 days.
- ๐ Mi Account must be created at least 30 days ago (otherwise the system will reject the application).
- ๐ฑ The device must have the latest official firmware installed (update via Settings). โ The phone. โ Updating the system).
After approval of the application:
- Download Mi Unlock Tool from the official website.
- Launch the utility on behalf of the administrator.
- Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
- If you see a Couldn't unlock error, try again in 24 hours.
โ ๏ธ Warning: Unlocking the bootloader resets the device to factory settings.All data will be deleted even if you backed up through the Mi Cloud.
What if the Mi Unlock Tool canโt see the device?
3. firmware selection: official MIUI vs custom builds
The type of firmware depends on the functionality of the device, the stability of work and even support for some modules (for example, a camera or NFC).
| Type of firmware | Advantages | Deficiencies | Suitable for |
|---|---|---|---|
| Official MIUI (Stable) | Maximum compatibility, support OTA-Updates, all functions are working | Advertising in system applications, limited customization | Users who need stability |
| Official MIUI (beta) | New features before, less advertising | Bugs, unstable work, possible problems with the battery | Enthusiasts ready for experimentation |
| Xiaomi.EU | Advertising-free, advanced settings, weekly updates | No official support, possible bugs | Advanced users |
| Castomium (LineageOS, Pixel Experience) | Clean Android, long-term support, no Bloatware | Camera, NFC or wireless charging may not work | Those who want Android without a MIUI shell |
Where to download the firmware:
- ๐ Official: en.miui.com (select the version for your model!).
- ๐ช๐บ Xiaomi.EU: xiaomi.eu (requires registration on the forum).
- ๐ ๏ธ Castomy: XDA Developers (Search for the theme of your model).
Before downloading, check:
- ๐ Model code (e.g. Redmi Note 12 Pro)+ 5G It has a ruby code. You can find it in Settings. โ The phone. โ Model or via the Quickboot Getvar Product command.
- ๐ Version MIUI (Installing the beta over a stable version can lead to a download cycle.
- ๐ฅ File integrity. The firmware must be.tgz or.zip (not.exe (MD5) utility-wise WinMD5Free.
๐ก
If you downloaded firmware in.tgz, don't unpack it manually! Mi Flash Tool will do it automatically. Manual file extraction can lead to installation errors.
4. Installation of drivers and necessary tools
For firmware through the PC will require:
- Mi Flash Tool is the official utility from Xiaomi for installing firmware in Fastboot mode.
- ADB and Fastboot are tools for interacting with a device via the command line.
- Qualcomm/MTK drivers depend on your smartphoneโs processor.
Step-by-step installation:
- Download the Mi Flash Tool (version 2023.4.25.0 or later).
- Install Android SDK Platform Tools (includes adb and fastboot).
- For Qualcomm processors, download the QDLoader drivers, for Mediatek - MTK USB Drivers.
- Connect your phone in Fastboot mode and wait for the drivers to be installed (Android Bootloader Interface should appear in Device Manager).
Check the connection via the command line:
fastboot devicesIf the device is identified (its serial number will appear), the drivers are installed correctly. If not, reinstall them manually through Device Manager.
โ ๏ธ Attention: On Windows 11 You may need to disable driver signature verification. To do this, do the command line (on behalf of the administrator): bcdedit /set nointegritychecks on After installing drivers, return the settings back: bcdedit /set nointegritychecks off
โ๏ธ Tool preparation
5. The firmware process through the Mi Flash Tool
Now, to the most critical phase, there are two options for firmware: Fastboot (full cleanup) or Recovery (data storage), and we'll look at the former, because it's more reliable and suitable for most scenarios (including disaster recovery).
Step-by-step:
- Unpack the downloaded firmware (if it is in the archive) in a folder without Cyrillic characters (for example, C:\MIUI\).
- Run the Mi Flash Tool on behalf of the administrator.
- Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
- In the program, click Select and specify the path to the folder with the firmware.
- 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
If the process is suspended on Waiting for device:
- ๐ Check the cable and port USB.
- ๐ Reboot your phone in Fastboot again.
- ๐ฅ๏ธ Reinstall drivers or try another computer.
Once the firmware is successful, the device will automatically restart. The first run can take up to 15 minutes - don't interrupt the process!
๐ก
If the phone is stuck on the MI logo after firmware, try resetting via Recovery (click Volume Up + Power and select Wipe Data).
6. Install custom firmware (LineageOS, Pixel Experience)
If you chose unofficial software, the algorithm will be more complex, and in addition to unlocking the bootloader, you will need to:
- Install custom recovery (TWRP or OrangeFox)
- Format the /data, /system and /vendor partitions.
- Install firmware and GApps (Google services if needed).
Instructions for TWRP:
- Download TWRP for your model from the official website.
- Fastboot: Fastboot Flash Recovery twrp-3.7.0_12-1-ruby.img fastboot boot twrp-3.7.0_12-1-ruby.img
- In TWRP, select Wipe โ Format Data (enter yes for confirmation).
- Transfer firmware and GApps to your phone via MTP (TWRP has this option).
- Install firmware first, then GApps (order is important!).
- Reboot to the system.
Typical errors when installing custom firmware:
- ๐ซ Error 7 is the wrong model. Check firmware compatibility.
- ๐ซ Logo hanging - no vendor or firmware. Download additional files from the forum XDA.
- ๐ซ No network, run separately modem and EFS through TWRP.
โ ๏ธ Attention: Castom firmware often breaks encryption, and if you have a phone that asks for a password after you install it, but doesn't accept it, you'll have to format it. /data Re-invented (all data will be lost!).
7.What to do if the firmware failed
Situations where the device is not turning on or is not working correctly, even in experienced users.
| Problem. | Possible cause | Decision |
|---|---|---|
| Phone not turned on (black screen) | Incorrect firmware or interrupted process | Repeat the firmware through Fastboot with a full clean (Clean all) |
| Hanging on the MI logo | MIUI version conflict or damaged partitions | Reset settings via Recovery or flash anti-rollback firmware |
| No network or IMEI | The modem or EFS partition is damaged | Restore EFS via TWRP or run through the original vendor |
| Cyclical reboot (bootloop) | Incompatible firmware or lack of vendor | Install firmware with the same build number (MIUI version) as before |
If the phone doesnโt respond to the buttons:
- ๐ Connect to charging for 30 minutes - maybe the battery has gone down.
- ๐ Try to pin the volume down. + Power for 20-30 seconds (forced Fastboot).
- ๐ฅ๏ธ Connect to your PC and check if your device is detected via fastboot devices.
For devices with a Mediatek processor (for example, Redmi 9A or POCO M3), you may need the SP Flash Tool utility.
8. System optimization after firmware
After successful installation of firmware, it is recommended:
- ๐ Reset to factory settings (via Settings) โ Additionally. โ Recovery and resetting. This will eliminate potential conflicts.
- ๐ Turn it on. OEM Unlock and USB Debugging (if you plan to manipulate further).
- ๐ฑ Update all apps via Google Play or Mi App Store.
- ๐ Calibrate the battery: fully discharge and charge the phone 2-3 times.
To improve productivity:
- Turn off animation via Settings โ For developers (set Windows Animation = Off).
- Limit the background activity of applications in Settings โ Battery โ Battery Optimization.
- Remove unnecessary system applications via ADB: adb shell pm uninstall-k --user 0 com.miui.analytics
If there are bugs after the firmware (for example, Always On Display or gestures do not work), check:
- ๐ Compatibility of firmware with your model (on the forum Xiaomi) EU Lists of supported functions).
- ๐ Availability of firmware updates (in Xiaomi.EU they are released weekly).
- ๐ ๏ธ Magisk Installation Correctness (if root is installed).
๐ก
Once custom software (like LineageOS) is firmware is installed, encryption support may be lost. To return it, file separate dm-verity and forceencrypt patches via TWRP.