How to flash Xiaomi Redmi 4X: official and custom firmware

Xiaomi Redmi 4X (codenamed santoni) is still a popular budget smartphone thanks to the robust Snapdragon 435 platform and the ability to install modern firmware. However, over time, official support for MIUI ends, and users face slowdowns, lack of security updates or the desire to install custom firmware like LineageOS or Pixel Experience. In this guide, we will analyze all the current ways to update Redmi 4X in 2026, from official updates to installing informal builds via TWRP.

It's important to understand that firmware is not only a way to upgrade the system, but also a risk of turning the phone into a brick if you break the process. Especially for models with a locked bootloader. In this article, you will find step-by-step instructions for each method, as well as unique solutions for errors specific to Redmi 4X (for example, the problem of checking the Mi Account after a reset or the black screen after a firmware through Fastboot). If you're a beginner, start with the official methods.

1. Firmware Preparation: What to Do Before Starting

Before you start firmware, make sure that all the preliminary steps are followed, which will save you from losing data and save time.

First, check the current version of MIUI: go to Settings โ†’ About โ†’ About โ†’ MIUI version. Write it down, it will help you choose the right firmware. For example, if you have MIUI 12.5 and want to upgrade to MIUI 14, you will need a full ROM, not an incremental one.

Second, make sure to back up. Even if you plan to upgrade without a reset, errors happen. Use the built-in Settings tool โ†’ Additional โ†’ Backup and Reset โ†’ Local backup or third-party utilities like Swift Backup.

  • ๐Ÿ“ฑ Contact (export to) VCF)
  • ๐Ÿ“ท Photos and videos (copy to PC or cloud)
  • ๐Ÿ”‘ Wi-Fi passwords (save the list of networks)
  • ๐ŸŽฎ Save games (use Google Play Games or Helium)

Finally, prepare the tools:

  • ๐Ÿ–ฅ๏ธ Computer on Windows 10/11 or Linux (for Fastboot)
  • ๐Ÿ”Œ Cable USB (preferably original, without damage)
  • ๐Ÿ”‹ Battery charge of at least 60%
  • ๐Ÿ“ Firmware (official or custom, see the next section)
๐Ÿ“Š What kind of firmware you plan to use?
Official Update via MIUI Updater
Firmware through Fastboot
Installation of custom firmware through TWRP
I haven't decided yet.

2. firmware selection: official MIUI vs custom builds

The type of firmware that determines the functionality of the phone, stability and even its lifespan, letโ€™s look at the pros and cons of each variant for the Redmi 4X.

The official MIUI is suitable for most users. It provides:

  • ๐Ÿ”„ Regular security updates (although for Redmi) 4X They're rare)
  • ๐ŸŽฏ Full compatibility with iron (camera, sensors, module) NFC)
  • ๐Ÿ” Support for Xiaomi services (Mi Cloud, Mi Account)

Cons: the presence of advertising in system applications, limited customization options, an outdated version of Android (maximum Android 7.1 Nougat in the latest builds of MIUI 12.5).

Custom firmware (e.g. LineageOS 18.1, Pixel Experience, Havoc-OS) allows:

  • ๐Ÿ†™ Update Android to version 11-13
  • ๐Ÿš€ Improve productivity through optimization
  • ๐ŸŽจ Flexibly customize the interface (dark theme, gestures, animations)

But there are risks:

  • ๐Ÿ”‹ Faster battery discharge (due to unoptimized cores)
  • ๐Ÿ“ธ Camera problems (for example, not working) HDR portrait-mode)
  • ๐Ÿ”Š Lack of Widevine certification L1 (Netflix HD not available)
CriteriaOfficial MIUICustom firmware
Android version7.1 (Nougat)11โ€“13
Security updatesNearby (until 2022)Current (monthly)
ProductivityStable but slow.Faster, but there's a possibility of bugs.
Support for banking applicationsYes (SafetyNet passing)No (Magisk required)
Complexity of installationEasy (via Updater)Difficult (needs an unlocked bootloader)

If you choose custom firmware, look for builds optimized specifically for santoni. 18.1 TheHitMan is considered one of the most stable, and you can download it on the forum. XDA Developers or in the Telegram channel @santoni_updates.

๐Ÿ’ก

Before installing custom firmware, check user reviews on 4PDA or XDA.Look for mentions of bugs with an NFC module (it often breaks on unofficial builds) and a proximity sensor (may not work during calls).

3. Unlock bootloader on Redmi 4X

Without unlocking the bootloader, you wonโ€™t be able to install custom recovery (TWRP) or flash informal firmware. Xiaomi locks the bootloader on all devices, including the Redmi 4X, so this step is a must.

The unlocking process consists of three stages:

  1. Linking your Mi Account to your device.
  2. Getting permission to unlock through Mi Unlock Tool.
  3. Directly unlock through Fastboot.

Important: Xiaomi has a restriction that you have to wait 7 days (168 hours) before unlocking your account, and you can't legally bypass this timer.

  • ๐Ÿ“ฑ The phone's debugging on. USB (Settings โ†’ The phone. โ†’ Version. MIUI (7 times press) โ†’ Developer settings โ†’ Debugging by USB)
  • ๐Ÿ”“ Two-factor authentication is disabled in the Mi Account (otherwise Tool will not see the device)
  • ๐ŸŒ Phone connected to the Internet via mobile network (Wi-Fi may not work)

Instructions for unlocking:

  1. Download Mi Unlock Tool from the official website (version no lower than 5.5.224.54).
  2. Launch the utility on behalf of the administrator and log in to your Mi Account.
  3. Connect your phone in Fastboot mode (turn off the device, then press Volume Down + Power).
  4. In the utility, press Unlock. If the "Couldn't unlock" error appears, try again in 24 hours.
What to do if the Mi Unlock Tool shows "Current account is different from the account info on the device"
This error occurs if you reset your phone or changed your Mi Account after you've linked. Solution: 1. Return your old account (if you remember the data). 2. If you don't remember, you'll have to wait 30 days from the last link (Xiaomi blocks frequent account changes). 3. The alternative is to use informal unlock methods (for example, via EDL, but this is risky and requires soldering work).

๐Ÿ’ก

Once the bootloader is unlocked, the phone will perform a full reset (wipe), all data will be deleted, including photos on internal memory.

4. Firmware through Fastboot: step-by-step instructions

The Fastboot method is suitable for installing official firmware (for example, when recovering from a crash) or custom if you already have a bootloader unlocked. For Redmi 4X, this method is more reliable than through Recovery, since it eliminates errors with the signature verification.

Files required:

  • ๐Ÿ“ Firmware in.tgz or.zip format (download from the official website or Xiaomi Firmware Updater)
  • ๐Ÿ–ฅ๏ธ Mi Flash Tool (20180528 or later)
  • ๐Ÿ”ง Qualcomm drivers HS-USB QDLoader 9008 (if Windows does not recognize the phone in Fastboot)

Instructions:

  1. Unpack the firmware in a folder without Cyrillic characters (for example, C:\santoni_fastboot).
  2. Install the Mi Flash Tool and run on behalf of the administrator.
  3. Connect your phone in Fastboot mode (clip Volume Down + Power when the device is off).
  4. In the Mi Flash Tool, click Select and specify the path to the firmware folder.
  5. Select firmware mode: Clean all - complete cleaning (recommended when changing the version of MIUI) Clean all and lock - cleaning + lock bootloader (only for official firmware!) Save user data - data storage (risky, can lead to bugs)

Flash

โ˜‘๏ธ Preparation for firmware through Fastboot

Done: 0 / 5

If the phone does not turn on after firmware or hung on the MI logo, try:

  1. Press Volume up + Power for 10-15 seconds for forced reboot.
  2. Repeat the firmware with the choice of Clean all mode.
  3. Check the integrity of the downloaded firmware (compare the MD5 hash with the official one).
How to Sweat Redmi 4X, If the Mi Flash Tool is an error "flash_all_lock.bat"
This error means that you are trying to flash the official firmware onto the unlocked bootloader with a choice of Clean all and lock mode: 1. Rename the file flash_all_lock.bat into flash_all_lock_old.bat. 2. Rename it. flash_all_except_data_storage.bat into flash_all.bat. 3. Run the firmware again.

5. Install custom firmware through TWRP

Unofficial firmware installations (such as LineageOS or ArrowOS) require custom recovery โ€“ TWRP. The official version for Redmi 4X is available on twrp.me, but we recommend using a modified build from TheHitMan (it works better with FBE encryption).

Steps to install TWRP:

  1. Download the latest twrp-3.7.0-santoni.img (check out the version on XDA or 4PDA).
  2. Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp-3.7.0-santoni.img
  3. Immediately after that, go to TWRP, holding Volume Up + Power (otherwise the system will overwrite recovery).
  4. In TWRP, go to Wipe โ†’ Format Data, type in yes and confirm (this will remove the encryption if it was).

Now you can install custom firmware:

  1. Copy. ZIP-Firmware file and (if necessary) GApps on the phone or SD-map.
  2. In TWRP, click Install, select a firmware file, and swipe for confirmation.
  3. After installing the firmware, repeat the step for GApps (if Google services are required).
  4. Run Wipe โ†’ Dalvik / ART Cache and reboot.

6.Recovery after failed firmware

If the phone stopped turning on or was stuck on the MI screensaver, don't panic. In 90% of cases, the Redmi 4X can be restored. The main thing is to correctly diagnose the problem.

Symptoms and solutions:

Problem.Possible causeDecision
Phone does not respond to buttons, screen blackFull battery discharge or EMMC failureConnect to charging for 30 minutes. If it doesn't work, swipe through EDL (requires an authorized Xiaomi account).
Hanging on the MI logoDamaged. boot.img orSweep through the official firmware via Fastboot with the choice of Clean all.
Cyclical reboot (bootloop)Conflict of modules in custom firmwareDelete /data/dalvik-cache and /cache files via TWRP.
Error "This device is locked"bootloader blocked, but tried to sew the casteUnlock the bootloader (see Section 3) and repeat the firmware.
No network after firmwareDamaged modem or EFSSweep modem.img and fsg.mbn files from the official firmware via Fastboot.

If the phone is not detected by your computer in Fastboot mode, try:

  1. Install drivers manually through Device Manager (select Qualcomm HS-USB QDLoader 9008).
  2. Use the other USB-port (preferably) USB 2.0 on the back of the PC).
  3. Press the Volume Up + Loud Down + Power for 20 seconds to force the transition to EDL.

๐Ÿ’ก

If the phone doesn't turn on even after you've run the Fastboot, check if the PMIC (power-control) module is on fire. It's a hardware malfunction, and it's not software-solved. Signs: the phone doesn't respond to charging, doesn't warm up, the screen is completely black.

7. Post-firmware optimization

After successful firmware, it is recommended to follow several steps to improve performance and stability:

For the official MIUI:

  • ๐Ÿ”ง Disable unnecessary system applications through Settings โ†’ Annexes โ†’ Application management (e.g. Mi Video, Mi Music, Browser).
  • ๐Ÿš€ Enable Developer Mode and Activate Optimize MIUI and background check RAM.
  • ๐Ÿ”‹ Calibrate the battery: completely discharge the phone, then charge to 100% without interruptions.

For custom firmware:

  • ๐ŸŽฏ Install the FrancoKernel or Perseus kernel to improve autonomy.
  • ๐Ÿ”’ Configure Magisk to pass SafetyNet (needed for banking applications):
  • ๐Ÿ“ก To improve communication, edit the file /system/build.prop (Root is required by adding lines: ro.telephony.default_network=22 persist.radio.modem.sarc=1

If NFC does not work after custom firmware firmware, try:

  1. Swipe separately the file nfc.img from the official firmware via Fastboot: fastboot flash nfc nfc.img
  2. Install the NFC Fix for Santoni module via Magisk.

FAQ: Frequent questions about Redmi firmware 4X

โ“ Can I get Redmi to flash? 4X loader-free?
Yes, but only official updates via MIUI Updater or Recovery. For custom firmware and TWRP, unlocking is mandatory. Except for firmware via EDL, but this requires an authorized Xiaomi account and special hardware.
โ“ Why After Fastboot Firmware Phone Asks for Login from Old Mi Account?
It's FRP-Factory Reset Protection works if you reset your phone without detaching your account. Solutions: Enter your old account details (if you remember). If you don't remember, contact Xiaomi with proof of purchase. EDL Deleting the frp partition (risky, may lead to blocking) IMEI).
โ“ What is the most stable custom firmware for Redmi 4X 2026?
According to user reviews on 4PDA and XDA, the best options are LineageOS 18.1 (Android 11) - maximum stability, but without GMS. Pixel Experience 12 (Android 12) - close to the Android stock, but there are possible camera bugs. Havoc-OS 4.10 (Android 11) - many customizations, but increased battery consumption. LineageOS with separately installed NikGApps (Basic variant) is recommended for everyday use.
โ“ How to get the official back MIUI post-stitch?
To return to the official firmware: Download the fastboot firmware for santoni from the official website. Sweat it through the Mi Flash Tool with Clean all and lock mode (this will block the bootloader back). If the bootloader has already been unlocked, after the firmware is installed, perform in Fastboot: fastboot oem lock Attention: this will lead to a complete reset and can cause problems with the Mi Account if the phone was tied to another region.
โ“ Why does not the approximation sensor work after the firmware?
This problem is typical for custom firmware on Redmi 4X. Solutions: Sweat persist.img from the official firmware: fastboot flash persist persist.img Install the "santoni Sensors Fix" module through Magisk. Check if the sensor is closed with a protective film or case. If nothing helps, go back to the official MIUI or try another custom firmware.