How to put a root on Xiaomi Redmi 4X: a safe guide with unlocking the bootloader

Why Redmi 4X is still relevant for rooting in 2026

The Xiaomi Redmi 4X (codenamed santoni) was released in 2017, but remains one of the most popular devices for firmware experiments. The reason is simple: the combination of the Snapdragon 435, removable battery and official MIUI support until 2022 makes it the perfect platform for newcomers to the custom firmware world. Unlike Xiaomiโ€™s new models with locked bootloaders and recoil protection, the Redmi 4X allows you to get root rights even without deep knowledge โ€“ provided you follow the current instructions.

But thereโ€™s a nuance: Xiaomi has tightened its bootloader unlock policy since 2023, now requiring a Mi Account to be linked to the device and waiting 72 hours after the first tether (it used to be 360 hours of untethered waiting), which means that old guides from 4PDA or XDA forums can lead to a soft brick โ€” when the phone turns on but doesnโ€™t load beyond the logo. In this article, we took into account all the changes in 2026 and put together a working scheme for getting a root with minimal risks.

Before you start, ask yourself why you need root, if the goal is simply to remove system applications or customize the interface, maybe enough. ADB-If you want to install a custom core to overclock the processor or use Magisk for modules like this. ViPER4Android, Then read on.

Preparation of the device: what to do before unlocking

The first and most important step is data backup. Unlocking the bootloader on the Redmi 4X results in a complete hard reset, which means all photos, contacts and messages will be deleted. Use Mi Cloud or local copying to your PC via MTP. Pay special attention to:

  • ๐Ÿ“ฑ Contacts (export to.vcf via Contacts app)
  • ๐Ÿ“ธ Photo/video in folders DCIM and Pictures
  • ๐Ÿ”‘ Wi-Fi passwords (save screenshots) QR-codes from Settings โ†’ Wi-Fi)
  • ๐ŸŽฎ Save games (use Helium or manually transfer via Root Explorer if the root has already been routed)

The next step is to check the current version of MIUI. Go to Settings โ†’ About Phone โ†’ MIUI Version. To successfully unlock, a version not newer than MIUI 12.5 is recommended. If you have a MIUI 13/14, you will have to roll back through the Fastboot (instruction below).

  • ๐Ÿ”‹ Battery charge > 60%
  • ๐Ÿ”Œ Used by the original USB-cable (cheap cables can interrupt the connection)
  • ๐Ÿ–ฅ๏ธ The PC has Qualcomm drivers installed and ADB (You can download from the Xiaomi website)
๐Ÿ“Š What firmware do you plan to use after rooting?
Stock MIUI with Magisk
LineageOS
Pixel Experience
Another custom
I haven't decided yet.

Unlock the bootloader: bypass the limitations of Xiaomi 2026

The main obstacle to accessing the root is a locked bootloader. Xiaomi requires official unlocking through the Mi Unlock Tool, but since 2023 the process has become more complicated. Now it is not enough to just wait 360 hours, you need to link the Mi Account to the device and confirm ownership. Here is a step-by-step algorithm:

  1. Download the latest version of the Mi Unlock Tool from the official website (do not use the version from torrents!).
  2. Turn on the phone Developer Mode: go to Settings โ†’ About Phone and 7 times click on the MIUI version.
  3. Back to Settings โ†’ Additionally. โ†’ For developers and activate: ๐Ÿ”“ Unlocking OEM (point-of-point!) ๐Ÿ”Œ Debugging by USB

Connect your phone to your PC, confirm debugging permission, and launch the Mi Unlock Tool. Sign in with the same Mi Account as your phone.

This is where the pitfalls begin. The utility can show the error "Couldn't unlock" or "Device not supported."

Mistake.Reason.Decision
Couldn't unlock (100%)It has not been 72 hours since the account was linked.Wait 3 days, periodically sync your account in Settings โ†’ Mi Account
Device not supportedUnofficial firmware installedReverse to stock MIUI via Fastboot
Current account is different...The account on the PC and the phone do not matchReconnect your account and reboot both devices
Network errorProblems with Xiaomi serversUse a VPN (China region) or repeat later

Linking your Mi Account to your phone|Insert "Unlocking" OEM"|Install the Mi Unlock Tool|Wait 72 hours.|Connect the original USB-cable-->

If the unlock is successful, the phone will automatically reset, and you can now start installing custom recavers and Magisk, but check the bootloader status with the command before you do this.

fastboot oem device-info

The output should be Device unlocked: true. If not, repeat the process.

๐Ÿ’ก

If the Mi Unlock Tool is 50% or 99% hung, try disabling antivirus on your PC and using a USB 2.0 port (blue ports often cause problems).

Installation of TWRP and Magisk: choice of firmware and tools

With an unlocked bootloader, you have two ways:

  1. Install Magisk on MIUI stock firmware (saving all functions but with root rights).
  2. Swipe custom firmware (LineageOS, Pixel Experience) with the already built-in Magisk.

Installation process:

  1. Download TWRP.img and Magisk.zip to your phone.
  2. Reboot to Fastboot (Battery + Volume Down) and run the TWRP command: fastboot flash recovery twrp-3.7.0-santoni.img
  3. Immediately after that, go to TWRP (Loudness up + Power), otherwise the stock firmware will overheat the Recovery.
  4. In TWRP, select Install โ†’ Magisk.zip and swipe for confirmation.

After the reboot, check for the root with the Magisk Manager app or command:

su

If you run a command without errors, congratulations, you have root! If you don't, read the section on typical errors.

What to do if TWRP asks for a password?
If after installation, TWRP requests a password, it means that the /data partition is encrypted. Solution: 1. In TWRP, select Wipe โ†’ Format Data (this will delete all data!). 2. Reboot and configure the phone again. 3. Re-scan Magisk.

Common Mistakes and How to Avoid Them

Even if you follow the instructions, you can run into problems, and here are the most common ones and the ways to solve them:

โš ๏ธ Warning: If after you have firmware Magisk, the phone loads into a bootloop (cyclic reboot), don't try to reflash it right away. 10-15 Minutes โ€“ sometimes the system itself recovers after the first boot.

Problem.Probable causeDecision
The phone does not turn on after fastboot flashWrong version of TWRP or interrupted firmwareSwipe stock firmware through Mi Flash Tool in clean all mode
Magisk doesn't define a rootMagiskHide not activated or module conflictGo to Magisk settings and turn on Zygisk
No network after firmwareDamaged modem or EFSStream the stock modem.img via TWRP
TWRP does not see internal memoryIncorrect partition format /dataIn TWRP, run Wipe โ†’ Repair File System

Another common mistake is losing IMEI after firmware manipulation, which is due to damage to the EFS partition.

  • ๐Ÿ“ก Always backup. EFS into TWRP (Backup โ†’ EFS).
  • ๐Ÿšซ Don't format a section /persist โ€” it's the modem data store.
  • ๐Ÿ”„ If IMEI Lost, restore backup or use the tool QCN Rebuilder.

If you encounter an error not described here, check the logs in TWRP (Advanced โ†’ Copy Log) and look for a 4PDA solution in the Redmi 4X theme.

๐Ÿ’ก

The most common reason for bricks is firmware incompatible versions of TWRP. Always make sure the recovery version matches the code of your device (santoni).

What to do after getting a root: setup and optimization

Now that you have root, you can start optimizing the system. Here's what you should do first:

  • ๐Ÿงน Bloat Removal: Use Debloater or Manual Deletion through ADB: adb shell pm uninstall -k --user 0 com.miui.analytics List of safe packet removal MIUI can be found XDA.
  • โšก Battery Optimization: Install Greenify with Magisk Module for Aggressive Background Control.
  • ๐ŸŽต Improved sound: Sweep through the module ViPER4Android or JamesDSP via Magisk.
  • ๐Ÿ”’ Security: Disable MagiskHide for banking apps and use Island to isolate your work profile.

For advanced users:

  • ๐Ÿ”ง Core: Try custom cores like FrancoKernel for better performance.
  • ๐Ÿ–ฅ๏ธ Multiboot: Set up dual booting with MultiROM (requires a separate partition).
  • ๐Ÿ“ก Network: Activate VoLTE and ViLTE via QTI Telephony.

Remember, root rights, you lose the warranty (if it was still valid) and take responsibility for security. Regularly update Magisk and modules to avoid vulnerabilities.

๐Ÿ’ก

If Google services stop working after you delete your system applications, you can use the Magisk module called GApps Optimizer.

How to bring everything back: a rollback to stock firmware

If you need to return your phone to its original state (for example, for sale or warranty repairs), follow this instruction:

  1. Download the full stock firmware for your model from the Xiaomi Firmware Updater. For Redmi 4X, it will be a file with the.tgz extension.
  2. Unclick the firmware and place the folder in the root of the C: drive (the path should not contain Cyrillic!).
  3. Install the Mi Flash Tool and run on behalf of the administrator.
  4. Transfer the phone to Fastboot and connect to the PC.
  5. In the Mi Flash Tool, select the downloaded firmware and press Refresh. The device must be determined.
  6. At the bottom, select Clean All mode and press Flash.

It takes 5-10 minutes. Once completed, the phone will reboot to the stock firmware without root and unlocked bootloader. To lock the bootloader again (for example, for warranty), use the command:

fastboot oem lock

โš ๏ธ Attention: Locking the bootloader after rooting can lead to data loss if you don't return to the full stock firmware!

If the phone doesnโ€™t turn on after firmware, try:

  • ๐Ÿ”Œ Connect to charging for 30 minutes (sometimes helps with a discharged battery).
  • ๐Ÿ”„ Repeat the firmware in clean all and lock mode.
  • ๐Ÿ“ฑ Switch only the boot section through fastboot flash boot boot.img.

FAQ: Answers to Frequent Questions

Can I get a root on Redmi 4X without unlocking the bootloader?
No, on Redmi 4X (as on all modern Xiaomi smartphones), unlocking the bootloader is mandatory. Alternative methods like DirtyCOW exploits do not work on current versions of MIUI (after 2019), the only exception is a temporary root through ADB for individual operations, but it disappears after the reboot.
Will Google Pay and banking apps work with Magisk?
Yes, if you configure MagiskHide correctly (newer versions โ€” Zygisk + DenyList). Google Pay will also require: Install the Universal SafetyNet Fix module. Add Google Play Services and Google Pay to DenyList. Clear Google Play Services data after setting up. Banking applications (e.g. Sberbank Online) may additionally need the Riru - EdXposed module to bypass checks.
How to update MIUI after rooting?
Update MIUI via OTA after rooting is impossible โ€“ this will lead to the loss of the root or bootloop. Instead: Download full Fastboot firmware from xiaomifirmwareupdater.com. Switch them through TWRP (choose Install โ†’ Image and flash only boot.img and system.img). After upgrading, re-shore Magisk. Or go to custom firmware with regular updates (for example, LineageOS).
Can I flash Redmi 4X on Android 12/13?
Xiaomi hasnโ€™t officially released Android 12/13 for the Redmi 4X, but there are unofficial ports: LineageOS 20 (Android 13) โ€“ stable but without VoLTE. Pixel Experience 12/13 is good optimization, but there may be camera bugs. crDroid Android 12 is a balanced option with support for most features. Before firmware check reviews for 4PDA or XDA โ€“ some builds may not support dual SIM or NFC.
How to recover IMEI after a failed firmware?
If you're missing IMEI, Take steps: Check the current IMEI *#06# or adb shell service call iphonesubinfo 3. IMEI No (null), restore the backup EFS from TWRP. If there is no backup, use the tool. QCN Rebuilder: 1. Download QPST and Qualcomm drivers. 2. Connect your phone to EDL-(closing the test points or using fastboot oem edl). 3. QPST Choose Restore QCN and upload the file with the correct ones IMEI. For Redmi. 4X testpoint EDL here. โš ๏ธ Recovery IMEI Qualcomm does not work on the engineering menu (#4636##) โ€“ this is a myth!