Xiaomi’s full firmware: from unlocking the bootloader to installing MIUI or custom software

Firmware Xiaomi smartphone from scratch is a task that scares many users. Meanwhile, the properly executed procedure allows not only to update the system to the current version, but also to eliminate software failures, return the device to the β€œfactory” state or even install alternative firmware like LineageOS or Pixel Experience. OTA-Update, full firmware via Fastboot or Recovery affects all partitions of the device memory, which guarantees a clean installation without remnants of the old system.

But the process has nuances, from having to unlock the bootloader (without it, firmware is impossible) to choosing the right version of the software for your model, and a mistake at any stage can lead to a β€œbrick” – turning the phone into a useless brick. In this guide, we will break down the only officially supported Xiaomi method of unlocking the bootloader in 2026, dwell on the preparation of tools and consider step-by-step instructions for both methods of firmware. Special attention will be paid to typical errors and their solution - for example, what to do if the device is not detected in the mode. EDL or is issued anti-rollback status.

1.Preparation: What to Know Before Firmware

Before you start the firmware, answer three key questions:

  • πŸ”“ Is the bootloader unlocked? Without this step, Fastboot firmware is impossible. Check the status of the fastboot oem device-info command β€” if Device unlocked: false requires unlocking.
  • πŸ“± What is your Xiaomi model? firmware is strictly tied to the device code (e.g. Redmi Note 11 Pro)+ 5G β€” This is veux, not pissarro for the global version. You can find the code in the settings (Settings). β†’ The phone. β†’ Version. MIUI) Or through the fastboot getvar product command.
  • πŸ”„ What firmware do you want to install? MIUI (stable/developer), custom (e.g. Xiaomi.eu) or global version for regional transition – this depends on the choice of files and the method of firmware.

Also prepare:

  • πŸ’» Computer on Windows 10/11 (for Mac/Linux Virtual machines are not suitable because of problems with the USB-data transmission.
  • πŸ”Œ Cable USB Type-C original or certified (cheap cables can interrupt data transmission).
  • πŸ”‹ Battery charge at least 60%. When discharged during firmware, the device may fail.
  • πŸ“ Backup data. Full firmware erases everything, including photos, contacts and apps. Use Mi Cloud, Google Photos or local copying.

⚠️ Note: Firmware of a device with Mi Account enabled (linked to Xiaomi account) may result in locking after reset. If you do not remember the password from the account, first untie the device in the settings (Settings) β†’ Xiaomi account β†’ Delete the account).

πŸ“Š What kind of firmware do you plan to install?
Official MIUI (Stable)
Official MIUI (Developer)
Custom (Xiaomi.eu, LineageOS, etc.)
Global version for region change
I don't know, I need some advice.

2. Unlock the bootloader: the official method 2026

Xiaomi has tightened the rules for unlocking the bootloader: now it requires an account to be linked to the device and wait 168 hours (7 days), which is impossible to circumvent – any β€œbypass” methods (like EDL without authorization) work only on older models until 2021 release.

Instructions for unlocking:

  1. Link your device to your Mi Account in settings (Settings β†’ Xiaomi Account). Use the same account you type into the Mi Unlock Tool.
  2. Activate debugging on USB unlock OEM: Go to Settings. β†’ About the phone and 7 times click on the version MIUI, To turn on the developer mode. Go back to Settings. β†’ Additionally. β†’ For developers and include: πŸ”§ Debugging by USB πŸ”“ Unlocking OEM (It may be called a factory unlock)

Mi Unlock Tool

Fastboot

Power + Volume Down

Mi Unlock Tool

Mi Account

Xiaomi modelDoes it support unlocking in 2026?Features
Redmi Note 12 Pro+ 5G (ruby)Yes.Requires account binding and 7 days waiting
POCO F5 (marble)Yes.Supports unlock without waiting for some regions (check out Mi Unlock Tool)
Xiaomi 13 Ultra (isis)Yes.Firmware through EDL is prohibited without authorization of a service account
Redmi 10A (dandelion)Yes.You may need to roll back to the old version of MIUI before unlocking.

⚠️ Warning: If you bought your device with your hands, check if the bootloader is unlocked earlier. Some sellers reset the waiting counter but do not delete the old account's binding, in which case unlocking may result in an error Couldn't verify device.

πŸ’‘

If the Mi Unlock Tool gives an error "Current account is different from the account info on the device", try to log in to Xiaomi account on your phone, then reboot to Fastboot and try again.

3. firmware selection: official MIUI vs custom builds

The type of firmware that determines not only the functionality of the device, but also the method of installation.

Official MIUI firmware

  • 🌍 Global Stable: Optimized for the international market, supports Google Services, updates less frequently, but more stable.
  • πŸ› οΈ Global Developer: Weekly updates with new features but possible bugs.
  • πŸ‡¨πŸ‡³ Chinese (China) Stable/Developer): No Google Services, but with unique features (like Mi Pay) Requires manual installation of GApps.

Custom firmware

  • πŸ”§ Xiaomi.eu: Unofficial assembly MIUI with advanced settings, without Chinese software and with support for Google Services.
  • πŸ€– LineageOS/Pixel Experience: Pure Android without shell MIUI. Suitable for weak devices or fans of stock interface.
  • ⚑ Custom ROMs (such as ArrowOS): Lightweight firmware with additional features, but may lose support for the camera or NFC.

Where to download:

  • πŸ“₯ Official firmware: Xiaomi website (choose version by device code!).
  • πŸ“₯ Xiaomi.eu: Community Forum (check compatibility with the model!).
  • πŸ“₯ Custom firmware: XDA Developers (Search for themes for your model).

Important: Firmware is divided into two types of files:

  • .tgz or.zip – for installation via Recovery (e.g. TWRP)
  • .tgz with image folder – for firmware via Fastboot.
What is the danger of firmware through Fastboot without unlocking?
If you try to flash a locked device through Fastboot, the system will give the error flash is not allowed in Lock State. However, using informal tools (for example, Mi Flash Pro with the option of clean all and lock), the phone can turn into a β€œbrick” with a locked bootloader and no recovery.

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

This method is suitable for installing official MIUI (including cross-region switching) and some custom firmware, and completely erases all data on the device.

Tools required:

  • πŸ–₯️ Google Platform Tools (for fastboot commands)
  • πŸ”Œ Xiaomi drivers USB Drivers (can be downloaded here)

Instructions:

  1. Turn off the phone and turn it into Fastboot mode (press Power + Volume Down).
  2. Connect the device to your PC and check its detection by the command: fastboot devices If the device is not displayed, install the drivers manually through Device Manager.
  3. For official firmware, use the Mi Flash Tool: Download and install the Mi Flash Tool. Select the unpacked firmware folder. Press Refresh, then Clean All (full clean) or Clean All and Lock (clean + lock the bootloader). Press Flash and wait for completion (usually 5-10 minutes).
fastboot flash boot boot.img


fastboot flash recovery recovery.img




fastboot flash system system.img




fastboot flash vendor vendor.img




fastboot flash product product.img




fastboot flash dtbo dtbo.img




fastboot flash vbmeta vbmeta.img




fastboot erase userdata




fastboot reboot

Note:

boot.img

system.img

Download Platform Tools and Firmware|Install Xiaomi drivers|Unlock the loader|Checking the connection with the device (fastboot devices)|Backup of data-->

⚠️ Note: If you are flashing a device with Dynamic Partition (e.g. Redmi Note) 11 Or later, use the command fastboot update. filename.zip Instead of file-based firmware, otherwise the super partition will be corrupted.

5. Firmware through Recovery (TWRP)

method TWRP (TeamWin Recovery Project is suitable for custom firmware installation or updates MIUI without complete data clearing (if you choose Wipe) Dalvik/Cache But you have to install it yourself first. TWRP, What requires an unlocked bootloader.

How to install TWRP:

  1. Download the TWRP version for your model from the official website (.img file).
  2. Transfer your phone to Fastboot and Switch Recovery: Fastboot Flash Recovery twrp-3.7.0_12-veux.img Fastboot Reboot Recovery Replace twrp-3.7.0_12-veux.img in the name of your file.
  3. If the TWRP is replaced with standard recovery after the reboot, re-sweeze it and immediately go to Volume Up + Power.

Install firmware through TWRP:

  1. Copy the firmware file (.zip) to your phone or flash drive (connected via OTG).
  2. In TWRP, select Install β†’ specify the firmware file β†’ swipe for confirmation.
  3. After installation, run Wipe Cache/Dalvik.
  4. Reboot the device (Reboot System).

For firmware such as Xiaomi.eu or LineageOS, you may need to install:

  • πŸ”Ή Magisk (for root rights),
  • πŸ”Ή GApps (if the firmware is not Google Services),
  • πŸ”Ή Disable Force Encryption (to disable forced encryption on older devices).

πŸ’‘

Firmware via TWRP allows you to save user data, if you do not choose the Format Data option. However, to switch from MIUI to custom firmware (for example, LineageOS), a complete cleanup is required!

Typical errors and their solution

Even if you follow the instructions accurately, you can get errors.

Mistake.Reason.Decision
fastboot: error: Failed to boot into userspaceBoot partition or incompatible firmware damagedSweep boot.img separately or check the firmware version
Anti-rollback check failReversed to an older version of MIUISwitch only the version that is newer than the current one, or use the Anti-Rollback Patch.
Device is locked. Cannot flash imagesThe bootloader is not unlockedUnlock the bootloader through the Mi Unlock Tool (see Section 2)
Invalid sparse file format at headerThe firmware file is damaged or there is not enough space in the sectionDownload the firmware again or run the fastboot erase system before the firmware
The phone does not turn on after firmware (black screen)Incompatible firmware or error when writing vbmetaRepeat the Clean All and Lock firmware in the Mi Flash Tool

If the device is not defined in Fastboot:

  • πŸ”Œ Check the cable and port USB (Try the port USB 2.0 on the back of the PC).
  • πŸ–₯️ Reinstall drivers manually through Device Manager (select Android Bootloader Interface).
  • πŸ”„ Try another PC or Linux virtual machine (Libusb is required for Mac).

For EDL (Emergency Mode) errors:

  • πŸ› οΈ If the phone does not respond to buttons and is not detected in Fastboot, transfer it to the phone. EDL combination of Volume Up + Volume Down + USB-cable (on the device turned off).
  • πŸ”§ For firmware in EDL You will need an authorized Xiaomi account (for new models) or a Qualcomm boxing account (for example, a new model, UFED).
What to do if the Mi Flash Tool is 99% deficient?
This problem is typical for firmware with a large super partition. Solutions: 1. Use an older version of the Mi Flash Tool (e.g., 2018.5.4.0). 2. Swipe manually through the command line, skipping a step from the userdata (if you don't need a reset). 3. Disable the antivirus (it can block access to.img files).

7.After firmware: First steps and optimization

Once the firmware is successful, the device will start in a clean state.

  • πŸ”„ Setup: Get started, connect to Wi-Fi. Update Google Services and apps through Play Market. Enable Optimization MIUI (Settings β†’ Special facilities β†’ Optimization MIUI) smooth-work.
  • πŸ”’ Security: Enable Find My Device (Settings) β†’ Google β†’ Security. Install. PIN-Check the status of the bootloader: if it is unlocked, consider blocking (via fastboot oem lock), but remember that this will limit further manipulation of the firmware.
  • πŸ“± Data recovery: Restore backup from Mi Cloud or Google Drive. Move files from your PC or old device. Set up contacts and calendar sync via Google Account.

For custom firmware:

  • πŸ”§ Install Magisk for root rights (if necessary). Download Magisk.apk from GitHub and run through TWRP.
  • 🎯 Check the operation of key functions: Camera (some custom firmware requires installation) ANX Camera or GCam). NFC Google Pay (may not work without additional patches) and Face Unlock.

If the device is heated or discharged quickly after firmware:

  • πŸ”‹ Calibrate the battery: discharge the phone to 0%, then charge to 100% without interruptions.
  • πŸ› οΈ Check the background processes in Settings β†’ Battery β†’ Battery utilization.
  • πŸ”„ Reset network settings (Settings) β†’ SIM-maps and mobile networks β†’ Resetting network settings).

FAQ: Frequent questions about Xiaomi firmware

❓ Can I flash Xiaomi without unlocking the bootloader?
No, for full firmware through Fastboot, unlocking is required. However, you can upgrade the system via Recovery (if the firmware is signed by Xiaomi) or use the system OTA-updates in settings. An alternative method is firmware through EDL, It requires an authorized account and is only suitable for the recovery of bricksΒ».
❓ How to return the official firmware after custom?
To return to the official MIUI: Download the stable global firmware for your model from the official website. Run it through Fastboot with Clean All and Lock option in Mi Flash Tool. If the bootloader has been unlocked, it will lock automatically. Attention: switching from custom firmware to official firmware may require a data reset.
❓ Why does the mobile network not work after the firmware?
Causes and solutions: πŸ“Ά Incorrect Firmware Region: If you have been stitched up by China ROM on the global device, may not support your LTE-Run the correct version. πŸ”§ Resets reset APN: Go to Settings. β†’ SIM-maps and mobile networks β†’ Access points (APN) Restore your operator’s settings. πŸ“± Modem module damaged: Sweep files separately modem.img and fsg.img original.
❓ How to flash Xiaomi if it does not turn on (brick)?
If the device does not respond to buttons and is not detected in Fastboot: Try to put it into mode EDL: Turn off the phone (if possible, remove the battery for 10 seconds). + Volume Down and connect USB-cable to PC if the device is defined as Qualcomm HS-USB QDLoader 9008, use the Mi Flash Tool with firmware for EDL (For new models (Redmi Note 11 and later), you will need an authorized Xiaomi account or contact the service center. EDL Without official permission, the device may be blocked completely.
❓ Can I use Xiaomi to help you? OTG-cable?
Technically yes, but with reservations: πŸ”§ This requires an already established custom recovery (TWRP). πŸ“ The firmware must be in.zip format and copied to OTG-flash-drive. πŸ”„ Process: Turn off the phone. Hold Volume Up. + Power to enter into TWRP. Connect. OTG-flash drive and select Install β†’ Restrictions: you can't flash through Fastboot or unlock a bootloader without a PC.