Reinstallation of the operating system on Xiaomi smartphones can be required in a variety of situations: from banal failures in operation to the need to install custom firmware for advanced functions. Unlike computers, where the process of reinstalling Windows or Linux is relatively standardized, on mobile devices it all depends on the model, version, and the model. MIUI, The status of the bootloader and even the region of purchase. This article will help you understand all the nuances from the preparation of the phone to the recovery of data after a clean installation.
It is important to understand that reinstalling the system on Xiaomi does not always mean a complete reset to factory settings. In some cases, it is enough to update the firmware through About the phone. โ Update the system, but if the device is infected with viruses, is unstable or you want to upgrade to another version MIUI (For example, from global to Chinese or vice versa, we're going to need a deeper intervention, and we're going to look at all the actual ways, from official Fastboot recovery to custom firmware installation through Fastboot. TWRP.
Before you start, answer the key question: Why do you need this? If the goal is just to speed up the phone, you might need to clear the cache or roll back to the previous firmware version. If you plan to unlock the bootloader to install LineageOS or Pixel Experience, be prepared for the process to take several hours and require technical skills.
1. Preparation of the phone for system reinstallation
The first and most important step is data backup. Even if you plan to use the official method of recovery through the Mi Flash Tool, there is a risk of losing photos, contacts and messages. Xiaomi offers built-in cloud storage Mi Cloud, but it does not store all data (for example, passwords from Wi-Fi or settings of some applications will have to be restored manually).
For a full backup, we recommend:
- ๐ฑ Use Mi Mover (built-in application) to transfer data to another smartphone or PC.
- โ๏ธ Upload important files to Google Drive or Yandex Disk (photos, videos, documents).
- ๐ Export SMS And the log of calls through apps like SMS Backup & Restore.
- ๐ Save the list of installed applications using ADB App List Backup.
Pay special attention IMEI Write them down or take a picture of the sticker under the lid (if the battery is removable). IMEI, Without this data, you will be left without mobile communication.
โ ๏ธ Note: If your Xiaomi is linked to your Mi Account and has Find Device enabled, the system may require login and password to be entered after reset. Make sure you remember the login details, otherwise the phone will turn into a brickยป.
Also check:
- ๐ Battery charge (at least 60%, ideally 100%).
- ๐ Availability of original USB-cables (cheap cables can interrupt the connection during firmware).
- ๐ป Windows computer 7/10/11 (Mi Flash Tool requires Microsoft OS).
Make a backup copy of all data
Record IMEI and serial number
Make sure you're working. USB-cable
Charge your phone to 100%
Disable protection with a pattern lock/PIN-code (if possible)
Download the necessary drivers and firmware-->
Official reinstallation methods MIUI
Xiaomi offers two official methods of system recovery: Recovery Mode and Fastboot. The first is suitable for resetting to factory settings or installing updates in.zip format, the second is for complete flashing of the device, including the bootloader and radio modules.
2.1 Reset via Recovery Mode
This is the easiest way to do this, and it doesn't require a PC connection, and it's good if you:
- ๐ The phone is slowing down, but it's turning on.
- ๐ You must delete all data before selling.
- ๐ฆ Requires to roll back an update that was installed with errors.
Instructions:
- Turn off the phone.
- Press the Power + Volume buttons up until the Mi logo appears.
- In the Recovery menu, select Wipe Data. โ Wipe All Data (use volume buttons for navigation, power button for confirmation).
- After cleaning, select Reboot โ Reboot to System.
โ ๏ธ Note: On some models (Redmi Note 10 Pro, POCO X3 Pro) after resetting through the recavers, it may be necessary to re-activate the bootloader.If the phone does not load beyond the logo, use Fastboot.
Flashing through Mi Flash Tool (Fastboot)
This method is suitable for โbrickโ devices or when you need to install another version. MIUI (You're going to need to change the region:
- ๐ฅ๏ธ Windows computer.
- ๐ Cable USB Type-C (for new models).
- ๐ Firmware in.tgz or.zip format (download from the official Xiaomi website).
- ๐ ๏ธ Mi Flash Tool (last version).
Step-by-step:
- Unpack the firmware in a folder without Cyrillic characters (for example, C:\Xiaomi\proshivka).
- Install drivers for Fastboot (you can download with the Mi Flash Tool).
- Turn off the phone and put it in Fastboot mode: pinch Power + Volume down.
- Connect your phone to your PC. The Android Bootloader Interface should appear in Device Manager.
- Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
- Press Refresh โ the program must identify your device.
- Select firmware mode: Clean All โ complete cleaning (recommended when changing region); Clean All and Lock โ locking bootloader (for security); Save User Data โ saving user data (not always stable).
Flash
| Firmware mode | Is the data preserved? | Loader status | When to use |
|---|---|---|---|
| Clean All | โ No. | Unlocked. | Changing the region, treating viruses |
| Clean All and Lock | โ No. | Blocked. | Recovery after failure |
| Save User Data | โ Yes (partially) | Unlocked. | Update without data loss |
๐ก
If the Mi Flash Tool is giving you a critical partition flashing error is not allowed, try using an older version of the utility (for example, 2018) or run your phone through the phone. EDL-Mode (requires an authorized Xiaomi account).
3. Unlocking the bootloader: when is it necessary?
By default, all Xiaomi smartphones have their bootloader locked, a security measure that prevents unofficial software from being installed.
- ๐ฆ Install custom firmware (LineageOS, Pixel Experience).
- ๐ Get root rights (via Magisk).
- ๐ Install modified Recovery (TWRP).
You'll have to unlock the bootloader. You can officially do this through the Mi Unlock Tool, but there's a nuance:
The unlocking process takes 7-14 days (on new Mi Account accounts), Xiaomi requires you to link the device to your account and wait for the system to โapproveโ the unlock.
- Turn on About Phone โ MIUI version (click 7 times to activate Developer Mode).
- Go to the Supplementary โ For developers and include OEM Unlocking.
- Attach the device to Mi Account in your account settings.
- Download Mi Unlock Tool from the official website and log in.
- Connect your phone in Fastboot mode and follow the program instructions.
โ ๏ธ Attention: On Xiaomi models 12/13 series and Redmi Note 11/12 Unlocking the bootloader can lead to blocking data encryption (FBE). After that, some banking applications (Sberbank, Tinkoff) will stop working. AVB (Android Verified Boot).
If you donโt want to wait 7 days, there are unofficial methods to unlock through the Internet. EDL (Emergency Download Mode, but they require:
- ๐ป Special Cable (Deep Flash Cable).
- ๐ Authorized Xiaomi Account (paid).
- ๐ ๏ธ Knowledge of working with QFil or Mi Flash Pro.
What happens if you unblock the bootloader unofficially?
4. Install custom firmware through TWRP
If official MIUI You are not satisfied with the alternative firmware, for example:
- ๐ฑ LineageOS โ โcleanโ Android without unnecessary applications.
- ๐จ Pixel Experience โ firmware with an interface like Google Pixel.
- โก ArrowOS โ Optimized for Performance.
- ๐ Havoc-OS โ with advanced privacy settings.
This will require:
- Unlocked boot loader (see previous section).
- Installed custom TWRP recap.
- Firmware in.zip format (download only from trusted sources, such as XDA Developers).
- Additionally: Magisk (for root rights), GApps (Google services, if they are not in firmware).
Instructions for installing TWRP and custom firmware:
- Download. TWRP for your model (for example, twrp-3.7.0_9-0-lavender.img For the Redmi Note 7).
- Transfer the phone to Fastboot mode and connect to the PC.
- Open the command line in the folder with ADB and execute: fastboot flash recovery twrp.img fastboot boot twrp.img
- The phone will load into TWRP. Go to Wipe. โ Format Data (required, otherwise the firmware will not stand up!).
- Copy the firmware to the phone through MTP (into TWRP There's a Mount option. โ Enable MTP).
- Press Install, select a firmware file and confirm the installation.
- After completion, install Magisk (if you need a root) and GApps (if you need Google services).
- Reboot to the system (Reboot โ System).
โ ๏ธ Note: On new Xiaomi models (Redmi Note) 12, POCO F5) The sensor may not be working TWRP Because of the changes in the core, the solution is to use TWRP Touch support or control through ADB: adb shell twrp install /sdcard/rom.zip
๐ก
Castom firmware deprives you of official updates over the air (OTA). To update, you will have to manually download new versions and stitch them through TWRP.
5. Data recovery after reinstallation
Once you have the system installed, you have to put all the data back in place.
- ๐ฑ Sign in to Mi Account (if your phone is tied) or Google Account to sync your contacts and emails.
- โ๏ธ Recover photos and files from cloud storage (Mi Cloud, Google Photos).
- ๐ Install apps from the list (you can use the App List Backup or installation history in Google Play).
- ๐ถ Set up a mobile network (if you have a mobile network) IMEI The connection is restored automatically).
If you've been backing up Mi Mover or Titanium Backup, recover the data from the archive.
- ๐ Files from internal memory (/sdcard/) They might have been deleted when they were formatted. If you copied them to a PC, return them back.
- ๐ Wi-Fi passwords will have to be re-entered (they will not be saved in the cloud).
- ๐ฎ Save games (e.g. in Genshin Impact or in the game) PUBG Mobile will only be restored if they are linked to an account.
On models with encryption FBE (File-Based Encryption) after resetting data from internal memory is impossible to recover, even with the help of specialized programs like Dr.Fone or EaseUS.
6. Frequent errors and their solutions
Even with strict adherence to the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| This device is locked in Fastboot | The bootloader is not unlocked | Use the Mi Unlock Tool or run through EDL |
| The phone is stuck on the Mi logo | Incompatible firmware or damaged partitions | Sweep the full.tgz package through the Mi Flash Tool in Clean All mode |
| Invalid IMEI or no network | Modem section damaged | Restore your IMEI via Maui META or run the modem separately |
| TWRP does not see internal memory | Data Encryption (FBE) | Format Data in TWRP (All data will be deleted!) |
| Error 7 in installation ZIP Recovery | Incompatible firmware or a corrupted file | Check the firmware version and feasibility for your model |
If after the system is reinstalled, the phone:
- ๐ฅ Overheating โ check if background applications are installed (e.g. mining bots).
- ๐ Fast discharge โ Calibrate the battery (discharge to 0%, charge to 100% without interruption).
- ๐ต Update your radio modules with Fastboot: fastboot flash modem NON-HLOS.bin fastboot flash fsg fsg.mbn
Alternative methods: EDL Test Point
If the phone has turned into a brick (not included, not defined in Fastboot), radical methods remain:
7.1. Firmware through EDL (9008 Mode)
Regime. EDL (Emergency Download Mode allows you to flash your phone even with a damaged bootloader:
- ๐ Deep Flash Cable (or a jumper on the board).
- ๐ป Mi Flash Pro or QFilm.
- ๐ Firmware in.mbn format (for Qualcomm) or.opk (for Mediatek).
Instructions:
- Turn off the phone, remove the back cover (if access to the board is possible).
- Find the Test Point (points to translate into) EDL) โ They are all their own (see the charts for each model). 4PDA or XDA).
- Close the contacts with a screwdriver and connect USB-cable.
- Device Manager should appear Qualcomm HS-USB QDLoader 9008.
- Run Mi Flash Pro, select firmware and press Flash.
โ ๏ธ Warning: Test Point failure can damage the board.If you're unsure of your skills, contact the service center.On models with Mediatek (e.g. Redmi) 9A) instead EDL mode BROM, necessary SP Flash Tool.
Recovery through the service center
If all attempts to reinstall the system failed, it remains to contact:
- ๐ข Official Xiaomi Service Center (Warranty is maintained if the bootloader is not unlocked).
- ๐ง Unofficial workshops (cheap, but risk running into incompetent specialists).
The cost of restoring the brick in 2026:
- ๐ฑ Redmi series: 1,500โ3,000 โฝ.
- ๐ฑ Xiaomi 11/12/13: 3 000โ6 000 โฝ (due to the complexity of disassembly).
- ๐ฑ POCO F/Pro: 2 000โ4 000 โฝ.