Installing new firmware on Xiaomi devices is a way to get fresh features, improve performance, or even resurrect an old smartphone. However, the process requires caution: wrong actions can turn a gadget into a brick. In this article, we will examine all current firmware methods, from official updates through MIUI to manually install custom assemblies through Fastboot and Recovery.
It is important to understand that there are three types of firmware: stable (recommended for most users), development (with new features, but possible bugs) and custom (created by enthusiasts such as LineageOS or Pixel Experience). Each option has its own nuances, from unlocking the bootloader to the risk of losing warranty. We will analyze each step in detail so that you can choose the best path.
If you want to just upgrade to the latest version, you need to have built-in MIUI tools, but if you want to install firmware from another region (for example, switch from Chinese to global) or custom build, you need to unlock the bootloader and use a PC. Let's start with preparation.
1. Preparation of the device for firmware
Before any firmware manipulation, several critical steps must be taken, and neglecting them can lead to data loss, malfunctions, or even device failure.
One is to back up. Use the built-in Settings tool โ About Phone โ Backup or third-party utilities like Titanium Backup (requires root).
- ๐ฑ Contacts (export to.vcf)
- ๐ท Photos and videos (copy to PC or cloud)
- ๐ Passwords from applications and Wi-Fi (write manually)
- ๐ฎ Save games (if important, use a cloud sync)
The second is to check the device model and the current firmware, which will help you avoid installing incompatible software. Find information in Settings โ Phone โ MIUI version and Device Model. For example, Redmi Note 10 Pro has the code name sweet, and Poco X3 Pro is vayu.
๐ก
If you are planning to switch from Chinese to global firmware, check your model support on MIUI Download. Some devices (like the Redmi K40) have separate versions for China and the global market, and their firmware is not interchangeable.
Three, charge the battery at least 60 percent, and it can take 10 to 40 minutes to run the firmware, and discharging in the middle of the process can have serious consequences.
- ๐ฅ๏ธ Windows computer 7/10/11 (for methods with Fastboot)
- ๐ Original. USB-cable (a faulty cable may interrupt the process)
- ๐ฅ Downloaded firmware (official or castom) in.zip or.tgz format
Check the device model|Create a backup copy|Charge the battery. >60%|Download the right firmware|Prepare. USB-cable-->
2. Official ways to update MIUI
If your goal is to simply upgrade to the latest version without risk, use Xiaomiโs built-in tools.This method does not require unlocking the bootloader and is suitable for 90% of users.
Method 1: Air Update (OTA)
The easiest option is to update through the settings menu:
- Open Settings โ About the phone โ System update.
- Click on "Check Updates."
- If a new version is available, download it (wi-fi or mobile internet required).
- After downloading, click "Install" and wait for the reboot.
Method 2: Manual installation via Recovery
If OTA-update does not come (for example, due to regional restrictions), you can install the firmware manually:
- Download the full firmware package (.zip) from the official MIUI Download website.
- Rename the file to update.zip and place it in the root folder of internal memory.
- Press the Power + Volume buttons up to enter Recovery.
- Select โInstall update.zipโ and confirm the installation.
| Method | You need a PC? | Data dump? | Suitable for |
|---|---|---|---|
| OTA | โ No. | โ No. | Update within one MIUI branch |
| Recovery (update.zip) | โ No. | โ No (if the version is compatible) | Manual installation of official firmware |
| Fastboot (miflash) | โ Yes. | โ Yes (full reset) | Change of region, downgrade, restoration |
| Custom firmware (TWRP) | โ Yes. | โ Yes (recommended) | Installation of LineageOS, Pixel Experience, etc. |
When you switch from one MIUI branch to another (for example, from Stable to Developer), you may need to format the data, in which case all user files will be deleted.
3. Unlocking the Xiaomi bootloader
To install firmware through Fastboot or custom Recovery (such as TWRP), you need to unlock the bootloader. This process is officially supported by Xiaomi, but has limitations:
- ๐ Unlocking resets the device to factory settings.
- โณ Waiting is required. 7-15 Days (depending on your Mi Account).
- ๐ซ On some models (e.g. Redmi Note 12 for China), unlocking may be prohibited.
Step-by-step:
- Link the device to your Mi Account in Settings โ Xiaomi Account.
- Activate USB debugging: Settings โ About Phone โ MIUI version (click 7 times to become a developer), then Settings โ Additional โ For Developers โ Debugging over USB.
- Download the Mi Unlock Tool and launch it on PC.
- Sign in to the tool under the same Mi Account as on your phone.
- Connect the device in Fastboot mode (press Power + Volume down when the phone is off).
- Click Unlock and wait until it is completed (it may be necessary to try again in a week).
What happens if you unlock the bootloader on the operator-bound device?
โ ๏ธ Warning: Once the bootloader is unlocked, the device becomes more vulnerable to malware. Install firmware only from trusted sources (the official Xiaomi website or trusted forums like the one on the site). XDA Developers).
4. Install firmware via Fastboot (MiFlash)
The Fastboot method is used to completely flash the device, change the region or recover from a crash. It requires a PC and an official MiFlash utility.
What you need:
- ๐ฅ๏ธ Computer with Windows and Xiaomi drivers (download here).
- ๐ฆ Firmware in.tgz format (unpack it into a folder without Cyrillic characters).
- ๐ USB-cable (preferably original).
- ๐ง MiFlash (last version).
Instructions:
- Turn off the device and put it in Fastboot mode (clip Power + Volume down).
- Connect to a PC. Android Bootloader Interface should appear in the Device Manager.
- Launch MiFlash, press โSelectโ and specify the folder with the unpacked firmware.
- At the bottom of the window, select firmware mode: clean all โ complete cleaning (recommended when changing the region). clean all and lock โ cleaning + lock bootloader (for sale of the device). save user data โ data storage (not always stable).
Press Flash and wait until it is completed (usually 5-10 minutes).
๐ก
Clean all removes ALL data, including internal memory (photos, videos, documents) and if you want to save files, pre-copy them on your PC.
If the process ends with a critical partition error, try:
- Reconnect. USB-cable.
- Change the USB port (better use USB 2.0).
- Reboot the PC and repeat the process.
5. Install custom firmware (TWRP + ADB)
Custom firmware (such as LineageOS, Pixel Experience or HavocOS) allows you to get a clean Android without a MIUI shell, longer support for older devices or additional features, but their installation requires an unlocked bootloader and TWRP (custom recovery).
Preparation:
- Unlock the bootloader (see Section 3).
- Download TWRP for your model from twrp.me (pay attention to the codename of the device!).
- Download custom firmware (.zip format) and, if necessary, GApps (Google services).
- Install on your PC ADB and Fastboot (part of the Android SDK).
Installation of TWRP:
fastboot flash recovery twrp-3.7.0_9-0-sweet.img
fastboot boot twrp-3.7.0_9-0-sweet.imgAfter that, the device will be loaded into TWRP.
Installation of firmware:
- In TWRP, select โWipeโ โ โAdvanced Wipeโ and select Dalvik, Cache, System, Data.
- Return to the main menu, select โInstallโ and specify the firmware file.
- If you need GApps, install them immediately after you have firmware (no reboot!).
- Restart the device (the first start can take 10-15 minutes).
โ ๏ธ Note: Some custom firmware does not support data encryption. If the device requests a password after installation, but does not accept it, you will have to repeat the process and format Data into the data. TWRP (Wipeยป โ ยซFormat Dataยป โ enter).
6. Solving common errors
The firmware process doesn't always go smoothly. Let's look at the typical problems and their solutions.
| Mistake. | Reason. | Decision |
|---|---|---|
| This package is for "sweet" devices; this is a "". | The firmware is not suitable for your model. | Check the code name of the device and download the correct version. |
| Couldn't unlock bootloader | It has not been 7 days since the account was attached. | Wait until the deadline is set or try another Mi Account. |
| The device does not turn on after the firmware. | Incompatible firmware or interrupted process. | Repeat the firmware through Fastboot with Clean All mode. |
| E: Unknown command [log] in TWRP | A damaged firmware file. | Download the firmware and check the checksum (MD5). |
If the device is stuck on the MI (bootloop) logo, try:
- Press Power + Volume up for 10-15 seconds for forced reboot.
- If it doesnโt work, run your device through Fastboot in clean all mode.
- For custom firmware, check the compatibility of the core and modules.
Useful commands for diagnosis:
fastboot devices # Check the connection of the device
fastboot getvar all # View device information
adb reboot recovery #Reboot in Recovery7. How to get back the official firmware
If you have decided to return to standard MIUI after experimenting with custom firmware, do the following:
Method 1: Fastboot (recommended)
- Download the official firmware for your model in.tgz format.
- Unpack it in a folder without spaces and Cyrillic.
- Start MiFlash, select the firmware folder and clean all mode.
- Connect the device to Fastboot and press โFlashโ.
Method 2: Recovery (if the Fastboot is not working)
- Download the firmware in.zip format and rename it to update.zip.
- Put the file in the root of the internal memory.
- Press Power + Volume Up to Enter Recovery.
- Select โInstall update.zipโ and confirm.
๐ก
Once you return to the official firmware, the bootloader will remain unlocked. To lock it back, select clean all and lock mode in MiFlash. Note that this will reset all data again!