How to get root rights to Xiaomi Redmi 4X: from unlock to Magisk

Why is Redmi 4X still relevant for rooting?

Xiaomi Redmi 4X (codenamed santoni) was released in 2017, but remains popular with customization enthusiasts, due to its balanced hardware (Snapdragon 435, 3GB of RAM in the top version) and active community support. In 2026, the device can still be turned into a performance device for specific tasks, from running retro games through emulators to being used as a server for IoT devices.

However, getting the root rights to the Redmi 4X is a nuanced task today. Xiaomi has long since closed the official ability to unlock the bootloader through the Mi Unlock Tool for older models, and most guides on the network contain outdated links to firmware and utilities. In this article, current methods for 2026, including bypassing the restrictions of MIUI, choosing between Magisk and SuperSU, as well as solving typical errors like Fastboot OEM unlock with code 86006.

Before you start, answer a key question: Why do you need root? If the goal is simply to remove embedded apps or disable ads in MIUI, there may be enough alternative methods without the risk of β€œbricking” the device.

πŸ“Š Why do you want to root on Redmi? 4X?
Install custom firmware
Remove Bloatware (built-in garbage)
Overclock the processor/GPU
Use Magisk modules (e.g. ViPER4Android)
Other

Preparation: What to do before unlocking

The process of obtaining root on Redmi 4X consists of three mandatory steps: unlocking the bootloader, installing a custom recap (TWRP) and flashing Magisk or other root package. Skipping any step or incorrect sequence of actions will lead to data loss or complete failure of the device.

List of requirements:

  • πŸ“± Redmi Smartphone 4X with a battery charge of at least 70%. Use the original cable USB Type-C: Cheap analogues can interrupt data transfer to fastboot.
  • πŸ’» Computer running Windows 10/11 (for Mi Unlock Tool or Linux/macOS (Virtual machines are not recommended due to driver problems.
  • πŸ”§ Utilities: ADB & Fastboot (latest version), Mi Unlock Tool (if available), TWRP for santoni (version 3.7.0 or later), Magisk v26+.
  • πŸ“ Backup data. Unlocking the bootloader erases everything, including photos in internal memory and application settings.

Pay special attention to the MIUI version. At the time of writing (2026), the latest stable firmware for Redmi 4X is MIUI 12.5.8 based on Android 7.1.2. If you have a newer version installed (for example, ported MIUI 14), the process may be different. Check the version in Settings β†’ About Phone β†’ MIUI version.

⚠️ Attention: If your Redmi is 4X When purchased in China (domestic version), unlocking the bootloader may not be possible without a Chinese Mi Account with a linked number. +86.This will require a bypass. EDL-The mode (described in the section on errors).

Step 1: Unlock the bootloader (bootloader)

Xiaomi locks the bootloader on all devices by default. The official way to unlock is through the Mi Unlock Tool utility, but it doesn't always work for the Redmi 4X. Below are the current methods for 2026.

Method 1: Official (if available)

1. Enable Developer Options: Go to Settings β†’ About Phone and 7 times click on MIUI Version.

2. Return to Settings β†’ Additional β†’ For developers and activate:

  • πŸ”“ Unlocking OEM (It may not be available on new versions. MIUI).
  • πŸ”Œ Debugging by USB.

3. Link your Mi Account to your device in Settings β†’ Xiaomi Account. Without this, Mi Unlock Tool will not allow unlocking.

4 Download the Mi Unlock Tool from the official website (version 5.5.224.30 or later) and run it on behalf of the administrator.

5. Connect your phone in fastboot mode (turn off the device, then press Volume Down + Power) and follow the instructions of the program. If you see the Couldn't unlock 86006 error, move to alternative methods.

Method 2: EDL bypass (for locked devices)

If the official method does not work, you will need firmware through EDL-This method is risky, because if you make a mistake, the device can turn into a brick. Use it only if you make a mistake:

  • πŸ”„ You have a backup copy of persisting and NVRAM (Losing them will lead to problems with IMEI net).
  • πŸ› οΈ You are ready for the possible loss of the guarantee (if it is still valid).

For EDL entry:

  1. Turn off the phone.
  2. Press Volume Up + Volume Down and connect the USB cable to the PC.
  3. Hold the buttons for 10-15 seconds until the display goes out (this is a sign of EDL login).

Next, you will need to flash the device through the Mi Flash Tool using an authorized Xiaomi account (for older devices, you can find workarounds on the 4PDA or XDA Developers forums).

β˜‘οΈ Checklist before unlocking the loader

Done: 0 / 5

Step 2: Installation of TWRP Recovery

When the bootloader is unlocked, you need to install customized recovery. Redmi 4X recommends using TWRP 3.7.0 from developer brunof1983 (available on XDA). Alternative versions may not support File-Based Encryption (FBE) encryption, which will lead to errors in /data mounting.

Installation instructions:

  1. Download the twrp-3.7.0-santoni.img file and rename it to recovery.img for convenience.
  2. Place the file in the folder with ADB & Fastboot.
  3. Connect your phone in fastboot mode and execute the command: fastboot flash recovery.img
  4. After successful firmware reboot to the Recovery team: fastboot boot recovery.img

If after the reboot you see a stock recavator MIUI, So, the recovery has been replaced when you boot it (the protection function of Xiaomi) to avoid this, immediately after you log in. TWRP execute:

  • πŸ“ Go to Mount. β†’ System and tick it.
  • πŸ”§ Get in Advanced. β†’ File Manager and delete the file /system/recovery-from-boot.p (Or rename it to recovery-from-boot.bak).
  • πŸ”„ Reboot back to the RecavΓ©rie.

⚠️ Attention: If after installation TWRP The phone is getting stuck on the Redmi logo more 10 So, the software is incompatible with your version. MIUI. Try another build. TWRP or stitch the stock boot.img via fastboot for recovery.

Step 3: Getting root rights through Magisk

Magisk is the most reliable way to get root on modern devices, as it supports SafetyNet (allowing you to use banking applications) and a modular system. For Redmi 4X, Magisk v26.1 or later is suitable.

Step-by-step:

  1. Download the latest Magisk-v26.1.zip from GitHub.
  2. Transfer the archive to your phone (for example, to your phone). SD-map ADB push).
  3. Download to TWRP and select Install β†’ Select Magisk.zip β†’ Swipe to Confirm Flash.
  4. After installation, reboot to the system.

To check if the procedure is successful, install the Magisk Manager app (available in Releases on GitHub) and run SafetyNet. If Basic Integrity: True is the status, then root is working correctly.

If the phone is fixated on boot animations after the reboot, then the firmware core is incompatible with Magisk.

  • πŸ”„ Boot in. TWRP and sew Magisk-uninstaller.zip.
  • πŸ“₯ Download. boot.img for your version MIUI (You can get it out of the firmware through the Mi Flash Tool).
  • πŸ› οΈ Send. boot.img On PC and run the command: magisk patch boot.img (file magisk_patched.img will appear in the same folder).
  • πŸ”§ Fastboot: Fastboot Flash Boot magisk_patched.img

πŸ’‘

If Magisk does not pass SafetyNet, install Universal SafetyNet Fix via Magisk Manager to bypass checks in banking applications and games.

Alternative Rooting Methods Without TWRP

Not all users need full root rights, and if your goal is simply to remove embedded apps or disable ads in MIUI, consider these methods:

MethodWhat's the point?Risks.Difficulty
ADB AppControlRemoving System Applications Without RootCould disrupt MIUI's work.⭐⭐
Shizuku + App OpsBlocking permissions for applicationsRequires ADB connection⭐⭐⭐
Custom firmware (such as LineageOS)Clean Android without BloatwareLoss of MIUI functions (e.g., design themes)⭐⭐⭐⭐
Xposed Framework (outdated)Deep customization of the systemIncompatible with new versions of Android⭐⭐⭐⭐⭐

For the use of ADB AppControl:

  1. Connect your phone to a PC with USB debugging enabled.
  2. Follow the command: adb shell pm uninstall -k --user 0 com.miui.analytics (replace com.miui.analytics with the desired application package).

List of safe to remove MIUI packets:

  • πŸ—‘οΈ com.miui.analytics – Xiaomi Analytics.
  • πŸ—‘οΈ com.xiaomi.midrop - Mi Drop (if not used).
  • πŸ—‘οΈ com.miui.hybrid – Hybrid services (may disrupt the work of the themes).
What happens if you remove the system application?
Deleting critical packets (e.g. com.android.phone) will result in network loss or looped loading. Always backup through adb backup before deleting.

Typical errors and their solutions

Even with the exact instructions, there can be problems, and below are the most common rooting errors in Redmi 4X and how to fix them.

Fastboot OEM unlock: FAILED (remote: oem unlock is not allowed)

Xiaomi has blocked the unlock for your region or MIUI version.

Decision:

  • πŸ”„ Try to re-shoot an older version. MIUI (for example, MIUI 10) via Mi Flash Tool, then re-unlock.
  • πŸ“‘ Use it. VPN Hong Kong or Singapore with Mi Unlock Tool.
  • πŸ› οΈ If nothing helps, look for it. EDL-Authorization on forums (paid or free).

2.TWRP does not see internal memory (Data decrypted successfully, but files are not displayed)

Reason: TWRP is incompatible with FBE encryption in your version of MIUI.

Solution: Squeeze TWRP 3.7.0 with FBE support or format /data to TWRP (Warning: this will erase all data!).

3.The phone does not boot after installing Magisk (Bootloop)

Reason: Incompatibility of patched boot.img with the firmware core.

Decision:

  • πŸ”§ Stitch the original boot.img fastboot.
  • πŸ“₯ Download the firmware for your model with Xiaomi Firmware Updater.
  • πŸ”„ Repeat the patching. boot.img via Magisk.

πŸ’‘

If your mobile data or Wi-Fi has stopped working after rooting, check the /system/etc/firmware file.

What to do after getting root?

Now that you have root rights, you can customize the Redmi 4X completely. Here are some useful steps:

  • πŸš€ CPU overclocking: Install the Kernel Adiutor and increase the frequency of the Snapdragon 435 to 1.6 GHz (standard - 1.4 GHz!
  • 🎡 Sound enhancement: Module ViPER4Android Magisk adds equalizer and surround effects.
  • πŸ”‹ Battery Optimization: Disable unnecessary services through Greenify or BBS (BetterBatteryStats).
  • πŸ“± Custom firmware: Try LineageOS 17.1 (Android 10) or Pixel Experience for pure Android.

For custom firmware installation:

  1. Download firmware in.zip format (for example, with XDA or 4PDA).
  2. Flush it through TWRP (don’t forget to make Wipe β†’ Format Data if you’re switching from MIUI to AOSP).
  3. Install GApps (if the firmware is without Google services) and Magisk.

Warning: custom firmware based on Android 10+ can run slower than MIUI, due to the weak iron Redmi 4X. The best choice is Havoc-OS or CrDroid, optimized for budget devices.

FAQ: Frequent questions about the Redmi 4X rooting

Can I get root without unlocking the bootloader?
No. On the Redmi 4X (as with all modern Xiaomi), unlocking the bootloader is mandatory for Magisk or SuperSU installation. Alternative methods like KingRoot don't work on MIUI and may contain malicious code.
How to return the warranty after rooting?
Officially, no. Xiaomi cancels the warranty when unlocking the bootloader. However, you can: Swipe the stock firmware through the Mi Flash Tool (select clean all). Lock the bootloader with fastboot oem lock (risky - can lead to a blink!). Remove traces of Magisk through the MagiskHide Props Config module. Note: the service center can check the status of the bootloader through fastboot oem device-info.
Why does Magisk not pass SafetyNet?
Since 2023, Google has tightened checks. Solutions: Install Universal SafetyNet Fix. Change the device's fingerprint through MagiskHide Props Config (select a certified device like the Pixel 4). Disable Enforce DenyList in the Magisk settings.
Can I update my MIUI after rooting?
Yes, but with reservations: Updates through OTA It is better to download full firmware (.tgz) from Xiaomi Firmware Updater. After the update, you need to re-switch Magisk (or patch a new one). boot.img). If the update ends with an error E:unknown command [log] into TWRP β€” Please use the Mi Flash Tool.
How to recover IMEI after a failed rooting?
Loss of loss IMEI occurs when the partition is damaged NVRAM. You can restore it like this: Download the stock firmware for your model and extract the file. nvram.bin (It's usually in images. SP Flash Tool Download Only (Mediatek only, but Redmi) 4X Snapdragon!! for Snapdragon use QCN-file QPST (An authorized Qualcomm account is required if IMEI zero-point (00000000), a recovery does not help – contact the service center (indicate that the phone did not turn on after the update).