How to get root rights on Xiaomi Redmi 5: a safe way to unlock the bootloader

Getting root rights to Xiaomi Redmi 5 (codenamed rosy) opens up access to hidden Android features, but requires caution. This smartphone, released in 2018, is still popular due to its balanced characteristics: Qualcomm Snapdragon 450 processor, 2-4 GB of RAM and a battery of 3300 mAh. However, the manufacturer blocks the possibility of modifying the system – without unlocking the bootloader and properly selected tools, you risk turning the device into a β€œbrick”.

In this article, we will discuss three officially supported root rights methods: through Magisk (recommended), SuperSU (obsolete but working) and custom TWRP reclaims. Special attention will be paid to preparation - from backup data to checking the firmware version. Redmi 5 with MIUI 14 and later requires an additional patch to bypass the anti-Rollback protection, otherwise the device will lock after firmware.

Before you get started, answer the key question: why do you root? If the goal is to remove embedded applications or change system fonts, just unlock the bootloader. For deep modifications (such as kernels or modules) you will need a full root with Magisk. Remember: Xiaomi warranty is canceled after unlocking, and some banking applications (such as SberBank Online) may stop working.

πŸ“Š Why you want to get root on Redmi 5?
Removal of embedded software
Installation of custom firmware
Game modifications (e.g. GFX Tools)
Processor/GPU overclocking
Other

1.Device preparation: backup and verification of MIUI version

The first step is to save all the data. The root procedure will require factory resets, and a firmware error can lead to file loss. Use Mi Mover (an application built into MIUI) or third-party tools like Swift Backup (requires root for a full backup, but is suitable for copying user data).

Check out the current version of MIUI:

  1. Go to Settings β†’ About Phone β†’ MIUI version.
  2. Remember the build number (e.g., V14.0.5.0.TEGMIXM).
  3. Check the official firmware list for Redmi 5 (Rosy model).

⚠️ Attention: If your version MIUI Now, it's more new than the one available for download on Xiaomi, you'll need to downgrade through Fastboot. It's risky -- if you don't choose the right firmware, you'll get Anti-Rollback protection, and the device will lock forever.

Save contacts and SMS to Google Cloud

Copy photos/video on PC

Record IMEI (type *#06#)

Disable Find My Device in your Mi Account

Charge your phone to at least 60%

-->

Make sure that the phone is enabled debugging by USB:

  1. Go to Settings β†’ About Phone and 7 times click on the MIUI version to activate the Developer Mode.
  2. Back to Settings β†’ Additionally. β†’ For developers.
  3. Activate USB Debugging and OEM Unlock (the latter may not be available on newer versions of MIUI).

2 Unlock the bootloader: the official way through Mi Unlock

Xiaomi blocks the bootloader on all devices, so without it unlocking, installing custom recavers or Magisk is impossible.Using the official Mi Unlock Tool, but note: the process takes up to 720 hours (30 days) of waiting due to Xiaomi's security policy.

Download Mi Unlock Tool from the official website (Windows version). Install Qualcomm and ADB drivers via Android SDK Platform-Tools. Connect Redmi 5 to your PC in Fastboot mode (turn off your phone, then press Volume Down + Power).

Start the Mi Unlock Tool and follow the steps:

  1. Sign in with the same Mi Account as you do on your phone.
  2. Connect the device in Fastboot mode (should be displayed in the program).
  3. Click Unlock. If you see a message about your account being linked to your device, wait for the specified time (usually 168 or 720 hours).

⚠️ Warning: If you see an error "Couldn't unlock. Current account is different from the account info on the device," you've had a reset or account change on your phone. β†’ Mi Account β†’ Synchronize and try again in 7 days.

What if the Mi Unlock Tool can’t see the device?
1. Check that the phone is actually in Fastboot mode (a screen with a rabbit and the words "Fastboot"). 2. Install the drivers manually through Device Manager (select "Qualcomm" HS-USB QDLoader 9008”). 3. Try another one. USB-cable (original from Xiaomi) and port USB 2.0 (on some PCs) USB 3.0 does not work). 4. Disable the antivirus - it can block the Mi Unlock Tool.

3. Installation of custom TWRP Recovery: an alternative to the standard

After unlocking the loader can be flashed TWRP β€” squashing-up that will allow you to install ZIP-Magisk or SuperSU files. For Redmi 5, use the version TWRP from the official website or a verified build from OrangeFox.

Download the file. twrp-3.7.0_9-0-rosy.img And you put it in a folder with a platform-tool. Open the command line in this folder and do it:

fastboot flash recovery twrp-3.7.0_9-0-rosy.img


fastboot boot twrp-3.7.0_9-0-rosy.img

If TWRP doesn’t start, try an alternative method:

  1. Sweat TWRP through fastboot as above.
  2. Immediately after the firmware (without disabling USB!) run the command: fastboot oem reboot-recovery
  3. If the phone boots into a standard recave, repeat the process with another TWRP file.

⚠️ Note: On some versions MIUI post-fix TWRP The standard recap is automatically restored, so to avoid this, immediately after loading into the TWRP Go to Mount. β†’ System and delete the file /system/recovery-from-boot.p (if it exists).

πŸ’‘

If TWRP asks for a password when downloading, it means that data encryption is enabled. Solution: before you run the recovery firmware, turn off encryption in settings (Settings β†’ Security β†’ Encryption) or format /data via TWRP (Lose all data!).

4. Getting root rights through Magisk: the safest method

Magisk is a modern alternative to SuperSU that hides root from banking apps and supports deep customization modules. Download Magisk's latest stable release (e.g. Magisk-v26.4.zip) from GitHub.

Installation instructions:

  1. Copy the Magisk-v26.4.zip file to your phone or flash drive.
  2. Boot to TWRP (turn off phone, press Volume up + Power).
  3. In TWRP, select Install β†’ Select Magisk.zip β†’ Swipe to Confirm Flash.
  4. After installation, reboot to the system.

Check for root using the Magisk Manager app (should appear in the menu) or commands in the terminal:

su

If you see a superuser invitation (#), root is installed successfully.

⚠️ Attention: On Redmi 5 s MIUI 13+ Magisk may not work due to DM-Verity protection.Solution: After installing Magisk, run the file. disable_dm-verity_forceencrypt.zip (You'll find it on the forum. XDA Developers).

πŸ’‘

Magisk allows you to hide root from specific applications (for example, banking) through the MagiskHide function. Activated in the Magisk Manager settings in the Configuration section.

5. Alternative methods: SuperSU and boot.img patches

If Magisk doesn’t fit for some reason, you can use SuperSU (an outdated but working method) or patch boot.img manually. SuperSU v2.82 is relevant for Redmi 5, but note: it doesn’t support root hiding and can conflict with newer versions of Android.

The installation process of SuperSU:

  1. Download UPDATE-SuperSU-v2.82-201705271827.zip.
  2. Sweat through TWRP (similar to Magisk).
  3. Reboot and check root through the Root Checker app.

For manual patching boot.img:

  1. Remove boot.img from the firmware for your model (for example, through MIUI bootloader).
  2. Patch it with the Magisk Manager (Patch Boot Image File).
  3. Fastboot: Fastboot Flash Boot patched_boot.img

⚠️ Attention: Patch boot.img It can lead to bootloop if the file is taken from incompatible firmware. Always check for version compliance. MIUI.

6. Frequent errors and their solutions

Even with the exact following of the instructions, there may be failures. Let's consider the typical problems and how to fix them:

Mistake.Reason.Decision
Fastboot: FAILED (remote: 'Flashing is not allowed in Lock State')The bootloader is not unlockedRepeat the unlocking procedure with the Mi Unlock Tool
The phone does not turn on after TWRP firmwareThe Incompatible Version of RecaveriScroll down another version. TWRP Or standard recaps via fastboot flash recovery stock_recovery.img
Magisk is not installed (Installation failed)Damaged. ZIP-file or lack of space in /systemCheck the checksum of the file or clear /cache and /data in TWRP
Applications do not see root (e.g. Titanium Backup)MagiskHide or conflict with SELinux not activatedEnable MagiskHide in Magisk Settings and Reboot

If after manipulation the phone stopped turning on (bootloop), try:

  • πŸ”„ Download to Fastboot and flash the original firmware through the Mi Flash Tool.
  • πŸ“± Keep Volume Up + Power 10-15 seconds for forced reboot.
  • πŸ’» Connect to your PC and run fastboot erase userdata (all data erased!).

7.What to do after getting root: helpful tips

Now that you have root rights, you can optimize Redmi 5.

  • πŸš€ Remove embedded apps (bloatware) via Titanium Backup or ADB: adb shell pm uninstall -k --user 0 com.mi.browser
  • ⚑ Install Greenify for hibernation of background processes and saving charge.
  • 🎨 Change system fonts and animations through Substratum Theme Engine (requires Andromeda for Oreo).
  • πŸ”§ Optimize performance with Kernel Adiutor (adjustment) CPU/GPU).

⚠️ Note: Do not remove system applications associated with MiuiSystemUI or Android Framework, this will lead to the collapse of the interface. XDA Developers.

For safety:

  • πŸ”’ Update Magisk and its modules regularly.
  • πŸ›‘οΈ Install AFWall+ for controlling network access of applications.
  • πŸ“± Create a backup. boot.img and recovery.img through TWRP.

πŸ’‘

To return the warranty, run the original firmware through the Mi Flash Tool and block the bootloader with the command fastboot oem lock. Note: this is erased all data, and the root will be lost.

Can I get root on Redmi 5 without unlocking the bootloader?
No. Xiaomi blocks modifications to the system partition without unlocking.The only workaround is exploits (like DirtyCOW), but they only work on older versions of Android (up to 7.0) and are unstable.
Why does the phone not pass SafetyNet after installing Magisk?
SafetyNet is locked because of a modified bootloader. Solution: Activate MagiskHide in Magisk settings. Install Universal SafetyNet Fix module via Magisk. Reboot device. Check status through the SafetyNet Test application.
How to update MIUI after getting root?
Updating through OTA will result in the loss of root. Alternatives: Download the full firmware (.tgz) from Xiaomi's site. Sweep it through TWRP (pre-deleting the anti-rollback strings, if any).
Can you get a root on Redmi 5 with a Snapdragon 450 processor without risk?
There is always a risk, but it can be minimized: Use only proven versions of TWRP and Magisk. Do not stitch firmware from other models (for example, from Redmi 5 Plus); Keep an eye on battery charge (at least 50%); Have the original firmware on hand for recovery.
Why do banking applications not work after rooting?
Banks use root testing through SafetyNet or their own mechanisms. Solutions: Activate MagiskHide and add the app to the hidden list. Install MagiskHide Props Config to disguise as another device. Use alternative applications (e.g., the bank's web version).