Install firmware via TWRP on Xiaomi: a complete guide to debunking errors

Installing custom firmware via TWRP on Xiaomi smartphones is a process that opens up access to advanced features of the device, from removing system applications to installing the latest versions of Android on older models. However, the wrong actions can turn the phone into a brick.

Many Redmi, POCO or Mi users are faced with having to reflash the device due to slow operation, lack of updates or desire to get root rights. But before you start, it is important to understand that firmware through TWRP will void the official warranty of Xiaomi and can lead to blocking of certain features (for example, Google Pay or banking applications).

In this guide, we will take a look at the process from unlocking the bootloader to the final system setup, focusing on the nuances of popular models (Redmi Note 10 Pro, POCO X3 Pro, Mi 11) and the typical errors that beginners experience. All steps are tested on current versions of TWRP 3.7.0 and MIUI 14/LineageOS 20 firmware.

Preparation of the device: unlocking the loader

The first and most critical step is unlocking the bootloader. Without it, TWRP simply cannot be installed. Xiaomi officially allows you to unlock the bootloader, but the process requires waiting and following the rules.

First, check the blocking status:

  1. Turn off the phone.
  2. Press Volume Down + Power to log into Fastboot Mode.
  3. Connect the device to the PC and type the command: fastboot oem device-info

If you see Device unlocked: false in the answer, the bootloader is locked.

  • πŸ“± Download Mi Unlock Tool (Official Tool from Xiaomi).
  • πŸ”— Link your Mi Account to your device in settings (Settings) β†’ Xiaomi account β†’ Mi Unlock status).
  • ⏳ Wait 7 to 168 hours (depending on model) Xiaomi deliberately delays the process so users don't accidentally unlock the bootloader.

⚠️ Warning: Once the bootloader is unlocked, all data on the device will be reset! backup via Mi Cloud or locally on PC.

When the wait is over, launch the Mi Unlock Tool, log in to your account and follow the instructions of the program. Successful unlocking will be confirmed by the message Unlocked successfully. You can now proceed to install TWRP.

πŸ“Š What Xiaomi model do you plan to use?
Redmi Note 10/Pro
POCO X3/X4
Mi 11/12
Redmi 9/9A
Another model

2. Installation of TWRP Recovery

TWRP (Team Win Recovery Project) is a custom recovery that allows you to install firmware, backup and get root rights. There is a different version of TWRP for each Xiaomi model, so it is important to download the correct file.

Where to get TWRP:

  • πŸ” Official website: twrp.me (see your model in the list).
  • πŸ€– Developer Telegram channels (e.g, @XiaomiFirmwareUpdater).
  • πŸ› οΈ Forums XDA Developers (tested themes only!).

Installation instructions:

  1. Download the TWRP file in.img format.
  2. Rename it to twrp.img and place it in a folder with fastboot.
  3. Transfer your phone to Fastboot Mode (Loudness Down + Power).
  4. Connect to your PC and execute the command: fastboot flash recovery twrp.img
  5. After successful installation, immediately boot into TWRP, holding Volume Up + Power.

⚠️ Note: On some models (POCO F3, Redmi K40) post-fix TWRP The system can automatically restore stock recovery, and to avoid that, immediately after entering the system. TWRP Go to Advanced. β†’ Flash Current TWRP.

If TWRP doesn’t start or gives you an OrangeFox (alternative recovery) error, try a different version of the file. New Qualcomm Snapdragon 8 Gen 1/2 devices may require TWRP with dynamic partitions support.

Data backup made.|Downloaded the correct version TWRP|Loader unlocked|Battery charge > 50%|Antivirus on PC is disabled-->

3. Selection and loading of firmware

The firmware choice is the key to the stability of the device, and there are several types of firmware for Xiaomi:

  • πŸ“± Officially MIUI (stock, but with a remote ad block).
  • πŸ”„ Castomy MIUI (for example, MIUI EU, MIUI Pro).
  • πŸ€– AOSP-Firmware (LineageOS, Pixel Experience, Havoc-OS).
  • πŸ”₯ Firmware for gamers (Corvus) OS, DerpFest).

For beginners, we recommend starting with MIUI EU β€” This is a modified official firmware without ads and with advanced settings. You can download it at xiaomi.eu. AOSP-Firmware contact the forums XDA or telegram chat developers.

Before downloading, check:

  1. Compatible with the code name of your model (for example, Redmi Note 10 Pro is sweet).
  2. Android version (some firmware requires Android 12+).
  3. Firmware type: Fastboot (installed via PC) or Recovery (installed via TWRP).

The firmware file is usually.zip. Download it and transfer it to your phone or to your phone. SD-Don't unpack the archives!

How do I find out the code name of my model?
Open Settings β†’ About Phone β†’ MIUI version and tap 7 times on the kernel version line. In the menu that appears, look for Hardware info, where the code name will be indicated (for example, alioth for POCO F3).

4. The firmware process through TWRP

Now, to the most important step, installing the firmware, follow the instructions carefully to avoid errors.

Step 1: Download to TWRP

  1. Turn off the phone.
  2. Press Volume Up + Power to enter TWRP.
  3. If you request permission to change, swipe to allow modifications.

Step 2. Cleaning the sections

Before installing a new firmware, you need to clear the old data. In the main TWRP menu, select: Wipe β†’ Advanced Wipe and tick:

  • πŸ—ƒοΈ Dalvik / ART Cache
  • πŸ“ System
  • πŸ“„ Data
  • πŸ”„ Cache

Swipe to Wipe. Do not clean the Internal Storage if the firmware is in internal memory!

Step 3: Installation of firmware

  1. Go back to the main menu and select Install.
  2. Find the firmware file (.zip) and select it.
  3. Swipe to Confirm Flash (Swipe to Confirm Flash)
  4. Wait until the process is completed (it can take 5-15 minutes).

Step 4: Additional actions

After installing the firmware:

  • πŸ”„ If the firmware requires Google services, install them immediately (download the appropriate Open GApps or NikGApps package).
  • πŸ” If you want root, go through it. Magisk.zip (download on GitHub).
  • πŸ“± For AOSP-You may need to run vendor and firmware separately.

When completed, press Reboot System. The first run can take up to 10 minutes - don't interrupt the process!

πŸ’‘

If your phone is stuck on the Xiaomi logo after you have firmware, try going to TWRP and re-cleaning Dalvik/Cache. If it doesn't work, then re-sweeten the firmware.

5. Typical errors and their solutions

Even if you follow the instructions accurately, you can get errors, and we'll look at the most common ones and how to fix them.

Mistake.Reason.Decision
Error 7 in TWRPIncompatibility of the firmware with the deviceCheck the code name of the model and download the correct version of the firmware
The phone does not turn on after the firmwareIncorrect cleaning of partitions or interrupted processRepeat the firmware to make sure System and Data are cleaned
No OS installed in TWRPThere is no firmware in the System sectionInstall the firmware again, having cleaned the System beforehand
Constant reboots (bootloop)Conflict of the kernel or modulesSwipe the stock kernel (boot.img) or roll back to the previous version
The sensor is not working in TWRPThe Wrong Recovery VersionDownload TWRP with support for your display (for example, for AMOLED)

If your mobile network is not running after AOSP firmware is installed, check if firmware and vendor are stitched. Some models (Redmi Note 8 Pro, POCO X2) require an additional patch for modems.

Another common problem is encryption, and if TWRP asks for a password after you've firmwareed it and you haven't set it, do it:

  1. In TWRP, go to Wipe β†’ Format Data.
  2. Type in yes and confirm.
  3. Reboot and re-install the firmware.

⚠️ Note: Data formatting will delete all data, including files on internal memory! Use this method only if other methods have not helped.

6.Setting up the system after firmware

After successful firmware, you must perform the initial setup. Depending on the type of firmware (MIUI or AOSP), the steps may differ.

For MIUI-firmware:

  • 🌐 Choose a language and region (we recommend Russia or Europe for the first time). MIUI EU).
  • πŸ”‘ Skip Mi Account binding if you don’t plan to use cloud services.
  • πŸ”„ Turn on Debugging. USB in the developer settings (Settings) β†’ The phone. β†’ Version. MIUI, tap 7 times).

For AOSP-Firmware (LineageOS, Pixel Experience):

  • πŸ€– Setting up is similar to pure Android: language selection, Wi-Fi connection, login to Google account.
  • πŸ”’ If root is required, install Magisk Manager and check the status in the app.
  • πŸ”„ Update the firmware through the built-in updater (if available).

After setting up, we recommend:

  1. Check the operation of the main functions: calls, mobile Internet, Wi-Fi, Bluetooth.
  2. Install Titanium Backup or Swift Backup for data recovery (if there is a backup).
  3. Disable unnecessary system applications via Magisk or ADB.

If gestures or animations don’t work after AOSP firmware, check the settings in System β†’ Gestures or install an alternative launcher (e.g. Nova Launcher).

πŸ’‘

After you have firmware custom firmware, do not update via OTA (over the air) - this can cause a failure. All updates are installed only through TWRP!

7. How to get back the stock firmware

If custom firmware is unstable or you want to return the official MIUI, you can do it in two ways: via Fastboot or Recovery.

Method 1: Fastboot (recommended)

  1. Download Fastboot firmware for your model from the Xiaomi website.
  2. Unpack the archive in a folder with fastboot.
  3. Transfer the phone to Fastboot Mode and connect to the PC.
  4. Launch the file. flash_all.bat (For Windows, run the command: fastboot flash all

Method 2: Through TWRP

  1. Download the Recovery firmware (.zip) from the same site.
  2. Put it on the phone.
  3. In TWRP, select Install and file.
  4. Clean Dalvik/Cache and reboot.

Once you return to the firmware, the bootloader will remain unlocked. To lock it back, use the command:

fastboot oem lock

Warning: Locking the bootloader will erase all data and may cause a failure if the firmware is modified!

8. Frequent questions and answers

❓ Can I use Xiaomi to help you? TWRP loader-free?
No, it's impossible. TWRP is installed in the recovery section, which is blocked on all Xiaomi devices. Unlocking the bootloader is a mandatory step.
❓ What kind of firmware to choose for everyday use?
For most users, the best choice is MIUI EU – if you want all the features of Xiaomi without advertising, Pixel Experience – if you want a clean Android with Google support, LineageOS – for maximum stability and updates, Corvus OS or DerpFest with performance optimizations is suitable for gamers.
❓ Why does not the camera or fingerprint sensor work after firmware?
This is a typical problem when installing AOSP-Reasons: There is no proprietary driver for your model, no vendor or firmware. Solution: find it on the forum XDA Patch for your device or return to MIUI.
❓ How to update the firmware through TWRP?
Custom firmware update: Download the new firmware version (.zip). TWRP. Install the firmware file (without cleaning Data!). Dalvik/Cache. Reboot, for the sake of AOSP-Sometimes you need to install a vendor separately.
❓ Can I get it? OTA-customization?
Yes, but only if the firmware supports OTA (For example, LineageOS or Pixel Experience. TWRP It's more reliable because it eliminates the risk of failure. MIUI OTA-Updates will not work – they will need to be installed manually.