How to flash Xiaomi Mi 9T: official and custom firmware (Fastboot, TWRP, Recovery)

Xiaomi Mi 9T (The codename davinci remains one of the most popular smartphones for firmware experiments years after its release, AMOLED-screen and retractable front camera – make the device an ideal platform for testing as official updates MIUI, It's also custom builds like LineageOS or Pixel Experience, but firmware is a process that requires attention to detail, from unlocking the bootloader to choosing the right version of the software.

In this article, we will look at all the current ways to run the Mi 9T firmware in 2026: through Fastboot (the official method), TWRP (for custom firmware), and MIUI Recovery (update without losing data), and pay special attention to common errors such as anti-rollback, brick after improper kernel firmware or problems with IMEI after a region change. If you are a beginner, start with the section on preparation: without an unlocked bootloader and backup of data, even the official firmware can turn into a problem.

Preparation for firmware: what to do before the start

The Mi 9T firmware without preparation can lead to loss of warranty, locking IMEI or a full β€œbrick” of the device. First and foremost, check the status of the bootloader. If it is blocked (and by default it is), it will have to be unlocked through the official Mi Unlock Tool. Note: Xiaomi imposes a restriction on unlocking – after linking the account to the device you will have to wait 7 days (sometimes more).

The second is backup. Even if you plan to flash the official MIUI through Recovery, save:

  • πŸ“± Contact and SMS (through settings β†’ Google β†’ Backup or Mi Cloud Backup)
  • πŸ“Έ Photos and videos (copy to PC or cloud)
  • πŸ”‘ Application Data (use Swift Backup or Titanium Backup for rooted devices)
  • πŸ“‘ IMEI Serial number (write them down on paper or take a screenshot from Settings) β†’ The phone)

The third is charging. Make sure the battery is at least 60 percent charged. It can take up to 20 minutes to run the firmware through the Fastboot, and if the phone turns off in the process, the consequences will be dire.

  • πŸ–₯️ Computer on Windows 10/11 (Mi Unlock Tool and Fastboot)
  • πŸ”Œ Original. USB-cable (cheap cables can cause data transmission errors)
  • πŸ› οΈ Drivers (Qualcomm) HS-USB QDLoader 9008 and ADB/Fastboot)

⚠️ Note: If you are using the Mi 9T version MIUI older than 12.0.3.0, before unlocking the bootloader, update to the latest official firmware via Settings β†’ System Update: Older versions of software may contain vulnerabilities that cause unblocking failures.

πŸ“Š What kind of firmware you plan to use?
Official MIUI via Recovery
Custom firmware through TWRP
Firmware through Fastboot
I haven't decided yet.

Unlock the bootloader on Xiaomi Mi 9T

Without the unlocked bootloader, you can flash the Mi 9T only through MIUI Recovery β€” and then if the update is official. To install custom firmware, cores or Magisk, unlocking is mandatory. The process consists of three stages:

  1. Linking your Mi Account to your device Go to Settings β†’ Mi Account β†’ Linked devices and make sure your phone is linked to your account. If not, log in.
  2. Request permission to unlock Download Mi Unlock Tool, launch it on behalf of the administrator and log in to the same Mi Account as on your phone. Connect Mi 9T in Fastboot mode (turn off the phone, then press Volume Down + Power).
  3. After successful binding, the tool will show a timer β€” usually 168 hours (7 days) β€” at the end of this period, you can unlock the bootloader.

If the Mi Unlock Tool displays a "Couldn't unlock" or "Current account is different from the account info on the device" error, check:

  • πŸ”„ Does the Mi Account match on the phone and in the tool.
  • πŸ“Ά Is the phone connected to the Internet (via mobile data or Wi-Fi).
  • ⏳ Is it 7 days since the first tether (the timer is not reset even after the phone is reset!).

⚠️ Attention: After unlocking the Xiaomi Mi bootloader 9T It automatically resets to the factory's Wipe data, and all the data in the internal memory will be deleted.

πŸ’‘

If the Mi Unlock Tool doesn’t see the phone in Fastboot mode, try disabling driver signatures in Windows: run the command prompt from the administrator and execute.

bcdedit /set testsigning on

Xiaomi Mi 9T firmware methods: which one to choose?

The choice of firmware method depends on your goal. Below is a comparison table with the pros and cons of each option:

MethodSuitable forPlusesConsDo you need to unlock the bootloader?
MIUI RecoveryOfficial updates without data lossβœ… Simplicity (via phone menu)βœ… User data is stored❌ Official firmware only❌ There is no possibility of reversing the old version.❌ No.
Fastboot (MiFlash)Official firmware, recovery after failureβœ… Reliability (recommended by Xiaomi)βœ… Suitable for "brick" phones❌ All data is deleted❌ Demands a PC.❌ No (but I need to unlock for custom firmware)
TWRP + Castom firmwareLineageOS, Pixel Experience, MIUI portsβœ… Flexibility (any firmware and modifications)βœ… The possibility of backup through TWRP❌ The risk of a brick in an error❌ Maybe it won't work. OTA-updateβœ… Yes.
ADB SideloadUpdate without TWRP (for example, via OrangeFox)βœ… No need to unlock for official firmwareβœ… Suitable for Firmware with Errors in Recovery❌ Slower than Fastboot❌ Not all custom firmware is supported❌ No (but it is for unofficial collections)

For most users, the best option is Fastboot (if you need clean official software) or TWRP (if you want custom firmware). MIUI Recovery is only suitable for β€œover the air” updates or manually installing official packages without resetting.

πŸ’‘

If you're a beginner, start by running through Fastboot with the official MIUI.This method is the most stable and supported by Xiaomi.Castom firmware requires expertise and can lead to problems with the camera, NFC or mobile network.

Xiaomi Mi 9T firmware via Fastboot (official MIUI)

This method is suitable for stock firmware installation (pure MIUI without modifications).

  • πŸ–₯️ Computer with Windows and installed drivers ADB/Fastboot.
  • πŸ“¦ Official firmware for Mi 9T (Download from the official website; choose the version of Fastboot, not Recovery).
  • πŸ› οΈ MiFlash tool (last version).

Step-by-step:

  1. Unpack the downloaded archive with firmware in a folder (for example, C:\mi9t_fastboot).

If MiFlash is making a mistake "flash_all_lock.bat failed, try it:

  • πŸ”„ Restart your PC and phone.
  • πŸ”Œ Use the other USB-port (preferably) USB 2.0).
  • πŸ“₯ Download the firmware again (possibly the archive is damaged).

⚠️ Note: If you are using the Mi 9T version MIUI based on Android 10 on firmware with Android 11+, The anti-rollback protection might work, so the phone locks itself at boot, so you can only flash official builds with the same or newer version of Android.

Download the official Fastboot firmware for Mi 9T (davinci)|

Installed ADB/Fastboot and MiFlash| drivers

Backup of data created |

Phone charged at 60 percent+|

bootloader unlocked (if you are stitching with caste) |-->

Installation of custom firmware through TWRP

LineageOS, Pixel Experience or other custom firmware will require TWRP, a custom recovery. Importantly, only the TWRP version for davinci is suitable for the Mi 9T (not to be confused with davinciin – this is the Redmi K20 for India!).

Steps:

  1. Download TWRP for Mi 9T from the official website (.img file).
  2. Transfer your phone to Fastboot and pass TWRP Team: Fastboot Flash Recovery twrp-3.7.0_9-0-davinci.img fastboot boot twrp-3.7.0_9-0-davinci.img
  3. In TWRP, make a backup of the persist partition (important for IMEI!) and copy the firmware to the phone.
  4. Sweep through the firmware (like LineageOS), then Gapps (if you need Google services) and Magisk (for root).
  5. Run Wipe β†’ Format Data (required!), then reboot.

Typical problems and solutions:

  • πŸ”΄ The phone does not load after the firmware β†’ Check if the firmware is suitable for davinci.Some builds for davinciin may not work.
  • πŸ“Ά No mobile network. β†’ Make sure you have the correct modem (vendor and firmware from the official firmware).
  • πŸ”‹ Fast battery discharge β†’ Castomic cores (like Kirisakura) can conflict with firmware. Try another core.
How to restore IMEI after firmware?
If after installing the custom firmware disappeared IMEI, Restore it through QCN-file SN Write Tool. 1. Make a backup of the persist partition in TWRP before the firmware. 2. IMEI You're out, you're out. MIUI via Fastboot with clean all and lock option. 3. Use the Mi Flash Tool with Flash All Except Storage checkbox to recover modem data.

Firmware via MIUI Recovery (without data loss)

If you want to upgrade the Mi 9T without resetting, use MIUI Recovery, which is only suitable for official firmware in.zip format (not.tgz for Fastboot!).

Instructions:

  1. Download Recovery firmware from Xiaomi (choose your model and region!).
  2. Rename the file to update.zip and move it to the root of internal memory.
  3. Go to Settings β†’ About Phone β†’ System Update, click on the three dots at the top and select Select a firmware file.
  4. Please specify the path to update.zip and confirm the installation.

If the update has been on the MIUI logo for more than 10 minutes:

  • πŸ”„ Force the phone to restart (clip the power for 15 seconds).
  • πŸ”§ Try to flash the same firmware through Fastboot.
  • πŸ“₯ Check the integrity of the archive (it may have jumped with an error).

⚠️ Attention: Some firmware MIUI for Mi 9T If you try to flash an older version (for example, from Android 11 to Android 10), the phone will lock. MIUI customized!

Solving errors after the firmware Xiaomi Mi 9T

Even with the right firmware, there can be problems, and the following are the most common ways to fix them:

Problem.Possible causeDecision
Phone not turned on (black screen)Incorrect firmware or interrupted processSwipe official MIUI through Fastboot with clean all option
Hanging on the MIUI logoMagisk module conflict or incorrect kernelRemove Magisk via TWRP or flash clean firmware
No mobile network (no signal)Modem or persist partition damagedSweep the official firmware with the Flash All Except Storage checkbox in MiFlash
The camera or NFC is not working.There are no drivers in the custom firmwareInstall a patch for the camera (such as ANX Camera) or flash another build
Fast battery dischargeBackground processes or unoptimized coreCheck the battery statistics in Settings β†’ Battery or run another core

If the Mi 9T is no longer detected by the computer in Fastboot mode (device not found error), try:

  • πŸ”Œ Connect the phone to another USB-port (preferably) USB 2.0).
  • πŸ–₯️ Reinstall Qualcomm drivers HS-USB QDLoader 9008.
  • πŸ”„ Reboot the phone to EDL-Mode (close the Volume up) + Loudness down + Power on a phone turned off).

πŸ’‘

If after the custom MIUI firmware, navigation gestures stopped working, go to Settings β†’ Additional β†’ Full-screen display and select the navigation type again.

FAQ: Frequent questions about the Xiaomi Mi 9T firmware

Can I flash the Mi 9T without unlocking the bootloader?
Yes, but only official firmware via MIUI Recovery or Fastboot (if the phone is already unlocked before).
How do I know if the bootloader is unlocked on the Mi 9T?
Turn off your phone and turn it on in Fastboot mode (Put Volume Down + Power). If you have "Unlocked" on the bottom of the screen, the bootloader is unlocked. If "Locked" is locked.
Which firmware is best to choose for the Mi 9T in 2026?
Depends on the target: πŸ“± Stability β†’ Official. MIUI (The latest version of Davinci). πŸš€ Productivity β†’ Pixel Experience (Pure Android without unnecessary services). πŸ”§ Setting up β†’ LineageOS with MicroG (without Google services).
What if the Mi 9T is not turned on after the firmware?
If the phone doesn't respond to the power button: Connect to charge for 30 minutes - maybe the battery has gone down. Try logging in to Fastboot (Loud down + Power). If it doesn't work, swipe the official MIUI through MiFlash in EDL mode (requires an authorized Xiaomi account).
How to return the official MIUI after custom firmware?
Download the Fastboot firmware from the official website and thread it through MiFlash with the clean all option. If the bootloader has been unlocked, you can block it back by selecting clean all and lock.