How to Install New Firmware on Xiaomi via TWRP: A Complete Guide with Nuances

Why TWRP is the Best Choice for Firmware Enthusiasts

Installing custom firmware through TWRP (Team Win Recovery Project) opens up opportunities for Xiaomi owners that the manufacturer does not even officially announce. It is not just a way to upgrade the system, it is a chance to gain full control over the device, from removing the embedded software to installing modified cores to improve performance. But why TWRP, and not the standard Fastboot or MIUI Updater?

First, TWRP allows you to install informal firmware (like LineageOS, Pixel Experience or ArrowOS) that often works more stable than stock MIUI, especially on older models like the Redmi Note 4 or Mi A1. Second, it allows you to make backups of NAND, full casts of the system, which will save your data if you fail firmware. And finally, TWRP supports ADB Sideload, which is critical if the firmware weighs more than 2 GB and does not fit on internal memory.

But there’s a downside: doing the wrong thing can turn your Xiaomi into a brick, like running a kernel from another model or trying to install MIUI for Global on a Chinese version of the device (China ROM) often leads to a hard brick β€” when the phone doesn’t even turn on in Fastboot mode.

  • πŸ” Compatibility of firmware with your exact model (for example, Redmi Note 10 Pro has sweet and sweetin variants – they are not interchangeable!).
  • πŸ”’ Unblocking status of the loader (if it is blocked, TWRP never start).
  • πŸ“‘ Version TWRP (Older version may not support new firmware).
πŸ“Š What kind of firmware do you plan to install?
Stock MIUI (official)
Custom (LineageOS, Pixel Experience, etc.)
MIUI EU (unofficial)
Other

Step 1: Unlocking the bootloader – without it anywhere

First and foremost, the Xiaomi bootloader is locked by default. Without it, you can't install TWRP or custom firmware. The procedure is officially supported by Xiaomi, but it has its pitfalls:

⚠️ Note: Unlocking the bootloader erases all data on the device, including photos, contacts and apps, and Xiaomi can block your Mi Account for 72 hours if you request unlocking too often.

Instructions for unlocking:

  1. Link Mi Account to your device in Settings β†’ Xiaomi Account.
  2. Enable Developer Options (7 times click on the MIUI version in Settings β†’ About Phone).
  3. Activate OEM Unlock and USB Debugging in the developer options.
  4. Download the official unlock tool (Mi Unlock Tool) and log in.
  5. Connect your phone in Fastboot mode (press Power + Volume Down) and follow the program instructions.

Once successfully unlocked, the phone will restart and perform a full reset, and you can now start installing TWRP.

πŸ’‘

If the Mi Unlock Tool produces a "Couldn't unlock" error after 50% progress, try using alternative versions of the tool from XDA Developers.

Step 2: Install TWRP – Version Selection and Installation Method

Not all versions of TWRP are equally good. For example, the Xiaomi Mi 11 (venus) needs a special build with support for dynamic partitions, and the Redmi Note 8 Pro (begonia) needs a version with a patch for Mediatek. Where to look for current builds?

  • 🌐 Official website: twrp.me (but there are often no new models available).
  • πŸ› οΈ Forum XDA Developers: partition of your model (e.g. Redmi Note 10 Pro).
  • πŸ“₯ Telegram channels like @TWRP_russia or @XiaomiFirmwareUpdater.

Once you download the correct file (usually with the.img extension), install TWRP in one of the following ways:

fastboot flash recovery twrp-3.7.0_12-0-sweet.img


fastboot boot twrp-3.7.0_12-0-sweet.img

The first command flashes the receptacles in memory, the second command immediately loads the phone into it. Importantly, after the firmware, do not boot into the system, otherwise the stock MIUI will overload the TWRP!

Method 2: Official TWRP App App

If you already have root rights, you can install TWRP directly from the official app, but this method doesn't work on all Xiaomi models.

⚠️ Note: On some devices (e.g. Poco) F3 Mi 11 Ultra after installation TWRP You need to turn off the firmware signature check. β†’ Disable DM-Verity.

Step 3: Preparing firmware - what to download and where to go

The choice of firmware depends on your goals:

Type of firmwareAdvantagesDeficienciesWhere to download
Official MIUI (Global/China/EU)Stability, OTA-updateBloatware, Xiaomi restrictionsOfficial website
LineageOS (Pixel Experience)Pure Android, no AdvertisingThere may be camera or NFC bugsXDA
MIUI EU (unofficial)No Advertising, Weekly UpdatesNo Google services out of the boxxiaomi.eu
Ported ROM (from other devices)Unique features (for example, the camera from Pixel)High risk of instabilityTelegram chats of developers

Download the firmware (usually in.zip format) transfer:

  • πŸ“ In the internal memory of the phone (if) TWRP sees).
  • πŸ’Ύ Nana SD-card (if supported).
  • πŸ–₯️ To the computer, install through ADB Sideload (if the firmware is more than 2 GB).

Compatibility of firmware with the device model |

Data backup (photos, contacts, SMS) |

Battery charge > 50%|

Screen locking (PIN/pattern lock) is disabled |

Drivers downloaded ADB/Fastboot PC-only-->

Step 4: The Firmware Process – A Step-by-Step Guide

Now, to the most critical stage, if you're flashing custom firmware for the first time, make sure to back up to TWRP (Backup section) by selecting Boot, System, Data and EFS sections, which will save you from losing IMEI or serial number.

Installation instructions:

  1. Boot to TWRP (Put Power + Volume Up when the phone is off).
  2. If you request a password, enter a pattern lock or PIN (if you have not disabled the lock!).
  3. Go to Wipe β†’ Advanced Wipe and mark: Dalvik / ART Cache System Data Cache

Don't touch it.

Internal Storage

MicroSD

Install

.zip

Swipe for confirmation and wait until the end (can take 5-15 minutes).

Magisk

Disable_Dm-Verity_ForceEncrypt

before-load

Reboot β†’ System

The first download can take up to 10 minutes - don't interrupt the process! If the screen has been stuck on the logo for longer than 20 minutes, then the firmware is not suitable or you missed the step with the wip.

What to do if the firmware is fixated on the load?
If the system is constantly restarting (bootloop), go back to TWRP and: 1. Repeat Wipe β†’ Advanced Wipe (System, Data, Cache). 2. Try flashing another firmware version (for example, instead of LineageOS 20, install LineageOS 19.1). 3. Check if an additional patch is required for your model (for example, Redmi Note 9 Pro needs a fix for fbe). 4. If nothing helps, restore the backup or run the stock MIUI through Fastboot.

Step 5: Solving Common Mistakes

Even with the correct following of the instructions, problems can arise, and here are the most common ways to solve them:

  • 🚫 Error 7 (Error 7) in TWRP: Reason: Firmware is incompatible with your model or version MIUI. Solution: Download the correct version or edit the updater-script file in the firmware archive (remove the lines with model verification).
  • πŸ”„ Bootloop after firmware: Reason: there is no DM-Verity patch or the kernel is incorrectly stitched. Solution: squeak through Disable_Dm-Verity_ForceEncrypt and re-set.
  • πŸ“΅ No network after firmware: Reason: lost IMEI Solution: Restore the partition. EFS From the backup or run the stock modem through Fastboot: fastboot flash modem NON-HLOS.bin
  • πŸ”‹ Hard brick: Reason: Firmware is not the same model or the process is interrupted. Solution: run the stock MIUI via Mi Flash Tool in mode EDL (You will need an authorized Xiaomi account).

If the error is not described above, look for a solution in 4PDA or XDA by specifying the exact model and error code.

πŸ’‘

90% of firmware errors are due to incompatibility with the device model or missed steps (for example, forgetting to disable DM-Verity).

Step 6: Optimize the system after the firmware

Successful firmware is only half the battle, so to keep the system running smoothly and quickly, follow a few additional steps:

  • ⚑ Disable unnecessary services: In custom firmware (for example, LineageOS) disable ADB Over Network and Wi-Fi Direct, if you don’t use them, you’ll save battery life.
  • πŸ”’ Set up root rights (optional): Install Magisk for root management and modules (e.g, ViPER4Android sound-enhancing).
  • πŸ“± Recover data: Use Swift Backup (for root) or Titanium Backup to restore applications from the backup. Don't restore system applications - this can cause conflicts!
  • πŸ”„ Update the firmware: In custom firmware updates come through OTA, But you can also install them manually (download a new.zip and run through it). TWRP vapeless).

If you have stitched MIUI EU or caste based on AOSP, check the work:

  • πŸ“Ά Cellular (dial ##4636## and select Phone Information).
  • πŸ“· Cameras (some custom firmware does not support 48 MP or Night Mode).
  • πŸ”Š Sound (check speaker, microphone and 3.5mm connector if available).

FAQ: Answers to Frequent Questions

Can I flash Xiaomi through TWRP without unlocking the bootloader?
No, it's impossible. TWRP requires an unlocked bootloader, otherwise the phone just won't boot into the recovery. The only workaround is to exploit vulnerabilities (like DirtyCOW for older models), but it's risky and doesn't work on all devices.
How to return stock MIUI after custom firmware?
Download the official firmware for your model in.tgz or.zip format. Sweat it through the Mi Flash Tool in Fastboot mode, selecting the Clean All option. If the phone does not turn on, use EDL mode (an authorized Xiaomi account will be required).
Why is the NFC or fingerprint sensor not working after the firmware?
This is a typical problem with custom firmware based on AOSP (like LineageOS). Solutions: Sweep a special patch for your model (look for XDA). Go back to MIUI - stock firmware is guaranteed to support all sensors. Check if the sensor is disabled in the settings (Settings β†’ System β†’ Sensors).
Can I flash TWRP on Xiaomi with a MediaTek processor?
Yes, but there are nuances: Mediatek (like the Redmi Note 8T or Poco M3) needs a special TWRP with support for mtk-client. Some models require disabling AVB (Android Verified Boot) before firmware. Use the SP Flash Tool utility instead of Fastboot if the standard method doesn't work.
How to check if TWRP has been successfully installed?
Once you have the recovery firmware, restart the phone to recovery mode (Power + Volume Up). If you see the Team Win logo and touch-controlled menu, it was a success. If the phone loads into the stock recovery, then the TWRP didn't pass or was rewired by MIUI.