Reinstallation of the operating system on Xiaomi smartphones is a procedure that can be required in case of critical failures, wanting to upgrade an outdated version of MIUI or switch to a clean Android. Unlike a conventional factory reset, full flashing allows you to eliminate deep software errors, remove viruses that have penetrated system files, or even bring back to life the βbrickβ after a failed update. However, this process requires accuracy: wrong actions can turn your Redmi Note 12 or POCO X5 into a useless piece of plastic.
In this article, we will discuss all the official and informal ways to reinstall Android on Xiaomi devices, including unlocking the bootloader, choosing the right firmware (stable/global/castom), and recovering data after the procedure. We will pay special attention to the nuances for different models, from the budget Redmi A2 to the flagship Xiaomi 14 Ultra. If you have never done firmware before, start with the official method through the Mi Flash Tool - it is the safest, although it requires waiting for the bootloader to unlock.
1.Reinstallation Preparation: What to Do Before Firmware
Before you start flashing, be sure to check the compatibility of the selected firmware with your Xiaomi model by device code (for example, toco for the device). POCO X3 Pro or cupid for Xiaomi 13. Installing incompatible software will cause the smartphone to fail. β The phone. β Model or on a sticker under the slot cover SIM-map.
Also prepare:
- π Battery charge of at least 60% (when discharged during firmware, the device can turn into a βbrick").
- π» Windows computer 7/10/11 (The Mi Flash Tool is required for Windows).
- π Original. USB-cable (cheap cables can interrupt data transmission).
- π Backup of important data (firmware completely erases internal memory!).
β οΈ Note: If your Xiaomi was purchased in China, it is likely that it is running regional firmware without support for Google services. MTK-Check compatibility in advance on the forum Xiaomi.eu.
For backup, use:
- π² Built-in Settings function β Additionally. β Backup and reset (keeps contacts, SMS, setting).
- π₯οΈ Mi programme PC Suite (copy photos, videos, applications).
- βοΈ Cloud services (Google Drive, Mi Cloud) for documents.
2 Unlocking the bootloader (Bootloader) - a mandatory step
All modern Xiaomi smartphones come with a locked bootloader, meaning you wonβt be able to install custom firmware or even official firmware through Fastboot until you unlock it.The procedure takes 3 to 7 days (depending on Xiaomiβs policy) and requires you to link your Mi Account to the device.
Step-by-step:
- 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 (may require input PIN-code). π Debugging by USB.
Mi Unlock Tool
Mi
Fastboot
Food + Volume Down
Unlock
β οΈ Warning: Once the bootloader is unlocked, the smartphone will perform a full reset (wipe). All data will be deleted! Also, some banking applications (for example, Sberbank Online) may stop working due to a trigger. OEM Unlock is secure in Android.
What if the Mi Unlock Tool canβt see the device?
3. Selection of firmware: official vs custom
The type of firmware depends on the stability of work, the availability of Google services and even battery life.
| Type of firmware | Advantages | Deficiencies | Who's right for? |
|---|---|---|---|
| Official Stable (Global/EEA) | Maximum compatibility, support for OTA updates, all functions work | Lots of Bloatware (pre-installed Xiaomi apps), slow updates | For those who want stability |
| Official Development (Beta) | New features before everyone else, less Bloatware | Bugs, unstable work, possible problems with the battery | Enthusiasts Ready for the Bugs |
| Xiaomi.eu | Clean MIUI without Chinese apps, weekly updates | No official support, camera/NFC bugs are possible | Advanced users |
| LineageOS (Pixel Experience) | Clean Android, long-term support, no Bloatware | Camera, NFC, Widevine L1 (no Netflix in HD) may not work | Gycs who want a stock Android |
For most users, the best choice is the official global firmware (for example, V14.0.3.0.TMCEUXM for Xiaomi 13). It can be downloaded from the site en.miui.com. If you need firmware without unnecessary applications, pay attention to Xiaomi.eu - a modified version of MIUI with remote bloatware and added support for the themes of design.
π‘
Before downloading the firmware, check its hash amount (MD5) using the HashMyFiles utility. This will save you from installing a corrupt file that can "brick" the device.
4. Ways to reinstall Android on Xiaomi
There are three main firmware methods, each suitable for different situations:
4.1. via Mi Flash Tool (Fastboot)
The most reliable way to get official firmware is if:
- π± The device does not turn on or is stuck on the Mi logo.
- π I need to return the stock firmware after the custom.
- π§ Requires a complete reinstallation with the removal of all data.
Instructions:
- Download the Mi Flash Tool and unpack the firmware into a folder without Cyrillic characters.
- Start the phone in Fastboot mode (Power + Volume Down).
- In the program, click Select, specify the path to the folder with the firmware, then Refresh (the device should appear).
- Choose Clean All or Clean All and Lock (if you want to lock the bootloader again).
- Press Flash and wait until it is completed (10-15 minutes).
4.2. Through Recovery (TWRP)
This method allows you to install custom firmware (for example, LineageOS) or make backups through TWRP.
- π οΈ Installation of modified versions MIUI (Xiaomi.eu).
- π Updates without loss of data (if firmware is compatible).
- π¦ Backups of the section /data.
To install TWRP:
- Download the recovery image for your model from twrp.me.
- Rename the file to twrp.img and place it in the folder with the platform-tools (from the Android SDK).
- Run command: fastboot flash recovery twrp.img fastboot boot twrp.img
- In TWRP, select Wipe β Format Data (if you want a clean installation), then Install and specify the firmware file.
Through OTA (Air Update)
The easiest way, but it only works for official updates: If your Xiaomi is switched on and connected to the Internet, check for updates in Settings β About Phone β System Update. This method does not require unlocking the bootloader and saves all data.
βοΈ Preparation for firmware through Mi Flash Tool
5. Typical errors and their solutions
Even if you follow the instructions, you can have problems, and here are the most common mistakes and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Couldn't unlock the Mi Unlock Tool | It has not been 7 days since the account was linked. | Wait until the time is set or try another Mi Account. |
| Fastboot not recognized | No drivers or wrong path to platform-tools installed | Install Android SDK or add path to adb in environment variables |
| The device does not turn on after firmware | Incompatible firmware or interrupted process | Repeat the firmware through Fastboot with the choice of Clean all |
| Anti-rollback error | Trying to roll back to an older version of MIUI | Only re-read the new version (no retracement possible). |
If Xiaomi does not load beyond the logo after the firmware, try:
- Press Power + Volume up to log into Recovery and make Wipe data.
- Fastboot with a clean all and lock check.
- If nothing helps, contact the service center (possibly damaged). EMMC-chip).
π‘
Never interrupt the firmware process during the writing phase of the system or boot partition, and this is guaranteed to lead to a build-up of the device that can only be restored through the system or boot partition. EDL-Mode (requires an authorized Xiaomi account).
6. Data recovery after reinstallation
If you made a backup through Mi PC Suite or TWRP, you can restore data in a few steps:
For TWRP:
- Copy the backup file (TWRP folder) to your phone.
- Download to TWRP and select Restore.
- Check the Data and Internal Storage sections (do not restore Boot or System!).
- Confirm the recovery and wait for completion.
For the Google account:
- π± When first enabled after firmware, select Restore from backup and log in.
- βοΈ Contacts, calendar and some app settings will be restored automatically.
- π· Photos and videos can be downloaded from Google Photos (if sync is enabled).
β οΈ Note: If you restore data from the backup to custom firmware (for example, LineageOS), some system applications (Mi Gallery, Mi Music) may not work.
7. System optimization after flashing
To make your Xiaomi work faster and keep your charge longer after reinstalling Android, do a few optimizations:
For the official MIUI:
- π Turn off animation: in Settings β Additionally. β For developers, set the animation scale on the off..
- π Limit background activity: Settings β Battery β Optimizing the battery β Choose Strict for Unnecessary Apps.
- ποΈ Remove Bloatware through ADB: adb shell pm uninstall -k --user 0 com.miui.analytics
For custom firmware (LineageOS, Pixel Experience):
- π¨ Install Magisk for root rights and modules (e.g, ViPER4Android sound-enhancing).
- π Set SELinux to Permissive Mode (if you have problems with modules).
- π Regularly update the firmware through OTA or manually (castomy firmware gets security patches more often than MIUI).
adb shell pm disable-user --user 0 com.miui.systemAdSolutionThis will remove ads from system applications.-->