How to install MIUI 12 on Xiaomi Redmi 4X: secure upgrade with unlock and TWRP

Introduction: Should I upgrade to MIUI 12 on Redmi 4X?

Xiaomi Redmi 4X (codenamed santoni) came out in 2017 with MIUI 8 powered by Android 6.0 Marshmallow, but even years later the device is capable of running on the latest versions of the shell. MIUI 12 brings modern design, improved multitasking and privacy features that were never officially intended for this model. However, installing custom firmware is a risky process, especially if you are the first to encounter unlocking the bootloader and recovery.

In this article, we will discuss three officially supported installation methods. MIUI 12 on the Redmi. 4X: via Fastboot, TWRP and OTA-Update (if you are already on the MIUI We will focus on preparation, from backup to choosing the right firmware version. Importantly, Android 10 firmware for santoni exists only in informal builds, and MIUI 12 on Android 9 is the most stable option for this device.

Before you start, answer two questions: Are you prepared for the possible loss of warranty (if it still exists) and do you understand the risks of β€œbricking” the phone?

1. Device preparation: Backup and unlocking of the bootloader

The first and most critical step is unlocking the bootloader. Without that, no custom firmware will install. On the Redmi 4X, this process takes up to 72 hours due to Xiaomi's policy, so start with it in advance.

What you'll need:

  • πŸ”Œ Charging at least 60% – interruption of the process due to battery discharge leads to a brick.
  • πŸ’» Windows computer (for Mi Unlock Tool) or Linux/macOS (alternative methods).
  • πŸ“± Mi Account linked to phone (required with a confirmed number!).
  • πŸ”§ USB-cable (preferably original, without damage).

Steps to unlock:

  1. Enable Developer Options: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Return to Settings β†’ Additional β†’ For developers and activate OEM Unlock and USB Debugging.
  3. Download Mi Unlock Tool (version no lower than 5.5.224.30).
  4. Connect your phone in Fastboot mode (click Volume Down + Power) and follow the program instructions.

⚠️ Note: If the Mi Unlock Tool shows a "Couldn't verify device" error, check that Factory Unlock is included in the For Developers (on some versions). MIUI hidden).

Linked to Mi Account on phone

USB debugging and OEM unlocking enabled

Download the Mi Unlock Tool of the latest version

The phone is charged at least 60%

Installed drivers Xiaomi on PC-->

2. Selection of firmware: official ports vs custom assemblies MIUI 12

Redmi 4X doesn't have official MIUI 12, only ported versions from the community.

  • 🌍 Xiaomi.eu – stable weekly builds with minimal bugs, but without Google services (you need to install separately).
  • πŸ› οΈ MIUIPro – Optimized firmware with additional chips (for example, advanced battery settings).
  • πŸ”§ LineageOS + MIUI 12 Themes – An Alternative for Those Who Want a Clean Android with Visuals MIUI.

Recommended versions for Santoni:

Type of firmwareAndroid versionDownload linkFeatures
MIUI 12 by Xiaomi.eu9.0 PieDownloadStable, without blobate, but requires separate installation of GApps
MIUI 12 Pro9.0 PieXDAAdditional performance settings, but camera bugs are possible
MIUI 12 Global (unofficial port)10.0 QSourceForgeAndroid 10, but less stable (Bluetooth problems)

If you want maximum stability, take Xiaomi.eu on Android 9. If you want to experiment, try the port on Android 10, but be prepared for bugs. Note: Android 10 firmware may not support Android 9's TWRP, you'll need a separate recovery!

MIUI 12 by Xiaomi.eu (Android 9)

MIUI 12 Pro (Castom Assembly)

Port MIUI 12 on Android 10

Another (I will write in the comments)-->

3. Installation of TWRP: without it, nowhere

TWRP (Team Win Recovery Project) is a custom recovery that will allow you to flash MIUI 12. For the Redmi 4X, there are two current versions:

  • πŸ“± TWRP 3.5.2 - for firmware on Android 9.
  • πŸ“± TWRP 3.6.0 for Android 10 firmware (but may not work with some ports) MIUI 12).

Installation instructions:

  1. Download the official TWRP image for Santoni.
  2. Rename the file to twrp.img and place it in the folder with fastboot (from Platform Tools).
  3. Connect your phone in Fastboot mode and execute the command: fastboot flash recovery twrp.img fastboot boot twrp.img
  4. After loading into TWRP Do not reboot to the system – immediately go through Disable_Dm-Verity_ForceEncrypt.zip (Otherwise, the phone will be stuck on the logo).

⚠️ Attention: If after installation TWRP The phone does not load in recovery, make sure you downloaded the version for santoni, not for rolex (Redmi). 4A) Also make sure that the fastboot team doesn't have any typos.

πŸ’‘

If TWRP asks for a password when you download it, which means that you have encryption on, so you can turn it off before you install it. TWRP perform reset to factory settings via standard recovery (clip Volume Up). + Nutrition).

4. Step-by-step installation of MIUI 12 via TWRP

Now that you have the bootloader unlocked and you have TWRP installed, you can start the firmware, and it's important to follow the exact sequence to avoid errors.

Algorithm of action:

  1. Download the selected firmware (for example, xiaomi.eu_multi_HM4X_MI12_V12.0.1.0.QFMCNXM_v12-9.zip) and place it on the internal memory or SD-map.
  2. Load to TWRP (Loudness Up + Nutrition).
  3. Complete the full vape (except internal memory!): Wipe β†’ Advanced Wipe β†’ Dalvik / ART Cache, System, Data, Cache
  4. Install firmware: Install β†’ choose ZIP-file β†’ Swipe to Confirm Flash.
  5. If the firmware is without GApps, immediately swipe OpenGapps-arm-9.0-pico.zip (for Android 9).
  6. Reboot β†’ System: The first boot can take up to 15 minutes!

Frequent mistakes and decisions:

  • 🚨 Error 7 is a mismatch in the model of the device.
  • 🚨 Error 255 - damaged ZIP-Download the firmware and check the checksum (MD5).
  • 🚨 Logo obsession MI β€” Force Encrypt hasn't been disabled. Disable_Dm-Verity_ForceEncrypt.zip.
What if the phone doesn’t load after the firmware?
1. Boot to TWRP (Loudness up + Power). 2. Delete /data/system/gesture.key and /data/system/locksettings.db (if any). 3. Run Wipe β†’ Format Data (this will delete all data, but often solves the problem). 4. Reflash the firmware. If it doesn't work, try another version of MIUI 12 or return to the stock firmware via Fastboot.

5. Alternative method: Firmware via Fastboot

If TWRP refuses to work or you prefer a clean installation, you can flash MIUI 12 through Fastboot, a method suitable for official ports (such as Xiaomi.eu) that are distributed as.tgz archives.

Instructions:

  1. Download fastboot-rom for your model (for example, for the first time, xiaomi.eu_multi_HM4X_V12.0.1.0.QFMCNXM_v12-9-fastboot.tgz).
  2. Unpack the archive in a folder with Platform Tools (must be files) images/ and flash_all.sh).
  3. Connect your phone in Fastboot mode and launch the script: flash_all.bat (for Windows or./flash_all.sh (for Linux/macOS).
  4. Wait until it is completed (the process will take 5-10 minutes).

Advantages of the method:

  • βœ… Less risk of errors (firmware is on the official scenario).
  • βœ… Not required TWRP.
  • βœ… The possibility of obtaining OTA-Updates (if the firmware supports).

Disadvantages:

  • ❌ Complete data reset (as opposed to OTA-renewal TWRP).
  • ❌ Not all custom firmware is available in fastboot-version.

πŸ’‘

Fastboot firmware is the most reliable way for beginners, as it eliminates errors associated with TWRP. However, this method always erases all data on the phone, so backup is a must!

6.Configure MIUI 12 after installation: optimization and bug fix

After a successful firmware, you have to set up the initial setup and possibly fight bugs.

Mandatory steps:

  • πŸ”„ Update all apps through the Play Market (especially Google Services).
  • πŸ”‹ Calibrate the battery: fully discharge and charge the phone 2-3 times.
  • πŸ“‘ Set up a network: in Settings β†’ SIM-Maps and mobile networks select the preferred network type (e.g, 4G instead 3G).
  • πŸ›‘οΈ Disable unnecessary permissions for system applications (such as Mi Browser or Mi Video).

Typical bugs and their solutions:

Problem.Reason.Decision
The camera's not working.Driver incompatibilityInstall a patch for the camera via TWRP
Fast battery dischargeMIUI background activityDisable Auto Sync and Google Play Services Battery Optimization
Bluetooth is not working.Firmware bug on Android 10Return to Android 9 or use Bluetooth Auto Connect from Play Market
No sound in the headphones.Failure in audio_policy.confSlice the fix for sound.

Performance tip: In Settings β†’ Special features β†’ Windows resolution set a value of 480 DPI – this will reduce the load on the processor and save battery power.

7.Shockback to stock firmware: if something went wrong

If MIUI 12 is unstable or you don’t like the changes, you can return the original firmware from Xiaomi.

  • πŸ“₯ Stock firmware for Redmi 4X (for example, MIUI 11 Global Stable).
  • πŸ”§ Mi Flash Tool (for Fastboot firmware).
  • πŸ”„ Patience – the process can take up to 20 minutes.

Step-by-step:

  1. Download fastboot-rom for your model (for example, for the first time, santoni_global_images_V11.0.2.0.PFMMIXM_20200310.0000.00_9.0_global_4a1a7a7b3d.tgz).
  2. Unpack the archive in a folder without spaces in the name (for example, C:\santoni_stock).
  3. Install the Mi Flash Tool.
  4. Connect your phone in Fastboot mode and in the Mi Flash Tool, select the folder with the firmware.
  5. Press Refresh, then Flash. At the bottom, select clean all.
  6. After completion, the phone will reboot to the stock firmware.

⚠️ Warning: After rolling back on the stock firmware, the bootloader will remain unlocked. To return everything "like from the factory", you will need to re-lock it through the Mi Unlock Tool (but this will delete all data and may require a wait of 72 hours).

FAQ: Answers to Frequent Questions

Can I install MIUI 12 on Redmi 4X without unlocking the bootloader?
No, any unofficial firmware requires an unlocked bootloader, and the only way to upgrade without unlocking is to wait until the official bootloader is available. OTA-Update: But for Redmi 4X He's gone).
Will I lose data when I install MIUI 12?
Yes, 99% of the time, even if you upgrade through TWRP without a Wipe, it is recommended to make a full backup (for example, through Titanium Backup or Swift Backup β€” OTA-Renewal within a single branch (e.g, MIUI 11 β†’ MIUI 12 from one developer).
Which version of MIUI 12 is the most stable for the Redmi 4X?
According to user reviews, the most stable build is MIUI 12 by Xiaomi.eu (Android 9) version V12.0.1.0.QFMCNXM. It is devoid of critical bugs, supports Google services and has a minimum amount of bloat.
Can I use it after installation? MIUI 12 OTA-update?
Yes, but only if you have installed firmware that supports OTA (e.g. official ports from Xiaomi.eu) Custom builds (e.g. from independent developers) do not usually support automatic upgrades.
How to get root rights back after installing MIUI 12?
After the firmware MIUI 12 You will need to re-shoot Magisk through the TWRP: Download the latest version Magisk.zip. Boot in. TWRP and sew ZIP-File. Reboot. Check root through Magisk Manager. Attention: Some builds MIUI 12 Magisk may not work because of SafetyNet. In this case, try the Universal SafetyNet Fix module.