Why do users choose custom firmware for Xiaomi?
Installing custom firmware on Xiaomi via PC is a process that opens up new possibilities for your smartphone, but requires care and preparation. Many owners of Redmi, POCO or Mi devices decide to do this step to get rid of pre-installed bloatware, get up-to-date security updates or install alternative shells like LineageOS and Pixel Experience. However, it is important to understand that this is not just an update through settings, but a full-fledged intervention in system software that can both revive an old device and turn it into a brick if errors.
The main reasons for switching to custom firmware usually boil down to three key points: performance (pure Android is faster than the ad-hoc MIUI), privacy (lack of Chinese surveillance services), and functionality (access to chips of the latest versions of Android on outdated models). For example, owners of the Redmi Note 8 Pro (2019) through custom firmware can get Android 14, while official support from Xiaomi has long been discontinued.
This guide will work for most Xiaomi, Redmi and POCO models released after 2018 (starting with the Mi 8 and Redmi Note 7).However, before you start, check if your device is supported on the XDA Developers or 4PDA forums β some budget models (such as the Redmi 9A) have a locked bootloader that cannot be unlocked legally.
Preparation of the device: unlocking the loader
The first and most critical step is to unlock the bootloader, without which no custom firmware will install. Xiaomi officially lets you unlock the bootloader, but the process involves waiting and binding to your Mi Account.
- π± Xiaomi smartphone with a battery charge of at least 60% (when unlocked, the device is rebooted many times).
- π» Computer running Windows 10/11 (Mi Unlock Tool requires Qualcomm drivers).
- π Cable USB Type-C (original or high-quality β cheap cables can interrupt the connection).
- π§ Mi Account tied to the device (unblocking is impossible without it!).
The unlocking process takes 3 to 7 days due to Xiaomiβs policy: once the account is linked to the device, you need to wait for the confirmation SMS.
- Activate Developer Mode: Go to Settings β About Phone β MIUI version and tap the build number 7 times.
- Turn it on. OEM-unlocking and debugging USB Settings menu β Additionally. β For developers.
- Download the official Mi Unlock Tool and install it on PC.
- Connect your phone to your computer, launch the Mi Unlock Tool and log in under the same Mi Account as you do on your smartphone.
- If you see a message that says "Wait 168 hours" - wait exactly 7 days (attempts to get around this time lead to the blocking of your account).
β οΈ Warning: If you bought the phone with your hands, make sure the previous owner untie his Mi Account. Otherwise, unlocking will not be possible without his data. VPN Mi Unlock Tool β Xiaomi blocks such attempts.
The best choice for the custom firmware: MIUI vs LineageOS vs Pixel Experience
Once the bootloader is unlocked, you need to decide on the firmware, and they're divided into three main categories:
- Modified MIUI (e.g. MIUI EU or xiaomi.eu): retains the branded interface but removes ads and Chinese services, suitable for those who like MIUI but want a clean system.
- AOSP-Firmware (LineageOS, Pixel Experience, ArrowOS): pure Android without Xiaomi shell. Optimal for weak devices (for example, Redmi 7), as they consume less resources.
- GSI firmware: General Android builds that can be installed on any device with an unlocked bootloader, suitable for experimentation, but can work unstablely.
For beginners, we recommend starting with xiaomi.eu, a stable version of MIUI without bloatware, with weekly updates. Power users often choose Pixel Experience for an interface similar to Google Pixel, or LineageOS for maximum customization. Below is a comparison table of popular firmware for Xiaomi:
| Firmware | Type | Advantages | Deficiencies | Support for models |
|---|---|---|---|---|
| xiaomi.eu | Modified MIUI | Stability, no advertising, weekly updates | Requires unlocked bootloader, no Google services out of the box | Most of the Xiaomi/Redmi/POCO models |
| Pixel Experience | AOSP | Google Pixel interface, quick work | Some functions may not work (NFC, IR-blaster) | Popular models (e.g. POCO F3, Redmi Note 10 Pro) |
| LineageOS | AOSP | Maximum customization, long-term support | Minimalist design, may not have a MIUI camera | A wide list, but not all functions work |
| CrDroid | AOSP | Balance between performance and functionality | Fewer updates than Xiaomi.eu | Limited list (mostly flagships) |
Before choosing, check if there is firmware for your model on XDA Developers or 4PDA. For example, for the POCO X3 Pro there are stable builds of Pixel Experience, and for the Redmi Note 8 LineageOS 20 (based on Android 13) is better suited.
π‘
Before downloading the firmware, check its hash amount (MD5 or SHA-256) on the developerβs website. This will protect you from fake builds with viruses or miners.
Installation of TWRP Recovery: a mandatory step before firmware
TWRP (Team Win Recovery Project) is a custom recovery that allows you to install firmware, backup and restore the system. Without it, custom firmware installation is impossible. The installation process for TWRP is different for different Xiaomi models, but the overall scheme is as follows:
Download the official image TWRP for your model|Install drivers ADB and Fastboot on PC|Enable debugging on USB phone-on|Make a backup copy of the data (TWRP does not save user files)|Charge your phone at least 70 times%-->
Instructions for installing TWRP via fastboot:
- Download the current version TWRP for your model from the official website (for example, for Redmi Note) 9 Pro, it's gonna be a file. twrp-3.7.0_9-0-joyeuse.img).
- Unpack the archive from TWRP in the folder from fastboot (usually C:\platform-tools after installing the Android SDK).
- Connect your phone to your PC in fastboot mode (turn off the device, then press Volume Down + Power before the Fastboot logo appears).
- Open the command line in the folder with fastboot and execute the command: fastboot flash recovery twrp-3.7.0_9-0-joyeuse.img
- After successful firmware reboot in TWRP Team: fastboot boot twrp-3.7.0_9-0-joyeuse.img
If the TWRP doesn't start after the reboot and the phone loads into standard recovery, your model has Anti-Rollback protection.
- π§ Install TWRP Fastboot boot (not flash!) and flash it right away. disable_force_encrypt.zip (Otherwise, the data will be encrypted and will not be available).
- π¦ Download firmware and Magisk in advance to install them in one session TWRP.
β οΈ Note: Some models (e.g. Xiaomi 12 and newer) TWRP This can cause hardware-based anti-rollback to go off, making the device unsuitable for official updates.
Firmware custom OS through TWRP: step-by-step instructions
Now that you have the bootloader unlocked and you have TWRP installed, you can start installing custom firmware, and this is irreversible, and once you have the firmware, all the data on the device will be erased.
- Reset to factory settings: In TWRP, select Wipe β Advanced Wipe and mark Dalvik, Cache, System, Data. This will delete all user data and old firmware.
- Install firmware: Press Install, select the downloaded firmware file (usually this is the ZIP-archive) and confirm the installation of the swipe.
- GApps firmware (if needed): If you install LineageOS or Pixel Experience without Google services, download the appropriate Open GApps package (choose arm64 for most Xiaomi) and run it right after the main firmware.
- Install Magisk (optional): If you need root access, file Magisk ZIP in the same TWRP session.
- Reboot: Press Reboot System. The first run can take up to 10 minutes - don't interrupt the process!
If after the reboot, the phone is stuck on the logo or went to bootloop, then the firmware is not suitable for your model or you missed the step with the Wipe.
- π Go back in TWRP (Hold the volume up + Power on loading).
- π§Ή Repeat Advanced Wipe and install the firmware again.
- π Check if you downloaded the firmware version (for example, for Redmi Note 10 Pro there are separate builds for sweet and sweetin).
What if TWRP doesnβt see internal memory?
On models with dynamic partitions (such as Xiaomi 11 and later), the standard Wipe method will not work. In this case, you need to manually format the userdata partition with the command. `fastboot erase userdata` before-fixing.
Solving typical problems after firmware
Even if the firmware is successful, there may be problems, and here are the most common ways to solve them:
| Problem. | Possible cause | Decision |
|---|---|---|
| No network (IMEI lost) | No modem or EFS section | Restore. IMEI through QCN-Recovery or sew stock modem from the official firmware |
| The camera's not working. | There are no drivers. MIUI Camera in AOSP-firmware | Install ANX Camera or patch for 4PDA camera |
| Fast battery discharge | The kernel or background processes are not optimized | Sweep through the FrancoKernel core or calibrate the battery to TWRP (Battery β Calibrate) |
| It's not working. NFC/IR-blaster | There is no support in the custom firmware | Return to MIUI or look for alternative firmware with support (e.g. xiaomi.eu) |
If the phone stopped seeing after the firmware SIM-check if the Baseband settings are wrong. TWRP file vendor.img Also make sure you download the firmware to properly modify the device (e.g., for Redmi Note). 9 Pro is a version for the global (joyeuse) and Indian (curtana) markets β they are incompatible!).
π‘
If the phone doesn't turn on after the firmware is done (black screen, no image vibration), try booting into TWRP and flashing the stock firmware through fastboot, which restores performance in 90% of cases.
Return to stock firmware: how to roll back
If custom firmware did not meet expectations or critical errors occurred, you can return to the official MIUI. For this you will need stock firmware in.tgz or.zip format (you can download on the official website of Xiaomi or Xiaomi Firmware Updater).
Return process:
- Download the full stock firmware (not a full stock firmware) OTA-update!) for your model, for example, for POCO X3 NFC It'll be a file. surya_global_images_V12.5.3.0.RJGMIXM_20220321.0000.00_11.0_global_1a2b3c4d5e.tgz.
- Unpack the archive and find the file. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac).
- Connect your phone to fastboot and start the script, and it will automatically stitch all the partitions.
- Once completed, the phone will reboot to standard MIUI, and may require a link to a Mi Account when it first starts.
If you need to log in to Mi Account after running the firmware, but you donβt remember the data, use the Mi Account Bypass Tool (available on 4PDA), but note that this method does not work on all models and can lead to locking the device.
β οΈ Note: On some devices (e.g. Xiaomi) 12T And now, returning to stock firmware via fastboot resets the bootloader's unlock status, which means you'll have to wait another 7 days to re-install custom firmware.