Installing an alternative version of Android on Xiaomi smartphones is a popular way to expand the functionality of the device, get rid of advertising in MIUI or get the latest security updates on older models. However, the process requires care: the wrong actions can turn the phone into a brick. In this guide, we will discuss all the steps from preparation to final configuration, taking into account the features of unlocking the bootloader in 2026 and compatibility with the latest versions of Redmi, POCO and Mi.
Itβs important to understand that installing custom Android (like LineageOS, Pixel Experience, or ArrowOS) is insecure and can affect some features like Widevine. L1 (viewable HD-Netflix content) or contactless payments, but for many users, the benefits of a clean Android without a bloat, quick updates and advanced customizations outweigh the risks.
1.Preparation: What to Know Before Installation
Before you start firmware, make sure your device is supported by the custom firmware you choose. Compatible model lists are usually published on XDA Developers forums or project sites (like LineageOS Wiki). Pay attention to the model codename (like raphael for Redmi K20 Pro) rather than the marketing name β this is critical for choosing the right firmware.
Also check:
- π Battery charge at least 70%. Interrupting the process due to discharge can make the phone inoperable.
- πΎ Backup: Use Mi Mover, Swift Backup, or adb backup to save data. Cloud backups (like Google Drive) don't work -- they won't restore system settings.
- π§ Tools: Windows PC 10/11 Linux, USB-cable (preferably original), debugging USB (Settings β The phone. β Version. MIUI β 7 Click to activate the developer mode).
β οΈ Note: On devices with MediaTek processors (e.g. Redmi Note 11 or POCO M4 Pro) unlocking the bootloader may not be possible without an authorized Xiaomi account. β The phone. β Full specification.
2 Unlocking the bootloader on Xiaomi in 2026
Since 2023, Xiaomi has tightened the rules for unlocking the bootloader, now requiring:
- Link your Mi Account to your device (in your phone settings).
- Waiting 7 days after the tether is a must for new devices.
- Use the official Mi Unlock Tool software (you can download it on the Xiaomi website).
Instructions for unlocking:
- Download and install Mi Unlock Tool on PC.
- Launch your phone in Fastboot mode: Turn off the device, then press the Power button + Volume down.
- Connect your phone to your PC and log in to the Mi Unlock Tool under the same account as your phone.
- Press Unlock and wait until it is completed (usually takes 1-3 minutes).
β οΈ Warning: If the Mi Unlock Tool gives you a "Couldn't unlock" error, check: Mi Account is logged on to your phone for more than 7 days. Find Device is disabled on your phone. β Mi Account β Find Device. You're using the original USB-cable (not all cables support data transfer to Fastboot).
Link Mi Account to phone | Disable Find Device | Install Mi Unlock Tool on PC | Wait 7 days after account binding | Download ADB/Fastboot-->
Installation of custom recovery (TWRP)
TWRP (Team Win Recovery Project) is an alternative recovery needed to install custom firmware. Official TWRP builds are available on twrp.me, but many Xiaomi models require unofficial versions (you can find them on XDA or Telegram developer channels).
Instructions for installing TWRP:
- Download the TWRP image for your model (file with.img extension).
- Move the file to the folder with the platform-tools (from Android SDK).
- Launch your phone in Fastboot and connect to your PC.
- Open the command line in the folder with platform-tools and do: fastboot flash recovery twrp-3.7.0_12-raphael.img Fastboot Reboot Recovery (Replacement) twrp-3.7.0_12-raphael.img in the name of your file).
After rebooting to TWRP, donβt restart your phone to the system β start installing the firmware immediately. Otherwise, the standard recovery MIUI will overload the TWRP.
What happens if TWRP doesnβt start?
4. Selection and installation of custom firmware
The most popular firmware for Xiaomi:
| Firmware | Features | Support for GApps | Complexity of installation |
|---|---|---|---|
| LineageOS | Clean Android, stable operation, long-term support | Yes (should be downloaded separately) | Medium |
| Pixel Experience | Google Pixel interface, regular updates | Included | Low. |
| ArrowOS | Maximum customization, support for themes | Yes (optional) | Tall. |
| MIUI Europa | MIUI without advertising and Chinese services | Yes. | Low. |
Installation process (LineageOS example):
- Download firmware and, if necessary, GApps (for example, NikGapps or OpenGapps).
- Move files to your phone or to your phone SD-map.
- In TWRP, run Wipe β Advanced Wipe and mark Dalvik / ART Cache System Data Cache
Don't wash.
Internal Storage
MicroSD
Install
GApps
Wipe β Format Data
1. Repeat Format Data in TWRP.
2. Swipe the kernel (boot.img) from the firmware archive separately.
3. Check firmware compatibility with the Android version (for example, firmware on Android 13 will not stand on the Android 12 device without prior updates).-->
5. Magisk installation for root rights
Magisk is a tool for obtaining root rights without violating the integrity of the system (unlike the outdated SuperSU), it also allows you to hide root from applications (for example, banking) and install modules for advanced configuration.
Installation instructions:
- Download the latest Magisk (.zip file) from GitHub.
- Download the phone to TWRP and swipe Magisk-v26.4.zip (version may vary).
- Restart. Once you start, install the Magisk application from the same archive (.apk file).
To check if the installation is correct, open Magisk and make sure that all items in the Superuser section are green. If the app doesn't start, try:
- Reinstall Magisk via TWRP.
- Switch Magisk-uninstaller.zip, then repeat the installation.
- Check compatibility with your firmware on XDA.
π‘
Magisk allows you to hide root from specific applications (such as banking or games). To do this, open Magisk β Settings β MagiskHide and mark the desired programs.
System configuration after installation
After the first download custom Android will need:
- Activate Google Services (if you have installed GApps): Sign in to your Google account in the settings.
- Configure access rights for Magisk (if you have installed root).
- Update the firmware through the built-in updater (for example, in LineageOS it is Settings β System β System Update).
- Restore data from a backup (if you did backup via TWRP or Swift Backup).
Typical problems after installation and their solution:
| Problem. | Possible cause | Decision |
|---|---|---|
| No mobile network. | No IMEI or incorrect APN settings | Switch persist.img from stock firmware or manually add APN |
| Wi-Fi/Bluetooth is not working | Incompatible kernel or drivers | Swipe the kernel (boot.img) from firmware compatible with your model |
| Fast battery discharge | Background processes or incorrect calibration | Calibrate the battery via TWRP or flash the Battery Calibration module in Magisk |
β οΈ Note: If contactless payments have stopped working after firmware (NFC), Check: Availability of Widevine Certificates L1 (can be checked in the appendix DRM Status of section /vendor β Sometimes you have to stitch it separately. Magisk settings: turn off MagiskHide for the Google Pay app.
7. Custom firmware update
Update custom Android can be in two ways:
- Through the built-in updater (recommended for beginners): In LineageOS or Pixel Experience, updates come automatically to Settings β System β Update. Download the update and install it without any further manipulation.
- Manually via TWRP (for power users): Download the new firmware version from the official website. Download to TWRP and stream the file (without Wipe Data unless otherwise specified).
Important: Check the changelog on the firmware site before updating. Sometimes a clean installation (with a full reset) is required if the Android version changes (for example, from 12 to 13).
π‘
When upgrading via TWRP, remember to flash Magisk again, otherwise the root will disappear and the modules will stop working.