How to install custom firmware on Xiaomi Redmi 4X

Owners of the legendary Redmi 4X (codenamed santoni) still appreciate this device for its autonomy and reliable processor Snapdragon 435. However, official support for the device has long ceased, and the latest version of MIUI no longer receives security updates. It is at this point on the scene come custom firmware that can give the smartphone a second life, updating Android to the current versions.

Installing third-party software is not just about changing wallpapers, it's about deep modifications. You'll need to follow the instructions exactly, have the original cable, and have a basic understanding of how ADB and Fastboot work. Don't be afraid of the challenges, because the development community has created many stable builds that run even faster than runoff.

Any interference with the device’s software code could theoretically render it inoperable, although Xiaomi, with its unlockable bootloader, has minimal chances of turning the phone into a brick if the rules are followed. The process of unlocking the Xiaomi bootloader officially takes 7 to 168 hours of waiting after filing.

Preparation of the device and the necessary software

The first step is to build an arsenal of tools, and you don't need random cables from a desk drawer, you need quality. USB-A cable that can transmit data, not just charge the battery, and you will also need a Windows computer, as most of the utilities for Xiaomi are sharpened for this platform.

You need to install special drivers on your smartphone. Without them, your computer won't see the device in firmware mode. They're usually installed automatically with platform tools, but sometimes you need to manually install them through your Device Manager. Make sure that the phone has USB debugging enabled, which is in the hidden menu for developers.

To activate the hidden menu, you need to click on the build number several times in the About section, and then the "Developers" option will appear in the additional menu, where you need to activate USB Debugging, which is a key point without which further manipulation is impossible.

  • πŸ“± Original. USB-Micro-USB cable (preferably short).
  • πŸ’» PC or laptop with Windows 7/10/11.
  • πŸ”‹ Charge device at least 60% to avoid shutdown.
  • πŸ“‚ Backup of all important data to the cloud or PC.

⚠️ Warning: Before starting any work, make a full backup of contacts and photos. During the flashing process, the internal memory will be completely cleared.

Unlocking the bootloader (Unlock Bootloader)

Without an unlocked bootloader, installing a custom TWRP recavator is impossible. Xiaomi requires you to link your Mi Account to your device and wait for a certain deadline. This is a security measure that, however, becomes a barrier for enthusiasts.

The process begins with registering for the Mi Community forum and applying for an unlock, and after approval (which can come instantly or in a week), you need to log into the same account on your smartphone via the Mi Unlock Status menu, only after that you can run the utility on your computer.

Put your phone in Fastboot mode, pressing the power and volume buttons simultaneously. Connect the cable to your PC and launch the Mi Unlock Tool. The program will check the status of the device and, if all conditions are met, allow unlocking. If the status of "Locked", you will have to wait for the timer to end.

β˜‘οΈ Checking before unlocking

Done: 0 / 4

It is worth noting that once the bootloader is unlocked, Find My Device and some banking applications may not work properly without additional security settings, and a warning will appear on the boot screen that the device is unlocked, which can only be removed by re-shrouding, which will make it impossible to install the modified software.

Installation of TWRP recavery

Xiaomi's regular recovery has extremely limited functionality and does not allow third-party zip archives to be installed. So replacing it with Team Win Recovery Project (TWRP) is a must. There are several versions of TWRP for Redmi 4X, but the 3.x.x version is considered the most stable version.

The recovery image file (twrp-3.x.x.x-santoni.img) needs to be placed in the folder with the ADB tools. Then, while in Fastboot mode, the firmware command is executed through the command line. It is important not to restart the phone in the usual way after recording the image, otherwise the regular recovery will overwrite TWRP.

fastboot flash recovery twrp-3.x.x.x-santoni.img


fastboot boot twrp-3.x.x.x-santoni.img

The second command in the code above forcibly runs the recavator that you just installed, and if you just reboot the device with the buttons, you lose access to the TWRP and have to repeat the process of firmware again, a common novice error that leads to confusion.

  • πŸ“₯ Download the current img file TWRP for santoni.
  • πŸ–₯️ Open up. CMD file ADB-driver.
  • ⚑ Run the firmware command and immediately load command.
  • 🚫 Do not do a regular reboot before installing the firmware.

⚠️ Attention: If after installation TWRP The phone does not see internal memory (reflects 0) MB), It's normal for first runs on new versions of Android. Data formatting will solve the problem, but delete all files.

Selection and installation of custom firmware

The choice of operating system for Redmi 4X is great. Users can choose pure Android in the form of LineageOS, functional Pixel Experience or optimized Xiaomi.eu. Each build has its own characteristics: somewhere better camera, somewhere higher autonomy.

The installation process is universal for all Android-based builds. TWRP You need to do a full Wipe reset, and you select the Dalvik, Cache, System, and Data partitions, and you don't need to touch the Internal Storage partition if the firmware file is there, but you'd better use an external memory card or MTP-regime.

πŸ“Š Which firmware do you prefer?
LineageOS (Pure Android)
Xiaomi.eu (Modified MIUI)
Pixel Experience (Google Services)
ArrowOS (Easiness and Speed)

Once cleaned, we go to the Install menu and select the firmware archive. The swipe to confirm starts the process. If you plan to use Google services and the firmware does not contain them by default (GApps), you need to flash the OpenGApps package to the corresponding version of Android immediately after you have run the OS firmware, without restarting.

Type of firmwareBasisStabilityFor whom?
LineageOSAOSPTall.Fans of pure Android
Xiaomi.euMIUIVery high.MIUI shell fans
Pixel Exp.AOSPMediumGoogle Design Lovers
ArrowOSAOSPTall.Owners of weak devices

Special attention should be paid to firmware. Some custom builds require pre-installing a specific modem firmware layer and core system. If the ROM instructions state that you need to update firmware, this should be done primarily through TWRP, otherwise the phone can go into an endless restart (bootloop).

System setup and optimization

After a successful installation and a first run, which can last up to 10 minutes, you will be put into a customized system, but for maximum comfort, it is worth doing a number of optimizations, especially for energy management, since custom cores can behave differently from stock kernels.

It is recommended that root-rights apps like Magisk be installed if they are not built into firmware, allowing specific modules to run and hiding superuser rights from banking applications, and without hiding root rights, many financial applications will not work.

Magisk's secrets
MagiskHide Props Config allows you to change system properties, for example, to certify a device in Google Play if the certification is reset after unlocking the bootloader.

You also need to adjust the screen settings and the frequency of the touchscreen survey. In Redmi 4X, the IPS screen, and properly calibrating colors through the engineering menu or third-party apps can greatly improve the picture. Remember to turn off unused animations in the developer settings to speed up the interface.

  • πŸš€ Enable the "High Performance" mode in the battery settings.
  • πŸ”’ Set up MagiskHide for banking applications.
  • 🎨 Calibrate the display through the engineering menu.
  • πŸ“‘ Check the work. GPS Bluetooth.

⚠️ Note: When using Magisk modules, make sure they are compatible with your version of Android.Version mismatch may result in a cyclical reboot.

Possible mistakes and ways to solve them

The process of modifying a smartphone rarely goes perfectly smoothly for all users. Most often, driver errors occur when the computer stops seeing the phone in Fastboot or Fastboot mode. ADB. The solution lies in reinstalling drivers or changing USB-port USB 2.0.

If the phone has gone to bootloop, don't panic. Go to TWRP and try doing Wipe Data/Factory Reset. If that didn't work, it's possible that the firmware file was corrupted when you downloaded it, and you need to download it again, checking the checksum.

πŸ’‘

If the TWRP stopped opening and the phone loads into a stock receptacle, try booting into TWRP via the fastboot boot recovery.img command from your computer and then reflashing it again.

Camera or flashlight problems are often solved by flashing the persist partition or installing a patch, but be careful with the persist partition – damage to it can lead to loss of sensor calibration, which is difficult to restore without a backup.

What if the Mi Unlock Tool can't see the phone?
Make sure you have the right Qualcomm or Xiaomi drivers installed USB Driver. Try another one. USB-cable, preferably original. Also check if debugging is included USB whether the regime is selected MTP Sometimes it helps to reinstall the utility on behalf of the administrator.
Is it safe to use custom firmware for banking applications?
Yes, but only if there are hidden root rights. Using Magisk Hide and masking modules allows you to bypass security checks. However, if the bootloader is unlocked, some applications (such as Google Pay in some regions) may not work regardless of the cloaking.
Can I return to the official firmware after the custom?
Yes, it's possible. You need to download the official Fastboot firmware for your model and region, then use the Mi Flash Tool to clean everything, restore the factory state, and that will automatically lock the bootloader if the firmware is global.

πŸ’‘

The key to success is to carefully read the instructions for your model (Santoni) and use verified files from authoritative sources such as 4PDA or XDA Developers.