How to install LineageOS on Xiaomi: a full guide from unlock to setup

Installing custom firmware LineageOS on Xiaomi smartphones is a way to get a clean Android without too much Blaatware, improve performance and extend the life of the device. However, the process requires care, from unlocking the bootloader to choosing the right build. In this article, we will analyze all the steps โ€” taking into account the features of Redmi, POCO and Mi-series, as well as the typical errors that beginners make.

Why LineageOS? This firmware is famous for its stability, regular security updates and support for outdated models that Xiaomi has not officially updated for a long time. But there are nuances: not all features can work out of the box (for example, NFC or broadband module on some devices), and the wrong installation actions can turn a smartphone into a brick.

1. Compatibility Check: Does your Xiaomi LineageOS support?

Before you start, make sure that your Xiaomi model is officially supported by the LineageOS project.The list of compatible devices is published on the official website.Please note: even if your model is on the list, some features (such as VoLTE or Wi-Fi Calling) may not work correctly.

This is especially true for devices with MediaTek processors, whose support is often limited by the closed source driver code. 11 (spes) has informal assemblies but with camera and module reservations 5G. Here. POCO F1 (beryllium or Mi A2 (jasmine_sprout) fully supported.

  • ๐Ÿ” How do you find the code name of the model? Go to Settings โ†’ The phone. โ†’ Version. MIUI and tap 7 times on "Core" and the menu that appears will have a Device line (e.g., surya for the "Core"). POCO X3).
  • โš ๏ธ Warning: If your model is not supported, installing LineageOS is only possible through informal builds (e.g. from Xiaomi.eu or PixelExperience), but it is risky.
  • ๐Ÿ“ฑ Popular models with good support: POCO F1, Redmi Note 7/Pro, Mi 9, Redmi K20 Pro, Mi A3.
Xiaomi modelCode nameStatus of supportFeatures
POCO F1berylliumOfficial.Full support including camera and NFC
Redmi Note 7lavenderOfficial.VoLTE works, but there is no Widevine L1
Mi 9cepheusOfficial.5G support (on models with modules)
Redmi K30 ProlmiInformalProblems with Wi-Fi 6 and 64 MP camera

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

Xiaomi blocks the bootloader on all its devices, so unlocking it is a must-have process that takes anywhere from 72 hours (as per Xiaomi rules) to a few minutes if you have an old account with previously unlocked devices.

Instructions for unlocking:

  1. Link your Mi Account to your phone in Settings โ†’ Xiaomi account.
  2. Enable Developer Options (Tap 7 times on the build number in About Phone).
  3. Activate OEM Unlock and USB Debugging in the Developer Menu.
  4. Download Mi Unlock Tool and log in to the program.
  5. Connect your phone in Fastboot mode (press Power + Volโˆ’ when the device is off).
  6. Run the unlock in the Mi Unlock Tool and wait until it is completed (it may take a retry in 72 hours).

โš ๏ธ If the Mi Unlock Tool gives you a "Couldn't unlock" error after waiting 72 hours, try using another one. USB-cable USB 2.0 (some laptops block data transmission over the Internet) USB Also check that there are no restrictions on your Mi Account (for example, if you have recently changed your password).

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

3. Installation of custom recaveri (TWRP or OrangeFox)

Once you unlock the bootloader, you need to install custom recavers like TWRP or OrangeFox, which you need to install LineageOS and other modifications, and you need to choose a version of the recavator that is compatible with your Xiaomi model.

Download the image of the recovery for your device from the official TWRP or OrangeFox website. For example, TWRP 3.7.0 will suit the POCO X3 NFC (surya).

fastboot flash recovery twrp-3.7.0-surya.img


fastboot reboot recovery

If you reboot your phone to the recavator and automatically switch to MIUI Recovery, the manufacturer has overwritten your recavator.

  • ๐Ÿ”ง Download to fastboot and repeat the installation command.
  • ๐Ÿ“ต Turn off the recapver check in MIUI (If there is such an option in the developer settings).
  • ๐Ÿ”„ Install OrangeFox instead TWRP โ€” It is better to bypass the limitations of Xiaomi.

โš ๏ธ Note: On some models (for example, Redmi Note 10 Pro) after installing custom recavery, the sensor may disappear in recovery mode. OTG-Mouse or touch version of OrangeFox.

Make a backup of data (photos, contacts, SMS)|Download LineageOS firmware for your model|Download Gapps (if you need Google services)|Download Magisk (optional, for root)|Fully charge your phone (minimum 70%)-->

4. Select and download the correct version of LineageOS

LineageOSโ€™ official website offers builds for Android versions ranging from Android 11 to Android 14. Choose the one that is as stable as possible for your device. For example, LineageOS 20 (Android 13) is recommended for POCO F1, as newer versions may have performance bugs.

Where to download:

  • ๐ŸŒ Official builds: download.lineageos.org (select by model code).
  • ๐Ÿ”ง Informal assembly: Forum XDA Developers or Telegram channels (e.g. LineageOS for Xiaomi).
  • ๐Ÿ“ฆ Additional: Download Open Gapps (if you need Google services) and Magisk (for root rights).

Critical information: Some devices (such as the Redmi Note 8 Pro with the MediaTek Helio G90T chip) do not have official builds of LineageOS due to closed drivers. In this case, use firmware from PixelExperience or Havoc-OS, but be prepared for bugs with a camera and a 4G module.

LineageOS versionAndroid-basedRecommended modelsFeatures
LineageOS 18.1Android 11POCO F1, Mi 9Stable but outdated
LineageOS 20Android 13Redmi Note 10 Pro, POCO X3A good balance of stability and function
LineageOS 21Android 14Mi 11, POCO F4New features, but possible bugs

5. Install LineageOS via TWRP: step-by-step instruction

Now, to the installation itself, it's important to follow the order of things and not skip the steps, especially partition cleaning.

  1. Download to Recovery: Turn off the phone, then press Power + Vol+ to log into TWRP.
  2. Clean Partitions: Go to Wipe โ†’ Advanced Wipe and mark: Dalvik / ART Cache System Data Cache

Confirm the swipe. Don't touch the Internal Storage section unless you want to lose your firmware files!

Installation of firmware:

Install

lineage-*.zip

Installation of Gapps (optional):

open_gapps-*.zip

nano

pico

Installation of Magisk (optional):

Magisk-*.zip

Reboot:

Reboot โ†’ System

โš ๏ธ Warning: If the phone has been stuck on the LineageOS logo for more than 20 minutes after installation, it means that the firmware is not suitable for your model or you forgot to clean the System partition. TWRP, repeat cleaning and installation.

๐Ÿ’ก

If your mobile network is not working after firmware, check the APN settings in Settings โ†’ Mobile Network โ†’ Access Points (APN). Often manual operator settings help.

6.Initial adjustment and solution of typical problems

Once you have successfully installed LineageOS, you will be greeted by an initial setup wizard, where you can select a language, connect to Wi-Fi and recover data from the backup (if you have backed up via TWRP or Swift Backup).

  • ๐Ÿ”’ Encryption: LineageOS offers to encrypt your device by default. If you don't plan to use a password or fingerprint, turn off this option - it can slow down your work on weak devices.
  • ๐Ÿ“ถ Mobile network: On some models (e.g. Redmi Note) 9 Pro) may not work VoLTE. Solution: install a patch VoLTE-fix.zip through TWRP.
  • ๐ŸŽฎ Performance: In Settings โ†’ System system โ†’ Additionally, you can turn on the performance mode for games.

Typical problems and their solutions:

Problem.Possible causeDecision
The camera's not working.There are no drivers for the moduleInstall ANX Camera or GCam from the repository
No sound in the headphones.Incorrect audio settingsCheck the settings โ†’ Sound โ†’ Sound quality
Fast battery dischargeBackground processes or unoptimized coreInstall FrancoKernel or calibrate the battery via TWRP
How to get back MIUI if you don't like LineageOS?
To get back to stock firmware, download the official Fastboot-ROM for your model from Xiaomi. Then run it through the Mi Flash Tool in clean all mode. Note that this will block the bootloader again and delete all data!

7.Optimize and Tweaks for Better Performance

LineageOS is already optimized, but a few tweaks will help improve the experience:

  • ๐Ÿš€ Core and Governor: In Settings โ†’ Battery โ†’ Select Performance Mode for Games or Balanced for Power Savings.
  • ๐Ÿ”‹ Auto-Run Applications: Limit Background Activity in Settings โ†’ Annexes โ†’ Special access โ†’ Optimizing the battery.
  • ๐Ÿ“ฒ Gestures: LineageOS has built-in navigation gesture support (like Android 10)+). Activate in Settings โ†’ System system โ†’ Gestures.

For advanced users:

  • ๐Ÿ› ๏ธ Install Kernel Adiutor to fine-tune the kernel (e.g., change it). CPU Governor on performance for maximum power).
  • ๐Ÿ”’ Use Magisk to install modules, for example: ViPER4Android โ€” To improve sound; LSPosed to modify system applications; App Systemizer to make custom applications system-friendly.

๐Ÿ’ก

Update LineageOS regularly through the built-in Settings menu โ†’ System โ†’ System Update. This will fix bugs and improve security.

8 Security and Updates: How to Keep the System Up-to-date

LineageOS updates weekly or monthly (depending on the model). To check for updates, go to Settings โ†’ System โ†’ System Update. Updates are installed automatically through the built-in installer, but sometimes you may need to manually install via TWRP (if the firmware structure has changed).

Security advice:

  • ๐Ÿ” Encryption: If you didnโ€™t turn it off when you set it up, the data on the device is protected. For additional security, use AppLock or Shelter (to isolate applications).
  • ๐Ÿ›ก๏ธ Backups: Regularly backup your files through TWRP Swift Backup (Save to PC or Cloud).
  • ๐Ÿ” Virus Check: Although LineageOS is safer MIUI (No pre-installed Bloatware, install applications only from trusted sources.

If you're using Magisk, update it with the firmware.

  1. Download the latest Magisk.apk from GitHub.
  2. Rename the file to Magisk.zip and run through TWRP after the LineageOS update.
  3. Reset the device.

โš ๏ธ Note: If the phone stopped booting after the LineageOS update, the cause may be a conflict of Magisk modules.Solution: boot into the phone. TWRP, delete the folder /data/adb/modules And reinstall Magisk.

FAQ: Frequent questions about installing LineageOS on Xiaomi

Can I install LineageOS without unlocking the bootloader?
No, Xiaomi blocks the bootloader on all devices, and unlocking it is a must-do step, and circumventing this restriction is technically possible only through exploits (such as DirtyCOW), but they do not work on all models and can lead to unstable system operation.
Will I lose my warranty after installing LineageOS?
Yes, custom firmware installation voids Xiaomiโ€™s warranty. However, you can return MIUI stock firmware via the Mi Flash Tool, and the service center is unlikely to notice any signs of unlocking (unless you check the statuses of fastboot oem device-info).
How to transfer data from MIUI to LineageOS?
Use Swift Backup or Titanium Backup to back up applications and their data. Contacts and photos will sync with Google Account. Importantly, don't restore MIUI system applications to LineageOS, it will cause conflicts.
Why is it that the installation does not work after the installation? NFC or IR-blaster?
Some models (e.g. Redmi Note) 8 Pro) these functions are not working due to the lack of proprietary drivers. NFC: Try to patch the patch. NFC-fix.zip (look XDA). For IR-Blaster: Install Mi Remote application manually (but it may not recognize some devices).
How to update LineageOS if there are no built-in updates?
If your model does not support OTA-updates, download new builds manually from the official site and install through TWRP. Before updating, be sure to backup the Data partition, as it sometimes requires cleaning.