How to Reflash Xiaomi: A Complete Guide from Unlocking to Installing Custom Firmware

Reflashing Xiaomi devices is a process that can both bring a "blocked" smartphone back to life and turn it into a "brick" if you approach it without preparation. โ†’ The phone. โ†’ Updating the system, completely flashing involves replacing software at the bootloader level, which requires unlocking, special tools and knowledge of the nuances for a particular model - be it Redmi Note 12 Pro+ or POCO F5.

In this article, we will analyze all the current ways of flashing: from official updates to MIUI Updater before installing custom firmware such as LineageOS or Pixel Experience. Particular attention will be paid to unlocking the bootloader (nowhere without it!), choosing the right firmware version (global, Chinese, stable or development), as well as typical errors such as ERROR: 999 or hang on the Mi logo. if you've never encountered a fastboot or ADB โ€” Donโ€™t be afraid: weโ€™ll explain everything in plain language, with step-by-step screenshots and warnings about pitfallsยป.

Before you start, answer three questions:

  1. Why do you need to reflash? (Bag fix, update to new version) MIUI, Installation of custom OS, removal of Bloatware?)
  2. Are you ready to lose the warranty? (Unlocking the bootloader will cancel it from official dealers.)
  3. Is there a backup of the data? (Firmware erases everything, including photos in the file) DCIM and WhatsApp messages.)
๐Ÿ“Š What kind of firmware you plan to use?
Official Update via MIUI Updater
Fastboot (full firmware)
Recovery (update over the air)
Custom firmware (TWRP)
I don't know, I'll pick it after reading.

1. Preparation for flashing: what to do before the beginning

The first and most important step is to save all the data. Flashing through fastboot or recovery formats the partition. /data, And with it, you can see photos, contacts, messages and app settings, even if you're planning to upgrade over the airยป (OTA), It is better to be safe: sometimes updates fly off, and the phone turns into a brickยป.

What to keep is mandatory:

  • ๐Ÿ“ธ Photo and video: copy the folder DCIM on PC or cloud (Google Photos, Mi Cloud).
  • ๐Ÿ“ฑ Contact and SMS: Export through Settings โ†’ Google โ†’ Backup or application SMS Backup & Restore.
  • ๐Ÿ”‘ Passwords and Tokens: Check that you have access to Mi Account, Google and two-factor authentication (if used).
  • ๐ŸŽฎ Game Save: Use built-in cloud-based save features (such as Genshin Impact or Call of Duty Mobile).

The second critical point is battery power, and if the phone runs out during firmware, you're more likely to get a hard-boiler, charge it to at least 60 percent, or better, 100 percent.

  • ๐Ÿ–ฅ๏ธ Windows computer 10/11 (For fastboot, it is better not to use macOS or Linux because of driver issues).
  • ๐Ÿ”Œ Original. USB-cable (cheap cables can interrupt the connection).
  • ๐Ÿ› ๏ธ Tools: Mi Unlock Tool (unlock), Mi Flash Tool (for fastboot firmware).

โš ๏ธ Note: If your Xiaomi is purchased in China (the C-suffix version in the model name, for example Redmi). K50 Pro C, to unlock the bootloader, you will need to link the device to a Chinese Mi Account and wait 7 days. Without this, the Mi Unlock Tool will give you a Couldn't unlock error.

Battery charge โ‰ฅ60%|Backup of data on PC/cloud|Xiaomi drivers installed on your computer|The right firmware for your model is downloaded|Antivirus is disabled (it can block Mi Flash Tool)-->

2 Unlock the bootloader: without it anywhere

All Xiaomi smartphones (except some models for the European market) have a locked bootloader by default, which means that you can not:

  • Install custom recovery (e.g., TWRP).
  • Swipe the device through fastboot with unofficial firmware.
  • Remove system applications (bloatware) without root rights.

The unlocking process consists of three stages:

  1. Device Link to Mi Account: Go to Settings โ†’ The phone. โ†’ Version. MIUI and tap 7 times on the line Version MIUI, To activate Developer Mode. Then go back to Settings. โ†’ Additionally. โ†’ For developers and include: Debugging by USB Unlocking OEM (In some models, this item may not be available. Connect the phone to the computer and confirm the debugging permission.

Wait 168 hours (7 days)

Once successfully pegged, Xiaomi blocks the unlock for a week, this is done to protect against theft. Once the deadline expires, repeat the process in the Mi Unlock Tool, the bootloader will be unlocked.

โš ๏ธ Attention: On models POCO X3 Pro, Redmi Note 10 Pro and newer, after unlocking the bootloader, can trigger an anti-rollback. MIUI, Check the current version of the rollback in fastboot with the command: fastboot getvar anti

What if the Mi Unlock Tool canโ€™t see the device?
1. Make sure you have Xiaomi drivers installed (download them from the official website). 2. Try another one. USB-port 2.0, not 3.0). 3. Disable driver signatures in Windows: Run the command line on behalf of the administrator and do: bcdedit /set nointegritychecks on Then restart the PC. 4. If you are using Windows 11, Disable protection from fake drivers in the system settings.

3. Selection of firmware: official vs custom

Not only does the firmware type determine the functionality, but also the stability of the device, and Xiaomi offers several types of official firmware:

Type of firmwareDesignationFeaturesFor whom?
Globally stableGlobal StableThe tested version with minimal bugs, support for Google services.Users who need stability and all features.
China's stableChina StableNo Google services, but with features exclusive to China (e.g. Mi Pay).Enthusiasts willing to sacrifice convenience for new features.
Global developmentGlobal DeveloperWeekly updates, new features, but bugs are possible.Testers and developers.
EEA (Europe)EEA StableAdapted to European standards (e.g. 900 MHz support for the 4G).Users in Europe.

Custom firmware (e.g. LineageOS, Pixel Experience, HavocOS) gives more freedom, but requires:

  • ๐Ÿ”“ Unlocked loader.
  • ๐Ÿ› ๏ธ Established custom recovery (TWRP Or OrangeFox).
  • ๐Ÿ”„ Regular manual updates (no auto updates).

Firmware for Xiaomi with suffix ING (For example, Redmi Note 11 Pro+ 5G ING) are only for India and may not support certain ranges 4G/5G Before downloading, check the model code in Settings โ†’ The phone. โ†’ Model.

Where to download official firmware:

  • ๐ŸŒ Official website MIUI (Choose your model and your region).
  • ๐Ÿ”— Xiaomi Firmware Updater (archive of all versions, including old ones).

For custom firmware:

  • ๐Ÿค– XDA Developers (the largest directory, but requires caution - some firmware may contain malware).
  • ๐Ÿ“ฑ Telegram channels (e.g, MIUI Russia 4PDA Xiaomi).

๐Ÿ’ก

Before downloading the firmware, check its hash sum (MD5 or SHA-1). This will help to avoid firmware errors due to corrupted files. WinMD5Free.

4. Ways of flashing: from the simplest to the most complex

There are four main methods of Xiaomi firmware, varying in complexity and risk.

Update through MIUI Updater (the safest way to do it)

Suitable for installing official updates "over the airยป (OTA). Does not require unlocking the bootloader and does not reset data.

  1. Go to Settings โ†’ About the phone โ†’ System update.
  2. Click on the three dots in the upper right corner and select Select the firmware file.
  3. Specify the path to the downloaded firmware file (usually in.zip format).
  4. Confirm the installation and wait for the reboot.

โœ… Pros: simplicity, data retention, minimal risks.

โŒ Cons: works only for official firmware, you can not roll back on the old version.

4.2. firmware through Recovery (for official and some custom firmware)

Requires an unlocked bootloader, but does not erase data (unless you choose to wipe data). MIUI or custom firmware in.zip format.

  1. Download the firmware and rename the file to update.zip (required!).
  2. Move the file to the root folder of the phoneโ€™s internal memory.
  3. Turn off the device and press Volume Up + Power to enter Recovery.
  4. Select Install update.zip and confirm the installation.

Firmware via Fastboot (full cleaning and installation)

The most reliable way to use official firmware, but it erases all data, and it is used if the phone doesn't turn on or you need to "roll back" to the old version.

  1. Unpack the downloaded firmware (.tgz or.zip file) into the folder on your computer.
  2. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  3. Connect the device to your PC and start the Mi Flash Tool.
  4. Select the firmware folder, press Refresh (the device should appear) and click Flash.
  5. Wait until the end (usually 5-10 minutes) and the phone will reboot automatically.

โš ๏ธ If the Mi Flash Tool is an error ERROR: Flash is not done, try: Reinstall the Xiaomi driver. Run the utility on behalf of the administrator. Select Clean all and lock mode in the Mi Flash Tool (if you do not need to unlock the bootloader after firmware).

Installation of custom firmware through TWRP

For enthusiasts who want Android without MIUI. Requires an unlocked boot loader and installed TWRP Recovery.

  1. Install TWRP via fastboot: fastboot flash recovery twrp.img fastboot boot twrp.img
  2. In TWRP, make a backup of the current firmware (Backup โ†’ Select Partitions โ†’ Swipe to Backup).
  3. Sweat the custom firmware (Install) โ†’ Select a zip file โ†’ Swipe to Confirm Flash).
  4. Clear the cache (Wipe โ†’ Dalvik / ART Cache + Cache).
  5. Reboot (Reboot โ†’ System)

๐Ÿ’ก

Firmware via fastboot is the only way to โ€œreanimateโ€ a phone that doesnโ€™t turn on or hovers on the Mi logo. However, this method completely erases data, so only use it if other methods have not helped.

5. Typical errors and how to fix them

Even with the exact following of the instructions, there can be problems.

Mistake.Reason.Decision
ERROR: 999 In the Mi Flash ToolInconsistency of the firmware version and device.Download the firmware for the exact model (check in fastboot getvar product).
The phone does not turn on after the firmwareIncorrectly selected version MIUI (China has been introduced to the global model).Sweep through the correct version through fastboot with a full clean (Clean all).
This package is for "xxx" devices; this is a "yyy"The firmware is designed for other modifications (for example, for the Redmi Note 11 Pro). 5G, You have a Redmi Note 11 Pro).Check the exact model name in fastboot getvar product and download the correct firmware.
Hanging on the Mi logoModule conflict or incomplete firmware.Log in to fastboot and flash the firmware again with the Clean all tick.

If the phone doesnโ€™t see it after the phone SIM-If you're mapping or not catching the network, you're probably installing firmware for another region. ING (India may not support Russian operators:

  1. Please use Global or EEA version MIUI.
  2. If the problem persists, check the settings. APN In Settings โ†’ SIM-maps and mobile networks โ†’ Access points (APN).

Anti-rollback error: If you are trying to flash the old version MIUI If you're on a device with a new rollback version, your phone locks, and the only way out is to flash a newer firmware or go to a service center.

What if the Mi Flash Tool can't see the phone?
1. Make sure the phone is in fastboot mode (a screen with a rabbit that fixes android). 2. Check that the cable is connected to the port. USB 2.0 (Blue port on PC). 3. In Windows Device Manager, check that the phone is defined as Android Bootloader Interface. 4. Reinstall the drivers manually by specifying the path to the folder with the Mi Flash Tool.

6.After firmware: First steps and optimization

Once the firmware is successful, the device will restart and you will have to set up the initial setup, so take your time to recover data from the backup - first:

  1. Check the basic functions: ๐Ÿ“ž Calls and mobile Internet. ๐Ÿ“ถ Wi-Fi and Bluetooth. ๐Ÿ”‹ Charging (connect the charger).

Update Google services:

Go to Settings. โ†’ Annexes โ†’ Google Play Services and click Update.

Disable unnecessary system applications:

With help. ADB You can remove bloatware (embedded applications that cannot be removed in the usual way). For example, to remove Mi Browser, run:

adb shell pm uninstall --user 0 com.android.browser

Set up energy saving:

V MIUI By default, aggressive background restrictions are enabled for applications. To keep them from closing, go to Settings โ†’ Battery โ†’ Power saving mode and turn it off for the right applications.

If you have installed custom firmware (like LineageOS), you may need to manually configure:

  • ๐Ÿ“ก Mobile network: Some firmware does not support VoLTE or ViLTE out of the boxยป.
  • ๐Ÿ”Š Sound: Check the volume of the speakers in Engineer Mode (type in dial ##4636##).
  • ๐Ÿ”’ Encryption: if the firmware does not support FBE (File-Based Encryption: Data on the device will not be encrypted.

On devices with a MediaTek processor (e.g., Redmi Note 11 or POCO M4 Pro) can fly after firmware through fastboot IMEI. It can be restored with the help of a tool. SN Write Tool, but it requires authorization from Xiaomi and may be illegal in some countries.

๐Ÿ’ก

If after firmware the phone began to discharge quickly, check the activity of processes in Settings โ†’ Battery โ†’ Battery use. Often to blame background processes of Google Play Services or MiuiDaemon.Try disabling autosynchronization or limiting background activity for these apps.

7.How to return the warranty after flashing

Xiaomi's official service centers refuse warranty repairs if the bootloader is unlocked, but it can be locked back to cover up the tampering.

  1. Swipe the official firmware through the Mi Flash Tool by selecting Clean all and lock mode.
  2. After the reboot, check the status of the bootloader with the command: fastboot oem device-info If the answer Device unlocked: false - the bootloader is blocked.
  3. Reset the device to factory settings (Settings โ†’ Additional โ†’ Recovery and Reset).

โš ๏ธ Important: This method doesn't work on all models. On some devices (e.g. Xiaomi) 12T or Redmi K60) The unlock status is stored in the hardware chip and is not reset even after the bootloader is blocked.

If you are denied warranty repairs due to unlocking, you can try:

  • Contact another service center (sometimes not so strictly checked).
  • Indicate that unlocking was necessary to test compatibility with enterprise software (if the phone was bought for work).
  • Pay for the repair yourself (sometimes cheaper than buying a new phone).

FAQ: Frequent questions about Xiaomi flashing

Can I use Xiaomi without unlocking the bootloader?
Yes, but only official updates through MIUI Updater or Recovery (if the firmware is signed by Xiaomi).To install custom firmware or firmware through fastboot, unlocking is mandatory.
Why does 5G not work after the firmware?
This is a typical problem when you install firmware in another region, for example, if you flashed the Global version onto a phone you bought in China, the module is a very simple one. 5G Solution: Sweep through the firmware for your region (e.g, EEA Check the settings for Europe. APN Update the modem via Engineer Mode (if available for your model).
How do I know which firmware is suitable for my model?
The exact name of the model can be found: In settings: Settings โ†’ The phone. โ†’ Model. Through fastboot: fastboot getvar product Then download the firmware from the official website MIUI, by choosing your model and region.
What if after the firmware phone asks for a password from Mi Account?
This means that the device is tied to the Mi Account and after the data reset requires authorization. If you do not remember the password: Try to restore access through the Xiaomi website. If the phone is purchased from hand, contact the previous owner (he must remove the device from his account). In extreme cases, contact the service center with proof of purchase (they can unlink through official channels). โš