How to install Android on Xiaomi: from unlock to firmware

Introduction: Why install custom Android on Xiaomi

Xiaomi smartphones, despite the excellent price-quality ratio, often come with a shell MIUI, Built-in advertising, limited system settings, unnecessary services and not always optimal optimization are just some of the reasons why Redmi owners are not happy, POCO Or Mi decide to install alternative firmware. Castomy Android (for example, LineageOS, Pixel Experience or ArrowOS) offers a clean interface, longer support for updates and advanced customization options.

But the installation process is not limited to just copying files, it's a complex process that involves unlocking the bootloader, installing custom Recovery (TWRP), Errors at any stage can lead to a device "brick" (inoperability), so it is important to follow the instructions with an understanding of each step. In this article, we will analyze the entire process from preparation to final configuration, taking into account the nuances for different Xiaomi models and the current requirements of 2026.

Before you start, answer a key question: what exactly do you want from custom firmware? This can be removing ads, supporting new versions of Android after the official updates, improving performance or accessing features that are not available in the company. MIUI. The answer depends on the choice of firmware and further actions.

๐Ÿ“Š What kind of firmware do you plan to install?
LineageOS
Pixel Experience
ArrowOS
MIUI Europa
Another (write in the comments)

Preparation of the device: what to do before installation

The first and most important step is data backup. Installing custom Android involves completely resetting your device, so all photos, contacts, messages and apps will be deleted. Use Google Photos for media files, Mi Cloud or Titanium Backup (for rooted devices) to back up your applications.

  • ๐Ÿ“ฑ Contact and SMS โ€” export them to the file VCF or through a Google Account.
  • ๐Ÿ”‘ Passwords and tokens โ€“ save data from two-factor authentication (Google Authenticator, Telegram).
  • ๐ŸŽฎ Game saves โ€“ many games (such as Genshin Impact or Honor of Kings) are tied to an account, but some require a manual backup.
  • ๐Ÿ“ Files in internal memory โ€“ copy folders DCIM, Downloads and WhatsApp on PC.

Next, check your modelโ€™s compatibility with the firmware you choose. Not all custom builds support all Xiaomi devices. For example, the Pixel Experience may not have builds for the Redmi Note 8 Pro (codename begonia), but support the design of the new model. POCO F3 (Please specify the code name of your smartphone:

  1. Open the Settings app โ†’ About Phone โ†’ MIUI version.
  2. Slip the kernel version several times until the developer menu appears.
  3. Back to Settings โ†’ Additionally. โ†’ For developers and find the code name of the device.

Also prepare the necessary tools:

  • ๐Ÿ–ฅ๏ธ Computer with Windows/Linux/macOS and USB-cable (preferably original).
  • ๐Ÿ”ง ADB Fastboot โ€“ utilities for interacting with the device through the command line.
  • ๐Ÿ“ฆ Firmware and TWRP โ€” Download files only from official sources (for example, XDA Developers or firmware sites).
  • ๐Ÿ”‹ Battery charge of at least 70% is critical to avoid failures during firmware.

โ˜‘๏ธ Firmware preparation

Done: 0 / 5

Unlocking the bootloader: a step without which you can not do

The bootloader on Xiaomi devices is locked by default, a security measure that prevents unauthorized changes to the system. To install custom Android, it must be unlocked. The process is officially supported by the company, but has a number of restrictions:

  • โณ Wait 7 days โ€“ after linking the Mi Account to the device, you need to wait a week (on some models โ€“ 360 hours!).
  • ๐Ÿ”— Account binding โ€“ unlocking is possible only through an authorized Mi Account, which should not be created on the account. VPN.
  • ๐Ÿ“ฑ Model Restriction โ€“ Some devices (e.g. Mi A-series with Android One) have a simplified procedure.

Instructions for unlocking:

  1. Activate Developer Mode (as described above) and enable OEM-unlocking in the settings for developers.
  2. Connect your phone to your PC, open the command line in the folder with ADB and execute: adb reboot bootloader The device will reboot to Fastboot mode.
  3. Run the Mi Unlock Tool (download from the official website), log in and follow the prompts. If you receive a waiting message, wait for the specified time.
  4. After unlocking, the phone will automatically reset to factory settings.

โš ๏ธ Warning: Unlocking the bootloader will void Xiaomiโ€™s warranty and could lead to problems with Google Pay, Netflix services HD Widevine L1 (downgrad L3). In some models (for example, POCO F5) After unlocking, support is lost 5G in some regions.

If the Mi Unlock Tool gives you a "Couldn't unlock" error, try:

  • Use the other USB-cable.
  • Disable the antivirus on the PC.
  • Try another Mi Account (not older than 30 days).
  • Make sure the Mi Unlock Tool version matches the version MIUI phone-on.
What to do if the unlock is 99% frozen?
This problem often occurs on models with a Mediatek processor (e.g. Redmi Note 11).Solution: 1. Disconnect the phone from the PC. 2. + Volume Up for 10 seconds for forced reboot. 3. Repeat the unlock process from the beginning. If the error repeats, try using the Mi Flash Tool to firmware the official global MIUI, And then you re-unlock.

Installation of TWRP: custom Recovery for firmware

TWRP (Team Win Recovery Project is an alternative recovery that allows you to install custom firmware, create backups and restore the system. Without it, most firmware installation is impossible. TWRP, compatible with your device and Android version.

Installation process:

  1. Download the image TWRP for your model (for example, twrp-3.7.0_12-0-begonia.img For the Redmi Note 8 Pro).
  2. Reboot your phone to Fastboot mode (as in the unlock step).
  3. In the command line, run: fastboot flash recovery twrp.img fastboot reboot recovery if TWRP Try an alternative command: fastboot boot twrp.img (It's a temporary launch without a flash in memory).
  4. V TWRP You may need to enter a password from encryption (if the data was encrypted in the MIUI).

After the first TWRP run, it is recommended that:

  • ๐Ÿ”„ Make a full backup of the current firmware (Backup item) โ†’ Choose Boot, System, Data).
  • ๐Ÿงน Format the Data partition (if you plan to clean installation).Warning: this will delete all user data!
  • โš™๏ธ Set up TWRP: Turn off encryption (if not necessary) in Wipe โ†’ Format Data โ†’ enter".

โš ๏ธ Note: Some new Xiaomi models (e.g. Xiaomi 13 or Xiaomi) POCO F5) standard TWRP You may not work because of changes in partition structure, in which case you can use OrangeFox Recovery or Dynamic Partitions special builds.

Xiaomi modelCode nameRecommended TWRPFeatures
Redmi Note 10 ProsweetTWRP 3.7.0Supports encryption, but requires disconnection before firmware.
POCO X3 ProvayuTWRP 3.6.2It doesnโ€™t work with Android 13.+ patchless.
Mi 11 LiterenoirOrangeFoxRequired to turn off avb2.0 before-fixing.
Xiaomi 12TplatoTWRP For Dynamic PartitionsA modified version with support is needed super.img.

Selection and installation of custom firmware

At this point, you will have to choose the firmware that suits your needs. Here is a brief overview of popular options:

  • ๐Ÿ“ฑ LineageOS is the most stable and close to โ€œpureโ€ Android. supports a large number of devices, but without the branded features of Google (they need to install separately).
  • ๐ŸŽจ Pixel Experience โ€“ firmware with the interface and features of Google Pixel, including Google Camera and Now Playing. Perfect for fans of stock Android.
  • โšก ArrowOS is a balance between customization and stability, it includes many interface settings, but it retains performance.
  • ๐ŸŒ MIUI Europa - modified version MIUI No ads and weekly updates, suitable for those who want to stay on the job MIUI, but to get rid of her shortcomings.
  • ๐Ÿ”ง Havoc-OS or crDroid โ€“ for enthusiasts who want maximum customization (statusbar setting, animations, gestures, etc.).

Installation process (LineageOS example):

  1. Download the firmware (for example, lineage-20.0-20260510-nightly-begonia-signed.zip) and, if necessary, GApps (Google service package, for example, NikGapps).
  2. Reboot to TWRP (Power + Volume Up)
  3. Run the Wipe. โ†’ Advanced Wipe and mark Dalvik/ART Cache, System, Data, Cache.
  4. Install firmware: Install โ†’ choose ZIP-file โ†’ Swipe to Confirm Flash.
  5. If you install GApps, do so immediately after the firmware is installed (no reboot!).
  6. Reset the device. The first start may take 10-15 minute.

After installation:

  • ๐Ÿ”’ Set up Magisk to get root rights (if necessary). Download Magisk-v26.4.zip and pass through TWRP.
  • ๐Ÿ”„ Update the firmware through the built-in updater (in LineageOS this is Settings). โ†’ System system โ†’ Update).
  • ๐Ÿ› ๏ธ Check the basic functions: camera, mobile network, Wi-Fi, Bluetooth. If something doesn't work, look for fixes on the phone. XDA or 4PDA.

โš ๏ธ Note: On devices with Dynamic Partitions (e.g. Xiaomi) 12/13 (a) the standard installation method may not work: 1. Unpack. payload.bin firmware MIUI. 2. Replace files in custom firmware with the new partition structure. 3. Use special scripts for firmware (for example, XiaomiTool) V2).

๐Ÿ’ก

If the mobile network does not work after firmware, check the settings APN. Often helps manually entering operator parameters or installing a patch IMS Fix for your model.

Setup of the system after installation

After successful firmware custom Android will be the initial setup.AOSPLineageOSPixel Experience functions may work differently than in the MIUI. Here's what you should pay attention to:

1. Google Account and Sync:

  • Add an account through Settings โ†’ Accounts.
  • Enable synchronization of contacts, calendar and Google Photos.
  • If Google services (such as Play Market) are not working, check the GApps or access rights.

Performance and battery:

  • B Settings โ†’ Battery disable unnecessary optimizations for background apps.
  • If you have a quick discharge, check the settings. โ†’ Annexes โ†’ Special access โ†’ Optimizing the battery.
  • For gaming smartphones (for example, POCO F4 GT) Install Game Turbo from Magisk modules.

Security and updates:

  • Set up a Smart Lock to unlock in trusted locations.
  • Enable monthly security updates (in LineageOS, this is done automatically).
  • Install Magisk to manage root rights and modules (e.g, ViPER4Android sound-wise).

4. Re-establishment of functions MIUI (if necessary):

  • If you miss Second Space or App Lock, install Xiaomi.eu or use alternatives from the Play Market (like Island for app isolation).
  • For IR Blaster (Infrared Port) Download Mi Remote from APK Or use AnyMote.
  • If Always-on Display is not working, check the settings in Settings โ†’ Screen. โ†’ Extended or install module AOD Enabler.

If Widevine is missing after the firmware L1 (no HD Netflix or Disney+), try:

  1. Refresh the original vendor.img stock-flow MIUI.
  2. Install Widevine Fix module via Magisk.
  3. Reset the settings DRM In Settings โ†’ Annexes โ†’ Special access โ†’ DRM.

๐Ÿ’ก

After installing custom firmware, the first 2-3 It can be unstable (overheating, fast discharge) that's OK, Android optimizes background processes. If problems persist longer, check firmware compatibility with your device.

Solving common problems

Even with the correct following of the instructions, errors can occur, and here are the most common ones and ways to fix them:

Problem.Possible causeDecision
The phone does not turn on after firmware (black screen)Incompatible firmware or installation errorCheck out the official Fastboot MIUI, then repeat the process.
Logo hanging (bootloop)Module conflict or incorrect WipeEnter in. TWRP, Run Advanced Wipe (including System) and then re-install.
Camera or sensors are not working.There are no drivers for your model.Install the patch. ANX Camera or stitch vendor.img stock-stack.
No mobile network (IMEI lost)The modem or EFS partition is damagedRestore. EFS from the backup or stream modem through the Fastboot.
Magisk or root is not workingIncorrect installation or module conflictRemove Magisk through TWRP, Then install the latest version.

If your problem is not described above, use the following resources:

  • ๐Ÿ› ๏ธ XDA Developers โ€“ search for the device model.
  • ๐Ÿ’ฌ 4PDA โ€” Russian-speaking community with guides and patches.
  • ๐Ÿ“– Official documentation of LineageOS.
  • ๐Ÿค– Telegram chats for firmware (e.g. Pixel Experience Chat or ArrowOS Official).

If the device doesnโ€™t turn on at all (even in Fastboot), try:

  1. Connect to charging for 30 minutes - sometimes helps with the discharge of the battery.
  2. Hold the Power. + Volume Down for 20 seconds for forced reboot.
  3. Use the Mi Flash Tool to run the official firmware MIUI mode EDL (Authorized account required).

โš ๏ธ Note: If you have firmware for another model (for example, installed the build for the Redmi Note 10 on the Redmi Note 10 Pro), the device may stop responding to the buttons. EDL-Mode (emergency firmware through testpoints) Contact the service center or look for soldering instructions for your model.

FAQ: Answers to Frequent Questions

Can I get the official back? MIUI after installing custom Android?
Yes, but the process depends on whether you have changed the partition structure: TWRP without changes in the vendor or modem, it is enough to flash the official MIUI If you installed firmware with Dynamic Partitions, you will need to restore the original structure using XiaomiTool. In any case, unlocking the bootloader will remain, and some features (for example, Mi Pay) may not work.
Will Google Pay and banking apps work after firmware?
It depends on: Magisk availability โ€“ if root is installed, banking applications can be blocked (use MagiskHide or Universal SafetyNet Fix). Widevine certification โ€“ if the level has dropped to L3, Netflix and other services will only work in the SD-Implementing the firmware โ€” MIUI Europa or Pixel Experience usually pass SafetyNet without additional action. Google Pay may require: Hide root through Magisk. Clear the data of the Google Play Services application. Get certified in the Play Market (section "Device certified").
How to update custom firmware?
Most firmware (such as LineageOS or ArrowOS) support OTA-Update: Go to Settings โ†’ System system โ†’ Update. Download the new version. Install the update (usually you need to reboot to the new version). TWRP). If OTA not working: Download the new build from the official website. TWRP and sew ZIP-file (without Wipe if upgraded "over the air"). When you upgrade to a new version of Android (for example, from 12 to 13), you may need a full clean installation.
Why does 5G not work after the firmware?
This problem is typical for: Mediatek devices (e.g. Redmi Note) 11 Pro+ 5G). Firmware collected without proprietary modem drivers. Solutions: vendor.img and modem.img formal MIUI Fastboot, install the patch. 5G Fix for your model (see for your model) XDA). Check the settings. APN (Sometimes manually entering operator parameters helps. If nothing helps, go back to the stock room. MIUI Or use a firmware with support 5G (for example, MIUI Europa).
Can I install custom Android without unlocking the bootloader?
No, it's impossible. Any custom firmware requires: Unlocked bootloader. Installed custom recaveri (TWRP Signature checks disabled (avb2.0). The only exception is the scaling through EDL (emergency mode), but this requires an authorized Xiaomi account and special equipment, and these methods often lead to a "soft brik" and are not recommended for beginners.