Xiaomi smartphone firmware: a full guide from unlocking to installing custom software

While Xiaomi’s smartphone firmware is a process that can both bring a device back to life after a crash and unlock its hidden potential. However, doing the wrong thing often turns a gadget into a brick and recovering it costs a tidy sum. This article will help avoid the typical mistakes of choosing the right version of MIUI to working with tools like the Mi Flash Tool and TWRP.

We'll look at all the actual ways of firmware, from official updates through Settings β†’ About the phone to manually install custom builds. We'll focus on unlocking the bootloader, without which most operations are simply impossible. And for those who are afraid of losing data, we'll give you proven backup methods.

Important: the firmware procedure on Xiaomi, Redmi and POCO devices has nuances depending on the model and region. For example, the Xiaomi 13 Pro and Redmi Note 12 require different versions of the Mi Unlock Tool, and some budget models (for example, the POCO M5) may not support custom recavereas.

1. Firmware Preparation: What to Do Before Starting

Before you start firmware, make sure your device is ready for the procedure. The first and most important thing is to save all data. Even if you plan to upgrade without resetting, a failure in the process can lead to loss of photos, contacts and messages.

The second is to check the MIUI version and the smartphone model, which is critical, as the firmware from the Redmi Note 11 Pro (codenamed veux) is not suitable for the Redmi Note 11 Pro+ 5G (peux), and you can find out the code name through the MIUI Version app or the ADB team:

adb shell getprop ro.product.device

Third, charge the battery at least 60 percent, and it can take up to 20 minutes to run the Fastboot, and if the device shuts down in the process, the consequences will be fatal.

  • πŸ”Œ Cable USB Type-C (original or certified) – Cheap cables often cause data transmission errors.
  • πŸ’» Computer on Windows 10/11 (for the Mi Flash Tool or Linux/macOS (for ADB/Fastboot).
  • πŸ“₯ Firmware corresponding to the model and region (e.g, miui_VEUXGlobal_14.0.5.0.TKCMIXM_... global version).
  • πŸ”“ Mi Account tied to the device (to unlock the bootloader).

⚠️ Note: If your smartphone is purchased in China (suffix version) CN), Global version of the firmware (Global or EEA) can block the modules NFC or 5G. Check compatibility on the forum XDA Developers or 4PDA.

πŸ“Š What kind of firmware you plan to use?
Official update to OTA
Fastboot via Mi Flash Tool
Recovery (TWRP)
Brushing Firmware (LineageOS, Pixel Experience)
I don't know, I'll pick it after reading it.

2 Unlock the bootloader: without it anywhere

All Xiaomi smartphones have a bootloader by default, which is a security measure, but it also blocks custom firmware, TWRP and even official versions from being installed via Fastboot. Unlocking takes 7 to 30 days (depending on Xiaomi’s policy) and requires the device to be linked to a Mi Account.

The unlocking process:

  1. Enable Developer Options: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Return to Settings β†’ Additional β†’ For developers and activate OEM Unlock and USB Debugging.
  3. Download Mi Unlock Tool from the official website and log in to the program under the same account as on your phone.
  4. Connect your smartphone in Fastboot mode (click Volume Down + Power when the device is off) and follow the instructions in the Mi Unlock Tool.

Since 2023, Xiaomi has tightened the rules: for new models (for example, Xiaomi 14 or Redmi K70), the wait can reach 30 days, and older devices (before 2021 release) unlock faster – in 7-14 days.

What happens if you break the unlock?
If you turn off the device or computer during unlocking, the bootloader may remain in an uncertain state, in which case the smartphone will not boot even in Fastboot mode, and you will need to contact the service center for flashing through EDL (emergency mode).

3. Firmware methods: which one to choose?

There are three main methods of firmware Xiaomi smartphones, and each has its pros and cons.

MethodWhen to usePlusesCons
OTA (over the air)Official updates without data lossSimplicity, does not require PC, saves settingsLong wait for updates, it is impossible to roll back
Recovery (via TWRP)Install custom firmware or modified versions of MIUIFlexibility, backup capability via NandroidRequires an unlocked bootloader and TWRP
Fastboot (via Mi Flash Tool)Recovery after failure, installation of official firmwareReliability, suitable for "brick" devicesResetting all data requires PC

For most users, the best option is to use Fastboot, as it is guaranteed to restore the device to work even after serious failures. However, if you want to install custom firmware (such as Pixel Experience or LineageOS), you can not do without TWRP.

β˜‘οΈ Preparation for firmware through Fastboot

Done: 0 / 5

4. Firmware through Fastboot: step-by-step instructions

This method is suitable for installing official firmware (for example, when switching from CN to Global) or recovering from a crash. Importantly, all data will be erased, so do a backup beforehand.

Instructions:

  1. Download the firmware for your model from the Xiaomi Firmware Updater website. The file must have the.tgz or.zip extension (e.g., the file must have a.tgz or.zip extension, veux_global_images_14.0.5.0.TKCMIXM_...).
  2. Unpack the archive into a short-cut folder (e.g., C:\Xiaomi\veux) and inside it should be an image folder with.img files.
  3. Install the Mi Flash Tool and Xiaomi drivers (unless Windows picks them up automatically).
  4. Transfer the phone to Fastboot mode (clip Volume down + Power when the device is off).
  5. Connect your smartphone to your PC and in the Mi Flash Tool, specify the path to the firmware folder. Select Clean all or Clean all and lock mode. + loader-lock).
  6. Press Flash and wait until it is completed (usually 5-15 minutes).

If the Mi Flash Tool is giving you a β€œflash not done” error, check the tool version: new models (such as the Xiaomi 13T) require Mi Flash 2023.4.1 or later, and an antivirus error can cause the error - temporarily disable it or add a firmware folder as exceptions.

⚠️ Note: If you are flashing a device with Qualcomm Snapdragon (for example, POCO F5), If you have a sahara or firehose, it might indicate that the modem partition is damaged. EDL (Requires an authorized Xiaomi account).

5. Install custom firmware: TWRP and not only

Custom firmware (such as LineageOS, Pixel Experience or ArrowOS) allows you to get a clean Android without branded MIUI bells. However, their installation requires an unlocked bootloader and TWRP (or other custom recavator).

Installation process:

  1. Download. TWRP for your model from twrp.me. make sure the version is compatible with your device (e.g, twrp-3.7.0_12-veux.img For the Redmi Note 11 Pro).
  2. Install. TWRP Fastboot: Fastboot Flash Recovery twrp-3.7.0_12-veux.img fastboot boot twrp-3.7.0_12-veux.img
  3. In TWRP, make a backup of the current firmware (Boot, System, Data sections).
  4. Download custom firmware (for example, PixelExperience_plus_veux-13.0-20231010.zip) And get her on the phone.
  5. In TWRP, select Install, specify the firmware file, and confirm the installation. Once complete, run Wipe β†’ Format Data (if required).

The first download after installing custom firmware can take up to 10 minutes, and if the device has been stuck on the logo for longer than 20 minutes, then the firmware is incompatible with your model or damaged.

πŸ’‘

Before installing custom firmware, check on the XDA or 4PDA forum if it supports your model. For example, firmware for the Redmi Note 10 Pro (sweet) will not work for the Redmi Note 10 Pro 5G (camellian).

Typical errors and their solutions

Even if you follow the instructions accurately, you can get errors, and here are the most common ways to correct them:

  • πŸ”΄ Error: Flash Not Done in Mi Flash Tool: Check the Tool Version (Newer Models Need Mi Flash 2023)+). Turn off the antivirus and run the program on behalf of the administrator. USB-port (preferably) USB 2.0).
  • πŸ”΄ Device not defined in Fastboot: Install Xiaomi drivers manually through Device Manager. Try another cable (original or certified). USB developer-setting.
  • πŸ”΄ After the firmware, there's no network (IMEI Missing: Sweep modem and nvdata files separately through Fastboot. Check if the firmware region matches the device region (e.g. Global vs. CN).

If the device does not turn on after firmware (black screen, vibration without booting), try:

  1. Charge the phone for 30 to 60 minutes (sometimes the battery is drained in the process).
  2. Repeat the firmware through Fastboot with the option Clean all and lock.
  3. If nothing helps, contact the service center for firmware through EDL (requires authorization from Xiaomi).

πŸ’‘

If you lose your IMEI after you have firmware, never try to restore it through the engineering menu (#4636##) - this can block the modem forever.

7.How to get back the official MIUI after custom firmware

If you've been experimenting with custom firmware and want to go back to standard MIUI, the process is a little different than regular firmware, and the rule of thumb is that you can't just flash the official MIUI over the custom firmware via Fastboot, which will lead to bootloop (endless reboot).

The right course of action:

  1. Download the full firmware (not downloaded) OTA-Update!) for your model from the official website.
  2. Unpack it and find the file. flash_all_lock.bat (for Windows or flash_all_lock.sh (for Linux/macOS).
  3. Transfer the phone to Fastboot and connect to the PC.
  4. Launch it. flash_all_lock.bat. This script will not only sew the device, but also block the bootloader, which is important for correct operation. MIUI.

After this procedure, the device will return to factory condition, and the bootloader will be locked again, and if you need to re-unlock it, you will have to wait 7 to 30 days, as in the first unlock.

FAQ: Answers to Frequent Questions

Can I use Xiaomi without unlocking the bootloader?
Unblocking is mandatory for all operations except official ones. OTA-Even installing the official firmware via Fastboot requires an unlocked bootloader.
How to check if the bootloader is unlocked?
Turn off your phone and press Volume Down + Power to log into Fastboot. If there's Unlocked at the bottom of the screen, the bootloader is unlocked. If Locked is locked.
What if the Mi Flash Tool can’t see the device?
Try: Reinstall Xiaomi drivers manually. Use another USB-port (preferably) USB 2.0). Run Mi Flash Tool on behalf of the administrator. Disable driver signatures in Windows (to do this, type in the command line: bcdedit /set nointegritychecks on).
Can I use Xiaomi on Mac or Linux?
Yes, but it requires using Fastboot and ADB via the terminal. Mi Flash Tool only works on Windows, but alternative tools like fastboot and heximage allow you to flash devices on other OSes. For example, the command to firmware through Fastboot on Mac:./fastboot flash boot.img./fastboot flash system.img
Lost IMEI after firmware.
If the IMEI is missing after the firmware, you should: Swipe the original modem and nvdata files for your model. If that doesn't work, use the QCN Rebuilder tool (requires nvdata backup); Contact the service center if self-restore fails. Attention: Don't use IMEI generators - this is illegal and can lead to locking the device by the operator.