Install unofficial firmware on Xiaomi: full guide with unlock and TWRP

Why do users choose custom firmware for Xiaomi?

Xiaomi, Redmi and POCO are known for their price-performance ratio, but the standard MIUI shell doesn’t always suit owners. Official software is overloaded with advertising, unnecessary services and restrictions that prevent full control of the device. Informal firmware (such as LineageOS, Pixel Experience or ArrowOS) solve these problems by offering β€œclean” Android, advanced settings and regular security updates even for older models.

But installing custom firmware isn’t just a software replacement, it’s a deep intervention. The process requires unlocking the bootloader, which resets the device to factory settings, and installing a custom TWRP recavator. Errors at any stage can lead to a phone β€œbrick” (inoperability), and in this article we’ll look at all the stages of the firmware to meet the current requirements of Xiaomi in 2026, including bypassing the new restrictions on unlocking the bootloader for models on the Qualcomm Snapdragon 8 Gen 2/3 platform.

Preparation: What to Know Before Firmware

Before you start, make sure your Xiaomi model is supported by the firmware you choose. For example, LineageOS officially supports Redmi Note 10 Pro (sweet), but not all POCO X5 modifications. Check compatibility on the firmware developer's website or in thematic forums (for example, 4PDA or XDA Developers).

Also consider:

  • πŸ”‹ The battery charge should be at least 70%. The firmware may take up to 30-40 minutes, and the discharge in the process will lead to failure.
  • πŸ“± Backup is a must! Unlocking the bootloader erases everything, including photos, contacts and apps. Use Mi Mover or third-party tools like Swift Backup (requires root).
  • πŸ” Mi Account must be tied to the device for a minimum of 7 days (a new requirement from Xiaomi in 2023.
  • πŸ’» Windows PC 10/11 MacOS will require additional drivers (Android File Transfer is not suitable!).

⚠️ Note: On models with a MediaTek processor (e.g. Redmi) 12C or POCO M6 Pro) unlocking the loader may block IMEI module 5G. Before firmware check user reviews of your model!

πŸ“Š What kind of firmware do you plan to install?
LineageOS
Pixel Experience
ArrowOS
MIUI Pro (modified)
Another.

Unlocking the bootloader: bypassing the restrictions of Xiaomi

Xiaomi has tightened the rules for unlocking from 2023, and now requires:

  1. Link your Mi Account to your device and wait 168 hours (7 days).
  2. Enable OEM Unlock in the Developer Settings (Settings β†’ About Phone β†’ MIUI Version – Tap 7 times, then go back to Settings β†’ Additional β†’ For Developers).
  3. Get permission through the official Mi Unlock Tool app (download here).

Newer models (such as the Xiaomi 14 or Redmi K70) may require additional confirmation via SMS or email. If the tool gives a "Couldn't unlock" error, try:

  • πŸ”„ Restart your phone and PC.
  • πŸ”Œ Use the original USB-cable (not all cables support data transmission).
  • πŸ“‘ Connect to another Wi-Fi network or use mobile internet (sometimes the lock is linked to a connection to the Internet) IP).
What if the Mi Unlock Tool can’t see the device?
1. Make sure the ADB drivers are installed (download Platform Tools). 2. In Device Manager, check if the phone is displayed as Android Bootloader Interface. 3. Run the command line in the folder with platform-tools and follow: adb devices If the device is not displayed, reinstall the drivers manually through Driver Update β†’ Search on this computer β†’ Select from the list β†’ Android Device β†’ Android Bootloader Interface.

Once successfully unlocked, the phone will automatically reset, and you can now start installing TWRP.

Installation of custom TWRP Recovery

TWRP (Team Win Recovery Project) is an alternative recovery that allows you to install informal firmware, make backups and obtain root rights. For each Xiaomi model, there is a version of TWRP. You can download it on the official website twrp.me or in the theme of the device on XDA.

Installation process:

  1. Download the image TWRP for your model (for example, twrp-3.7.0_12-0-sweet.img For the Redmi Note 10 Pro).
  2. Rename the file to recovery.img and place it in the platform-tools folder.
  3. Connect your phone to your PC in fastboot mode (clip Volume Down + Power when the device is off).
  4. Fastboot flash recovery recovery.img
  5. Reboot to TWRP, holding Volume Up + Power.

⚠️ Note: On some models (e.g, POCO F5 Xiaomi 13T) post-fix TWRP And the standard way is to replace the Recovery with the stock one at the first load, so to avoid that, right after installation. TWRP Execute the command: fastboot flash recovery_ab recovery.img (partition recovery_ab).

β˜‘οΈ Preparation for installation TWRP

Done: 0 / 5

Selection and installation of informal firmware

Popular custom firmware for Xiaomi:

FirmwareFeaturesSupport for modelsComplexity of installation
LineageOSClean Android, regular updatesRedmi Note 9/10/11, POCO X3/F3Medium
Pixel ExperienceInterface like Google Pixel, Google CameraXiaomi Mi 11, POCO F4 GTHigh (requires additional patches)
ArrowOSBalance between customization and stabilityRedmi K40, Xiaomi 12TLow.
MIUI ProModified MIUI without advertising and unnecessary servicesMost models on SnapdragonLow.

Installation instructions:

  1. Download firmware (.zip format) and, if necessary, GApps (Google services) from the OpenGApps website.
  2. Transfer files to your phone or flash drive (TWRP supports OTG).
  3. In TWRP, run Wipe β†’ Advanced Wipe and mark Dalvik, Cache, System, Data.
  4. Return to the main menu, select Install and specify the path to the firmware file.
  5. After installing the firmware, repeat the step for GApps (if needed).
  6. Run the Reboot System.

πŸ’‘

If the phone has been stuck on the logo for more than 10 minutes after firmware, don't panic! Try clamping Volume Up + Power for 15-20 seconds for a forced reboot. Often the first download takes up to 15-20 minutes.

Addressing common mistakes

Even with proper execution of instructions, there can be problems, and here are the most common ways to solve them:

Error 1: "Invalid IMEI" after firmware

Reason: Damage to the modem or nvram partition when installing firmware.

  • πŸ”§ Restore the stock firmware through the Mi Flash Tool (download here).
  • πŸ“‘ Use the tool. SN Write Tool for Recovery IMEI (requires authorization on some models).

Error 2: Bootloop (Cyclical Reboot)

Reason: Incompatibility of firmware with the kernel or lack of patches for Dynamic Partition (on new devices).

  • πŸ”„ Install the firmware again by pre-executing Format Data in TWRP (Not Wipe, but Format!).
  • πŸ“¦ Check that the firmware version matches the type of bootloader (AB or A/B).

Error 3: "No OS installed" in TWRP

Reason: Damage to the system partition or installing firmware is not for your model.

  • πŸ” Make sure the downloaded firmware is specifically for your device (check the codename, for example, alioth for the app). POCO F3).
  • πŸ“₯ Reinstall firmware by pre-formatting the system, vendor and product sections.

πŸ’‘

If you don't have a sensor, camera or speaker after you've run your firmware, it probably doesn't support your hardware. Go back to stock MIUI and pick a different custom build.

Firmware recovery

If custom firmware was unstable or you need to return the warranty, restore the original MIUI.

  1. Download stock firmware for your model from the official website (MIUI Downloads). Choose the version of Fastboot (not Recovery!).
  2. Unpack the archive in a folder without Cyrillic characters.
  3. Connect your phone in fastboot mode and start the Mi Flash Tool.
  4. Select a firmware folder and press Refresh. The device must be determined.
  5. At the bottom, select Clean all and lock (this will lock the bootloader and return everything to factory state).
  6. Press Flash and wait until it is completed (it will take 5-10 minutes).

After the stock firmware has been restored:

  • πŸ”„ The phone will automatically restart and perform the initial setup.
  • πŸ”’ The bootloader will be blocked and all data deleted.
  • πŸ“± Re-unlocking will require 7 days to wait again.

⚠️ Note: On models with MediaTek (e.g. Redmi Note 12), the recovery of stock firmware via the Mi Flash Tool may require an authorization file (auth.ini) to be obtained from official service centers or on paid forums.

FAQ: Frequent questions about Xiaomi firmware

Can I install custom firmware without unlocking the bootloader?
All modern Xiaomi smartphones (starting in 2018) require unlocking the bootloader to install unofficial software. EDL-The mode only works for older models (e.g. Redmi). 4X) and require an authorized service center account.
Will I lose my warranty after I have been slapped?
Yes, unlocking the bootloader and installing custom firmware will void the warranty. However, you can return the stock firmware and lock the bootloader before contacting the service center. Check the lock status by command: fastboot oem device-info If Device unlocked: false, there will be no trace of interference.
Which firmware to choose for maximum productivity?
For games and performance, AOSP-based firmware with minimal modifications is recommended: ArrowOS or DerpFest. They remove background MIUI processes, which reduces heat and increases battery life. Pixel Experience is better for photography - it includes an optimized version of Google Camera with support for all camera modules.
Can I upgrade the custom firmware "over the air" (OTA)?
Yes, but only if the firmware supports OTA-For example, LineageOS has a built-in updater (Settings) β†’ System system β†’ Updates for the Pixel Experience and other firmware updates will have to be installed manually via TWRP. Before updating, always make a backup in TWRP (Backup β†’ Select sections β†’ Swipe to confirm)!
What if 5G or Wi-Fi is not working after the firmware?
The problem is that there are no proprietary drivers (blobs) for your model. Solutions: Install firmware marked "With Vendor" or "Firmware Included." Manually swipe vendor and firmware from stock MIUI via TWRP. Check if your model supports 5G in the selected firmware (e.g. Redmi Note 11 Pro+ 5G requires special patches).