Xiaomi Mi 9T (also known as Redmi K20 in some regions) remains a popular smartphone among customization enthusiasts due to its powerful hardware and active community support. However, standard MIUI firmware does not always suit users: someone wants to get rid of advertising, someone wants to get a fresh version of Android, and someone wants to install custom software like LineageOS or Pixel Experience. In this article, we will analyze all the stages of replacing firmware from preparing the device to solving possible problems.
It is important to understand that the process of firmware Mi 9T requires care: error at any stage can lead to a βbrickβ (inoperability) of the device. We will consider two main methods β through Fastboot (the official way from Xiaomi) and TWRP (for custom firmware), and give recommendations for choosing the right software. If you are a beginner, start with the section on preparation β this will save time and nerves.
Note: the instructions are relevant for Xiaomi Mi 9T (codename davinci) and Redmi K20 (codename davinciin for Indian version). Make sure your device matches these designations β information can be found in Settings β About Phone β Model.
1. Device Preparation: What to Do Before Firmware
Before you start replacing the firmware, you need to follow a few critical steps, and neglecting them can lead to data loss, inability to unlock the bootloader, or even physical damage to the smartphone.
First, back up all the data. The firmware erases the device's internal memory, so copy photos, contacts, messages and files to your computer or cloud storage. You can use Titanium Backup (requires root) or the built-in Settings feature β Additional β Backup and Reset to back up applications and their data.
Check the battery power β it should be at least 60%. Interrupting the firmware process due to battery discharge is almost guaranteed to lead to a "brick." USB-cable (preferably original) and Windows-based computer 10/11 Linux (MacOS may require additional drivers).
- π Battery charge: at least 60%, optimally - 80% and above.
- πΎ Backup: photos, contacts, messages, application data.
- π₯οΈ Computer: with drivers installed ADB/Fastboot Mi Unlock Tool.
- π Device codename: Make sure your Mi is yours 9T The name davinci.
β οΈ Attention: If your Xiaomi Mi 9T was purchased in China, it can have a blocked bootloader with a link to the Mi Account. In this case, unlocking is possible only through the official Xiaomi service with the provision of a check of purchase.
2 Unlocking the bootloader: a step without which you can not do
All Xiaomi smartphones have a bootloader by default, a security measure that prevents unofficial software from being installed. To change the firmware, the bootloader needs to be unlocked. The process takes 7 to 30 days due to Xiaomi's policy, so start in advance.
Unlocking will require:
- Link the device to your Mi Account in Settings β Xiaomi Account.
- Enable USB Debugging and OEM Unlocking in Settings β About Phone β MIUI Version (click 7 times) β Additional β For Developers.
- Download and install Mi Unlock Tool from the official Xiaomi website.
- Connect the phone to the PC in Fastboot mode (turn off the device, pinch Volume down + Power).
- Start Mi Unlock Tool, log in to your account and follow the instructions.
Once you have sent an unlock request, Xiaomi will link your account to your device and start counting down (usually 168 hours) and you can finally unlock the bootloader after that. Importantly, don't log out of your Mi Account and don't reset your phone until the process is complete!
π‘
If the Mi Unlock Tool gives you a "Couldn't unlock" error after waiting, try using a different version of the program (e.g. 5.5.224.24) or connect to your PC via another version. USB-port (preferably 2.0).
| Mistake. | Reason. | Decision |
|---|---|---|
| Couldn't verify device | The device is not tied to an account or has not been logged in for 168 hours. | Wait for the specified time or check the account binding. |
| Current account is different from the account info on the device | Mi Unlock Tool uses a different account than your phone. | Log in to the same account as on the device. |
| Mi Unlock Tool doesn't see the phone | There are no Fastboot drivers or the cable is faulty. | Install the drivers manually or try another cable. |
3. firmware selection: official MIUI vs custom builds
Once you unlock the bootloader, you need to decide on the type of firmware. Each option has pros and cons:
- π± Official. MIUI: stable work, support OTA-Updates, all camera and sensor features are out of the box. Cons are advertising, customization restrictions, possible delays in Android updates.
- π οΈ Custom firmware (LineageOS, Pixel Experience, crDroid): pure Android without ads, quick updates, advanced settings. Cons - possible bugs with the camera or NFC, absence of Widevine L1 (no HD Netflix).
- π Ported MIUI (for example, MIUI EU): MIUI No ads or Chinese apps, weekly updates, cons: localization errors are possible, not all features can work.
For Xiaomi Mi 9T we recommend the following builds:
- Official MIUI: Download from the official website (select the version for davinci).
- LineageOS 20/21: stable firmware based on Android 13/14, suitable for everyday use.
- Pixel Experience: as close as possible to βpureβ Android with chips from Google Pixel.
- MIUI EU: An optimized version of MIUI without ads (weekly builds)
Before downloading the firmware, check that it is compatible with your device's code name (davinci or davinciin) and installing the firmware for another model will make your phone inoperable!
Where is it safe to download firmware?
4.Fastboot Firmware: The Official Method from Xiaomi
This method is suitable for installing an official MIUI (including for recovering the phone after a crash), you will need a computer with ADB and Fastboot installed, as well as firmware in.tgz or.zip format (for Mi Flash Tool).
Step-by-step:
- Download the firmware for davinci from the official website and unpack it into a folder without Cyrillic characters.
- Install the Mi Flash Tool (you can download it here).
- Turn off the phone and put it in Fastboot mode (clamp Volume down + Power).
- Connect the device to your PC and run the Mi Flash Tool. The program must identify the phone.
- In the Select field, specify the path to unpacked firmware. At the bottom, select firmware mode: Clean all β complete clean (recommended when changing the MIUI version); Clean all and lock β clean + lock the bootloader (only if you plan to stay on official software); Save user data β save data (not always working correctly).
Flash
Download the official firmware for Davinci
Install Mi Flash Tool and Fastboot Drivers
Check the battery power (minimum 60%)
Transfer the phone to Fastboot mode
Disable the antivirus (can block the Mi Flash Tool)
-->
β οΈ Note: If after firmware the phone is stuck on the logo MI longer than 15 minutes, don't panic - sometimes the first download takes up to 20 minutes.If after that time nothing has changed, try repeating the firmware with the choice of the Clean all option.
5. Install custom firmware through TWRP
To install unofficial firmware (LineageOS, Pixel Experience, etc.) will require custom recovery - TWRP. This method is more flexible, but also more risky: an error in choosing a firmware or incompatibility with the kernel can lead to a "brick".
Installation steps:
- Install. TWRP: Download the latest version TWRP For davinci from the official website, transfer your phone to Fastboot and connect to your PC. Open the command line in the Fastboot folder and do: fastboot flash recovery twrp-3.7.0_9-0-davinci.img fastboot boot twrp-3.7.0_9-0-davinci.img
- Make a backup in TWRP: On the main menu. TWRP Select Backup. Mark Boot, System, Data, Vendor. Save backup to SD-map OTG-flash-drive.
- Sweat custom firmware: Copy the firmware file (.zip) to your phone or flash drive. In TWRP, select Wipe β Advanced Wipe and tick Dalvik, Cache, System, Data. Go back to the main menu, select Install and specify the path to the firmware. After installing the firmware, be sure to flash Gapps (if they are not included in the build).
- Reboot: Select Reboot β System. The first download can take 10-15 minutes.
Critical information: firmware based on Android 12 And newer ones require an updated vendor. If the custom software doesn't work on mobile or Wi-Fi after you install it, download it and run it through the computer. TWRP fitting vendor_firmware.zip for your model.
π‘
When installing custom firmware, always check for compatibility with the device codename (davinci) and the Android version. The mismatch will lead to errors or a βbrickβ.
6. Solving common errors after firmware
Even with the exact following of the instructions, there can be problems, and let's consider the most common of them and how to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| The phone does not turn on after the firmware | Incompatible firmware or interrupted process. | Repeat the firmware through Fastboot with the Clean All option. |
| No mobile network. | There is no vendor/firmware available or incompatible. | Slice the appropriate vendor for your firmware. |
| The camera's not working. | There are no drivers or incompatible cores. | Install a patch for the camera (e.g., ANX Camera for custom firmware). |
| Hanging on the MIUI logo | Module conflict or incomplete cleaning before firmware. | Log in to Fastboot and repeat the firmware with a full cleanup. |
| No sound in the speaker. | Incorrect mixers settings in firmware. | Install a patch for sound or change the firmware. |
If after firmware the phone stopped being determined by the computer in Fastboot mode, try:
- π Connect to another USB-port (preferably 2.0).
- π₯οΈ Reinstall Fastboot drivers manually through Device Manager.
- π Use another cable (original or high-quality).
- π§ Hold the Loud up. + Power for 10-15 seconds for forced reboot.
7. System optimization after firmware
After successfully installing a new firmware, it is recommended to follow several steps to improve performance and stability:
- β‘ Disable unnecessary applications: even custom firmware may still have background services. Use Settings β Applications to disable unnecessary.
- π Update the kernel: custom firmware often releases updated cores (for example, FrancoKernel or Kirisakura).
- π± Set up gestures: in Settings β System system β Gestures can be enabled by gesture navigation instead of buttons.
- π Optimize the battery: Turn off background activity for underutilized applications in Settings β Battery β Optimizing the battery.
For firmware based on Android 12 and later, it is useful to enable Background Limitation for apps (Settings β Special Features β Background Limitation).This will reduce battery consumption, but may affect notifications in some instant messengers.
If you have installed MIUI EU or other modified MIUI, check the Security β Autostart settings for mission-critical applications (such as WhatsApp or Telegram), otherwise notifications may not arrive.
8.Return to Standard Firmware: How to roll back
If custom firmware did not meet expectations or critical errors occurred, you can return the official MIUI.
- Download the stable version of MIUI for davinci from the official website.
- Unpack the archive and prepare the Mi Flash Tool (as in Section 4).
- Select Clean all and lock mode - this will return factory settings and block the bootloader.
- After the firmware, the phone will automatically reboot to the standard MIUI.
Important: After returning to the official firmware, the bootloader will be blocked, and to re-install the custom software you will need to wait 168 hours for unlocking.
β οΈ Note: If you have installed magnetic patches (for example, to pass SafetyNet), after returning to the MIUI They will have to be manually removed through Magisk Manager, otherwise there may be problems with the work of banking applications.
π‘
Returning to the official MIUI erases all data, including internal memory. If you need to save files, backup through TWRP before rolling back.