Xiaomi Redmi 4X (codenamed santoni) remains a popular budget smartphone even years after its release. However, over time, official MIUI support ends, and users face slowdowns, lack of security updates or the desire to install custom firmware like LineageOS or Pixel Experience. Flashing allows the device to return to its former performance, but requires accuracy β errors can turn the phone into a βbrickβ.
In this guide, we will look at all the steps from unlocking the bootloader to installing firmware through Fastboot or TWRP Recovery. We will focus on the nuances specific to the Redmi 4X, such as the problem with the incorrect operation of the proximity sensor after firmware custom software or the need to use old versions of the Mi Flash Tool tools (new often do not recognize the device), and you will find a firmware compatibility table and answers to frequent questions about restoring the IMEI or resetting the Anti-Rollback counter.
Preparation for Flashing: What You Need to Know Before You Start
Redmi 4X flashing is not just about downloading a file and pressing a button, but it has a few pitfalls to learn about in advance:
- π Blocked bootloader. Xiaomi blocks the ability to install unofficial software by default. Unlocking requires binding Mi Account and waiting (sometimes up to 720 hours!).
- π Anti-Rollback protection, if you stitch through the version MIUI older than the current one, the phone may be locked. β The phone. β Version. MIUI.
- π Battery charge. The process can take up to 30 minutes - make sure the charge is at least 60 percent, or you risk getting a discharged phone in the middle of the firmware.
- πΎ Backup. Firmware erases all data, including photos in internal memory. Use Mi PC Titanium Backup or Suite (requires root).
Also check out your device! Redmi 4X came in several versions:
| Model | Code name | 4G support | Features of firmware |
|---|---|---|---|
| Redmi 4X (Global) | santoni | Bands 1/3/5/7/8/20 | Official global firmware available on Xiaomi website |
| Redmi 4X (China) | santoni | Bands 1/3/5/7/8 | Requires manual installation of Google Services |
| Redmi 4X (India) | santoni | Bands 1/3/5 | Dual VoLTE support, but limited frequency set |
β οΈ Attention: If your Redmi is 4X purchased in China (domestic version), after firmware MIUI Mobile data may stop working. Solution: installing a ModemFix patch through TWRP.
Unlocking the bootloader: Step 1 on the way to freedom
Without an unlocked bootloader, you can't install custom recovery or alternative firmware. Xiaomi has made it harder in recent years, but for the Redmi 4X, it's still working.
- Download the Mi Unlock Tool from the official website (version is not newer than 5.5.228.30 β newer devices may not support older devices).
- Sign in to your Mi Account on your phone and in the program (should be the same account!).
- Put the phone in Fastboot mode: turn it off, then press Volume down + Power.
- Connect to your PC and start unlocking in the Mi Unlock Tool.
You will likely see a waiting message (usually 168-720 hours) that is reset when:
- π Re-flashing the official MIUI via Fastboot.
- π± Changing your Mi Account on your phone.
- β³ Reboot your phone in Fastboot mode without connecting to a PC.
β οΈ Note: If you see a "Couldn't unlock" error with code 86006 or 86012, it means that your account is not tied to the device. β Additionally. β For developers β Mi Unlock status and re-connect your account.
π‘
If the unlock timer is accidentally reset, try connecting the phone to another one. USB-port (preferably 2.0) or use the original Xiaomi cable.Some users have solved the problem by disabling the antivirus on the PC.
Install TWRP Recovery: Your Key to Custom Firmware
TWRP (Team Win Recovery Project) is an alternative recovery that allows you to install informal firmware, backup and restore the system. Redmi 4X has two current versions:
- π± Official (from the team) TWRP) β Supports data encryption, but may not work properly with some custom cores.
- π οΈ Modified (e.g. from OrangeFox) β adds advanced features like screen brightness control to recovery.
Installation instructions:
- Download the latest version of TWRP for santoni from the official website (file with the extension.img).
- Rename the file to twrp.img and place it in the folder with ADB/Fastboot.
- Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp.img
- Immediately after that, do: fastboot boot twrp.img (this will load the phone into TWRP to prevent the recovery of stock MIUI from overwriting).
βοΈ Pre-installing check TWRP
β οΈ Attention: If after installation TWRP The phone is loaded into stock recovery, so MIUI Solution: After the fastboot flash recovery command, download it immediately. TWRP and select Reboot from the menu β Recovery. Then go to Mount. β Enable MTP And copy the file to the phone. disable_forced_encryption.zip (search the forum XDA), Then you can run it through. It'll turn off the coercive encryption that's interfering with the work. TWRP.
Firmware selection: official MIUI vs custom builds
It all depends on your goals:
| Type of firmware | Pluses | Cons | Recommendation |
|---|---|---|---|
| Official MIUI (Stable) | Maximum stability, OTG support, all camera features work | Slowdown over time, advertising in system applications | For everyday use |
| Official MIUI (weekly) | New features, bug fixes faster | Possible critical errors, fast battery discharge | For enthusiasts ready for bugs |
| LineageOS | Clean Android, no ads, regular updates | Some functions do not work, for example, IR-blaster) | For stock Android fans |
| Pixel Experience | Google Pixel interface, good optimization | There may be problems with the camera (no HDR+ mode) | For Pixel fans |
| Havoc-OS | Maximum customization, support for Substratum | Less stable than LineageOS | For experienced users |
For official MIUI, download firmware only from the official website or Xiaomi Firmware Updater. Look for firmware on XDA Developers (Redmi 4X section).
What is Anti-Rollback and why is it important for the Redmi 4X?
Fastboot Firmware: Method for Official MIUI Builds
This method is suitable for installing stock MIUI and recommended by Xiaomi.
- π» Windows PC (on) Linux/Mac There may be problems with drivers).
- π Firmware in.tgz format (unpack it into a folder).
- π οΈ Mi Flash Tool (2018.5.18.0) β Newer ones donβt support Redmi 4X).
Step-by-step:
- Install Qualcomm HS-USB QDLoader 9008 drivers (search the network if the Mi Flash Tool does not see the device).
- Unpack the firmware in a folder without Cyrillic characters (for example, C:\MIUI\).
- Start the Mi Flash Tool, select the folder with the firmware.
- Connect your phone in Fastboot mode (clip Volume Down + Power).
- In the Mi Flash Tool, press Refresh β the device must be defined as COMX.
- Select firmware method: Clean all β clean (recommended). Clean all and lock β clean + lock the bootloader (only if you want to return the phone to stock state).
Flash
π‘
If the Mi Flash Tool freezes in the βwaiting for deviceβ stage, try: 1) reconnect the phone to another device. USB-port; 2) run the program on behalf of the administrator; 3) disable driver signature verification in Windows.
Firmware through TWRP: installing custom assemblies
This method is suitable for installing LineageOS, Pixel Experience or other custom firmware.
- β Installed TWRP Recovery (see section above).
- β Downloaded firmware in.zip format (do not unpack!).
- β Downloaded GApps package (if firmware without Google Services). 4X Pico or nano is a good option.
- β Backup done through TWRP (Backup menu, select Boot, System, Data).
Instructions:
- Boot to TWRP: Turn off the phone, press Volume up + Power.
- In TWRP, select Wipe β Advanced Wipe and mark: Dalvik / ART Cache System Data Cache Then swipe for confirmation.
- Return to the main menu, select Install and specify the path to the firmware file.
- After installing the firmware (don't restart!), install GApps (if necessary).
- Optionally, if the firmware requires Magisk to root, install it at this stage.
- Select Reboot System.
β οΈ Note: If after firmware custom software stopped working sensors (for example, proximity sensor or gyroscope), download and run through TWRP patch santoni-sensors-fix.zip. It can be found on the forum. XDA smack-in.
Solving problems after firmware
Even if you install it properly, you can have problems, and here are the most common ways to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| Phone not turned on (black screen) | Incorrect firmware or interrupted process | Repeat the firmware through Fastboot with the choice of Clean all |
| No mobile network (IMEI reset) | The modem or nvram partition is damaged | Restore IMEI via SN Write Tool or run the stock modem via TWRP |
| Fast battery discharge | Unoptimized firmware or background processes | Install a kernel with improved power management (e.g. FrancoKernel) |
| The camera is not working (Cannot connect to camera) | No drivers or conflict with GApps | Sweep the patch. Camera2API_enabler.zip Or reinstall firmware without GApps |
| Phone overheats | Too high frequency of the processor in the custom core | Install Kernel Adiutor and limit the maximum frequency |