Installing a custom TWRP recavator on Xiaomi Redmi 4X (codenamed santoni) opens up access to advanced features: backups via Nandroid, custom ROM firmware, root rights and even restoration of bricks after unsuccessful experiments. However, the process requires accuracy - an error at any stage can turn a smartphone into a useless brick. In this article, we will analyze all the steps from unlocking the bootloader to checking the health of TWRP, taking into account the nuances of a particular model.
The main difficulty for owners of Redmi 4X is the official policy of Xiaomi, blocking the bootloader by default. Without it, you can not flash TWRP. In addition, the model was released in several versions (for example, with Snapdragon 435 and 430 processors), which affects the choice of files recovery. We will look in detail how to determine the version of the device, where to download the right files and how to avoid common errors like Fastboot mode or endless download.
Important: The instruction is relevant for the MIUI-based Redmi 4X (including global and Chinese versions), but not for models with MediaTek processor or modifications like Redmi 4/4A/4 Prime. If you are not sure about the model, check it in Settings β About Phone β Model or through the command fastboot getvar product.
1. Preparation: What to do before installing TWRP
Before you start unlocking and firmware, gather everything you need. Without proper preparation, you risk getting a smartphone with a locked bootloader or damaged partitions.
Here's the mandatory set:
- π Charged smartphone (at least 70% battery) Fastboot firmware can take up to 10 minutes, and discharge in the process will lead to failure.
- π» Windows computer 10/11 (or Linux/macOS driverless ADB/Fastboot). Virtual machines are not recommended due to problems with the USB-connection.
- π Cable USB (Cheap cables can interrupt data transmission, which is critical for Fastboot.
- π Firmware files: Official Mi Unlock Tool (last version). TWRP for santoni (links below in the table). ADB/Fastboot (for example, Android SDK Platform-Tools).
Also, make sure to back up important data β once you unlock the bootloader, the smartphone will be reset to factory settings. Use Mi Cloud, Google Photos or physical copying on your PC. Apps like Titanium Backup won't help without root rights.
β οΈ Attention: If your Redmi is 4X was purchased in China and runs on firmware for the China region, after unlocking the bootloader may require firmware global version MIUI for Google services to work correctly. Clarify the firmware version in Settings β The phone. β Version. MIUI.
2 Unlock the bootloader on the Redmi 4X
The bootloader on all Xiaomi smartphones is locked by default, and unlocking it is a must before installing TWRP. The process takes up to 72 hours due to Xiaomiβs policy, which requires waiting after the account is tied to the device.
Instructions for unlocking:
- Link your Mi Account to your device: Go to Settings β Mi Account and log in. Enable Settings β Additional β Developer β Unlock OEM (if not, activate Developer Mode by clicking 7 times on About Phone Build Number). Connect your smartphone to your PC and confirm the binding in Mi Unlock Tool.
- Run Mi Unlock Tool: Download the utility from the official website and install. Run the program on behalf of the administrator, log in to the same Mi Account as your phone. Put the phone in Fastboot mode: turn it off, then press Volume down + Power until the rabbit appears in the hat-eared.
- Start unlocking: Connect your phone to your PC. The Mi Unlock Tool will show a message about a successful connection. Press Unlock. If you have a wait error, wait until the specified time (usually 72-168 hours).
Once successfully unlocked, the phone will automatically reset to factory settings. Don't worry, that's okay. Now you can start TWRP firmware.
Linked to the Mi Account to the device|Unlocking enabled OEM|Drivers installed ADB/Fastboot|Phone's loaded on 70%+|Data backup made.-->
3.Selecting the Right TWRP Version for Redmi 4X
The Redmi 4X came with two processor types: the Snapdragon 435 (most devices) and the Snapdragon 430 (less commonly), and using an inappropriate TWRP version will cause the device to fail to identify its modification:
- Install the Kernel Adiutor or CPU-Z app.
- Check the processor model in the Hardware Info section.
- Please refer to the table below:
| Processor | Code name | TWRP reference | Notes |
|---|---|---|---|
| Snapdragon 435 | santoni | Official website | The most common version. Supports /data encryption. |
| Snapdragon 430 | santoni (revision) | XDA Developers | Unofficial builds. You may need to disable dm-verity. |
Download a file with the.img extension (for example, twrp-3.7.0_9-0-santoni.img) and save it to the folder with the platform-tools (where adb.exe and fastboot.exe lie).
β οΈ Attention: If you download TWRP For other models (e.g. Redmi 4 or Redmi Note) 4X), The firmware will end in error and the phone may stop loading. Always check the device's code name through fastboot getvar product.
How to check the code name of the device?
4. Install TWRP via Fastboot
Now, to the firmware itself, the whole process takes no more than 5 minutes, but requires precise follow-up.
Step-by-step:
- Turn your phone into Fastboot mode: Turn off the device. Press Volume down + Power before the screen with the hare appears.
- Connect to your PC and check the connection: Open the command prompt in the folder with the platform-tools (press Shift + PCM β Open the PowerShell window here). Enter the command: fastboot devices If the device is determined (the serial number appears), you can continue.
- Please. TWRP: Enter the command (replace). twrp.img The name of your file: fastboot flash recovery twrp-3.7.0_9-0-santoni.img Wait for the message. OKAY.
- Launch it. TWRP: Without turning off the cable, enter: fastboot boot twrp-3.7.0_9-0-santoni.img It'll temporarily load. TWRP without being written to permanent memory (in case of errors). TWRP You can use it constantly (see the next section).
If the fastboot flash recovery error appears after the command FAILED (remote: 'Not allowed in Lock State'), then the bootloader is not unlocked. Go back to step 2.
π‘
If after the firmware TWRP The phone loads into a standard Recovery, so the stock firmware overwrote it. TWRP plough disable_forceencrypt.zip (if you use encryption) or no_verity_opt_encrypt.zip self-indulgently TWRP.
5. Permanent installation of TWRP and overwriting protection
By default. MIUI at first load after the firmware TWRP It can automatically restore the stock Recovery:
- Load in TWRP: After the command fastboot boot (from the previous step), the phone should boot into the interface. TWRP. If the screen does not respond to touch, connect OTG-mouse.
- Turn off signature verification: Go to Mount β Enable MTP (You can download files from your PC. no_verity_opt_encrypt.zip And move it to the phone. TWRP Click Install, select the downloaded file and swipe for firmware.
- Sweep Magisk (optional): If you need root rights, download Magisk and thread it in the same way.
- Reboot to System: Press Reboot β System. If TWRP asks about installing an application, you can opt out.
After these actions, the stock recovery will not recover, and you will be able to use TWRP for backups, ROM firmware and other operations.
Use the correct version of TWRP for your processor.
- File. no_verity_opt_encrypt.zip Switch before the first load into the system.
- bootloader unlocked (checked by the command fastboot oem device-info).-->
6. Common errors and their solution
Even with the correct following of the instructions, problems can arise, and here are the most common ones and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| FAILED (remote: 'Flashing is not allowed in Lock State') | The bootloader is not unlocked | Repeat the unlock process through the Mi Unlock Tool and wait for the timer to end. |
| The phone is not defined in fastboot devices. | No drivers or USB issues | Install Google Drivers USB Driver. Try another one. USB-port (preferably) USB 2.0). |
| TWRP is stitched but not launched | Incompatible version or corrupted file | Download another version of TWRP (for example, the official version) and repeat the firmware. |
| After the firmware Magisk phone does not boot | Incompatibility with the MIUI version | Sweep Magisk-uninstaller.zip through TWRP or upgrade MIUI to the latest version. |
If neither of these methods worked, try returning stock recaps and firmware through the Mi Flash Tool. Recovery instructions can be found on the Xiaomi.eu forum.
7. Additional features after installation of TWRP
Now that TWRP has been successfully installed, you can:
- π± Install custom firmware (e.g. LineageOS, Pixel Experience, or MIUI from xiaomi.eu).
- π Make full backups (including /data, /system and /boot) and re-establish them if necessary.
- π§ Get root rights through Magisk for fine-tuning the system.
- π Remove embedded applications (bloatware) without risking damage to the system.
- π Bypassing restrictions MIUI, for example, locking the installation APK source.
For beginners, we recommend starting with the backup of the current firmware. TWRP Select Backup, mark all partitions (except Cache) and save backup to SD-It's a card or a PC, and it'll save you if you don't get a firmware failure.
π‘
Always check for compatibility with the santoni model and Android version before installing custom firmware. For example, firmware for Android 10 will not work if your Redmi 4X runs Android 7/8.