Xiaomi firmware: a complete guide from unlocking to installing custom software

Introduction: Why You Need a Firmware and When to Make It

The firmware of Xiaomi’s smartphone is a process that can both save the device from software failures and turn it into a β€œbrick” if you approach it without preparation. β†’ The phone. β†’ Update of the system, manual firmware gives access to custom assemblies, new functions MIUI Or even an alternative OS like LineageOS?

Main reasons for firmware: fixing critical bugs (for example, the problem with endless reboot on the Redmi Note 10 after upgrading to a new one) MIUI 14.0.3.0), uninstall pre-installed software, overclock performance or return to a stable version after a failure OTA-However, if your Xiaomi is stable and the only goal is to β€œtry something new”, it is better to refrain from this: the risk of losing warranty or data is higher than the potential benefit.

It is important to understand the difference between the types of firmware:

  • πŸ”„ Stock-stock MIUI β€” official firmware from Xiaomi (stable or development version).
  • πŸ› οΈ Custom firmware – modified builds (e.g. Pixel Experience or crDroid).
  • πŸ”“ Global/Chinese – regional versions with different set of functions (e.g. in Chinese) MIUI No Google services).

πŸ“Š Why do you want to make your Xiaomi?
Correct errors after updating
Install custom firmware
Remove ads in MIUI
Unlock additional functions
Other

Preparation of the device: 5 mandatory steps before firmware

Before you start firmware, make sure you meet all the preconditions, and neglecting them is the main reason for the hardware to build, and let's start with the most important thing: unlocking the bootloader.

Xiaomi will block the bootloader on all devices released after 2016, and it will require:

  1. Link your Mi Account to your device (Settings β†’ Xiaomi Account).
  2. Enable debugging on USB (Settings β†’ The phone. β†’ Version. MIUI β€” Tap 7 times, then return to the additional β†’ For developers).
  3. Apply for unlocking via the official Mi Unlock tool (it may take up to 720 hours to wait!).

Backup of data (via Mi Cloud or TWRP)

Charge your phone at least 60%

Download the correct firmware version (check the model and region!)

Install ADB/Fastboot drivers on PC

Disable the antivirus (it can block firmware files)

-->

Pay special attention to the choice of firmware. For example, for the Redmi Note 11 Pro+ 5G (veux) only a firmware marked will do veux_global β€” Version installation for Redmi Note 11 Pro (peux) will lead to a broken camera or module NFC. Download files only from official sources:

  • 🌍 Official website MIUI (stock-fixer).
  • πŸ”§ XDA Developers (for custom builds).
  • πŸ“¦ Xiaomi Firmware Updater (Firmware Archive).

⚠️ Note: If your device was purchased in China (suffix version _CN), firmware MIUI It can block the network due to differences in modem files, in which case you will need a separate mod firmware via Fastboot.

Firmware: Fastboot vs Recovery vs. OTA

There are three main methods of Xiaomi firmware, and the choice depends on your purpose and the current state of the device.

MethodWhen to usePlusesCons
FastbootComplete flashing, resetting locks, recovery after failureThe most reliable, even works on "bricks"Requires a PC, erases all data, takes the longest time
Recovery (TWRP)Installation of custom firmware, backups, partial updatesSave data (when set up correctly) and flexibilityNot all devices support all devices TWRP, mistake
OTA (over the air)Update the current version of MIUI without losing dataThe simplest thing is, it doesn't require a PC.It will not help in case of serious failures, limited to the choice of versions.

For most users, Fastboot is the most versatile method, especially if the device doesn’t turn on or gets stuck on the Mi logo. X3 Pro via Fastboot, you will need:

  1. Download Fastboot firmware (file with.tgz extension).
  2. Unpack it into a folder with the Mi Flash Tool.
  3. Connect the phone in Fastboot mode (clamp Volume down + Power).
  4. In the Mi Flash Tool, select a folder with firmware and press Refresh, then Flash.
What if the Mi Flash Tool can’t see the device?
1. Check if Qualcomm drivers are installed HS-USB QDLoader 9008 (Snapdragon or MediaTek Preloader. 2. Try another one. USB-port (preferably) USB 2.0 back-panel). 3. Disable driver signatures in Windows: type in bcdedit command line /set Testsigning on and restarting the PC. 4. If the device is identified as Unknown Device, manually specify the path to the drivers from the Mi Flash folder. Tool\source\third_party\Google\UsbDriver.

To install custom firmware (e.g. Pixel Experience on Redmi) K20 Pro will be required TWRP. The algorithm is more complicated:

  • πŸ”§ Install TWRP Fastboot: Fastboot Flash Recovery twrp.img fastboot boot twrp.img
  • πŸ“ Copy the firmware (.zip file) to your phone.
  • πŸ”„ V TWRP choose β†’ Format Data (required!), then Install and specify the firmware file.

⚠️ Note: On devices with dynamic partitions (e.g. Xiaomi) 12 Pro) firmware through TWRP may result in loss IMEI. In this case, additional firmware is required. super.img via Fastboot.

Unlocking the bootloader: how to get around the wait of 720 hours

The official procedure for unlocking the bootloader on Xiaomi includes a mandatory wait of 7 days (168 hours) to 30 days (720 hours), a security measure, but it greatly slows down the process. Are there workarounds?

Technically yes, but they are associated with risks:

  • πŸ”“ Account-based method: If you previously unlocked a bootloader on another Xiaomi device, the wait is sometimes reduced to 0 hours. 10S This trick doesn't work).
  • ⏳ Use of old Mi Unlock: Some users claim that Mi Unlock 3.5.503.24 bypasses the wait, but this can lead to account blocking for β€œunofficial activityΒ».
  • πŸ’» EDL-Mode: allows you to flash the device without unlocking, but requires an authorized Xiaomi account with rights EDL (Only available to service centers).

πŸ’‘

If you don’t want to wait, buy a used device with an already unlocked bootloader (checks by the fastboot oem device-info team – look for the line Device unlocked: true). But remember: the seller may not report hidden problems, such as a broken device. NFC post-fix.

If you still decide to wait, here’s how to speed up the process:

  1. Link the device to your Mi Account and enable synchronization.
  2. Log in to the account on the official website and confirm email/phone.
  3. Connect your phone to your PC, start Mi Unlock and log in. The timer will only start after the first successful connection.
  4. Repeat the unlock attempt every 24 hours – sometimes the timer is reset.

On some devices (e.g. Poco) F3) After unlocking the bootloader, Widevine is reset L1 on L3, This makes it impossible to watch high-resolution videos on Netflix or Disney.+. This can only be corrected by flashing vendor and system partitions with saving DRM-key.

Firmware through Fastboot: step-by-step instructions with pictures

Fastboot is the most reliable way to bring your device back to life, but it’s also the most destructive: it completely erases all data, including internal memory. If your Xiaomi doesn’t turn on or is stuck on the boot, this method is your only chance.

What you need:

  • πŸ–₯️ Windows PC 10/11 (MacOS or Linux may have driver problems).
  • πŸ”Œ Cable USB (It is preferably original, since cheap cables may not transmit data to Fastboot).
  • πŸ“‚ Firmware in.tgz format (for example, veux_global_images_V14.0.2.0.TKCCNXM_20230310.0000.00_12.0_global_3f7a1d53d4.tgz).
  • πŸ› οΈ Mi Flash Tool (last version).

Turn off the phone.

Hold the Loud down + Power (hold 10 seconds)

Connect to a PC (should be defined as Fastboot)

Run Mi Flash Tool and select folder with unpacked firmware

Press Refresh β†’ Flash (Select Clean All)

Wait. 5-15 minutes (not to be switched off!)

-->

Let’s look at the process on the example of Xiaomi 11T Pro (vili):

  1. Unpack the firmware in a folder without Cyrillic characters (for example, C:\MIUI\vili_global).
  2. Run MiFlash.exe on behalf of the administrator.
  3. In the Select field, specify the path to the firmware folder.
  4. Connect the phone in Fastboot mode (the screen should show the hare in the hat-eared).
  5. In the Mi Flash Tool, press Refresh – the device should appear (for example, COM3 - vili).
  6. At the bottom, choose Clean all (complete cleaning) or Clean all and lock (if you want to lock the bootloader again).
  7. Press Flash and wait for the green tick to appear.

If the process is suspended on Waiting for device:

  • Check that the Device Manager defines the phone as Android Bootloader Interface.
  • Try another one. USB-port.
  • Reinstall drivers via Mi Flash Tool β†’ Driver β†’ Install.

πŸ’‘

Never interrupt the firmware during the flashing stage... this is guaranteed to turn the device into a brick. If the process is stuck for more than 20 minutes, check the logs in MiFlash.log (the file is in the tool folder).

Installation of custom firmware: TWRP and alternative OS

If the stock MIUI You don't like it, you can install custom firmware, like LineageOS (pure Android) or Pixel Experience (with features from Google Pixel). TWRP.

Preparation:

  • πŸ”“ Unlock the bootloader (as described above).
  • πŸ“± Install. TWRP For your model (download only from the official website!).
  • πŸ”„ Make a backup through TWRP (Backup β†’ Select System, Data, Boot).

Instructions for Redmi Note 9 Pro (joyeuse)

  1. Download the firmware (for example, PixelExperience_joyeuse-13.0-20230512-1200.zip) GApps (if you need Google services).
  2. Reboot to TWRP: fastboot boot twrp-3.7.0_9-0-joyeuse.img.
  3. In TWRP, select Wipe β†’ Format Data (enter yes).
  4. Return to the main menu, click Install and select the firmware file.
  5. After installing the firmware, repeat the step for GApps (if necessary).
  6. Reboot to the system (Reboot β†’ System).

⚠️ Note: On some devices (for example, Xiaomi Mi 11) custom firmware breaks the main camera due to closed libarcore drivers. XDA.

Popular custom firmware for Xiaomi:

FirmwareFeaturesXiaomi support
Pixel ExperienceGoogle Pixel interface, regular updatesRedmi Note 10 Pro, Poco X3, Mi 11
LineageOSClean Android without unnecessary appsXiaomi Mi A2, Mi 9, Redmi 4X
crDroidMaximum customization, support for themesPoco F1, Redmi K20, Mi 9T

Frequent mistakes and how to fix them

Even with the right instructions, something can go wrong. Here are the most common mistakes and their solutions:

1. "Couldn't unlock" error in Mi Unlock

  • πŸ”Ή Make sure you are logged in to the same Mi Account on your phone and tool.
  • πŸ”Ή Check that the phone is debugging on USB and OEM-unlock (Settings) is allowed β†’ For developers).
  • πŸ”Ή Try another version of Mi Unlock (e.g. 5.5.224.24).

2.The phone is not identified in Fastboot

  • πŸ”Ή Install drivers manually through Device Manager (select Android Bootloader Interface).
  • πŸ”Ή Try another one. USB-port USB 2.0).
  • πŸ”Ή On some motherboards Asus/MSI You need to turn off the Fast Charge in BIOS.

3. After firmware no network (IMEI invalid)

  • πŸ”Ή Sweep modem and nvdata files separately through Fastboot.
  • πŸ”Ή Restore. IMEI via Maui META (for MediaTek or QCN (for Snapdragon).
  • πŸ”Ή If nothing helps, contact the service center - sometimes you need to solder the module.

4.Hanging on the Mi logo after firmware

  • πŸ”Ή Try to go to Recovery (Loudness Up). + Powering) and making Wipe Data.
  • πŸ”Ή Fastboot with Clean All and Lock selection.
  • πŸ”Ή Check that the firmware is suitable for your model (e.g., alioth for Poco). F3, Not aliothin for the Indian version).

How to recover data after a failed firmware?
If you've done a backup in TWRP, Restore it through Restore. If you don't, try programs like Dr.Fone or something like that. 7-Data Recovery, but the odds are slim: Fastboot firmware completely erases data. ADB Backup before experiments: adb backup -apk -obb -shared -all -f backup.ab

Can I use Xiaomi without unlocking the bootloader?
Technically yes, but only through EDL-An Emergency Download Mode that requires an authorized Xiaomi account with service center rights. This is not possible for ordinary users. The alternative is to exploit vulnerabilities (such as DirtyCOW on older devices), but it is unstable and dangerous.
Will I lose my warranty after I have been slapped?
Yes, unlocking the bootloader and installing custom software will void the warranty. However, if you return the stock firmware and lock the bootloader (fastboot oem lock), the service center may not notice the interference, except if the firmware damaged hardware components (for example, the Wi-Fi module burned).
How to check if the bootloader is unlocked?
Turn off the phone, then press the volume down. + Power to log in to Fastboot. Connect to your PC and type in the command: fastboot oem device-info If there is a line Device unlocked: true in the answer, the bootloader is unlocked.
Can I roll back the firmware to an older version?
Yes, but with reservations: πŸ”™ On Anti-Rollback devices (such as the Redmi Note 8 Pro), rollback to the old version will block the bootloader forever. πŸ”„ For rollbacks, use only official firmware through Fastboot. ⚠️ After rollback, you may need to reflash persist and modem partitions.
Which is better: European or Global?
Depends on your priorities: 🌍 Global: more stable, but with advertising and restrictions (for example, no themes in some regions). πŸ‡ͺπŸ‡Ί European (EEA): No ads, but updates come out later. Supports Google services out of the boxΒ». πŸ‡¨πŸ‡³ Chinese (CN): more features (like Super Wallpapers), but without Google services and with Cyrillic fonts by default.