Root rights to Xiaomi Redmi Note 5: a complete guide with unlocking the bootloader and installing Magisk

The Xiaomi Redmi Note 5 (codenamed whyred) is still a popular device among customization enthusiasts, despite the release of new models. Getting root rights gives you access to deep system configuration, removing firmware, installing modified firmware, and even restoring β€œbricks” after unsuccessful experiments. However, the process of obtaining a root on this smartphone has nuances, from the mandatory unlocking of the bootloader to choosing the right version of TWRP and bypassing the recoil mechanisms of MIUI.

In this article, we’ll take a look at the 2026 root rights process, taking into account the latest Xiaomi security updates, how to avoid common bugs (e.g., Fastboot error: remote: oem unlock is not allowed), which versions of TWRP are compatible with your firmware, and how to properly flash Magisk to keep data from being lost.

⚠️ Warning: Procedure violates Xiaomi warranty, blocks the possibility of using official updates by air (OTA) It increases the risk of security vulnerabilities on some firmware (e.g, MIUI 14 with a March 2023 patch) may require additional anti-rollback protection bypass.

1. Device preparation: backup and compatibility check

Before you start manipulating root rights, it is critical to save all the data. Even if you successfully unlock the bootloader, Xiaomi resets the device to the factory settings.

  • πŸ“± Local Copy: Transfer photos, videos and documents to your PC via MTP (in file transfer mode. For contacts and SMS Swift Backup (requires a temporary root if you already have access).
  • ☁️ Cloud Storage: Sync your data with Google Drive or Mi Cloud (but note that once you unlock your Mi Account binding will reset!).
  • πŸ”§ IMEI Serial number: Write them down (you can find them in Settings) β†’ Phone or box, useful for network recovery after reset.

Next, check the firmware version and the status of the bootloader:

  1. Go to Settings β†’ About Phone β†’ MIUI version. Press 7 times on the line to activate Developer Mode.
  2. Return to Settings β†’ Additional β†’ For developers and enable USB Debugging and OEM Unlock (the latter item may not be available on some firmware).
  3. Connect your phone to your PC and execute the command in the terminal: adb devices If the device is displayed, type: adb shell getprop ro.boot.verifiedbootstate The result of orange means that the bootloader is already unlocked; green – locked.

πŸ’‘

If the β€œOEM Unlock” option is not in the settings, upgrade to the latest version of the firmware via MIUI Updater or use an alternative method of unlocking through Fastboot (described in the next section).

2. Unlock the bootloader: bypassing the restrictions of Xiaomi

Xiaomi has imposed strict restrictions on unlocking a bootloader, requiring a Mi Account to be linked and waiting up to 720 hours (30 days) for new devices, but for the Redmi Note 5 (released in 2018), this period is often reduced to 168 hours (7 days) or not at all if the device is already activated in the Mi Account.

To unlock, follow the steps:

  1. Link your Mi Account: Go to Settings β†’ Mi Account and log in. Enable data sync and confirm phone number/email.
  2. Request unlock: Download the official Mi Unlock Tool (at least 5.5.224.30) Launch it on behalf of the administrator, log in to the same Mi Account as on your phone. Connect Redmi Note 5 in Fastboot mode (turn off the phone, then press Volume down + Power).

Waiting and confirming:

The utility will show a waiting timer (for example, 168 hours). If the timer is missing, try unlocking immediately. If you fail, try again in 24 hours.

What if the Mi Unlock Tool can’t see the device?
1. Install Xiaomi Fastboot drivers manually through Device Manager (download at xiaomiflashtool.com). 2. Try another one. USB-port (preferably) USB 2.0 back-panel). 3. Disable the antivirus, it can block the Mi Unlock Tool. 4. Use a virtual machine with Windows 7, if 10/11 fallacies.

Important: Once the bootloader is successfully unlocked, the phone will automatically reset to factory settings, and all data will be deleted, including the link to the Mi Account.

3. Selection and installation of TWRP Recovery

There are several versions of TWRP for the Redmi Note 5 (whyred), but not all of them are compatible with the latest MIUI 12-14 firmware. Using an inappropriate version can lead to soft-brick (cyclic reboot) or the inability to flash Magisk.

Recommended versions of TWRP:

MIUI versionRecommended TWRPDownload linkNotes
MIUI 10-11 (Android 8-9)3.3.1-0 (official)twrp.meSupports FBE encryption.
MIUI 12 (Android 10)3.5.2_9-0 (informal)XDA-DevelopersFixed the error with /data mounting.
MIUI 13-14 (Android 11-12)3.7.0_12-0 (patched)Telegram channelRequires deactivation of dm-verity.

Instructions for installing TWRP:

  1. Download the.img file for your version of MIUI and rename it to twrp.img.
  2. Move the file to the folder with the platform-tools (where adb and fastboot are installed).
  3. Turn off the phone and turn it into Fastboot mode (Loud down + Power).
  4. Run the command: fastboot flash recovery twrp.img
  5. Immediately after the firmware, go to TWRP, holding Volume Up + Power (otherwise the system will overwrite recovery!).

Launch TWRP faultless|Mounting of sections /data and /system|No password request for encrypted storage|The possibility of creating a backup-->

4. Magisk firmware for root rights

Magisk is a universal tool for obtaining root rights without changing the systemless root. Magisk 26.1+ is suitable for the Redmi Note 5, but you need to disable forced encryption before installing it, otherwise the phone will get stuck on the MIUI logo after restarting.

Step-by-step:

  1. Download Magisk: Official Upk: GitHub Magisk. Or use Magisk Delta (fork with additional features) to bypass anti-rollback.
  2. Preparation for TWRP: V TWRP Go to Wipe. β†’ Format Data (this will remove encryption, but also all data!) Download disable_forceencrypt.zip (For example, from here and run it through Install.
  3. Install Magisk: Sweep the Magisk-v26.1.zip file through Install to TWRP. Reboot to the system (the first download can take up to 10 minutes).

Official (topjohnwu)|Magisk Delta|KernelSU|Another (to be posted in the comments)|Not yet installed-->

⚠️ Note: If after Magisk firmware, the phone loads into Fastboot or produces a bootloop error, then the dm-verity has not been disabled:

1. Return to TWRP (Loudness up + Power upload). 2. Sweep Magisk-uninstaller.zip (download on GitHub). 3. Install DM-Verity Disabler (such as this zip). 4. Re-sweep Magisk.

5. Root rights verification and solution of typical problems

After successful installation of Magisk, check the functionality of root rights:

  1. Install Magisk Manager (or Magisk Delta if you used a fork).
  2. Run it and make sure that Installed: 26.1 (26100) (or your version) is displayed in the status.
  3. Download Root Checker from Play Market and do the check.

Typical problems and their solutions:

Problem.Reason.Decision
Magisk doesn't define rootInactive magiskhide moduleTurn on the MagiskHide option in the Magisk settings and restart.
Constant reboots (bootloop)Conflict with dm-verity or encryptionPlease. disable_dm-verity_forceencrypt.zip and re-install Magisk.
Banking applications are not workingRoot detection via SafetyNetInstall Universal SafetyNet Fix in Magisk.
No network after firmwareResetting IMEI or modem settingsRestore the IMEI via QCN or run the stock modem into TWRP.

πŸ’‘

If Google Pay or Netflix stop working after obtaining root rights, install the MagiskHide Props Config module and configure the masking for a certified device.

6. Update of the firmware with root rights

Update MIUI On the device with root-rights need to be careful: official OTA-Updates can result in the loss of root or bootloop:

  • πŸ“₯ Download the full firmware package: Use Xiaomi Firmware Updater to download Fastboot ROM or recovery ROM For your model (whyred). Avoid incremental updates (OTA) β€” They often break Magisk.
  • πŸ”„ Update through TWRP: Sweep through the new firmware through Install β†’ Install Image (select your choice) system.img and vendor.img). After the update, re-sweep Magisk (version must match the new firmware!).
  • ⚠️ Anti-Rollback Protection: At MIUI 12+ If you flash the firmware older than the current one, the phone will lock. β†’ The phone. β†’ All specifications β†’ The kernel version.

⚠️ Note: If after the update Magisk stopped working, and in the logs TWRP The error is invalid magisk image, so the new firmware has changed the structure. boot.img. Decision:

1. Extract. boot.img from a new firmware (for example, through the Mi Flash Tool). 2. Send it to Magisk Manager and create a patch file (Patch Boot Image). 3. Sweep the resulting file through fastboot flash boot magisk_patched.img.

7. Alternative methods of root production (without TWRP)

If TWRP installation is difficult (e.g. due to anti-rollback), you can get root through patching boot.img or using KernelSU. These methods are less versatile, but work on the latest versions of MIUI.

Method 1: Patching boot.img via Magisk

  1. Download the stock firmware for your model and extract boot.img (for example, via Mi Flash Tool or 7-Zip).
  2. Move boot.img to your phone and in Magisk Manager, select Install β†’ Select and Patch a File.
  3. Copy the patch file (magisk_patched.img) On PC and run it through fastboot: fastboot flash boot magisk_patched.img

Method 2: KernelSU (for Android 12+ firmware)

  • πŸ› οΈ A custom core is required: KernelSU is built into the system kernel, so you need to flash the modified kernel (for example, from here).
  • πŸ”§ Installation: Flow the kernel with KernelSU through TWRP Install KernelSU Manager from GitHub. Activate root in the app settings.
The advantages of KernelSU over Magisk
1. Android 12+ support without conflicts with Zygisk. 2. Less problems with SafetyNet (some banking applications work without additional fixes). 3. Built-in support for modules (analogue of Magisk Modules). 4. Compatible with GKI (Generic Kernel Image) on new firmware.

8. rollback of changes and restoration of stock firmware

If you need to return the phone to its original state (for example, for sale or warranty repair), follow the following steps:

  1. In Magisk Manager, select Uninstall β†’ Complete Uninstall. or surf Magisk-uninstaller.zip via TWRP.
  2. Stock recovery: Download the official Fastboot ROM firmware for your model and execute: fastboot flash recovery recovery.img
  3. Stock MIUI firmware: Use the Mi Flash Tool in clean all mode (removes all data!). or swipe Recovery ROM through stock recovery (keep Volume up + Power when booting).

Locking the loader:

Follow the command:

fastboot oem lock

⚠️ Warning: This will delete all data and return dm-verity! Once the bootloader is locked, re-unlocking will require waiting. 7-30 days.

If the phone doesn't boot after running a stock MIUI, or if it gives an error This MIUI version cannot be installed on this device, you're trying to flash the firmware with a lower version of the anti-rollback.

1. Find firmware with the same or newer version of anti-rollback (check in the file name, for example, V12.5.1.0.RFECNXM). 2.If the stock firmware doesn't help, flash Fastboot ROM Use the Mi Flash Tool in clean all and lock mode. 3. EDL-Mode (requires an authorized Xiaomi account and Qualcomm boxing).

FAQ: Frequent questions about root on Redmi Note 5

❓ Can I get root without unlocking the bootloader?
No, on all Xiaomi devices with 2017 Years (including Redmi Note) 5) Unlocking the bootloader is mandatory for custom recovery or modification installation boot.img. Bypasses (e.g., through vulnerabilities in the MIUI) Closed in the latest security updates.
❓ Why does the phone not see after Magisk firmware? SIM-map?
It's about the dump. IMEI or damage to modem files (modem.img). Solutions: Restore IMEI through the engineering menu (##4636## β†’ Information) or QCN-Backup, run the stock. modem.img and fsg.mbn from the official firmware. Check the network settings in Settings β†’ SIM-maps and mobile networks.
❓ How to Update Magisk on New Firmware?
If you're up to date MIUI through OTA or recovery ROM, Magisk is likely to fly.To restore root: Download the new version of Magisk (e.g., Magisk, Magisk-v26.4.zip). Flush it through. TWRP patch boot.img from a new firmware. TWRP It does not work, use fastboot boot. magisk_patched.img For a temporary root, then install Magisk in the system.
❓ Can I hide root from banking applications?
Yes, but it requires additional action: In Magisk, turn on Zygisk and Enforce DenyList. Add banking apps (e.g. SberBank Online, Tinkoff) to DenyList. Install modules: Universal SafetyNet Fix (to passNet); Magisk Safety Props Config (to disguise as a certified device). After that, restart the phone and check the status of SafetyNet in the YASNAC app.
❓ What to do if after all the manipulations the phone does not turn on?
Symptoms and Solutions: Symptoms Cause Black screen solution, no reaction to Hard-brick buttons (damage bootloader) Recovery through EDL-mode (requires Qualcomm box or an authorized Xiaomi account) Download to the logo MIUI Bootloop: Magisk conflict with dm-verity disable_dm-verity_forceencrypt.zip through TWRP. Constant download in Fastboot is not available boot.img or recovery, stitch the stock boot.img and recovery.img The phone vibrates when turned on and off Damaged modem or persist modem.img, fsg.mbn and persist.img If nothing helps, please refer to the Redmi Note XDA-Developers section. 5 fault-logged.