How to reflash Xiaomi Redmi 9: official and custom firmware

Xiaomi Redmi 9 (codenamed lancelot) remains a popular budget smartphone even in 2026, but over time its performance may decline due to outdated software. Flashing the device will help to restore the old speed, install a fresh version of MIUI or even custom firmware like LineageOS or Pixel Experience. However, the process requires care: wrong actions can turn the phone into a β€œbrick”.

In this guide, we will analyze all methods of firmware - from official updates through Recovery to install custom software through Fastboot and TWRP. You will learn how to unlock the bootloader, where to download proven firmware for Redmi 9, and how to avoid errors like anti-rollback or hanging on the Mi logo. EEA-version MIUI β€” The wrong choice can lead to problems with IMEI mobile.

Preparation for firmware: what to do before the start

Flashing is not just about pressing a few buttons, but it's about your preparation whether Redmi 9 will stay functional or turn into an expensive alarm clock.

  • πŸ”‹ Charge the battery to at least 60%, and when discharged during firmware, the phone may turn off, leading to a software failure.
  • πŸ“± Back up. Use Mi Cloud, Google Drive, or local copy on your PC. The firmware erases the data in the section. /data!
  • πŸ” Find out the version. MIUI And the region. Go to Settings. β†’ The phone. β†’ Version. MIUI. If it says China and you download Global, you risk losing your network.
  • πŸ’» Install the Mi Flash Tool (for Fastboot) and Xiaomi drivers (or use the Mi). PC Suite).

If you plan to install custom firmware, you will additionally need:

  • πŸ”“ Unlock the bootloader through the Mi Unlock Tool (more on this below).
  • πŸ› οΈ Install TWRP Recovery – custom recovery for installation of unofficial firmware.
  • πŸ“‘ Download the firmware from a verified source (recommended) XDA Developers or Xiaomi Firmware Updater).

⚠️ Note: If your Redmi 9 is purchased in China (China version), Global firmware or EEA Check compatibility on the Mi Verify website.

πŸ“Š What kind of firmware do you plan to install?
Official MIUI (Stable)
Official MIUI (Developer)
LineageOS (Pixel Experience)
Another.

Method 1: Update via Recovery (without PC)

The easiest and safest method is to upgrade through stock recovery, which is suitable for installing official MIUI updates if:

  • πŸ“² You already have. MIUI (custom-free).
  • πŸ”„ You are updated within a single branch (e.g., with a MIUI 12 on MIUI 13, but not from China to Global).
  • πŸ“ You have a firmware file in.zip format (not.tgz for Fastboot!).

Step-by-step:

  1. Download the firmware from the official website (select the Redmi 9 model and region).
  2. Rename the file to update.zip and move it to the root directory of the phone’s internal memory.
  3. Turn off the phone, then press Volume Up + Power to enter Recovery.
  4. Select the language (if you have an option), then go to Install update.zip to System.
  5. Confirm the installation and wait for completion (5-10 minutes).
  6. Select Reboot to System.

If you reboot your phone with the Mi logo, reset it with Recovery (Wipe Data β†’ Wipe All Data) and delete all data, but it will restore the functionality.

β˜‘οΈ Preparation of a firmware file for Recovery

Done: 0 / 4

Method 2: Fastboot Firmware (official MIUI)

Fastboot is suitable for β€œreanimating” the phone if it does not turn on, or for forced installation of official firmware.

Important: This method completely erases data, including internal memory! and it does not work with a locked bootloader (unless you have unlocked it before).

Instructions:

  1. Download the Fastboot firmware (.tgz file) for Redmi 9 from the official website.
  2. Uncancel the file into a folder without Cyrillic characters (e.g., C:\MIUI\lancelot).
  3. Turn off your phone and put it in Fastboot mode: Press Volume Down + Power.
  4. Connect your phone to your PC through USB-cable (preferably original).
  5. Launch the Mi Flash Tool, press Select and specify the path to the firmware folder.
  6. At the bottom, choose Clean All (full cleaning) or Clean All and Lock (clean + lock bootloader).
  7. Press Flash and wait until it is completed (the process will take 5-15 minutes).

⚠️ Note: If the Mi Flash Tool is an anti-rollback error, you are trying to install an older version. MIUI, Solution: download the firmware with a newer build date or use a patch from the phone. XDA.

Mistake.Reason.Decision
anti-rollbackReverse to the old version of MIUIUse firmware with a newer date or patch
This device is lockedbootloader lockedUnlocking with Mi Unlock Tool
Flash not doneProblems with drivers or USB-connectionReinstall drivers, try another cable/port
Phone is not defined in FastbootIncorrect drivers or modeInstall Mi USB Driver, check the connection mode

πŸ’‘

If the Mi Flash Tool is 99% hanging, don't turn off the phone! wait 10-15 minutes - sometimes the process is completed with a delay.

Method 3: Install custom firmware (TWRP + LineageOS/Pixel Experience)

Custom firmware like LineageOS or Pixel Experience delivers pure Android without ads or Xiaomi apps, but requires an unlocked bootloader and TWRP Recovery.

Warning: this method voids the warranty and may cause problems with Widevine L1 (loss of HD support on Netflix/Disney+).

Step-by-step:

  1. Unlock the bootloader through the Mi Unlock Tool (instruction below).
  2. Download: πŸ“± TWRP Recovery for Redmi 9 (for example, here). πŸ“¦ Custom firmware (e.g. LineageOS 20). πŸ”‘ Disable Force Encryption (if the firmware does not support encryption).

TWRP

Fastboot

fastboot flash recovery twrp.img


fastboot boot twrp.img

TWRP

Wipe β†’ Format Data β†’ Yes

MTP

TWRP

Install β†’ Select a file β†’ Swipe to Confirm

Disable Force Encryption

Magisk

Reboot β†’ System

⚠️ Note: After installing custom firmware, do not update through OTA! This can lead to a freeze. All updates are manually installed through the TWRP.

What is Disable Force Encryption and Why is it Used?
Most custom firmware does not support Xiaomi’s data encryption (FBE). If it is not disabled, the phone will constantly reboot or require a password that does not accept. Disable Force Encryption removes this restriction, but makes the data less secure (you can read it by connecting memory to a PC).

How to unlock the bootloader on Redmi 9

Without unlocking the bootloader, you will not be able to install custom firmware or TWRP. Xiaomi allows you to do this officially, but with restrictions:

  • πŸ•’ Wait 168 hours (7 days) after linking your account to your phone.
  • πŸ“± The phone should be on the official MIUI (casteless!).
  • πŸ”— Mi Account must be linked to the phone and confirmed by SMS.

Instructions for unlocking:

  1. Enable OEM Unlock and USB Debugging: Go to Settings β†’ About Phone β†’ MIUI Version and tap 7 times on the build number to activate Developer Mode. Return to Settings β†’ Additional β†’ For Developers and enable: OEM Unlocking (unlock bootloader), USB Debugging (USB debugging).

Mi

Settings β†’ Xiaomi Account β†’ Synchronization

Mi Unlock Tool

Mi

Fastboot

Loudness down + Nutrition

Unlock

Wait until the end (if there is an error, try again in 24 hours).

If the Mi Unlock Tool is a Couldn't unlock error, check:

  • πŸ”Œ Cable and port USB (Use the original cable and port USB 2.0).
  • πŸ•’ Has it been 168 hours since the account was linked.
  • πŸ“± Is there an official phone on the phone? MIUI (Custom firmware blocks unlocking).

πŸ’‘

Unlocking the bootloader erases all data from the phone! make a backup in advance.

Frequent mistakes and their solutions

Even with the exact following of the instructions, there can be problems.

Problem.Possible causeDecision
The phone does not turn on after the firmwareIncorrect firmware (e.g. China instead of Global)Switch the correct version through Fastboot
Hanging on the Mi logoVersion conflict or incomplete firmwareRun Wipe Data in Recovery or Refuse
The anti-rollback errorReverse to the old version of MIUIUse a firmware with a newer date
No network after firmwareIncompatibility of modems (e.g. China β†’ Global)Restore the correct version or restore the IMEI
Mi Flash Tool doesn't see the phoneNo drivers or incorrect modeInstall Mi USB Driver, check Fastboot

If the IMEI is missing after the firmware or the mobile network is not working, try:

  1. Restore IMEI via Engineer Mode (type ##4636## β†’ Information).
  2. Swipe modem and nvram through Fastboot (files can be found on 4PDA).
  3. Reset network settings: Settings β†’ SIM-maps and mobile networks β†’ Resetting settings.

πŸ’‘

If Google services do not work after custom firmware, install NikGapps or OpenGapps via TWRP.

FAQ: Answers to Frequent Questions

Can I flash Redmi 9 without unlocking the bootloader?
Yes, but only official. MIUI via Recovery or Fastboot (if the firmware is signed by Xiaomi). TWRP require unlocking.
How do I know which firmware is on my Redmi 9?
Go to Settings β†’ About Phone β†’ MIUI Version. This will show the version (e.g. MIUI 14.0.2 Global). You can also use the command in ADB: adb shell getprop ro.miui.ui.version.name
What to do if the phone does not turn on after the firmware?
First, try Fastboot (Loudness down + Power) or Recovery (Loud up + Power). If your phone responds, run the official MIUI through the Mi Flash Tool with the Clean All option. If it doesn't respond, check the charging or contact the service.
Can I return the warranty after unlocking the bootloader?
Officially, no. Some service centers can lock the bootloader back if you install the official firmware via Fastboot with the Clean All and Lock option, but that doesn't guarantee warranty recovery.
Which is the best custom firmware for Redmi 9?
The choice depends on the goals: LineageOS is a stable, clean Android. Pixel Experience is an interface like Google Pixel. ArrowOS is a balance between performance and functionality. MIUI Mix is a modified MIUI without ads. Download firmware only from trusted sources (XDA or 4PDA).