How to reflash Xiaomi on Android: from unlocking to installing custom firmware

Reflashing Xiaomiโ€™s smartphone to pure Android or custom firmware is a challenge that scares many users. Meanwhile, itโ€™s the only way to get rid of the obsessive shell of MIUI, get up-to-date security updates or resurrect an old device. In this article, weโ€™ll take a look at the whole process from A to Z: from unlocking the bootloader to installing an alternative firmware via Fastboot or TWRP.

It is important to understand that the procedure requires care and preparation. Errors at any stage can lead to a "brick" (inoperability) of the device, loss of warranty or problems with the operation of modules (for example, a camera or NFC on some firmware). However, with the right approach, even a beginner will cope with the task. We will consider official and informal methods, as well as give recommendations for choosing firmware for specific models of Redmi, POCO and Mi.

Why users want to reflash Xiaomi on pure Android

The main reason is dissatisfaction with the MIUI branded shell, which, despite regular updates, sins:

  • ๐Ÿ“ฑ Aggressive advertising in system applications (even in settings)
  • ๐Ÿข Slowdowns due to excessive background processes
  • ๐Ÿ”’ Restrictions on the removal of pre-installed applications
  • ๐Ÿ“… Android update delays (sometimes years)

Pure Android (or firmware based on it, like LineageOS, Pixel Experience) solves these problems. In addition, custom firmware often supports devices longer than Xiaomi itself. For example, Redmi Note 7 (2019) officially received its last update in 2022, but LineageOS 20 runs Android 13.

Other reasons for reflashing:

  • ๐Ÿ”ง Recovery of the brick after a failed update
  • ๐Ÿ“ฑ Testing new features (e.g. Android 14 on non-upported devices)
  • ๐Ÿ”’ Removal of Chinese services and spyware (relevant to global firmware)
  • ๐ŸŽฎ Optimization for gaming (firmware with Kirin Gaming core)

โš ๏ธ Note: Firmware reflashing on unofficial firmware will void the Xiaomi warranty. In some cases (for example, when using Google Camera on custom cores), the quality of photos / videos may deteriorate.

๐Ÿ“Š What kind of firmware do you prefer on Xiaomi?
Official MIUI
LineageOS
Pixel Experience
Another custom
I don't know.

Preparation for Flashing: What to Do Before Starting

Before starting the procedure, follow the mandatory steps:

Create a backup copy of data (photos, contacts, SMS)

Check the device model in Settings โ†’ About the phone

Download the necessary firmware (official or custom)

Install ADB/Fastboot drivers on PC

Charge your phone at least 60%

Prepare. USB-cable (preferably original)

-->

Pay special attention to backup. Flashing erases all data from internal memory.

  • ๐Ÿ“ฑ Mi Cloud for Contacts and Notes
  • ๐Ÿ–ฅ๏ธ Google Photos for Media Files
  • ๐Ÿ’พ Titanium Backup (requires root) for applications
  • ๐Ÿ“‚ ADB Backup for system settings (command: adb backup) -all -f backup.ab)

To determine the exact model of the device, go to Settings โ†’ About Phone โ†’ Model. For example, the Redmi Note 10 Pro can have indexes sweet (global version) or sweetin (Indian).

โš ๏ธ Note: If your device is blocked by an operator (e.g. MegaFon or Beeline), unlocking the bootloader may cause communication to be lost.

Unlocking the Xiaomi bootloader: step-by-step instructions

Without an unlocked bootloader, custom firmware cannot be installed. Xiaomi officially lets you unlock it, but the process requires waiting and linking an account.

Steps to unlock:

  1. Link your Mi Account to your device: Go to Settings โ†’ Xiaomi Account Sign in or sign up (be sure to link your phone number!) Enable sync
  2. Activate debugging on USB: Enable Developer Mode (7 taps according to Version) MIUI In About Phones In Settings โ†’ Additionally. โ†’ For developers, turn on: ๐Ÿ”ง Debugging by USB ๐Ÿ”“ Unlocking OEM (point-of-point!)

Connect to the PC.

adb devices

Your device should display a series of numbers.

Launch the unlock utility

  • Download Mi Unlock Tool (official website)
  • Log in to the same Mi Account as on your phone
  • Follow the instructions of the program (it may take 7-30 days to wait!)
Xiaomi modelWaiting period for unlockingFeatures
Redmi Note 10/117 daysRequires a tie-up. SIM-map
POCO F3/F414 daysYou may need to disable the antivirus on the PC
Mi 11/1230 days86006/86012 - Requires repeated attempts
Redmi 9/9A3-5 daysSometimes unlocked without waiting.

Once the bootloader is unlocked, the device will reset to factory settings! All data will be deleted.

1. Disable VPN/proxy on PC

2. Use another USB-cable (preferably original)

3. Run the program on behalf of the administrator

4.Reboot the phone and PC-->

Selection of firmware: official vs custom

Once you unlock the bootloader, you need to decide on the type of firmware. Each option has pros and cons:

Official firmware Xiaomi

  • โœ… Stability: tested by the manufacturer
  • โœ… Compatibility: all modules (camera, NFC, IR-blaster working
  • โœ… OTA-Updates: Automatic updates
  • โŒ MIUI: Advertising, restrictions, delays of Android updates

Castom firmware (LineageOS, Pixel Experience, etc.)

  • โœ… Clean Android: No Advertising and No Extra Apps
  • โœ… Up-to-date versions: Android support 13/14 old-device
  • โœ… Customization: deep customization of the interface
  • โŒ Bugs: possible problems with the camera, sensors, wireless charging
  • โŒ No OTA: Updates are installed manually

Where to download firmware:

  • ๐Ÿ”— Official: en.miui.com (choose Fastboot or Recovery)
  • ๐Ÿ”— LineageOS: download.lineageos.org
  • ๐Ÿ”— Pixel Experience: download.pixelexperience.org
  • ๐Ÿ”— XDA Developers: a forum with firmware for specific models

โš ๏ธ Attention: Firmware from sites such as 4PDA Torrent trackers may contain viruses or spyware. Download only from official sources or verified topics on the Internet. XDA.

How to check firmware for viruses?
1. Download the file to PC (not to phone!) 2. Check the hash amount (MD5/SHA1) using the HashMyFiles 3 utility. Scan with antivirus (we recommend VirusTotal) 4. Check the file size - it must match the specified on the site (for example, LineageOS for Redmi Note 9 Pro weighs ~1.8 GB)

Install firmware via Fastboot (official method)

Fastboot is suitable for installing official firmware Xiaomi or some custom (for example, Xiaomi.eu).It does not require custom recovery, but erases all data.

Tools required:

  • ๐Ÿ–ฅ๏ธ PC Windows/Linux/macOS
  • ๐Ÿ”Œ Cable USB (preferably original)
  • ๐Ÿ“ฆ Firmware in.tgz or.zip format (for Fastboot)
  • ๐Ÿ› ๏ธ Utilities. ADB and Fastboot (download)

Step-by-step:

  1. Unpack the firmware in the folder with fastboot (must be files) images/ and flash_all.bat)
  2. Turn your phone into Fastboot: adb reboot bootloader or turn off the device and press Power + Volโˆ’
  3. Connect your phone to your PC and check for detection: fastboot devices
  4. Start the firmware: For Windows: Launch flash_all.bat For Linux/macOS: launch./flash_all.sh

Wait for completion

If the process is interrupted with a FAILED error (remote: 'Flashing is not allowed') it means:

  • ๐Ÿ”“ The bootloader is not unlocked (repeat the unlock procedure)
  • ๐Ÿ”Œ The cable is faulty (try another one)
  • ๐Ÿ–ฅ๏ธ Drivers not installed (check in Device Manager)

๐Ÿ’ก

Fastboot is suitable for building blocks recovery and installation of official firmware. LineageOS (Pixel Experience) custom firmware usually requires TWRP.

Installation of custom firmware through TWRP

For most custom firmware, custom recavery will be required โ€” TWRP (Team Win Recovery Project. ZIP-Firmware files, make backups and restore them.

Installation steps:

  1. Download TWRP for your model: Official website: twrp.me For new devices (Redmi Note 12, POCO F5) look for unofficial builds on XDA
  2. Install. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_12-1-sweet.img Fastboot Reboot Recovery (replace sweet with your model code)
  3. Make a backup in TWRP: Select Backup Tags Boot, System, Data Save to SD-card or PC (via ADB Pull)

Install the firmware

  • Move it. ZIP-phone-file
  • V TWRP Choose Install โ†’ Select a file โ†’ Swipe to Confirm Flash
  • Clear the cache: Wipe โ†’ Format Data (enter "yes") Wipe โ†’ Advanced Wipe โ†’ Dalvik/ART Cache, Cache
  • Reboot to the system (Reboot โ†’ System)

In some cases, it may be necessary to re-unblock the bootloader (waiting 7-30 days).

Which Xiaomi models are better not to re-flash?
Not recommended to flash: Xiaomi Mi A1/A2/A3 โ€“ already coming with pure Android, but have problems with Redmi 9C/9A updates โ€“ weak iron, custom firmware works unstablely POCO M3 โ€“ frequent bugs with sensors after firmware Devices on MediaTek (for example, Redmi 10C) โ€“ little support from developers Before checking the themes on XDA or 4PDA โ€“ there are usually compatibility lists.
How to check if the bootloader is unlocked?
Turn off your phone and press the power. + Volโˆ’. If you see: ๐Ÿ”“ "Unlocked โ€“ the bootloader is unlocked ๐Ÿ”’ "Locked bootloader is also available to check with the command: fastboot oem device-info Look for the lines Device unlocked: true.
What if the Mi Unlock Tool canโ€™t see the device?
Try: Disable antivirus on PC (it can block drivers) Use another USB-port (preferably) USB 2.0) Install drivers manually through Device Manager (look for Android Bootloader Interface) Run Mi Unlock Tool on behalf of the administrator Try another PC (sometimes helps) If nothing works, check if O is enabledEM Unlock in the Developer Settings.
Can I use Xiaomi without a computer?
Technically yes, but with reservations: ๐Ÿ“ฑ For official updates โ€“ through Settings โ†’ Updating the system ๐Ÿ“ฑ For custom firmware - only if already installed TWRP and firmware ZIP To unlock the loader and the first installation TWRP computer is mandatory.