How to change firmware to Xiaomi: rollback, update and install custom versions

Why to change firmware to Xiaomi and when it is necessary

Xiaomi smartphones are known for their software flexibility: users can choose between official versions of MIUI (Global, China, EEU), custom firmware like Pixel Experience or LineageOS, and roll back on previous builds when bugs occur. However, changing firmware is a process that requires understanding the consequences. Wrong actions can lead to a device β€œbrick” (completely inoperable), loss of warranty or locking the bootloader.

When should you think about updating or rolling back?

  • πŸ”„ Recoil on the old version – if the new firmware brakes, quickly discharges the battery or contains a critical bug (for example, the camera on the Redmi Note 12 Pro does not work).+ post-update MIUI 15).
  • 🌍 Change of regional firmware - transition from Chinese (CN) Global (Global) or European (European (EEU) for obtaining Google services.
  • πŸ› οΈ Install custom firmware – for advanced features (e.g., Root access) or an alternative interface (e.g., Root access, AOSP instead MIUI).
  • πŸ”’ Unlocking the bootloader is a mandatory step before installing unofficial software.

It is important to understand: on Xiaomi devices from 2021 (for example, Xiaomi) 12T, Redmi Note 11 Pro uses Anti-Rollback system that blocks rollback on version MIUI Trying to circumvent this restriction can lead to permanent-brick (irreparable damage). XDA Developers or 4PDA.

πŸ“Š What kind of firmware do you want to install on Xiaomi?
Official Global ROM
Castomic (AOSP, Pixel Experience)
Chinese version of MIUI
Reverse to the old version
Other

Device Preparation: Unlocking the bootloader and Backup

The first and most critical step is to unlock the bootloader, which is impossible to install custom software or roll back to unofficial firmware. On new Xiaomi devices (released after 2017), the bootloader is locked by default.

  1. Linking your Mi Account to your device (required!). Why is it important?Unlocking is impossible without a linked Mi Account. Xiaomi requires proof of ownership of the device. If you bought a smartphone with your hands, the previous owner must delete the account through Settings β†’ Mi Account β†’ Delete the account.
  2. Application for unlocking through the Mi Unlock Tool (you can download it on the official website).
  3. The wait is 7-30 days (on new models like Xiaomi 13 Ultra or POCO F5, the period can reach a month).

Once the bootloader is unlocked, all the data on the device will be erased, so before the process begins,

β˜‘οΈ What to do before changing the firmware

Done: 0 / 5

⚠️ Warning: Unlocking the bootloader will void warranty on most Xiaomi devices. In some countries (e.g. Russia), service centers may refuse repairs even for paid services if they find an unlocked bootloader.

How to change firmware: OTA, Recovery and Fastboot

There are three main methods of installing or rolling back firmware on Xiaomi. The choice depends on your purpose and the current state of the device:

MethodWhen to usePlusesConsDo you need unlocking?
OTA (over the air)Update to new version of MIUI without data lossSimplicity, saving settingsYou can’t just roll back, only the official version.No.
Recovery (TWRP)Install custom firmware or rollback to the old versionFlexibility, support for informal softwareYou need to install TWRP, risk of a breeze.Yes.
Fastboot (Mi Flash)Recovery after failure, forced firmwareReliability, even working on bricksWipes all data, difficult for beginnersYes.

Let’s look at each method in more detail.

Update via OTA (without loss of data)

The safest way is to upgrade to the new official version of MIUI without the risk of losing data.

  1. Go to Settings β†’ About the phone β†’ System update.
  2. Click on the three dots in the top right corner and select Select Service Pack.
  3. Specify the path to the downloaded firmware file (.zip format).
  4. Confirm the installation and wait for the reboot.

If the update is β€œhang” during the verification phase, try:

  • πŸ”Œ Reconnect to another Wi-Fi network (sometimes Xiaomi servers are blocked by the provider).
  • πŸ“± Restart the phone and try again.
  • ⏳ Wait 24 hours – sometimes updates are not available for all regions.

⚠️ Note: If you are trying to install firmware for another region (e.g. Global on a device with a CN), OTA-It's not going to work. You need a Fastboot or a Recovery.

Installation via Recovery (TWRP)

To install custom firmware or rollback on an older version of MIUI, custom recovery is required - usually TWRP. This method is suitable for advanced users, as it requires an unlocked bootloader and the ability to work with ADB.

Steps:

  1. Download. TWRP For your model (for example, for Redmi Note) 10 Pro, it's gonna be a file. twrp-3.7.0_12-v6.7_A11-sweet.img).
  2. Install TWRP via Fastboot: fastboot flash recovery twrp.img fastboot boot twrp.img
  3. In TWRP, make a backup of the current firmware (Backup section).
  4. Sweep through the new firmware through Install β†’ Select ZIP.
  5. Clear the cache (Wipe) β†’ Dalvik/ART Cache).

If after installing custom firmware, the phone does not boot:

  • πŸ”„ Try to stitch the core (boot.img) separately.
  • πŸ”§ Check firmware compatibility with your model (e.g., Pixel Experience doesn’t support all Xiaomi devices).
  • πŸ“₯ Download the firmware from another source (sometimes the files on the forums are corrupted).

πŸ’‘

If after installing custom firmware does not work mobile network, check the settings APN or patch the modem (file) modem_fix.zip).

3. Firmware via Fastboot (Mi Flash Tool)

Fastboot is the most reliable method for recovering a device after a crash or forced firmware change, completely erasing data, but it is guaranteed to work even on bricks.

Instructions:

  1. Download the Mi Flash Tool and the official firmware in.tgz format (for example, sweet_global_images_V12.5.3.0.RKFMIXM_20211029.0000.00_11.0_global_1234567890.tgz).
  2. Unpack the archive in a folder without Cyrillic characters.
  3. Launch the Mi Flash Tool, connect the phone in Fastboot mode (clip Volume Down + Power).
  4. Select the firmware folder and click Refresh β†’ Flash.
  5. Wait until the end (the process will take 5-15 minutes).

If the Mi Flash Tool is making an error:

  • πŸ”Œ Try another one. USB-port USB 2.0 on the back of the PC).
  • πŸ–₯️ Install Qualcomm or MediaTek drivers (depending on your smartphone’s processor).
  • πŸ“ Rename the firmware folder by removing spaces and special characters.

πŸ’‘

Fastboot firmware is the only way to restore a device if it doesn’t turn on or gets stuck on the MI logo.

Recoiling on the old version of MIUI: risks and limitations

A rollback to the previous version of MIUI is a common practice if the new firmware is unstable, but there are a few pitfalls:

  • πŸ”’ Anti-Rollback Protection – on devices starting in 2021 (e.g. Xiaomi) 11T, POCO X4 Pro: You can't roll back on versions older than a certain date, and you can't try hard-brick).
  • πŸ“± Data loss – if you roll back via Fastboot or Recovery, all user files will be deleted.
  • πŸ”„ Module conflicts – if you roll back from Android 13 to Android 12, some system apps may stop working.

How to check if you can roll back on your model?

  1. Find out the current version of Anti-Rollback (ARB) in Settings β†’ About Phone β†’ All specs β†’ ARB version.
  2. Compare it to the firmware version of ARB you want to roll back to (the information is in the file title or 4PDA forum).
  3. If the current version of the ARB is higher, a rollback is not possible!

Example: Redmi Note 11 Pro+ 5G (codename veux) version ARB 4. If you upgrade to MIUI 14 (ARB 5), the recoil on MIUI 13 (ARB 4) is blocked.

⚠️ Note: On some devices (for example, Xiaomi 12 Pro) rollback is possible only through the EDL-A mode (emergency firmware) that requires an authorized Xiaomi account or paid access to tools like the Mi Flash Pro.

Install custom firmware: Pixel Experience, LineageOS and others

Custom firmware such as Pixel Experience, LineageOS or Havoc-OS allows you to get a "pure" Android without a MIUI shell, as well as features that are not available in official software (for example, Root access or advanced camera settings).

  • πŸ”“ Unlocked loader.
  • πŸ“₯ Compatible firmware version (check support for your model on the XDA Developers).
  • πŸ”§ Established TWRP or other custom recovery.

Step-by-step instructions for installing Pixel Experience:

  1. Download the firmware from the official website (for example, PixelExperience_plus_veux-13.0-20230512-0908.zip For the Redmi Note 11 Pro+ 5G).
  2. Download NikGapps (Google Services Package) or OpenGapps (arm64 version for most Xiaomi).
  3. Reboot to TWRP and make a full backup (Boot, System, Data sections).
  4. Run Wipe β†’ Advanced Wipe and mark System, Data, Cache.
  5. Install firmware, then Gapps, then (if necessary) Magisk for Root.
  6. Reboot. The first launch can take 10 to 15 minutes.

Typical problems after installing custom firmware:

  • πŸ“Ά Mobile network is not working – patch the modem or check the settings APN.
  • πŸ”Š No sound in the speaker -- maybe the core is incompatible. Try a different build.
  • πŸ”‹ Fast battery discharge – calibrate the battery (discharge to 0%, then charge to 100% without interruptions).

πŸ’‘

If Face Unlock doesn’t work after installing custom firmware, check if your model supports this feature on alternative software. For example, on POCO F3 Face Unlock only works on MIUI.

Frequent mistakes and their solutions

When you change firmware, you often encounter common bugs, and here are the most common ways to fix them:

Mistake.Reason.Decision
Couldn't verify device (in Mi Flash)Wrong firmware version or blocked bootloaderCheck firmware compatibility with the device code name (e.g., surya for POCO X3)
Error 7 in TWRPThe firmware is not designed for your model.Download the correct version or edit the updater-script in ZIP-file
The device is stuck on the MI logoIncompatible kernel or damaged boot.imgStitch the original boot.img via Fastboot or use it EDL-regime
Anti-Rollback check failTrying to roll back to a version with a lower ARBReturn to a new firmware or use EDL (requires authorization)

If your device does not turn on after a failed firmware:

  1. Try going to Fastboot (click Volume Down + Power).
  2. If you don't respond, transfer to EDL-Mode (close test points on the motherboard or use the command adb reboot edl).
  3. Sweep the original firmware through the Mi Flash Tool in Clean All mode.

⚠️ Note: If the device is not defined by the computer in Fastboot or EDL, Maybe damaged. USB-port or power controller, which requires repairs at the service center.

Can I roll back to the old version of MIUI without unlocking the bootloader?
No, rolling back through Recovery or Fastboot requires an unlocked bootloader. The only way to do it without unlocking is to wait until the official bootloader is available. OTA-Xiaomi updates, but this only works for upgrades to new versions, not rollbacks.
How do I find out the code name of my Xiaomi device?
Codename (e.g., surya, veux, alioth) can be found: In settings: Settings β†’ About Phone β†’ MIUI Version β†’ Device name (e.g., Redmi Note 10 Pro has a sweet code). Through ADB: connect your phone to your PC and follow the command: adb shell getprop ro.product.device
Why does the phone not turn on after Fastboot?
Probable causes: Incorrect firmware (e.g., stitched Global on a Chinese model); interrupted firmware (switched off USB or battery dead); damaged firmware file (incompletely downloaded); Solution: Repeat firmware through the Mi Flash Tool in Clean All mode or use EDL.
Can I use Xiaomi without a computer?
Yes, but with limitations: Through OTA β€” Only official updates. via Local Update in Settings β†’ System Update – if you already have the bootloader unlocked and downloaded the correct one ZIP-through the file. TWRP β€” If recovery is already installed, you can ZIP It's a memory card. EDL computer is mandatory.
How to return the official firmware after custom?
To get back to stock MIUI: Download the official.tgz firmware for your model. Run it through the Mi Flash Tool in Clean All mode. If the bootloader has been unlocked, it can be blocked back through the command: fastboot oem lock But this will delete all data and can cause problems if the firmware is unofficial.