Reinstallation of the operating system on Xiaomi smartphones can be required in a variety of situations, from bugs after an upgrade to a complete cleaning of the device before sale. Unlike a normal reset, a full flashing allows you to install a clean version of Android from scratch, eliminating system errors, removing viruses or even changing the firmware region. However, the process requires care - wrong actions can turn the phone into a brick.
In this article, we will discuss all the steps from device preparation to installation method selection (via Fastboot or Recovery), focus on the nuances for different Xiaomi models, including the Redmi Note 12, POCO X5 and the flagship Mi 13 series. You will also learn how to avoid common mistakes, such as losing IMEI or blocking your Mi Account after firmware.
Before you start, answer the main question: why do you need to reinstall Android? If the goal is just to clean your phone of garbage, maybe enough resetting through Settings โ Phone โ Reset. Flashing is only needed for deep system changes, install custom firmware or recover from serious crashes.
1. Preparing the phone for flashing
The first and most important step is data backup, and reinstalling Android will remove all information from internal memory, including:
- ๐ฑ Contacts (unless synced with Google or Mi Cloud)
- ๐ท Photos and videos in the gallery (including screenshots and downloads)
- ๐ต Music, documents and files in the Download folder
- ๐ Wi-Fi passwords, data stored in the browser
- ๐ฎ Game saving (if not linked to an account)
For backup, use:
- ๐ฅ๏ธ Mi PC Suite (Official Software from Xiaomi for Windows)
- โ๏ธ Cloud services: Google Drive, Mi Cloud or Yandex Disk
- ๐ Manual copying to a computer via cable USB Type-C
โ ๏ธ Note: If your phone is locked with a pattern lock or password and you donโt remember your Mi Account details, flashing it will not unlock the device).
Also check:
- ๐ Battery charge (at least 50%)
- ๐ The original cable. USB (Cheap cables can interrupt the connection)
- ๐ป Windows computer 7/10/11 (for the Fastboot method)
โ๏ธ Checklist before firmware
2 Unlocking the bootloader (Bootloader)
Without unlocking the bootloader, you canโt reinstall Android on Xiaomi, which is protection against unauthorized system changes, taking 3 to 15 days (depending on Xiaomiโs policy) and requires:
- A phone-linked Mi Account (with a confirmed phone number!)
- Developer mode enabled and USB debugging allowed.
- Mi Unlock Tool (you can download from the official website).
Instructions for unlocking:
- Activate Developer Mode: Go to Settings โ About Phone and click on MIUI Version 7 times.
- Back to Settings โ Additionally. โ For developers and include: ๐ Unlocking OEM (It may be called a factory unlock) ๐ Debugging by USB
Mi Unlock Tool
Mi Account
Fastboot
Fastboot
โ ๏ธ Warning: If you bought your phone with your hands, make sure the previous owner untie their Mi Account. Otherwise, after unlocking the bootloader, the device may be tied to someone else's account and you will not be able to use it.
Once successfully unlocked, the bootloader will remain unlocked even after flashing, but some official firmware (such as the Xiaomi 13 Ultra) can automatically block it when installed, in which case the procedure will have to be repeated.
What happens if you flash a phone with a locked bootloader?
3. Selection of firmware: official vs custom
The type of firmware that determines the stability of the phone, the availability of updates and even the guarantee.
| Type of firmware | Pluses | Cons | For which models? |
|---|---|---|---|
| Official MIUI (Global/EEA/China) | โ Stable work โ Support OTG-update โ Preservation of the guarantee | โ Many pre-installed applications โ Advertising in system utilities โ Restrictions by region (for example, no Google on Chinese firmware) | All models Xiaomi/Redmi/POCO |
| Castom (LineageOS, Pixel Experience, crDroid) | โ Clean Android without Bloatware โ Quick security updates โ Advanced settings | โ Possible bugs with camera or sensors โ No official support โ Loss of guarantee | POCO F3, Redmi Note 10 Pro, Mi 11 (popular models) |
| Port from other devices (for example, firmware from POCO to Redmi) | โ Unique features | โ High risk of โbricking" โ Failing modules (NFC, 5G) | Only for experienced users |
Where to download the firmware:
- ๐ Official firmware MIUI: https://new.c.mi.com/global/miuidownload/index
- ๐ ๏ธ Custom firmware: XDA Developers or SourceForge
- ๐ To search by model: use the Device filter: [name of your model] on XDA.
Critically, the firmware must match the phone model and the bootloader version (e.g., Redmi Note 11 Pro 5G and Redmi Note 11 Pro are different devices!) Installing incompatible firmware will result in loss of IMEI or failure of the communication module.
๐ก
Before downloading the firmware, check its hash amount (MD5) using the MD5 Checker utility. This will protect against downloading corrupted files.
4. Android reinstallation methods
There are three main ways to use Xiaomi:
- via Fastboot (recommended for official firmware).
- Through Recovery (suitable for custom firmware and updates).
- EDL (Emergency mode if the phone is not turned on).
Letโs look at the first two methods in detail.
Installation via Fastboot (for official firmware)
This method is suitable for stock firmware installation (original MIUI) and requires an unlocked bootloader.
- ๐ฅ๏ธ Computer with installed Xiaomi drivers (you can download through the Mi Flash Tool).
- ๐ Firmware in.tgz or.zip format (unpacked in a folder).
- ๐ ๏ธ Mi Flash Tool (download from the official website).
Step-by-step:
- Turn off the phone and press Volume Down + Power to log into the Fastboot.
- Connect the phone to the PC.
- Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
- At the bottom, select Clean All (Full Cleaning) or Clean All and Lock (Cleaning + Lock bootloader).
- Press Flash and wait until it is completed (5-10 minutes).
โ ๏ธ Attention: If there is an error in the process anti_rollback, This means you are trying to install an older version. MIUI, This requires firmware with the same or newer Anti-Rollback number (check on Xiaomi website).
Installation via Recovery (for custom firmware)
This method is used to install custom ROM (like LineageOS) or updates via TWRP.
- Download TWRP for your model from the official website.
- Rename the file to recovery.img and place it in the folder with ADB.
- In the command line, run: fastboot flash recovery.img fastboot boot recovery.img
Next:
- Boot to TWRP (click Volume Up + Power).
- Make a backup of the current firmware (optional).
- Press the Wipe. โ Advanced Wipe and mark: ๐๏ธ Dalvik / ART Cache ๐ฑ System ๐ Data ๐ Cache
Install โ Choose. ZIP-file
๐ก
After installing custom firmware, the first run can take up to 15 minutes. Do not interrupt the process, even if the screen does not react for a long time.
5. Common mistakes and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| This device is locked (in Fastboot) | The bootloader is not unlocked | Repeat the unlocking procedure with the Mi Unlock Tool |
| The phone is not defined in the Mi Flash Tool. | There is no driver or faulty cable | Install drivers manually through Device Manager or try another USB cable/port |
| Mistake 7 in TWRP | Incompatible firmware or damaged ZIP-file | Check the firmware model and download the file again |
| No network after firmware | Lost IMEI | Restore the IMEI through Engineer Mode (instruction below) |
If the connection to the mobile network is lost after the firmware, the IMEI is most likely reset.
- Install the Mobile Uncle Tools app from the Play Market.
- Open Engineer Mode โ Engineer Mode (MTK).
- Go to Connectivity โ CDS Information โ Radio Information.
- Enter the commands (replace XXXXX on your IMEI): AT +EGMR=1.7,"XXXXXXXXXXXXXX" AT +EGMR=1.10,"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
- Reboot the phone.
๐ก
If the phone starts to warm up after firmware, check the load on the processor in the CPU Monitor application. Often the cause is background data synchronization or an unoptimized core in custom firmware.
7. How to return the phone to factory settings without firmware
If the goal is simply to clean the phone, rather than change the firmware, use Hard Reset, a method that does not require unlocking the bootloader and keeps the official firmware.
- Turn off the phone.
- Press Volume Up + Power before the Mi logo appears.
- From the Recovery menu, select Wipe Data โ Wipe All Data.
- Confirm the action and wait for the reboot.
Differences between Hard Reset and Reflashing:
- โ Save the current version MIUI.
- โ Doesn't require a computer.
- โ Does not eliminate system errors if they are related to damage to firmware files.