Xiaomi Redmi 4X (codenamed santoni) remains a popular budget smartphone even years after its release. However, over time, the regular MIUI firmware begins to slow down and updates from the manufacturer stop coming, firmware through the computer allows you to install a fresh version of MIUI, custom software like LineageOS or even restore the βbrickβ after unsuccessful experiments.
This guide will take a look at everything from tool preparation to final system setup, and weβll look at formal and informal methods, as well as critical nuances that are often overlooked in standard guides, such as how to get around MiFlash: βCanβt find deviceβ or what to do if your phone isnβt detected in Fastboot mode.
Important: the procedure requires unlocking the bootloader, which resets all data. If you have never worked with ADB or Fastboot, we recommend that you first familiarize yourself with the basic concepts, this will save you from typical errors.
1. Preparation for firmware: what will be needed
Before you start, you can assemble everything you need, and even if you don't have one component, you can interrupt the process at a critical stage.
- π± Smartphone Xiaomi Redmi 4X with a battery charge of at least 60% (preferably 80%), and discharge during firmware leads to a brick".
- π» Computer on Windows 7/10/11 (64-bit). Nana macOS/Linux Possible problems with MiFlash drivers.
- π Original. USB-Cheap cables often don't transmit data to Fastboot.
- π§ Programs: MiFlash Tool (official firmware tool) ADB & Fastboot (Google package) Xiaomi Drivers (download automatically when connected or manually here)
- π Firmware: Official MIUI (stable or development) from Xiaomi.Castom firmware (e.g. LineageOS 16 for santoni) from the forum XDA.
Downloaded firmware files are usually.tgz or.zip. Unpack them into a folder without Cyrillic characters (e.g., C:\MIUI\rom).
β οΈ Note: If you are running custom software, make sure it is compatible with the Redmi model. 4X (santoni.Redmi firmware installation 4/4A/4 Prime will cause the device to fail.
2 Unlocking the bootloader: a mandatory step
Xiaomi blocks the bootloader on all devices. Without it, Fastboot firmware is impossible. The process takes 3 to 360 hours (depending on Xiaomi's policy) and requires a Mi Account to be linked.
Instructions:
- Activate Developer Mode: Go to Settings β About Phone. Tap 7 times on MIUI until the notification βYou are a developerβ appears.
- Enable USB debugging: Return to Settings β Additional β Developer. Activate USB debugging and OEM unlock.
- Link your Mi Account: In the same menu, find Mi Unlock Status and click Add Account and Device. Sign in to your Xiaomi account (if not, sign up).
- Download the Mi Unlock Tool and run it on behalf of the administrator.
- Connect the phone in Fastboot mode (turn off the device, then press Volume down + Power until the hare appears in the eardress cap).
- In the program, click Unlock and wait until it is completed. If you receive a message to wait, wait for the specified time (usually 168 hours for new accounts).
β οΈ Warning: Once the bootloader is unlocked, the smartphone will completely reset. back up the data via Mi Cloud or locally on your PC.
What if the Mi Unlock Tool canβt see the device?
3. Selection of firmware: official vs custom
The type of firmware depends on the functionality and stability of the device. Let's consider the pros and cons of each option:
| Type of firmware | Advantages | Deficiencies | Recommendations |
|---|---|---|---|
| Official MIUI (Stable) | Maximum compatibility with iron OTA-Updates are available for all functions (NFC, IR-blaster.) | Lots of Bloatware (pre-installed apps) Ads in system menu Delays with security updates | The Best Choice for Everyday Use |
| Official MIUI (Development) | New features before stable version Fewer bugs than custom firmware | Possible errors Frequent updates (once a week) | For enthusiasts ready for small bugs |
| LineageOS (Pixel Experience) | Clean Android without ads Longer supported updates More features for customization | It may not work. NFC, IR-blaster, camera No OTA-Updates (must be hand-stitched) Risk of unstable operation | For experienced users who need a βcleanβ Android |
For Redmi 4X, the official firmware is divided into:
- Global (for the international market, support for Google services).
- China (without Google services, but with a lot of MIUI features)
- EEA (for Europe, compliant with GDPR)
The critical nuance is that if you're running a China version on a global model (and vice versa), the network may disappear after the firmware is run, and you'll need to flash modem separately.
π‘
Before you run custom software, check on the XDA forum to see which features donβt work. For example, LineageOS 16 for santoni may not have a camera running correctly, and Pixel Experience may have NFC.
4. Firmware through MiFlash: step-by-step instructions
This method is suitable for installing the official MIUI. If you have chosen custom firmware, skip this section and go to the firmware via TWRP.
Install Xiaomi drivers|Unpack the firmware in a folder without spaces|Disable the antivirus|Charge the phone. >60%|Connect the original USB-cable
-->
Steps:
- Turn off the phone and put it in Fastboot mode (clip Volume Down + Power).
- Connect the device to a PC. Android Bootloader Interface should appear in Device Manager.
- Run MiFlash on behalf of the administrator.
- Click Select and point the way to the folder with unpacked firmware.
- At the bottom of the window, select firmware mode: Clean all β complete cleaning (recommended when changing the version of MIUI); Clean all and lock β cleaning + lock the bootloader (only if you complete experiments); Save user data β data storage (not always working correctly).
Refresh
Redmi 4X
Flash
If the process is suspended during the waiting for the device:
- π Reconnect. USB-cable.
- π§ Reinstall drivers manually through Device Manager (select Android Bootloader Interface driver from MiFlash folder).
- π₯οΈ Try another PC (sometimes the problem is in conflict with others) ADB-driver).
β οΈ Warning: If the phone doesn't turn on after 15 minutes, don't panic. The first turn on after Clean all can take up to 20 minutes. If after that time the screen remains black, repeat the firmware by selecting a different mode (Clean all and lock often helps with freezes).
5. Install custom firmware through TWRP
Custom firmware (LineageOS, Pixel Experience, HavocOS, etc.) requires custom recavers - usually TWRP. The official version for Redmi 4X can be downloaded here.
Instructions:
- Download TWRP for santoni (file with.img extension).
- Move the downloaded file to a folder with ADB (e.g., C:\platform-tools).
- Open the command prompt in this folder (Shift + right click β Open the PowerShell window here).
- Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp-3.7.0_9-0-santoni.img fastboot boot twrp-3.7.0_9-0-santoni.img (Replace the file name with the current one).
- The phone will reboot to TWRP. Backup the current firmware (Backup β Select partitions β Swipe for confirmation).
- Transfer the custom firmware file (.zip) to your phone or flash drive.
- In TWRP, select Wipe β Advanced Wipe and select Dalvik / ART Cache System Data Cache
Swipe for confirmation.
Install
Reboot System
The first turn on can take up to 10 minutes. If the system does not load for more than 20 minutes, repeat the steps, making sure that:
- π The firmware is compatible with Santoni.
- π You have made Wipe all of the sections mentioned.
- π Firmware file is not damaged (check checksum) MD5).
π‘
Custom firmware often requires additional patches, such as Open GAPPS for Google services in LineageOS (choose arm64 β pico for Redmi 4X).
6. Solving common errors
Even with the correct following of the instructions, problems can arise, and let's look at the typical errors and how to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| MiFlash:"Can't find device" | No drivers or conflict with others ADB-device | Remove all Android devices in Device Manager. Reinstall drivers from the MiFlash folder. USB-port. |
| Fastboot:"FAILED (remote: device is locked)" | The bootloader is not unlocked | Return to the step with the Mi Unlock Tool and wait until the unlock is completed. |
| TWRP:"Unable to mount /data" | Encrypted data section (if password was set) | In TWRP, select Wipe β Format Data, enter Yes and confirm. |
| The phone does not turn on after the firmware | Incompatible firmware or interrupted process | Repeat the firmware with Clean all. If it doesn't work, run the China version of MIUI, then the global version. |
| No network after firmware | Switched version for another region (for example, China on the global model) | Sweat modem from your regionβs stock firmware through TWRP. |
If none of the methods worked, try to sew through EDL-(Access loading mode) This will require:
- Special cable (EDL cable) or closing contacts on the board.
- MiFlashPro or QFil.
- Firmware in.mbn format (can be extracted from the official.tgz).
β οΈ Attention: Firmware through EDL β If you're not sure about your skills, you can go to the service center if you're not sure about your skills.
7. System optimization after firmware
After successful firmware, it is recommended to follow several steps to improve performance and stability:
- π§ Disable unnecessary services: Go to Settings β Annexes β Application management: Disable pre-installed services (Mi Video, Mi Music, Mi Browser, etc.) if you are not using them.
- β‘ Activate Performance Mode: Enable Settings β Battery β Performance mode. Turn off animation: in Settings β About the phone tap 5 times on the version MIUI, then in Settings β Additionally. β For developers, install Windows animation = 0.5x.
- π‘οΈ Set up security: Update Google Play Protection in Settings β Google β Security: Set a strong password or pattern lock (do not use it) PIN β easier to pick up).
For custom firmware (LineageOS, etc.):
- Install Magisk for root rights (download Magisk.zip and run through TWRP).
- Set up SELinux in Permissive mode (if some features donβt work).
If after the firmware noticed overheating or rapid discharge of the battery:
- Check the active processes in Settings β Battery β Battery use.
- Calibrate the battery: completely discharge the phone, then charge to 100% without interruption.
- If the problem persists, run the kernel with optimized settings (e.g., FrancoKernel for santoni).