Reflashing the Xiaomi smartphone 9T (also known as the Redmi K20 codenamed davinci โ a task that users face for various reasons: from wanting to update an outdated version MIUI It's a process that requires care, but a mistake at any stage can turn a device into a brick. In this article, we'll look at everything from preparing and unlocking a bootloader to choosing a firmware and solving typical problems.
Many people are afraid to stitch their smartphones themselves, fearing losing their warranty or data. Indeed, the official warranty Xiaomi is removed after unlocking the bootloader, but with careful follow-up, the risks are minimal. TWRP So there's a very different complexity and consequences, and we're going to look at both, and we're going to look at alternatives like this. OTA-Renewal for those who are not ready for radical change.
Before you start, answer two questions: Why do you need to flash it, and what do you expect to see? If the goal is simply to upgrade to the latest version of the system. MIUI, If you want to have a clean Android without Xiaomi shell or want root rights to deep customize the system, then you can not do without unlocking the bootloader and custom recovery.
1. Preparation for flashing: what to do before the start
The first step is to save all the important data. Flash it, especially through Fastboot or TWRP, Use Xiaomi Cloud, Google Drive or physical copying to your PC for backup:
- ๐ฑ Contacts (export to) VCF-file)
- ๐ท Photo and video (copy to external drive)
- ๐ Logins and passwords (use managers like Bitwarden)
- ๐ฎ Game Save (check if the game supports cloud backup)
Next, check the current firmware version and device model. To do this, go to Settings. โ You're gonna need a phone:
- ๐ Model of the device (should be) M1903F10I or M1903F11I global version)
- ๐ข Version. MIUI (for example, MIUI Global 14.0.5)
- ๐ bootloader status (unlocked/locked โ checked by the fastboot oem device-info command)
It is equally important to prepare the computer:
- ๐ฅ๏ธ Install Android SDK Platform-Tools (for fastboot and adb)
- ๐ Connect your smartphone with the original cable (cheap cables can cause data transmission errors)
- ๐ Battery charge should be at least 60% โ this is critical to avoid failures during firmware
โ ๏ธ Attention: If your Xiaomi 9T It was purchased in China (the C-suffix version in the model), and it may take up to 360 hours (15 days) to unlock the bootloader after the Mi Account is linked to the device.
2 Unlock the bootloader: step zero for any firmware
Without an unlocked bootloader, you can't install custom recavators or firmware through Fastboot. The process is officially supported by Xiaomi, but has nuances. Here's a step-by-step instruction:
Step 1: Linking your Mi Account to your device
- ๐ฑ Go to Settings. โ Xiaomi account โ Mi Cloud and log in.
- ๐ Enable sync and make sure the device is tied to your account.
- ๐ B Settings โ Additionally. โ For developers, activate OEM-unlocking and debugging USB.
Step 2: Request Unlocking via Mi Unlock Tool
- ๐ฅ๏ธ Download Mi Unlock Tool and run on behalf of the administrator.
- ๐ Connect your phone in Fastboot mode (clip Volume Down) + Power with the device switched off).
- ๐ Log in to the same Mi Account as on your phone and follow the program instructions.
When you send a request, you may receive a waiting message, which is typically 72 to 168 hours for global versions, up to 360 hours for Chinese versions, and the unblock status can be checked by the team:
fastboot oem device-infoSearch for Device unlocked: true.
โ ๏ธ Warning: If you bought your phone with your hands, make sure the previous owner untie your Mi Account from the device. Otherwise, unlocking will not be possible without its data.
Linked to the Mi Account to the device|On. OEM-unlocking|Installed drivers Fastboot on PC|Battery charge >60%|Original. USB-cable-->
3. firmware selection: official MIUI vs custom builds
The type of firmware depends not only on the functionality, but also on the stability of the device.
| Type of firmware | Advantages | Deficiencies | Complexity of installation |
|---|---|---|---|
| Official MIUI (Fastboot/Recovery) | Stability, support OTA-Updates, retaining warranty (unless the bootloader is unlocked) | Shell MIUI Advertising, limited customization | โญโญ (easily) |
| LineageOS (Pixel Experience) | Clean Android, no Bloatware, regular updates | There are possible bugs with the camera or sensors, no OTA | โญโญโญโญ (difficult) |
| Port from other devices (e.g. port from other devices, MIUI from Redmi K30) | New functions, informal support | High risk of unstable work, lack of updates | โญโญโญโญโญ (difficult) |
For beginners, we recommend starting with the official firmware, which can be downloaded at en.miui.com.
- ๐ Region: Choose Global for International or China for Chinese.
- ๐ข Android Version: For Xiaomi 9T Firmware based on Android 10-12.
- ๐ฆ File type:.tgz for Fastboot or.zip for Recovery.
If you are a custom firmware user, check out XDA-Developers forums.
- ๐ค LineageOS โ as close as possible to Android stock.
๐ก
Before downloading custom firmware, check the date of the last update on the forum. If the build has not been updated for more than 6 months, there is a risk of incompatibility with new versions of GApps or the kernel.
4.Fastboot Firmware: The Official Method from Xiaomi
This method is suitable for setting an official MIUI And it requires an unlocked bootloader:
Step 1: Preparing files
- ๐ฅ Download the firmware in.tgz format and unpack it into a folder with fastboot.
- ๐ The file should appear in the folder. flash_all.bat (for Windows or flash_all.sh (for Linux/Mac).
Step 2: Transfer your phone to Fastboot mode
- ๐ Turn off the device.
- ๐ Hold the Loud down. + Power before the appearance of the Fastboot logo.
Step 3. Starting the firmware
- ๐ฅ๏ธ Connect your phone to your PC and start it. flash_all.bat.
- โณ Wait until the process is completed (usually takes 5-10 minutes).
If the process is interrupted with an anti-rollback error, you are trying to install an older version. MIUI, It's not the one that's already on the device, and in that case, you're going to have to look for the firmware with the highest number of the anti-rollback or use it. TWRP circumvention.
โ ๏ธ Warning: Once you've run your Fastboot, your phone will automatically reset to factory settings. Don't try to interrupt the process, wait until the system is fully loaded.
๐ก
Fastboot firmware is the most reliable way to return the device to the โfactoryโ state, but it is not suitable for installing custom firmware or modified cores.
5. Installation through TWRP: root-stitch
If you want to install LineageOS, get root rights or make a backup through Nandroid, you will need a custom recavery. TWRP. The process is more complicated than through Fastboot, but opens up more possibilities.
Step 1: Installation of TWRP
- ๐ฅ Download the current version TWRP for davinci from the official website.
- ๐ฅ๏ธ Move the file. twrp.img fastboot.
- ๐ Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp.img
- ๐ After successful installation, reboot to the Recovery, holding Volume up + Nutrition.
Step 2: Custom OS firmware
- ๐ Download the firmware (for example, lineage-19.1-davinci.zip) GApps (if you need Google services).
- ๐ฑ Transfer files to your phone or external SD-map.
- ๐ง V TWRP run the Wipe โ Advanced Wipe and mark: ๐งน Dalvik / ART Cache ๐๏ธ System ๐ Data ๐ Cache
- ๐ค Return to the main menu and select Install, then specify the path to the firmware file.
- ๐ After installing the OS, repeat the step for GApps (if necessary).
Step 3. First download
- โณ The first download can take 10-20 minutes โ do not interrupt the process.
- ๐ง If the system does not load for more than 30 minutes, return to the TWRP And check the error logs.
What if TWRP doesnโt see internal memory?
Typical errors and their solutions
Even with the exact following of the instructions, there can be problems.
| Mistake. | Reason. | Decision |
|---|---|---|
| Fastboot: FAILED (remote: 'Flashing is not allowed in Lock State') | The bootloader is not unlocked | Unlock the bootloader through the Mi Unlock Tool |
| E: Unknown command [log] in TWRP | Incompatible version of TWRP | Download the current build for Davinci |
| The phone does not turn on after the firmware | Incorrectly selected firmware or interrupted process | Repeat the firmware via Fastboot with the official MIUI |
| Anti-rollback check fail | Reversed to an older version of MIUI | Find the firmware with the highest number of antirollback |
If after firmware the phone hangs on the logo, try:
- ๐ Hold the Loud up. + Food for entry TWRP repeat.
- ๐ฅ๏ธ Scroll down the official MIUI Fastboot (this will bring the device back to life 90% of the time).
For errors related to data encryption (for example, requesting a password after installing custom firmware), formatting the Data partition in TWRP.Remember will help: this will delete all user data!
7.Getting root rights: Magisk and its alternatives
If the purpose of the firmware is to obtain root rights, after installing a custom OS or an official one MIUI through TWRP You can use Magisk:
Step 1 Installation of Magisk
- ๐ฅ Download the latest Magisk release from GitHub (file) Magisk-v26.4.zip).
- ๐ฑ Transfer the file to the phone.
- ๐ง V TWRP Choose Install and point the way to Magisk.zip.
- ๐ After installation, restart.
Step 2. Root check
- ๐ฑ Install the Magisk Manager app (download as a download) APK same GitHub).
- ๐ Run it and check for Magisk status โ it should have a green icon.
Step 3: Hiding root for banking applications
- ๐ฆ Many banking applications (e.g. SberBank Online) block access on rooted devices.
- ๐ง In Magisk, activate the MagiskHide option and add apps to the Hidden List.
- ๐ Reset the device.
โ ๏ธ Note: Some firmware (for example, MIUI Global) have built-in protection against Magisk, in which case you will either have to abandon root or switch to custom firmware without Dm-Verity.
8.Recovery after failed firmware
If something goes wrong, Xiaomi will do it. 9T Stop turning on or booting into a bootloop, don't panic. 99% of the time, the device can be brought back to life.
Method 1. Firmware through Fastboot
- ๐ฅ๏ธ Download the official firmware in.tgz format.
- ๐ Connect your phone in Fastboot mode (even if it doesn't turn on, try pinching Volume Down). + Power on the device switched off).
- ๐ Unpack the firmware and launch it. flash_all.bat.
Method 2: Use of the Mi Flash Tool
- ๐ฅ Download the Mi Flash Tool.
- ๐ Select a folder with unpacked firmware.
- ๐ In the tool settings, select Clean All (full reset).
- ๐ฅ๏ธ Press Flash and wait until it is completed.
Method 3: Flashing through EDL-regime (for โbricksยป)
- โ ๏ธ This method requires an authorized Xiaomi account and a special cable (EDL cable or circuit of contacts on the board).
- ๐ ๏ธ Used to recover devices that donโt respond to buttons and arenโt defined in Fastboot.
- ๐ง Instructions for working with EDL Search for XDA-Developers (requires experience).
๐ก
If the phone does not respond to any combination of buttons, but is defined by the computer as Qualcomm HS-USB QDLoader 9008, so it's in the EDL-This is the last chance to bring him back to life without a soldering iron.