Install Recovery on Xiaomi Redmi 4X: from unlocking the bootloader to firmware TWRP

The Xiaomi Redmi 4X (codenamed santoni) remains a popular budget smartphone years after its release, and one of the key reasons is that it has a vibrant community of developers offering alternative firmware and modifications, but it requires custom Recovery, the most common of which is the TeamWin Recovery Project (TWRP), to help you figure out how to install it properly, avoiding the typical bugs.

It is important to understand that the procedure involves unlocking the bootloader, which resets the device to factory settings. In addition, improper actions can lead to a β€œbrick” (complete inoperability) of the device if you flash Recovery, incompatible with the version of MIUI or hardware revision. In this article, we will discuss current methods for 2026, given the changes in Xiaomi policy and tool updates.

If you’ve never worked with ADB, Fastboot or custom firmware before, we recommend you take a closer look at each step. For power users, at the end of this article, there’s a TWRP versioning table with different Redmi 4X modifications.

Preparation of the device: unlocking the loader

The first and mandatory step is to unlock the bootloader. Without this, you can not install custom Recovery. Xiaomi officially allows unlocking, but the process requires confirmation through the Mi Account and waiting (usually 7-15 days).

What you need:

  • πŸ“± Redmi Smartphone 4X battery-charged β‰₯ 60%
  • πŸ’» Computer running Windows 10/11 Linux (MacOS may require additional drivers)
  • πŸ”Œ Cable USB Type-C (original or qualitative analogue)
  • πŸ”‘ Mi Account Linked to the Device

Instructions for unlocking:

  1. Activate Developer Mode: Go to Settings β†’ About Phone β†’ MIUI version and tap 7 times on this item.
  2. Back to Settings β†’ Additionally. β†’ For developers and include: πŸ”§ Debugging by USB πŸ”“ Unlocking OEM (point!)

Connect the phone to the PC and confirm the debugging permission.

Mi Unlock Tool

Fastboot

Food + Volume Down

Unlock

⚠️ Note: If you unlock a "Couldn't unlock" error with code 86006 or 86012, it means that the wait period has not expired.

Mi Unlock Tool Deciphering Errors
86006 – Device not tied to account (you need to log into Mi Cloud on your phone). 86012 – not 7 days after the first attempt to unlock. 86008 – account is not confirmed (requires SMS/email verification). 86014 – too frequent attempts (wait 30 minutes).

Once successfully unlocked, you can start installing Recovery. Make sure the phone has disabled Find Device protection in the Mi Cloud - it can block firmware.

2.Selecting a TWRP version for the Redmi 4X

Not all TWRP builds work equally well on the Redmi 4X.

  • πŸ“Œ Compatibility with version MIUI (for example MIUI 14 might not fit. TWRP 2018).
  • πŸ”§ Support FBE (File-Based Encryption – If your device is encrypted /data.
  • πŸ› οΈ Presence of patches to bypass anti-rollback (if you roll back on old firmware).

Up-to-date versions of TWRP for santoni (as of 2026):

TWRP versionRelease dateSupport for FBECompatibility with MIUIDownload link
3.7.0_12-0March 2023βœ… Yes.MIUI 12–14Official website
3.6.2_11-0June 2022❌ No.MIUI 10–12XDA Developers
3.5.2_9-0 (OrangeFox)August 2021βœ… Yes.MIUI 9–13OrangeFox

For most users, the best choice is TWRP 3.7.0 from the official developer. If you are using Android 10+ firmware, check if the selected version supports dynamic partitions (otherwise, you may have problems with system and vendor partitions).

πŸ“Š What version? TWRP You're planning to install?
Official 3.7.0
OrangeFox
Old 3.6.2.
Other (specify in the comments)

3. Install TWRP via Fastboot

The most reliable way to flash Recovery is through Fastboot mode.

  • πŸ–₯️ Installed drivers ADB/Fastboot (You can download it on Android. SDK).
  • πŸ“ File. twrp.img (Rename it for convenience).
  • πŸ”Œ Connecting your phone to your PC in Fastboot mode.

Step-by-step:

  1. Unpack the archive from the platform-tools to the root of the C:\ disk (e.g., C:\platform-tools\).
  2. Place the twrp.img file in the same folder.
  3. Open the command line (Win + R β†’ cmd) and go to the tool folder: cd C:\platform-tools\
  4. Check the connection of the device: fastboot devices should display the serial number of the phone.
  5. Recovery: fastboot flash recovery twrp.img
  6. Reboot to Recovery: fastboot boot twrp.img (this is a temporary boot to check the health).

Download official twrp.img for santoni| ADB/Fastboot drivers installed | Phone in Fastboot mode | OEM lock disabled in settings | Battery charge β‰₯ 50%

-->

⚠️ Note: If an error occurs after the fastboot flash recovery command "FAILED (remote: 'Partition not found', which means that your version of the MIUI It uses dynamic partitions. In this case, first, run vbmeta: fastboot. --disable-verity --disable-verification flash vbmeta vbmeta.img (file vbmeta.img You can get out of the official firmware through MIUI bootloader).

If TWRP has successfully booted, we recommend you to back up the persist partition right away (it contains IMEI and calibration data!). To do this, select Backup β†’ Persist from the main Recovery menu.

4. Alternative method: installation via ADB Sideload

If Fastboot is not available for some reason, you can flash Recovery through ADB Sideload, which is useful if the device is already loading into stock Recovery but does not allow customization.

Algorithm of action:

  1. Download the twrp-installer-santoni.zip file (not to be confused with.img!).
  2. Transfer the phone to stock Recovery: Turn off the device, then pinch Power + Volume up.
  3. From the Recovery menu, select Apply update β†’ Apply from ADB.
  4. On PC, run the command: adb sideload twrp-installer-santoni.zip
  5. Once completed, restart immediately to TWRP (not to the system!), otherwise stock Recovery will overload custom.

This method is less reliable than Fastboot, but can help in situations where the bootloader is locked at the hardware level (for example, after a failed update).

πŸ’‘

If ADB doesn’t see the device, try reinstalling drivers manually through Windows Device Manager. To do this, select β€œUpdate Driver β†’ Search on this computer β†’ Select from the list” from the driver menu and specify the path to the folder with the platform-tools.

5. Checking the health and the first settings of TWRP

After installing Recovery, you need to follow a few critical steps to avoid problems in the future:

1. Factory reset (if you unlocked the bootloader): in TWRP, select Wipe β†’ Format Data (this will remove encryption and prevent getting stuck).

2. disable signature verification: go to Settings β†’ Zip signature verification and disable the option (this will allow you to install unofficial firmware).

3. Creating a full backup:

- Mark the sections: Boot, System, Data, Persist, EFS.

Save the backup to an external memory card or PC.

If you replace TWRP with stock Recovery after you reboot, your version of MIUI has activated overwrite protection.

  • πŸ”„ Please. disable_dm_verity_forceencrypt.zip (download XDA).
  • πŸ”§ Or edit the fstab.qcom file in the section /vendor (requires root rights).

πŸ’‘

After installation TWRP Never select "Reboot to System" from the menu immediately after you have firmware! First, reboot back to Recovery (Reboot button) β†’ Recovery" or stock Recovery will overrun custom.

Typical errors and their solutions

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

Mistake.Reason.Decision
Invalid sparse file format at headerThe twrp.img file or incompatible version is damaged.Download the image again from the official source. Check the checksum (MD5).
phone is stuck on startup MI logo after firmwareTWRP is incompatible with MIUI or damaged boot.Swipe the stock boot.img through Fastboot, then re-install TWRP.
E: Unable to mount /dataFBE encryption is enabled, and TWRP does not support it.Use the FBE-marked version of TWRP or format /data manually.
Sensor buttons don’t work in TWRPThe wrong version of Recovery for hardware revision (e.g. Redmi 4X India)Install a specialized assembly (for example, TWRP_unified_santoni).

If the device does not boot into the system after installing TWRP, try:

  1. Swipe stock firmware through the Mi Flash Tool (select the Clean all option).
  2. Repeat unlocking the bootloader (sometimes reset after failures).
  3. Use an alternative Recovery, such as OrangeFox.

⚠️ Note: If you see a message during the firmware process, "Anti-rollback check fail!", it means that you are trying to install firmware older than the one on the device before. MIUI. A rollback to the old firmware without a patch will lead to a full brik of the device without the possibility of recovery through the SP Flash Tool.

7. Additional features after installation of TWRP

Custom Recovery provides access to a variety of functions that are not available in stock firmware:

  • πŸ”„ Install custom firmware (for example, LineageOS, Pixel Experience).
  • πŸ“¦ Backup and restoration of individual sections (including EFS s IMEI).
  • πŸ”§ Editing system files (e.g. build.prop to change) DPI device-model).
  • πŸ”“ Getting root rights through Magisk (set as ZIP through TWRP).

Example of Magisk installation for root:

  1. Download the latest Magisk.zip from the official repository.
  2. Reboot to TWRP.
  3. Select Install β†’ Select Magisk.zip β†’ Swipe to confirm.
  4. Reboot to the system. Check root through the Magisk Manager app.

Note: Some MIUI 13/14 firmware may require you to disable DM-Verity (use the Magisk module called Universal DM-Verity Disabler).

How to check the Redmi 4X hardware revision version?
Open stock recovery (Power) + Volume up, and look at the top line. If it says santoni, you have the standard version. santoni_in_global or santoni_in β€” Indian audit, which may require special recovery.

FAQ: Frequent questions about installing Recovery on Redmi 4X

Can I install TWRP without unlocking the bootloader?
No, it's impossible. Xiaomi blocks entry to the recovery section at the bootloader level. Any attempts to circumvent this restriction (for example, through exploits) cause crashes or a device blink. The only legal way is to officially unlock through the Mi Unlock Tool.
Once you have TWRP installed, the phone doesn't boot. What do you do?
The problem is probably version incompatibility. Try: Swipe stock Recovery through Fastboot: fastboot flash recovery stock_recovery.img (You can extract the file from the official firmware. Install another version. TWRP (For example, OrangeFox instead of the standard TWRP). Complete reset via fastboot erase userdata. If nothing helps, run the full stock firmware through the Mi Flash Tool (select the Clean all and lock option to return the device to its original state).
How do I know which version of MIUI is on my Redmi 4X?
Go to Settings β†’ About β†’ MIUI version. It will indicate something like MIUI Global 14.0.2 Stable. You can also see the Android version (for example, Android 10 QKQ1.191222.002). This information is critical for choosing a compatible TWRP.
Can I return stock recovery after installing TWRP?
Yes, it's done by one team in Fastboot: Fastboot Flash Recovery. stock_recovery.img Where stock_recovery.img β€” The original Recovery file from the official firmware. After that, unlocking the bootloader is saved, but custom Recovery will be deleted. To fully return the device to the stock state, run the full firmware through the Mi Flash Tool with the Clean all and lock option.
Will Google Pay work after installing TWRP and Magisk?
Probably not, because of the SafetyNet trigger. However, you can bypass: Install modules in Magisk: - Universal SafetyNet Fix, - MagiskHide Props Config. In Magisk settings, turn on MagiskHide and add Google Pay to the list of hidden applications. Reboot your device and check the SafetyNet status through the YASNAC application. Note: with the release of Google Wallet, security requirements have tightened, and the bypass may not work on new versions of MIUI.