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:
- Go to Settings β About Phone β MIUI version. Press 7 times on the line to activate Developer Mode.
- Return to Settings β Additional β For developers and enable USB Debugging and OEM Unlock (the latter item may not be available on some firmware).
- 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:
- Link your Mi Account: Go to Settings β Mi Account and log in. Enable data sync and confirm phone number/email.
- 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?
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 version | Recommended TWRP | Download link | Notes |
|---|---|---|---|
| MIUI 10-11 (Android 8-9) | 3.3.1-0 (official) | twrp.me | Supports FBE encryption. |
| MIUI 12 (Android 10) | 3.5.2_9-0 (informal) | XDA-Developers | Fixed the error with /data mounting. |
| MIUI 13-14 (Android 11-12) | 3.7.0_12-0 (patched) | Telegram channel | Requires deactivation of dm-verity. |
Instructions for installing TWRP:
- Download the.img file for your version of MIUI and rename it to twrp.img.
- Move the file to the folder with the platform-tools (where adb and fastboot are installed).
- Turn off the phone and turn it into Fastboot mode (Loud down + Power).
- Run the command: fastboot flash recovery twrp.img
- 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:
- Download Magisk: Official Upk: GitHub Magisk. Or use Magisk Delta (fork with additional features) to bypass anti-rollback.
- 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.
- 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:
- Install Magisk Manager (or Magisk Delta if you used a fork).
- Run it and make sure that Installed: 26.1 (26100) (or your version) is displayed in the status.
- Download Root Checker from Play Market and do the check.
Typical problems and their solutions:
| Problem. | Reason. | Decision |
|---|---|---|
| Magisk doesn't define root | Inactive magiskhide module | Turn on the MagiskHide option in the Magisk settings and restart. |
| Constant reboots (bootloop) | Conflict with dm-verity or encryption | Please. disable_dm-verity_forceencrypt.zip and re-install Magisk. |
| Banking applications are not working | Root detection via SafetyNet | Install Universal SafetyNet Fix in Magisk. |
| No network after firmware | Resetting IMEI or modem settings | Restore 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
- Download the stock firmware for your model and extract boot.img (for example, via Mi Flash Tool or 7-Zip).
- Move boot.img to your phone and in Magisk Manager, select Install β Select and Patch a File.
- 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
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:
- In Magisk Manager, select Uninstall β Complete Uninstall. or surf Magisk-uninstaller.zip via TWRP.
- Stock recovery: Download the official Fastboot ROM firmware for your model and execute: fastboot flash recovery recovery.img
- 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).