How to put firmware on Xiaomi: official and custom methods

Xiaomiโ€™s smartphone firmware is a process that can both bring a device back to life and turn it into a โ€œbrickโ€ if you approach it without preparation. Unlike a regular update via Settings โ†’ Phone โ†’ System Update, full flashing requires unlocking the bootloader, choosing the right version of the software and following the instructions exactly. This article will help you figure out when to sew the device, what tools you will need, and how to avoid typical errors.

Many users resort to firmware to get rid of ads in MIUI, install a global version instead of the Chinese version or get the latest security updates on outdated models. Others want to try custom firmware like LineageOS or Pixel Experience for pure Android. However, it is important to understand that firmware resets all data, and improper actions can deprive warranties or disable a smartphone.

Before you start, answer two questions: Why do you need a new firmware? And are you prepared for the risks? If the goal is just to upgrade, check first. OTA-Updates to the standard menu. If you need a different version MIUI (for example, EEA Instead of Global) or Custom Software - Read More.

๐Ÿ“Š Why do you want to make your Xiaomi?
I want to get rid of advertising in MIUI.
We need a global firmware instead of Chinese.
I want to try custom firmware (LineageOS, Pixel Experience)
The device is not operating smoothly.
Other

1. Firmware Preparation: What to Do Before Starting

The first and most important step is data backup. The firmware completely erases internal memory, including photos, contacts and messages. Use Mi Cloud, Google Drive or local copying on your PC.

  • ๐Ÿ“ฑ Contact (export to) VCF-file through Contacts โ†’ Settings โ†’ Imports/Exports)
  • ๐Ÿ“ธ Photo and video (copy folder) DCIM computer)
  • ๐Ÿ”‘ Passwords from apps (save in the password manager or write down)
  • ๐ŸŽฎ Game savers (use cloud services or root backup if there is root)

Check the device model and current MIUI, which is critical because the firmware for the Redmi Note 10 Pro (sweet) is not suitable for the Redmi Note 10 (mojito).

  1. Enter the code ##4636## and find the Model number.
  2. Or check in Settings โ†’ About Phone โ†’ MIUI version (click several times on the line with the version to appear codename).

Also prepare:

  • ๐Ÿ”Œ Charged battery (at least 60%, better than 100%)
  • ๐Ÿ–ฅ๏ธ Windows computer 7/10/11 (For the Mi Flash Tool)
  • ๐Ÿ”— Original. USB-cable (cheap cables can interrupt data transmission)
  • โš™๏ธ Drivers for your model (download official Xiaomi drivers)

โš ๏ธ Note: If your device is purchased in China and runs on firmware for the China region, the global version may stop working after firmware is installed. NFC, Google Pay and some frequency bands 4G. Check compatibility in advance on forums like 4PDA or XDA Developers.

Backup all the data.

Check the model and code name of the device

Charge your smartphone to 100%

Install Xiaomi drivers on PC

Download the correct version of the firmware

Prepare original USB-cable-->

2. firmware choice: official MIUI vs custom options

The type of firmware not only affects the appearance of the system, but also the stability of the work, the availability of advertising and the availability of updates.

Type of firmwarePlusesConsWho's right for?
Official MIUI (Global/EEA/China)Stable work, support OTG-Updates, the guarantee is maintainedAdvertising in system applications, limited customizationFor those who want stability
MIUI with disabled ads (xiaomi.eu)No Ads, Weekly Updates, Additional FeaturesNo official support, possible bugsAdvanced users who are prepared for the risks
Brush firmware (LineageOS, Pixel Experience)Clean Android, no extra apps, long-term supportCamera, NFC or wireless charging may not workEnthusiasts who want to experiment

For most users, the best choice is the official global firmware (e.g. MIUI Global 14.0.5), which can be downloaded from the Xiaomi Firmware Updater. If you want to get rid of advertising, look at the firmware from Xiaomi.eu, which is official builds, but with remote ad modules and additional settings.

Custom firmware will require an unlocked bootloader and a TWRP installed.

  • ๐Ÿ“ฑ LineageOS โ€“ pure Android without shell MIUI
  • ๐Ÿ“ฑ Pixel Experience โ€“ The interface is like Google Pixel
  • ๐Ÿ“ฑ HaventOS โ€“ Optimized for gaming and performance

โš ๏ธ Note: Xiaomi.eu firmware does not support Google Pay and Widevine services L1 (no HD If these features are critical, choose the official global version.

๐Ÿ’ก

Before downloading the firmware, check its hash (MD5 or SHA-1) on the developerโ€™s website to avoid installing a corrupted file that can turn the phone into a brick.

3. Unlocking the bootloader: a mandatory step for firmware

The bootloader on all Xiaomi smartphones is locked by default to install any firmware (except for the one on the other). OTA-Updates, it needs to be unlocked, takes 3 to 30 days due to Xiaomi's security policy.

Step-by-step:

  1. Link your Mi Account to your device Go to Settings โ†’ Xiaomi Account โ†’ Mi Cloud and log in. Make sure the device is linked to your account (check Settings โ†’ Additional โ†’ Developers โ†’ Mi Unlock Status).
  2. Enable USB debugging Activate Developer Mode by tapping the MIUI version 7 times in your phone settings. Then turn on USB debugging and OEM Unlock in the developer menu.
  3. Download Mi Unlock Tool The official utility is available on the Xiaomi website. Install it on your PC and log in under the same account as your phone.
  4. Connect your phone in Fastboot mode Turn off the device, then press Volume Down + Power to log into Fastboot. Connect to your PC and launch the Mi Unlock Tool.
  5. Start unlocking the Utility will show the timer (usually 168 hours or 7 days). After waiting, repeat the process - the bootloader will be unlocked.

Important: unlocking resets the device to factory settings! also note that some models (like the Redmi Note 12 or Xiaomi 13) may require additional steps, such as tethering. SIM-card-to-account.

What happens if you unlock the bootloader on the warranty device?
Officially, Xiaomi does not deprive the warranty for unlocking the bootloader, but if the firmware of custom software leads to a breakdown, the service center may refuse to repair. In some regions (for example, Russia), unlocking does not affect the warranty, but it is better to check with the local service center.

4. Install firmware via Mi Flash Tool (official method)

This method is suitable for installing official firmware (for example, switching from China to Global), you will need an unlocked bootloader and a Windows PC.

Instructions:

  1. Download firmware in.tgz or.zip format for example for Redmi Note 11 Pro+ 5G (veux) download the file veux_global_images_V14.0.4.0.TKCCNXM_20231010.0000.00_12.0_global.zip official website.
  2. Use 7-Zip or WinRAR to extract files into a folder without Cyrillic characters in the path (e.g., C:\MIUI\veux).
  3. Install Mi Flash Tool Download the latest version from the official website and install.
  4. Launch the utility on behalf of the administrator In the Select field, specify the path to the unpacked firmware. Select firmware mode: Clean all - Clean all and lock - cleaning + lock bootloader (only for official firmware!) Save user data - data storage (not always stable)

Connect your phone in Fastboot mode

Loudness down + Nutrition

Refresh

Flash

Wait for completion

Success

If the Mi Flash Tool gives you an error that can't receive hello packet, try changing it. USB-port (better to use port) USB 2.0), disable the antivirus or run the utility in Windows 7 compatibility mode.

๐Ÿ’ก

When running through the Mi Flash Tool, never turn off the cable or interrupt the process, even if nothing seems to be happening.The average firmware time is 10 minutes, but on weak PCs it can take up to 20 minutes.

5. Install custom firmware through TWRP

Custom firmware (like LineageOS) will require custom TWRP recavers, which are more complex but offer more customization options.

Step 1: Installation of TWRP

  1. Download the version. TWRP for your model from twrp.me (for example, twrp-3.7.0_9-0-veux.img For the Redmi Note 11 Pro+).
  2. Rename the file to recovery.img and place it in the folder with the platform-tools (from Android SDK).
  3. Connect your phone in Fastboot mode and execute the command: fastboot flash recovery.img fastboot boot recovery.img

Step 2: Firmware through TWRP

  1. Download firmware (e.g. lineage-20.0-20231007-nightly-veux-signed.zip) and, if necessary, Gapps (Google services).
  2. Reboot to TWRP: Turn off the phone, press Volume up + Power.
  3. In TWRP, select Wipe โ†’ Advanced Wipe and select Dalvik / ART Cache System Data Cache

Run a swipe for cleaning.

Install

Gapps

Reboot System

โš ๏ธ Note: Some custom firmware requires additional patches to operate the camera or NFC. For example, Google Camera on Xiaomi may need a file. fix-miui-cam.zip, post-primary.

๐Ÿ’ก

If after firmware custom software phone is fixated on the logo, try flashing the kernel (boot.img) separately through Fastboot: fastboot flash boot.img.

Typical errors and their solutions

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

Mistake.Reason.Decision
This device is locked in Mi Flash ToolThe bootloader is not unlockedUnlock the device through the Mi Unlock Tool
The phone does not turn on after the firmwareInappropriate firmware version or interrupted processRepeat the firmware with the correct version of MIUI for your model
E: Unknown command [log] in TWRPA damaged firmware fileCheck it out. MD5-file sum and download again
No network after firmwareSwitched version for another region (for example, China instead of Global)Install the correct firmware or flash the modem separately

If the device does not boot after firmware, try the following steps:

  1. Press Volume Up + Power for 10-15 seconds for forced reboot.
  2. If it doesnโ€™t help, swipe the device again through Fastboot using the official firmware.
  3. For models with Qualcomm (like Snapdragon), you can try EDL (emergency firmware) mode, but it requires an authorized Xiaomi account.

If the phone is identified as a Qualcomm HS-USB QDLoader 9008 in Device Manager, it means that it has moved to EDL mode. Recovery will require a special flashplug like Mi Flash Pro or help from a service center.

7 How to return the official firmware if something went wrong

If after experimenting with custom firmware, the device is unstable or you want to return the warranty, you can restore the official MIUI.

  1. Download the official firmware for your model in.tgz format from the Xiaomi website.
  2. Unpack the archive and launch the Mi Flash Tool.
  3. Select Clean all and lock mode โ€“ this will return the stock Recovery and block the bootloader.
  4. Connect your phone in Fastboot mode and start firmware.

Once the firmware is successful, the device will return to factory status with the bootloader locked, and note that this process will also reset all data.

โš ๏ธ Note: If you have been running custom software with a modified vendor or system partition, returning to the official firmware may cause errors. In this case, first run the stock software without locking the bootloader (Clean all), and then repeat the process with the Clean all and lock option.

8. Frequent questions about Xiaomi firmware

โ“ Can I flash Xiaomi without unlocking the bootloader?
No, to install any firmware (except for the OTA-Updates require an unlocked bootloader, with the exception of some MediaTek models that have workarounds through SP Flash Tool, but they are risky and can cause a break.
โ“ How long does it take to unlock the loader?
Xiaomi officially sets a timer of 168 hours (7 days) for new accounts. If the account is attached to the device for a long time, unlocking can go immediately, and the time depends on the model: for example, for a POCO F5 it takes 360 hours (15 days).
โ“ Why Google Pay doesnโ€™t work after the firmware?
This is due to the lack of certification of Widevine L1 and SafetyNet on custom firmware. To restore work, you need to: Swipe the official global firmware. Or install the Magisk module with the Universal SafetyNet Fix patch. Google Pay also does not work by default on firmware from xiaomi.eu.
โ“ Can I roll back the version? MIUI?
Yes, but with reservations. The retracement to the older version is possible only through the Mi Flash Tool in Clean all mode. However: On some models (for example, Xiaomi 12), the rollback is blocked by anti-rollback. After the rollback, the camera or fingerprint sensor may stop working. Before rolling back, check your model information on the 4PDA forum.
โ“ Where to download firmware for Xiaomi?
Official firmware: Xiaomi's website is global and Chinese. Xiaomi Firmware Updater is a firmware archive for all models. Custom firmware: XDA Developers is your model's thread. Xiaomi.eu is ad-free firmware. LineageOS is pure Android.