How to reinstall Android on Xiaomi: a complete guide with unlocking and firmware

Introduction: Why reinstall Android on Xiaomi?

Reinstallation of the operating system on Xiaomi, Redmi or POCO smartphones can be required in a variety of situations, from bugs after an upgrade to a complete reset before sale. But unlike a conventional factory reset, a clean Android installation allows you to eliminate deep software failures, remove viruses that have penetrated system files, or even switch to custom firmware for advanced features.

But it's not as easy as it sounds, and it's important to consider the device model, the MIUI version, the status of the bootloader, and even the region of the firmware, and any mistake at any stage, and the smartphone risks becoming a brick. In this article, we'll look at all the steps of reinstallation, from preparing and unlocking the bootloader to choosing the firmware and installing it through Fastboot or Recovery, and how to avoid the typical mistakes that even experienced users make.

Before you get started, answer a key question: Do you need official firmware (for stability and warranty) or custom firmware (for advanced features and updates)?

๐Ÿ“Š Why you want to reinstall Android on Xiaomi?
Eliminate lags and bugs
Install custom firmware
Returning factory condition
Update to the new version of MIUI
Other

Preparation for reinstallation: what to do before firmware

The first and most important step is data backup. Reinstalling Android will remove all the contents of internal memory, including photos, contacts and messages. Use Mi Cloud, Google Drive or local copying on your PC.

  • ๐Ÿ“ธ Photos and videos (check folders) DCIM and Pictures)
  • ๐Ÿ“ฑ Contact and SMS (Export through Settings โ†’ Google โ†’ Backup)
  • ๐ŸŽฎ Save games (use Google Play accounts or specialized utilities like Helium)
  • ๐Ÿ”‘ Passwords and tokens (save data from Mi Account, banking applications, social networks)

Check the device model and current MIUI version, which is critical for choosing the right firmware. You can find out the model in Settings โ†’ About Phone โ†’ Model (e.g. Redmi Note 11 Pro 5G or POCO F4). See the MIUI version in the same place โ€“ it is usually designated MIUI 14.0.5.0 (SKUEUXM), where:

  • SKU - model code
  • EU โ€“ Firmware Region (Europe)
  • XM - Type of assembly (Stable)

Also prepare:

  • ๐Ÿ”Œ Charged smartphone (at least 60% of the battery)
  • ๐Ÿ’ป Windows computer 10/11 (for Fastboot)
  • ๐Ÿ”— Cable USB (original, undamaged)
  • ๐Ÿ› ๏ธ Tools: Mi Flash Tool, ADB/Fastboot, Qualcomm or Mediatek drivers (depending on the processor)

Make a backup copy of all data |

Find out the exact model and version of MIUI|

Charge your phone at least 60% |

Download the firmware for your model |

Install drivers and Mi Flash Tool-->

Unlocking the bootloader: without this firmware is impossible

All Xiaomi smartphones have a bootloader by default, a security measure that prevents unofficial software from being installed. To reinstall Android, the bootloader will have to unlock, otherwise the system will simply not allow the device to be flashed.

The unlocking process includes several stages:

  1. Mi Account Link: Your Mi Account must be tied to the device for at least 7 days (up to 30 days for new models!).
  2. Application: via the official Mi Unlock app (you can download it on the Xiaomi website).
  3. Waiting for approval: It usually takes from a few hours to 72 hours.
  4. Unlocking itself: Connect your phone in Fastboot mode and execute a command via the Mi Unlock Tool.

Important nuances:

  • ๐Ÿ”’ You can unlock only one device per month on a Mi Account.
  • ๐Ÿ“ฑ Some models (e.g. Xiaomi) 13T or Redmi K60) require additional confirmation through SMS.
  • โš ๏ธ Once unlocked, all data, including data in internal memory, will be reset!
What happens if you break the unlock?
If you turn off your phone or computer while unlocking the bootloader, the device can hang on the Mi logo or go to Fastboot mode with the error This device is locked. Only a repeated attempt to unlock or contact the service center (if the warranty is valid) will help restore the workability.

Once successfully unlocked, the phone will display this device is unlocked, and you can start selecting and installing the firmware.

Firmware selection: official MIUI vs custom builds

The type of firmware depends not only on the functionality of the smartphone, but also its stability.

Type of firmwarePlusesConsWho's right for?
Official Stable (MIUI)Maximum stability, support OTA-Updates, maintaining the guaranteeLots of Bloatware (pre-installed apps), slow updatesFor most users who value reliability
Official Beta (MIUI)Early access to new features, frequent updatesPossible bugs, unstable work, not on all modelsFor enthusiasts who are ready for experimentation
LineageOS (Pixel Experience)Clean Android, fast updates, no BloatwareCamera, NFC or other features may not work, no warrantyFor advanced users who want an alternative to MIUI
Ported (from other models)Unique features, unofficial featuresHigh risk of bricking, no supportOnly for experienced users!

Where do I download the firmware?

  • ๐ŸŒ Official assembly MIUI: Xiaomi website (select a version for your model and region!).
  • ๐Ÿ› ๏ธ Custom firmware: XDA Developers or Xiaomi.EU (Multilingual builds).
  • ๐Ÿ” Ported firmware: look in thematic telegram channels or on 4PDA (But be careful!).

Warning: Never install firmware from another model or region! For example, the firmware for the Redmi Note 10 Pro (codename: sweet) will not work for the Redmi Note 10 (codename: mojito).

๐Ÿ’ก

Before downloading the firmware, check its hash amount (MD5 or SHA-1) using the HashMyFiles utility.

Install firmware through Fastboot: step-by-step instructions

Fastboot is the most reliable way to flash Xiaomi, especially if the device is not turned on or stuck on the logo.

Installation steps:

  1. Download the firmware in.tgz or.zip (for Fastboot) and unpack the archive into a folder without Cyrillic characters (for example, C:\Xiaomi\proshivka).
  2. Turn off your phone and press Volume Down + Power to enter Fastboot mode (a hare in a hat-eared hat will appear on the screen).
  3. Connect your phone to your PC and run the Mi Flash Tool. The utility should identify the device.
  4. Select the firmware folder in the Select field and press Refresh. Make sure your device appears in the list.
  5. Select firmware mode: Clean all - clean (recommended) Clean all and lock - clean + lock bootloader (only for official firmware!) Save user data - save data (not always working correctly)

Flash

If the process is successful, the phone will automatically restart. The first turn on can take up to 15 minutes - don't interrupt it!

๐Ÿ’ก

Clean all and lock mode will lock the bootloader back, only use it if you install the official firmware and do not plan to further manipulate the system.

Common errors when running through Fastboot:

  • ๐Ÿšซ This package is for "xxx" devices; this is a "yyy.
  • ๐Ÿšซ Flash is not done. Please uninstall and reinstall MiFlash - driver or antivirus problems.
  • ๐Ÿšซ Device not found โ€“ incorrect cable connection or lack of drivers.
What if the Mi Flash Tool canโ€™t see the device?
1. Check that the phone is really in Fastboot mode (screen with a hare). 2. Install drivers manually through Device Manager (look for Android Bootloader Interface). 3. Try another one. USB-port (preferably) USB 2.0 back-panel). 4. Disable the antivirus (it can block the Mi Flash Tool). 5. Reinstall the Mi Flash Tool to a folder without spaces (e.g, C:\MiFlash).

Installation of firmware through Recovery: an alternative method

If Fastboot is not available for some reason, you can flash the device through custom recovery (e.g. TWRP), a method that is suitable for installing custom firmware or updating without completely cleaning the data.

What you need:

  • ๐Ÿ”ง Established TWRP Recovery (Universal Recovery from Xiaomi is not suitable!).
  • ๐Ÿ“ฑ Firmware in.zip format (for TWRP).
  • ๐Ÿ”Œ The debugging bridge ADB (To transfer files if the internal memory is not readable).

Instructions:

  1. Download the firmware and place it in your internal memory or on the SD-map.
  2. Turn off your phone and press Volume Up + Power to enter TWRP.
  3. In TWRP, select Wipe โ†’ Advanced Wipe and mark: Dalvik / ART Cache System Data (if you need a full cleanup) Cache

Then swipe for confirmation.

Install

Confirm the installation with a swipe and wait for completion.

Reboot System

Warnings:

โš ๏ธ Note: If you are installing custom firmware, first check compatibility with your model in the forum XDA or 4PDA. Some firmware requires additional patches (for example, to operate a camera module or a camera module). NFC).

โš ๏ธ Note: After installing custom firmware, Google Pay, Netflix may stop working HD Recovery will require Magisk and Universal SafetyNet Fix.

What to do if the phone does not turn on after the firmware?

If, after reinstalling Android, the device doesn't respond to the power button or gets stuck on the logo, don't panic. 90% of the time, it's fixable. Consider typical symptoms and solutions:

Symptoms.Possible causeDecision
Black screen, no response to buttonsBattery or soft brick is outConnect to charging for 30 minutes, then try logging into Fastboot (Loudness down + Power)
Hanging on the Mi or Redmi logoIncompatible firmware or incomplete cleaningFastboot with full cleanup (Clean all)
Cyclical reboot (bootloop)Damaged system files or incorrect boot.imgInstall firmware via TWRP or run boot.img separately through Fastboot:
No command error in RecoveryDamaged Standard RecoveryInstall TWRP via Fastboot (fastboot flash recovery twrp.img)

If the phone doesnโ€™t respond to any combination of buttons, try hardware reset:

  1. Turn off the phone from charging.
  2. Press Volume Up + Power for 20-30 seconds.
  3. If it doesnโ€™t help, connect to your PC and check if the device is detected in Device Manager (Qualcomm HS-USB QDLoader 9008).