How to Put Clean Android on Xiaomi Mi 9: A Complete Guide to Unlocking and Firmware

Xiaomi Mi 9

cepheus

Snapdragon 855

MIUI

Android

But moving to stock Android isn't just about "set and forget"; it requires unlocking the bootloader, working with custom Recovery. TWRP, And most importantly, understanding the risks, from loss of warranty to build-up of the device, and in this guide, we'll go through all the steps from preparation to final setup, and also tell you which firmware supports all the features of the Mi 9, including the ones that are used in the new version. NFC camera AI-treatment.

โš ๏ธ Important: Instructions are relevant for Xiaomi Mi 9 (model) M1902F1G For modifications of the Mi 9 SE Mi 9 Pro process will be different โ€“ they have different code names (grus and crux respectively) and a different hardware platform.

๐Ÿ“Š Why you want to install a clean Android on the Mi 9?
I want to get rid of it. MIUI publicity
Regular security updates are needed
I love customization and AOSP-project
I have problems with productivity on MIUI
Other

1.Why Pure Android is Better MIUI Xiaomi Mi 9 for the first time?

Shell MIUI Xiaomi is a compromise between functionality and imposed services, and on the one hand, it offers handy chips like a two-way split screen or a built-in scrolling screenshot:

๐Ÿ”น Advertising in system applications (even in Phone or Weather) that has to be manually disabled through hidden settings.

๐Ÿ”น Background processes that eat up battery power and RAM (e.g. mipush or miui.analytics).

๐Ÿ”น Delayed updates: MIUI The Mi 9 is no longer getting major updates. AOSP-Firmware (such as LineageOS or Pixel Experience) is updated monthly.

Pure Android solves these problems:

  • โœ… No ads and bloatware โ€“ only basic Google apps (if you choose the GApps version).
  • โœ… Speed: without unnecessary services, the system works smoother, especially on aging iron.
  • โœ… Up-to-date security patches: firmware like GrapheneOS or CalyxOS focus on privacy and regularly close vulnerabilities.
  • โœ… Customization: You can choose firmware with themes, gestures or even alternative launchers (e.g. Lawnchair).

There are, however, downsides:

  • โš ๏ธ Loss of some functions MIUI: For example, in stock Android there is no built-in game turbo mode or Xiaomi brand gestures.
  • โš ๏ธ Error risk: Not all cameras or sensors can work out of the box (e.g., a wide-angle module or a sensor). IR-blaster).
  • โš ๏ธ Lack of official support: if the service center breaks, it will refuse warranty repairs.

๐Ÿ’ก

Before installing pure Android, check if the selected firmware supports Widevine L1 (look-in Netflix/Disney+ into HD). For example, in Pixel Experience it works, and in some builds LineageOS โ€“ no.

2.Preparation: What to do before the firmware

Installing custom firmware is an irreversible process that erases all data from the device. To avoid problems, follow these steps:

๐Ÿ“Œ Create a backup copy:

  • ๐Ÿ“ฑ Application data: use adb backup or apps like Swift Backup (requires root).
  • ๐Ÿ“‚ Files: Copy photos, videos and documents to your PC or cloud (Google Drive, Mi Cloud).
  • ๐Ÿ“‹ Settings: Export SMS through SMS Backup & Restore and sync your contacts with your Google account.

๐Ÿ”ง Check the version. MIUI:

Some firmware requires a specific version MIUI You can find it in Settings to unlock the bootloader. โ†’ The phone. โ†’ Version. MIUI. The best starting version for the Mi 9 โ€” MIUI 12.5 or later (older drivers may have problems).

๐Ÿ’ป Install the necessary tools on the PC:

  • ๐Ÿ–ฅ๏ธ ADB Fastboot: Download Googleโ€™s Platform Tools.
  • ๐Ÿ”‘ Xiaomi Drivers: for Windows โ€“ Mi Flash Tool, for Windows Linux/macOS โ€” Adequately standard adb packages.
  • ๐Ÿ“ฆ Firmware and TWRP: Choose the build in advance (more on that below) and download it. TWRP for cepheus from the official website twrp.me.

Battery charge > 70%|Backup copy of data created|Drivers. ADB/Fastboot fixed|Firmware and TWRP downloaded|Encryption disabled in MIUI (Settings โ†’ Lockdown and protection โ†’ Encryption)

-->

โš ๏ธ Note: If your Mi 9 was purchased in China (local version), unlocking the bootloader may require additional steps, including waiting 7-30 days after linking your Mi Account to the device.

3. Unlock the bootloader on Xiaomi Mi 9

The bootloader on Xiaomi devices is locked by default, and unlocking it is a mandatory step before installing custom firmware, which takes 5 minutes to a week (depending on Xiaomi policy).

๐Ÿ”“ Step 1: Link your Mi Account to your device

  1. Go to Settings โ†’ About Phone โ†’ MIUI version and tap 7 times on the line to activate the developer mode.
  2. Back to Settings โ†’ Additionally. โ†’ For developers and include: ๐Ÿ”„ Debugging by USB ๐Ÿ”“ Unlocking OEM (may require input PIN-code).

Connect the phone to the PC and confirm the debugging permission.

๐Ÿ”“ Step 2: Use the Mi Unlock Tool

  1. Download the Mi Unlock Tool (the official tool from Xiaomi).
  2. Start the program, log in to your Mi Account (should match the one on your phone!).
  3. Put the phone in Fastboot mode: turn it off, then press Power + Volume down.
  4. Connect Mi 9 to your PC and press Unlock in the program.

๐Ÿ† Top.-5 firmware for Xiaomi Mi 9 into 2026 year:

FirmwareTypePlusesConsReference
Pixel ExperienceAOSP + GooglePure Android with Pixel chips, stable cameraSometimes animation slows down.Download
LineageOSAOSP (Google)Maximum productivity, minimalismNo GApps by default, weak cameraDownload
ArrowOSAOSP customizedFlexible interface settings, good optimizationRare Bluetooth bugsDownload
Havoc-OSAOSP + fitA lot of themes and gestures, game modeIncreased battery consumptionDownload
crDroidAOSP + productivityExcellent autonomy, support OTA-updateThere is no official Widevine support L1Download

๐Ÿ” How to Check Compatibility?

Before downloading the firmware, make sure it is for the cepheus (not the grus or other models), for example, the name of the archive should be something like:

PixelExperience_cepheus-13.0-20260510-UNOFFICIAL.zip

โš ๏ธ Attention: Labeled firmware UNOFFICIAL They may contain bugs. For maximum stability, choose OFFICIAL Recommended or recommended by developers XDA Developers.

5. Installation TWRP and firmware of pure Android

Now we move on to the most important stage - the installation of custom recavery (TWRP) Follow the instructions carefully to avoid errors.

๐Ÿ› ๏ธ Step 1: Installation TWRP

  1. Download the last one. TWRP for cepheus (e.g. version 3.7.0 or later) from twrp.me.
  2. Rename the file to twrp.img and place it in the folder with the platform-tools.
  3. Turn your phone into Fastboot mode (Power + Volume Down).
  4. Open the command line in the folder with platform-tools and execute: fastboot flash recovery twrp.img fastboot boot twrp.img

๐Ÿ“ฑ Step 2: Firmware through TWRP

  1. After loading into TWRP Make a full backup (click Backup and select Boot, System, Data partitions).
  2. Go to Wipe. โ†’ Advanced Wipe and mark: ๐Ÿงน Dalvik / ART Cache ๐Ÿ—ƒ๏ธ System ๐Ÿ“„ Data ๐Ÿ”„ Internal Storage (optional if you want to clear your memory completely).

Install

PixelExperience_cepheus-13.0.zip

GApps

Open GApps

arm64 โ†’ 13 โ†’ pico

Reboot โ†’ System

โš ๏ธ Typical errors and their solutions:

  • ๐Ÿšจ Error 7: The firmware is incompatible with your model).
  • ๐Ÿ”„ Loaded Load: Try to flash vendor and firmware from the latest MIUI before installation AOSP.
  • ๐Ÿ“ต No network: install the correct modem files for your region (you can download it from the site) 4PDA).

๐Ÿ’ก

After the first download of pure Android, do not update via OTA In the first 24 hours, let the system stabilize. If you need updates, download them manually and stitch them through the system. TWRP.

6. Set up a clean Android after installation

After a successful firmware, you'll have to set up the system first.

โš™๏ธ Basic settings:

  • ๐Ÿ”’ Security: Enable encryption in Settings โ†’ Security (if you havenโ€™t done so in this case) TWRP).
  • ๐Ÿ“ถ Network: manually select the operator in Settings โ†’ SIM-Maps and networks if the automatic search fails.
  • ๐Ÿ”‹ Battery: Turn off unnecessary background processes in Settings โ†’ Battery. โ†’ Optimizing the battery.

๐Ÿ“ท Camera setup:

In Android, the Mi 9 camera may not work properly.

  • ๐ŸŽฏ Install Google Camera (GCam) with settings for Snapdragon 855.Recommended versions: BSG GCam (for the best) HDR). Greatness GCam (for night mode).
  • ๐Ÿ”ง Turn it on. Camera2API via Magisk (module) Camera2API Enabler) if the camera is not started.

๐ŸŽต Sound and multimedia:

  • ๐Ÿ”Š To improve the sound, set up ViPER4Android (Magisk demands).
  • ๐ŸŽฌ To make Netflix work in the HD, Check the status of Widevine L1 appendix DRM Info.

โš ๏ธ Note: If you have lost your firmware after NFC or fails IR-blaster, try to stitch a separate patch for your firmware (look for the XDA or 4PDA).

7. Root rights and Magisk: Do they need to be on pure Android?

Magisk is a root rights tool that is safe to use on pure Android to:

  • ๐Ÿ”ง Modules: e.g, ViPER4Android for sound or App Systemizer to transfer applications to the system.
  • ๐Ÿ“ฑ Backup with Titanium Backup.
  • ๐ŸŽฎ Game tweaks (e.g. overclocking) CPU/GPU).

๐Ÿ”ง How to install Magisk on Xiaomi Mi 9:

  1. Download the latest Magisk.apk from GitHub and rename it to Magisk.zip.
  2. Reboot to TWRP and sew Magisk.zip Like a normal zip file.
  3. Restart to the system and check root through the Magisk Manager app.

โš ๏ธ Risks of using root:

  • ๐Ÿ›ก๏ธ SafetyNet breach: some banking applications (e.g. Sberbank Online) may stop working.
  • ๐Ÿ”’ Vulnerabilities: root opens access to system files, which is dangerous when installing unverified applications.
  • ๐Ÿ”„ Problems with OTA: Air updates can break if Magisk is available.

๐Ÿ’ก

If you need root rights for backup only, consider alternatives like Swift Backup (works without root on Android 11).+).

8. Return to MIUI: how to roll back

If pure Android didnโ€™t live up to expectations, you can go back to MIUI.

๐Ÿ”„ Method 1: Fastboot (recommended)

  1. Download the official firmware MIUI for Mi 9 (e.g. Stable) ROM) Xiaomi.
  2. Unpack the archive and place the folder in the platform-tools.
  3. Transfer your phone to Fastboot and execute: fastboot flash boot boot.img fastboot flash system system.img fastboot flash vendor vendor.img fastboot erase userdata fastboot reboot

๐Ÿ“ฆ Method 2: Through TWRP (if there's a backup)

  1. Download to TWRP and select Restore.
  2. Restore the System and Boot partition backup made before the firmware.
  3. Wipe Dalvik/Cache and reboot.

โš ๏ธ Note: After returning to the MIUI The bootloader may lock again. To avoid this, before the firmware, do:

fastboot flashing unlock_critical
What if the Mi 9 doesnโ€™t turn on after the firmware?
If the device is stuck on the logo or left in the bootloop, try it: 1. Load in TWRP sniff vendor/firmware last MIUI. 2. Perform a complete reset (Wipe) โ†’ Format Data, then refashion the system). 3. Use the Mi Flash Tool to recover through the EDL-Regime (requires an authorized account).

FAQ: Frequent questions about installing clean Android on Xiaomi Mi 9

โ“ Can I install a clean Android without unlocking the bootloader?
No, unlocking the bootloader is a must, and without it, the system won't allow you to flash custom Recovery or firmware.
โ“ What is the most stable firmware for everyday use?
For most users, the best choice is the Pixel Experience (as close as possible to Android stock) or ArrowOS (if customization is needed), which rarely bugs and supports all the features of the Mi 9.
โ“ Why does the mobile network not work after the firmware?
This is a typical problem when moving from MIUI on AOSP. Solutions: Check that you have flashed the correct modem files (they must match your version) MIUI). Manually select the operator in the network settings. Set the patch IMS For VoLTE (if you have it for your firmware).
โ“ Can I upgrade to a clean Android "over the air" (OTA)?
Yes, but with reservations: โœ… Official builds (e.g. LineageOS) support OTA. โš ๏ธ Unofficial firmware can break when updating - it is better to download new versions manually and stitch through the TWRP. ๐Ÿšซ If you have Magisk installed, OTA It may not work โ€“ remove root before updating.
โ“ How to check that the firmware is installed correctly?
Run these teams in ADB or check in the settings: adb shell getprop ro.build.version.incremental # build version adb shell getprop ro.boot.bootloader # bootloader status Also make sure that: ๐Ÿ“ถ Mobile network and Wi-Fi are working. ๐Ÿ“ท The camera opens without errors (check all modules). ๐Ÿ”‹ The phone doesnโ€™t overheat or discharge too quickly.