How to Install TWRP on Xiaomi Redmi 4X: A Complete Guide from Unlock to Firmware

Why is TWRP on Redmi 4X still relevant in 2026?

The Xiaomi Redmi 4X (codenamed santoni) remains a popular device among custom firmware enthusiasts despite its age (released in 2017), and the reason is simple: balanced iron (Snapdragon 435, 3GB of RAM), removable battery and active community support. The TWRP (Team Win Recovery Project) installs:

βœ”οΈ firmware MIUI Android (for example, LineageOS 18.1);

βœ”οΈ creating full backups of the system (Nandroid backup);

βœ”οΈ manual removal of bloatware (embedded Xiaomi applications);

βœ”οΈ Unlock additional features through Magisk (e.g, ViPER4Android sound-wise).

But the process of installing TWRP on the Redmi 4X has nuances: Xiaomi’s official support for unlocking the bootloader has become more complicated, and some firmware versions block the installation of a custom recovery. This guide features current methods for 2026, including bypassing typical errors like the Invalid image format or hanging on the Mi logo.

πŸ“Š Why do you need it? TWRP on the Redmi 4X?
Install custom firmware
Remove embedded applications
Get root rights
Backup the system.
Other

Step 1: Preparing the device and PC

Before starting, check out 4 critical conditions:

  • πŸ”‹ Battery charge at least 70% when discharged during Redmi firmware 4X It can turn into a brick (not even in Fastboot mode).
  • πŸ“± Version. MIUI No newer than 12.5.3. on more recent firmware Xiaomi blocks installation TWRP If necessary, roll back through the Mi Flash Tool.
  • πŸ–₯️ Xiaomi drivers are installed on PC. Download Mi Unlock Tool - it will automatically install the desired drivers.
  • πŸ” Backup of data. TWRP Save user files, but reset to factory settings (Wipe) erases everything, including photos in internal memory.

Download the necessary files (links are valid for May 2026):

File.ReferenceNote
TWRP for SantoniOfficial websiteVersion. 3.7.0_9-0 (last-last stable)
Mi Unlock ToolXiaomi pageRequires a Mi Account with a linked number
ADB & FastbootAndroid StudioUnpack in C:\platform-tools
Disable Force EncryptionXDA DevelopersTo disable encryption (optional)

⚠️ Attention: If your Redmi is 4X purchased in China (suffixed version _CN In the model name, you'll need to wait 360 hours to unlock the bootloader after you've linked your account.

Step 2: Unlock the bootloader through the Mi Unlock Tool

Without a bootloader, TWRP installation is impossible. Xiaomi made it harder to get started in 2023, so follow the instructions carefully:

  1. Activate Developer Mode: Go to Settings β†’ The phone. β†’ Version. MIUI and tap 7 times on the line. Go back to Settings. β†’ Additionally. β†’ For developers and include: πŸ”§ Debugging by USB πŸ”“ Unlocking OEM (point-of-point!)

Link your Mi Account to your device:

In the same Developer Menu, find Mi Unlock Status β†’ Add an account. Use the same account as you used in the Mi Unlock Tool on your PC.

Launch the Mi Unlock Tool on PC:

1. Connect the phone in Fastboot mode (turn off, then press Volume Down + Power).


2. In the program, log in to the Mi Account.




3.Push Unlock and wait until it is completed (it may take several attempts).

Critical detail: If the Mi Unlock Tool gives you a 99% "Couldn't unlock" error, try using the 5.5.224.24 version of the tool - it bypasses the restrictions on new firmware.

Linked to Mi Account in phone settings

USB debugging and OEM unlocking enabled

The phone is connected in Fastboot mode (the rabbit logo)

Drivers are installed on the PC ADB-->

Step 3: Install TWRP via Fastboot

Once the bootloader is unlocked, we move to the backup firmware, and we use fastboot, which is the most reliable method for the Redmi 4X.

Open the command line in the platform-tools folder (press Shift + PCM β†’ Open the PowerShell window here) and execute commands in order:

fastboot devices


fastboot flash recovery twrp-3.7.0_9-0-santoni.img




fastboot boot twrp-3.7.0_9-0-santoni.img

Explanation to the teams:

  • πŸ“± fastboot devices β€” check the device's connection. If the list is empty, reinstall the drivers.
  • πŸ’Ύ Fastboot Flash Recovery – Recording TWRP recovery.
  • πŸ”„ fastboot boot – temporary launch TWRP (to avoid overwriting stock recaps at the first load).

⚠️ Note: If an error occurs after the fastboot flash recovery command FAILED (remote: partition table doesn't exist, your device uses dynamic partitions. twrp-installer-santoni.zip temporary TWRP (see next step).

πŸ’‘

If the phone is stuck on the Mi logo after installing the TWRP, press Volume Up + Power for 10 seconds for a forced reboot. Then repeat the command fastboot boot twrp.img.

Step 4: Permanently installing TWRP and disabling encryption

Temporary launch of TWRP (fastboot boot) does not save the recovery after the reboot.

  1. From the TWRP menu, select Install β†’ find the twrp-installer-santoni.zip file (download it in advance with XDA).
  2. Swipe it for confirmation. TWRP slot-in (recovery_a and recovery_b).
  3. To disable forced encryption (if you use custom firmware): πŸ” Please. Disable_Dm-Verity_ForceEncrypt.zip (jump on XDA). 🧹 Run the Wipe. β†’ Format Data (enter yes to confirm).

After these actions:

  • πŸ“ The internal memory will be available as /data codeless.
  • πŸ”„ TWRP will remain after reboots (if you do not sew stock recavery).
What if TWRP asks for a password when downloading?
This means that the section /data It's encrypted: 1. Enter the last one. PIN-phone code. 2. If you don’t remember, run Format Data (all data erased!). 3. Alternative: pass through Disable_Dm-Verity_ForceEncrypt.zip before first launch TWRP.

Step 5: Solving Common Mistakes

Even with the exact instructions, there are possible failures, and the following are typical problems and proven solutions for the Redmi 4X:

Mistake.Reason.Decision
Invalid sparse file format at headerThe damaged twrp.img fileDownload the image again, check the checksum for SHA-256
Phone loads into stock RecoveryStock firmware re-writes TWRPSwitch twrp-installer.zip or disable auto-update in Settings β†’ System Update
E: Unable to mount /dataFBE encryption is enabledPlease. Disable_Dm-Verity_ForceEncrypt.zip And make Format Data.
Error 7 when ZIP firmwareIncompatible version of AndroidCheck firmware and TWRP compliance (e.g. Android 10 requires TWRP 3.4+)

If the phone doesn't boot into the system after installing TWRP (cyclical reboot), the boot section is likely damaged.

  1. Download stock firmware for Redmi 4X with Xiaomi Firmware Updater.
  2. In TWRP, only run boot.img from the firmware archive (not all ZIP!).

πŸ’‘

Redmi 4X with MIUI 12+ firmware may require a recoil on MIUI 11 before installing TWRP. Use the Mi Flash Tool in Clean All mode (not Clean All and Lock!).

Step 6: Next steps after installing TWRP

Now your Redmi 4X is ready to experiment.

  • πŸ“¦ Installation of custom firmware: Download ZIP with firmware (such as Havoc-OS or Pixel Experience for santoni) and run through Install β†’ Select ZIP. Don’t forget to make a Wipe before. β†’ Advanced Wipe (select Dalvik, Cache, System, Data).
  • πŸ”‘ Getting root rights: Download the latest version of Magisk (e.g., download the latest version of Magisk, Magisk-v26.4.zip) and pass through TWRP. After the reboot, check root with Root Checker.
  • πŸ’Ύ Backup creation: On the menu TWRP Choose Backup β†’ Check the Boot, System, Data sections β†’ Swipe for confirmation. SD-card.

Important for Redmi 4X: If you plan to use Google Apps (GApps), download arm64 β†’ 10.0 β†’ pico (for Android 10).Newer versions of GApps may not stand up due to memory limitations.

FAQ: Frequent questions on TWRP on the Redmi 4X

Can I install TWRP without unlocking the bootloader?
No. Xiaomi blocks the write-in to the recovery section on all devices, including the Redmi 4X. The only workaround is exploits for older firmware versions (like MIUI 9), but they don't work on current builds.
Why does the phone not see internal memory after TWRP firmware?
It's about encryption. FBE (File-Based Encryption Solutions: Please Disable_Dm-Verity_ForceEncrypt.zip. Execute Format Data in TWRP (All data will be deleted! or enter the password from the phone when you request it in the TWRP.
How do you get back the stock recap if something goes wrong?
Download the official firmware for Redmi 4X from Xiaomi and run it through the Mi Flash Tool in Clean All mode. Alternatively, you can only flash recovery.img from stock firmware in TWRP.
Which version of TWRP is best used for the Redmi 4X in 2026?
Recommended version β€” 3.7.0_9-0 (last stable from the official team TWRP). Unofficial assemblies are popular TWRP by brunodles with Android support 11, But it may contain bugs.
Can I update TWRP through the Recovery itself?
Yes, but only if the new version is compatible with your firmware. In TWRP, go to Install β†’ Install Image, select a new twrp.img and swipe to Recovery. After rebooting to the recovery command adb reboot recovery.