Xiaomi Mi 9 is the flagship of 2019, which is still relevant thanks to the powerful hardware and active support of the development community. MIUI They stop coming out, and users are faced with brakes, bugs, or the desire to install custom firmware. OTA-update.
In this article, you will find step-by-step instructions on how to run the Mi 9 through your computer, from unlocking the bootloader to installing the firmware via MiFlash or Fastboot. We will break down errors that 90% of users encounter (such as anti-rollback or invalid image), and give recommendations on how to choose the version of MIUI - Global Stable, China Stable, EEA or custom (such as Pixel Experience), you will learn how to restore IMEI after the firmware has reset, and why you can not install the firmware with a downgrade version without special patches.
Preparation for firmware: what to do before the start
Firmware through a PC is a process that requires preparation, and without it, you risk getting a brick or losing data. Here are the steps before you start:
- π± Save all data: firmware erases internal memory. Use Mi Mover, Google Photos or manual copying on PC.
- π Charge your smartphone to at least 60%. interruption of the process due to battery discharge can damage the boot partition.
- π₯οΈ Install drivers: download Mi PC Suite or Qualcomm Drivers to recognize your device in Fastboot mode.
- π Unlock the bootloader (unlocked). Without it, you can't flash the Mi 9 through your PC.
Pay special attention to the firmware version. Xiaomi Mi 9 (codename cepheus) has anti-rollback protection. This means that you can not install firmware older than the one already on the device. For example, if you have MIUI 12.5 and you are trying to put MIUI 11, the smartphone will lock. Check the current version in Settings β About Phone β MIUI version.
β οΈ Note: If you have been stitching Mi 9 before and installing custom recavers (for example, TWRP), The backup of the stock recavers before the firmware is used through MiFlash, otherwise the process will end with the error remote: partition table does not exist.
Unlocking the bootloader on Xiaomi Mi 9: Step-by-step
The bootloader on all Xiaomi smartphones is locked by default. Unlocking requires a device-based Mi Account and waiting (usually 7-15 days).
- Link your Mi Account to your phone: Go to Settings β Xiaomi Account. Log in to your account (or create a new one). Activate Find Device and Sync.
Mi Unlock Tool
- Download the official utility.
- Launch it on your PC, log in to the same Mi Account as on your phone.
- Connect the Mi 9 in Fastboot mode (clip Power + Volume down when the phone is off).
- Press Unlock and wait until it is completed (may take a few days).
If the utility gives you an error, Cann't unlock or Current account is different from the account info on the device, check:
- π Does the Mi Account match on PC and phone.
- πΆ Is the phone connected to the Internet (via mobile network or Wi-Fi).
- β³ 168 hours (7 days) have passed since the first account was linked.
π‘
If you are slow to unlock, try using the Mi Unlock Tool version 5.5.224.24, which is often more stable than newer versions.
Choosing a firmware for Xiaomi Mi 9: which one to download?
The firmware choice is crucial for the smartphoneβs stability, and the following types of firmware are available for the Mi 9 (cepheus):
| Type of firmware | Advantages | Deficiencies | Download link |
|---|---|---|---|
| Global Stable | Official, optimized for the international market, support for Google services | Updates are less common than in the China version | Official website |
| China Stable | More frequent updates, new features earlier | No Google services, localization bugs are possible | Official website |
| EEA (Europe) | GDPR Compliance, No Chinese Services | Fewer functions than in the Global | Official website |
| Castomic (AOSP) | Pure Android, no MIUI, better performance | No official support, camera or NFC bugs are possible | XDA Developers |
For most users, Global Stable is the best choice. If you want the latest MIUI features, take China Stable, but be prepared to install Google Installer manually. Custom firmware (like Pixel Experience or LineageOS) will suit advanced users who want to get rid of MIUI.
β οΈ Note: Firmware for Mi 9 SE (grus or Mi 9T (Davinci is incompatible with Mi 9 (cepheus) and installing the wrong firmware will damage the modem partition and cause network loss.
βοΈ Preparation of firmware files
Xiaomi Mi 9 firmware via MiFlash: step-by-step instructions
MiFlash is Xiaomi's official Fastboot firmware utility, suitable for installing stock firmware (Global, China, EEA).
- Download and install MiFlash: Official version: link. Install the utility and Qualcomm drivers (come with the package).
- Prepare the firmware: Unpack the downloaded.tgz or.zip archive into a short-track folder (for example, C:\Mi9\). Make sure there is a file in the folder flash_all.bat.
- Connect your phone in Fastboot mode: Turn off Mi 9. Press Power + Volume down until the hare in the eardress cap appears.
Run the firmware.
- Open MiFlash, press Select and select the firmware folder.
- Press Refresh β the list of devices should appear COM-port.
- Select Clean All or Clean All and Lock (if you want to lock the bootloader after you have been firmware).
- Press Flash and wait until it is completed (5-10 minutes).
If the process is successful, the phone will restart. It can take up to 15 minutes to turn on the first one, which is normal. If MiFlash is a bug, check:
- π Is the phone connected to the back? USB-port (on the front panel of the PC may not have enough power).
- π« Is the antivirus disabled (it can block fastboot commands).
- π Is the firmware properly unpacked (the path to the folder should not contain Cyrillic or spaces).
What if MiFlash canβt see the phone?
Fastboot Firmware Manual: MiFlash Alternative
If MiFlash doesn't work or you want more control over the process, you can manually flash the Mi 9 through Fastboot commands, which is also useful for custom firmware installation.
You'll need:
- π₯οΈ ADB Fastboot (download Platform Tools from Google).
- π Firmware in.tgz or.zip format (unpacked).
- π USB-data-couple.
Instructions:
- Open the command line (Win + R β cmd) in the folder with the platform-tools.
- Connect your phone in Fastboot mode (as described above).
- Check the connection command: fastboot devices should appear serial number of the device.
- Run the firmware (for stock MIUI): fastboot flash boot.img fastboot flash recovery.img fastboot flash system.img fastboot flash vendor.img fastboot flash vendor.img fastboot flash dtbo.img fastboot flash vbmeta vbmeta.img fastboot erase userdata fastboot reboot For custom firmware, commands may differ - see the instructions for a specific build.
β οΈ Note: If you are using a custom recycler (TWRP), Do not reboot immediately after the fastboot flash recovery command. First boot to the recaveri (Power) + Volume upwards, otherwise stock MIUI rewrite it.
π‘
Fastboot firmware manually gives you more control, but requires command knowledge, and a sequence error can result in loss of IMEI or damage to the modem partition.
Mistakes in Xiaomi Mi 9 and how to fix them
Even with the correct following of the instructions, errors can occur, and here are the most common ways to solve them:
| Mistake. | Reason. | Decision |
|---|---|---|
| anti-rollback check fail | Trying to install firmware older than the current one | Use the same or newer firmware, and if you want to downgrade it, look for a patch to bypass the anti-rollback. |
| invalid sparse file format at header | A firmware file or an incorrect version of MiFlash is damaged | Download the firmware again and use MiFlash 2020.3.14.0 or later. |
| remote: partition table doesn't exist | Installed Custom Recavery (TWRP) | Return stock recavities via Fastboot with the fastboot flash recovery.img command. |
| This package is for "cepheus" devices; this is a "" | Wrong firmware (not for Mi 9) | Download the firmware specifically for the cepheus model. |
| The phone does not turn on after the firmware | Boot or system partition damaged | Repeat the firmware in Clean All mode or use it EDL-Regime (requires an authorized account). |
If the IMEI is missing after the firmware or the mobile network is not working, use the recovery instructions:
- Download the utility to restore IMEI.
- Connect your phone in Fastboot mode.
- Enter the commands: fastboot flash modem NON-HLOS.bin fastboot erase modemst1 fastboot erase modemst2 fastboot reboot
- After the reboot, check the IMEI in *#06#.
What to do after firmware: setup and optimization
After successful firmware Xiaomi Mi 9 requires initial configuration.
- π Reset your network settings (if there is no mobile internet): Settings β SIM-maps and mobile networks β Resetting network settings.
- π Enable encryption (if you have stitched custom firmware): Settings β Security β Encryption of the telephone.
- π± Update Google Services (if you have flashed China Stable): Install Google Installer from APKPure.
- π― Turn off unnecessary services MIUI: Advertising: Settings β Memory. β Cleanup β Settings β Disable recommendations. Analytics: Settings β Additionally. β Confidentiality β Disable data sending.
If you have stitched custom firmware (like Pixel Experience), check:
- πΈ Is the camera working (may require GCam installation).
- π Optimized battery (in Settings) β Battery turn on adaptive charging).
- π Does it work? NFC (Some assemblies require a patch).
π‘
After China Stable firmware, be sure to install Google Installer, otherwise Play Market, Gmail and other services will not work.