The Xiaomi Mi 9, released in 2019, remains a popular flagship thanks to its powerful hardware (Snapdragon 855, 6/8 GB of RAM) and support from the development community. However, over time, even this smartphone begins to βbrakeβ on stock firmware, and official updates from Xiaomi cease to come out.
In this guide, we will analyze all the current ways of firmware Mi 9 (codename cepheus): from the official OTA-Updates to custom recyclers and software via Fastboot. Particular attention will be paid to unlocking the bootloader - a mandatory step for most methods, as well as typical errors (for example, anti-rollback or anti-rollback). EDL Mode, which can turn a smartphone into a brick. If you're a beginner, start with the official methods; if you're an experienced user, go straight to the sections about the phone. TWRP custom-made.
1. Firmware Preparation: What to Do Before Starting
Xiaomi Mi 9 firmware is a process that requires care. A mistake at any stage can lead to data loss, a device "brick" or blocking the Mi Account.
- π± Save all the data: contacts, photos, messages. Firmware through Fastboot or custom rivers erases internal memory (partition) /data). Use Mi Cloud, Google Drive, or physical backup on PC.
- π Charge the battery to at least 60%. interruption of the process due to discharge can make the smartphone unfit for switching on.
- π₯οΈ Install drivers: to work with Fastboot and ADB PCs need Qualcomm and Xiaomi drivers. Download them from the official website or through the Mi Flash Tool.
- π Check the status of the bootloader: if it is locked (which is typical for new devices), it will have to be unlocked through the Mi Unlock Tool.
Also prepare the cable. USB Type-C (preferably original) and Windows PC 10/11 (for the Mi Flash Tool and ADB). Users macOS/Linux They can use alternative tools like fastboot via the terminal, but Xiaomiβs official utilities only run on Windows.
2. Unlock the bootloader on Xiaomi Mi 9
The bootloader on all Xiaomi smartphones is locked by default, a security measure that prevents unofficial software from being installed. To flash the Mi 9 through Fastboot or install TWRP, it must be unlocked. The process takes 3 to 360 hours (depending on Xiaomi policy) and requires you to link your Mi Account to the device.
Unlocking algorithm:
- Link your Mi Account to your device: Go to Settings β Xiaomi Account. Sign in or create a new account. Enable data sync and confirm the link via SMS.
β οΈ Note: Once the bootloader is unlocked, the Xiaomi Mi 9 will perform a full Factory Reset.All data will be deleted, and some features (such as Mi Pay or Find Device) may stop working.
Mi Account linked to device | USB debugging and OEM | Downloaded Mi Unlock Tool of the latest version | Smartphone charged at 60%+| Qualcomm--> Drivers installed
3. Official ways of firmware: OTA and Fastboot
If you donβt plan to install custom firmware, use official methods from Xiaomi: they are safe, do not require unlocking the bootloader (except Fastboot) and retain a warranty (if it is still valid).
Updating by Air (OTA)
The easiest way is to update through Settings. Xiaomi releases regularly OTA-packages for the Mi 9, but from 2023 they only contain security patches, not new versions of Android:
- Go to Settings β About the phone β System update.
- Click Check for updates.
- If you have an update, download it (preferably via Wi-Fi).
- After download, click Set and wait for the reboot.
OTA-updates do not erase data, but can sometimes "hang" during the installation phase. If the smartphone does not turn on for longer than 15 minutes, perform a forced reboot (press the Power supply). + Volume up for 10 seconds).
3.2. firmware via Fastboot (Mi Flash Tool)
If OTA is not available or you want a clean installation, use the Mi Flash Tool.This method requires an unlocked bootloader and completely erases the data.
- Download the firmware: Official images for Mi 9 (cepheus) available on the websites: Official portal MIUI (Choose a version for your region. Xiaomi Firmware Updater (an alternative source with the latest builds). Download a file with the.tgz or.zip extension (for example, cepheus_global_images_...tgz).
- Unpack the firmware: Use 7-Zip or WinRAR to extract the archive, and inside it should be a folder with images and scripts. flash_all.bat.
- Install Mi Flash Tool: Download the utility from the official website. Install and run on behalf of the administrator.
- Connect your smartphone in Fastboot mode: Turn off Mi 9. Press Volume down + Power. Connect to a PC.
- Sweep the device: In the Mi Flash Tool, press Select and point the path to the unpacked firmware. Select Clean all or Clean all and lock mode. + Press Flash and wait for completion (5-10 minutes).
| Firmware mode | Description | Effects of consequences |
|---|---|---|
| Clean all | Complete cleaning of all partitions (/data, /system) | All data is deleted, the bootloader remains unlocked |
| Clean all and lock | Cleaning + Locking of the loader | Data deleted, bootloader locked (must be unlocked again) |
| Save user data | Firmware without cleaning /data | Data is saved, but errors may occur when changing MIUI |
β οΈ Warning: If you choose Clean all and lock, you will have to re-unlock the bootloader through the Mi Unlock Tool after the firmware is installed. This mode is useful if you want to return the smartphone to the βfactoryβ state with the bootloader locked.
π‘
Fastboot firmware is the only official way to install an old or new version of MIUI on the Xiaomi Mi 9 without custom reverie.
4. Installation of the TWRP custom recovery
To install informal firmware (for example, LineageOS, Pixel Experience) or modified cores will require custom recyclers β TWRP. This is an alternative to standard MI-Recovery, which allows you to install ZIP-files, make backups and restore them.
The process of installing TWRP on Xiaomi Mi 9:
- Download the current version of TWRP: Official builds for cepheus are available at twrp.me. Choose the version marked unofficial only if there is no official one - they may contain bugs.
- Rename the file to twrp.img and place it in the folder with ADB.
- Open the command prompt in the ADB folder (press Shift + PCM β Open the command window).
- Transfer the smartphone to Fastboot mode and connect to the PC.
- TWRP command: fastboot flash recovery twrp.img
- Run the reverie: Run the command: fastboot boot twrp.img Or manually: Press Volume up + Power when turned on.
After the first launch TWRP will suggest allowing modification of the system partition β swipe right to confirm. If you don't, install ZIP-files will be impossible.
What happens if TWRP doesnβt start?
5. Installation of custom firmware
Custom firmware (e.g. LineageOS, ArrowOS, Pixel Experience) allows you to upgrade the Xiaomi Mi 9 to current versions of Android 13/14, remove unnecessary Xiaomi services and improve performance. However, they require an unlocked bootloader and TWRP.
Installation algorithm:
- Choose firmware: Popular options for cepheus: LineageOS β pure Android without branded improvements. ArrowOS β balance between performance and functionality. Pixel Experience β firmware with interface and chips Google Pixel. Download builds only for cepheus (not to be confused with the Pixel Experience). cepheus_in β Indian).
- Download additional files: GApps (Google services) - if they are not included in the firmware. We recommend Open GApps (choose arm64 β Android 12/13 β pico). Magisk (for root rights) - the latest version from GitHub. FW + Vendor - if the firmware requires current firmware and vendor libraries (downloaded separately to 4PDA).
- Transfer files to your smartphone: Connect Mi 9 to your PC in mode MTP (or use OTG-- The storage device. ZIP-Firmware, GApps and Magisk files in internal memory.
- Download to TWRP and clean: Go to Wipe β Advanced Wipe. Mark the Dalvik, Cache, System, Data, Vendor sections. Swipe for confirmation.
- Install firmware: Press Install and select ZIP-Firmware file. Add GApps and Magisk (if needed). Swipe for installation.
- Reboot: Once complete, press Reboot System. The first run can take 10-15 minutes.
β οΈ Attention: Some custom firmware for Xiaomi Mi 9 Have problems with data encryption (FBE). If after installation, the system requires a password but does not accept it, try: Install firmware without GApps and check the health. /data into TWRP how F2FS (instead ext4). Use an alternative GApps package (e.g. NikGApps).
π‘
Before installing custom firmware, check on forums (such as 4PDA or XDA) to see if it has any critical bugs for the cepheus model, especially when it comes to camera, NFC module and wireless charging.
Typical errors and their solution
Xiaomi Mi 9 firmware may be accompanied by errors related to anti-rollback, damaged partitions or firmware incompatibility.
"Anti-Rollback Check" error
Xiaomi Mi 9 has anti-rollback (ARB) protection that blocks rollbacks to older versions of MIUI. If you try to flash a firmware with a lower ARB number than the current one, you get an error:
anti-rollback check fail!Decisions:
- π Make sure you have a firmware with the same or higher ARB. Check the current one. ARB Mi Flash Tool or Xiaomi Firmware Updater.
- π οΈ Use it. EDL-Mode (emergency firmware via Qualcomm 9008) Requires an authorized Mi Account and a special cable.
- β οΈ Drop it. ARB Testpoint (risky!) Some versions of the Mi 9 can reset the counter. ARB, I'll just close the testpoint on the board. 4PDA.
The smartphone is not turned on after firmware ("brick")
If the Mi 9 doesnβt respond to the power button or is stuck on the MIUI logo, try:
- π Forced reboot: Squeeze Power + Volume up for 15-20 seconds.
- π₯οΈ Fastboot Firmware: Connect your smartphone in Fastboot mode. Use the Mi Flash Tool with the Clean all option.
- π§ EDL-Mode (Qualcomm 9008): Close the testpoint on the board (instructions for cepheus here). Connect the smartphone to the PC - it will be defined as QDLoader 9008.
Error "This package is for "cepheus" devices"
This error occurs if you are trying to install firmware that is not designed for the Xiaomi Mi 9 (such as the Mi 9 SE or Mi 9T).
- π Check the code name of the device in TWRP Adb shell getprop ro.product.device For Mi 9, it must be cepheus.
- π₯ Download the firmware specifically for cepheus (not for the cepheus). cepheus_in, grease).
7.The rollback to official firmware
If custom firmware is unstable or you want to return the warranty, you can return to the official MIUI.
- Download stock firmware for your region (for example, cepheus_global_images...).
- Unpack the archive and prepare the Mi Flash Tool.
- Boot in Fastboot and connect your smartphone to your PC.
- Select Clean All mode in the Mi Flash Tool.
- Start the firmware. Once it's done, the device will automatically restart.
If you want to block the bootloader (for example, to sell a smartphone), select Clean all and lock mode. However, remember: after that, you will have to re-unblock the bootloader to install custom software.
π‘
The rollback to the official firmware via Fastboot is the only reliable way to return the Xiaomi Mi 9 to the βfactoryβ state, including restoring the IMEI and all sensors.