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:
- Activate Developer Mode: Go to Settings β About Phone β MIUI version and tap 7 times on this item.
- 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
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 version | Release date | Support for FBE | Compatibility with MIUI | Download link |
|---|---|---|---|---|
| 3.7.0_12-0 | March 2023 | β Yes. | MIUI 12β14 | Official website |
| 3.6.2_11-0 | June 2022 | β No. | MIUI 10β12 | XDA Developers |
| 3.5.2_9-0 (OrangeFox) | August 2021 | β Yes. | MIUI 9β13 | OrangeFox |
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).
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:
- Unpack the archive from the platform-tools to the root of the C:\ disk (e.g., C:\platform-tools\).
- Place the twrp.img file in the same folder.
- Open the command line (Win + R β cmd) and go to the tool folder: cd C:\platform-tools\
- Check the connection of the device: fastboot devices should display the serial number of the phone.
- Recovery: fastboot flash recovery twrp.img
- 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:
- Download the twrp-installer-santoni.zip file (not to be confused with.img!).
- Transfer the phone to stock Recovery: Turn off the device, then pinch Power + Volume up.
- From the Recovery menu, select Apply update β Apply from ADB.
- On PC, run the command: adb sideload twrp-installer-santoni.zip
- 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 header | The 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 firmware | TWRP is incompatible with MIUI or damaged boot. | Swipe the stock boot.img through Fastboot, then re-install TWRP. |
| E: Unable to mount /data | FBE 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 TWRP | The 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:
- Swipe stock firmware through the Mi Flash Tool (select the Clean all option).
- Repeat unlocking the bootloader (sometimes reset after failures).
- 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:
- Download the latest Magisk.zip from the official repository.
- Reboot to TWRP.
- Select Install β Select Magisk.zip β Swipe to confirm.
- 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).