The Xiaomi Mi 9, launched in 2019, was a landmark device for the company to offer flagship specs at a competitive price. However, over time, official software support ceased, remaining on the Android 10 version. Many users still want to experience the capabilities of a fresher operating system to access new privacy features, updated interface and compatibility with modern applications. Installing Android 11 on this device is a technically complex process, but quite real with custom firmware.
Any interference with the software shell of a smartphone, especially related to unlocking the bootloader and flashing, carries the potential threat of turning the device into a “brick.” Officially, the Xiaomi Mi 9 has not received an update to Android 11, so all methods are based on ports from the developer community. You should be prepared for the fact that some features, such as the camera or NFC, may not work correctly depending on the quality of the firmware build.
In this article, we will discuss in detail the process of preparing, unlocking, installing custom recovery and direct firmware of the current version of the OS. We will look at both global versions based on MIUI, and clean builds of AOSP or LineageOS. Carefully follow each step, check the compatibility of versions and make backups of data to minimize possible loss of information during the experiment.
Preparation of equipment and software
Success of the operation 90% It depends on the proper preparation of the workplace and the smartphone itself. You will need a computer running Windows (the most stable drivers for Xiaomi), a serviceable computer. USB-It is also critical to charge the battery of the smartphone to a minimum of the maximum possible amount of power, preferably original or certified, providing a reliable connection without interference. 70-80%, since the firmware process is energy intensive, and a sudden power outage can lead to fatal loader errors.
You need to install specialized software on your computer. ADB And Fastboot tools that allow you to send commands from your PC to your device in debugging mode, without which you can't interact with the system partitions of the phone, and you'll need Mi Flash Tool to run through Fastboot or Xiaomi. ADB/Fastboot Tools for more advanced manipulation.
⚠️ Before starting any work, be sure to create a full backup of all important data (contacts, photos, documents) to an external medium or to the cloud storage. In the process of unlocking the bootloader, all data on the smartphone will be irretrievably deleted.
Don’t forget to activate the developer mode on the phone itself. To do this, go to Settings → About Phone and quickly press 7 times on MIUI Version. After that, a new section will appear in the menu Additional, where you need to enable USB Debugging. This is a key parameter that allows the computer to “see” the smartphone in control mode.
☑️ Firmware readiness
Unlocking the Bootloader bootloader
The most difficult and longest step is to unlock Bootloader. Xiaomi artificially limits this possibility by requiring a wait of 7 to 30 days after the account is attached. Without the unlocked bootloader, installing a custom recovery or third-party firmware is impossible in principle.
Once you submit an application via the Mi Unlock app on your PC, you can wait. SMS permission notices can come in a week or a month. This is the time it takes to verify your account with the company's servers. Trying to bypass the wait through third-party paid services carries high risks of locking the device over IMEI, so be patient.
When the wait period expires, reconnect the phone in Fastboot mode (pressing the power and volume buttons). In Mi Unlock, press the Unlock button. It takes about a minute, the phone will restart, and all data will be erased. Now the bootloader is open, and you can modify the system partitions.
It is important to understand that when the bootloader is unlocked, some secure features will stop working, for example, bank applications may refuse to run due to a system integrity violation, and the quality of photos in some modes may deteriorate due to the reset of security flags in the camera module, which is a fee for the ability to install a fresh OS.
Installation of custom TWRP Recovery
Xiaomi’s regular recovery menu is extremely limited and does not allow unsigned firmware to be installed. To work with Android 11, we will need to install TWRP (Team Win Recovery Project), a modified touch-controlled recovery menu that gives full access to the device’s file system.
First, you need to find the actual image of.img for the Xiaomi Mi 9 (codename cepheus). Using the image for another model is guaranteed to cause the touchscreen to fail or completely block the download. Download the file and place it in the folder with ADB tools on your computer.
Put your smartphone into Fastboot mode and connect to your PC. Open the command line and enter a command to check the connection:
fastboot devicesIf the device is determined, enter a command to temporarily load the recaveri:
fastboot boot twrp-3.x.x.x-cepheus.imgOnce you download the TWRP menu, the first thing you need to do is prevent an automatic reboot to the stock system, which can overwrite the Recovery. To do this, select Advanced → Terminal from the TWRP menu and enter a command to lock the recovery partition, or just go straight to the firmware if the TWRP version allows.
What if TWRP doesn’t see internal memory?
Android 11 installation process
There are two main ways to upgrade to Android 11: installing a higher level of official global firmware (if available for your region) or installing custom build (LineageOS, Pixel Experience, crDroid).
Download the firmware archive (usually.zip) and, if necessary, the GApps package (Google Apps) if they are not built into the firmware. Place files in the phone's internal memory. From the TWRP menu, select Wipe, then Advanced Wipe, and mark the Dalvik/ART Cache, System, Vendor, and Data sections. Don't touch the Internal Storage section, or you'll lose the installation files.
Once you clear the partitions, go back to the main menu and select Install. Find the firmware archive and swipe to install. Wait until the process is complete. If the firmware doesn't turn on Google services, install the GApps archive immediately without restarting. Only then you can run the Reboot System.
| Type of firmware | Stability | Google's presence | Complexity of installation |
|---|---|---|---|
| Official MIUI | Tall. | There is. | Low. |
| LineageOS | Medium | No (Gapps needed) | Medium |
| Pixel Experience | Tall. | There is. | Medium |
| Nightly builds | Low. | Depends. | Tall. |
The first launch of the new system can take anywhere from 5 to 10 minutes. The Android logo or firmware name will be on the screen. Don't panic or try to restart the phone at this point - the system adjusts the components. If the phone doesn't boot after 15 minutes, the firmware may be incompatible or damaged.
💡
The main rule of “clean” installation: always make Wipe Data and System when switching between different versions of Android or different types of firmware to avoid cyclical reboots.
System setup and optimization
After successfully loading Android 11 on Xiaomi Mi 9, you need to do a basic setup. First of all, check the main modules: cameras, Bluetooth, Wi-Fi and fingerprint sensor. On custom firmware, drivers may not work perfectly, so it is worth testing the quality of images in different lighting.
To improve autonomy and performance, it is recommended to disable extra animation. Go to Settings → About Phone → Version of the kernel (7 times), then in the developer menu, find the items “Window animation”, “Jump animation” and set the value of 0.5x or turn them off completely. This will make the interface more responsive.
Also worth paying attention to the battery settings: Android 11 has improved background management, go through the list of installed applications and limit background activity for those programs that do not require constant connection, for example, for marketplaces or news aggregators.
⚠️ Attention: On custom firmware, the camera functionality is often inferior to the drain MIUI. If photo quality is critical to you, consider installing a ported version of GCam (Google Camera) specifically assembled for the Snapdragon 855 processor.
Possible problems and solutions
Specific errors can occur during operation. One of the common problems is VoLTE or Wi-Fi Calling, which is tied to proprietary blobs from Xiaomi, which are difficult to integrate correctly into pure Android. The solution can be to return to the stock firmware of a particular region (for example, India or Global) via the Mi Flash Tool.
Another common problem is bootloop. If the phone is stuck on the logo, boot back into TWRP, make Wipe Dalvik/Cache, and try stitching again. If it doesn't work, maybe the firmware version is "bug-in," and look for a more stable build on profile forums.
The Widevine L1 (not being able to watch Netflix in HD) is a difficult problem to solve. When unlocking the bootloader, the level of protection often drops to L3. The L1 can only be restored by flashing the original bootloader and firmware, but it requires deep knowledge and the presence of backups of specific partitions (persist, fsg) made before unlocking.
💡
If the approximation sensor stopped working after firmware, try calibrating it through the engineering menu by typing the code ##6484## in the phone and selecting the Proximity Sensor test.