Rooting Xiaomi Redmi 5: a complete guide with unlocking the bootloader and installing Magisk

Xiaomi Redmi 5 is one of the most popular budget smartphones of 2018, which is still in active use. However, standard MIUI capabilities limit users: you can not remove system applications, change the processor frequency or install modified firmware. The solution is root rights.

In this article, we will provide the latest instructions for rooting Redmi 5 (codename rosy) in view of changes in Xiaomi’s policy from 2023 to 2026.

  • πŸ”“ How to unlock the bootloader officially (without circumventing restrictions)
  • πŸ“± Installation of custom recaveri TWRP for Redmi 5
  • πŸ›‘οΈ Safe method of rooting through Magisk (without SafetyNet triggers)
  • ⚠️ Typical errors and how to avoid them (including fastboot problems)

Important: the procedure is suitable for all versions of Redmi 5 (rosy), including versions with 2/16 GB and 3/32 GB of memory. For Redmi 5A (riva) or Redmi 5 Plus (vince), the instruction is irrelevant - they have other firmware and bootloaders.

πŸ“Š Why do you want to root Redmi 5?
Remove embedded applications
Install custom firmware
Overclock the processor
Use Magisk modules
Other

1.Rooting Preparation: What to Do Before Starting

Before you start unlocking the bootloader and installing TWRP, follow the mandatory steps. Missing any of them can lead to data loss or locking the device.

First, check:

  • πŸ“± Phone Model: Go to Settings β†’ The phone. β†’ Model. Must be specified Redmi 5 (not 5A 5 Plus).
  • πŸ”’ Version. MIUI: current global or Chinese firmware (e.g, MIUI Older versions (below) MIUI 12) may not support unlocking.
  • πŸ”‹ Battery charge: at least 70%. The process can take up to 30 minutes, and the discharge during the firmware will lead to failure.
  • πŸ’» Computer: Windows 10/11 (for Linux/macOS You'll need additional drivers. Disable the antivirus, it can block fastboot.

Back up all the data. Rooting wipes out the phone's internal memory!

  • πŸ“² Mi Cloud (for contacts, notes, SMS)
  • πŸ–₯️ Xiaomi PC Suite (for photos, videos, documents)
  • πŸ”„ Titanium Backup (only if you already have root on another device)

⚠️ Note: If you use Redmi 5 with operator binding (for example, MTS or Beeline), unlocking the bootloader can cancel the warranty and block the network. SIM-Locations in Settings β†’ SIM-maps and mobile networks.

β˜‘οΈ Checklist before rooting

Done: 0 / 5

2. Unlock the bootloader: the official method from Xiaomi

Xiaomi blocks the bootloader on all devices, so the first step is to unlock it through the official Mi Unlock Tool.The process takes 3 to 7 days due to the mandatory confirmation wait.

Instructions:

  1. Link your Mi Account to your phone: Go to Settings β†’ Xiaomi Account. Sign in to your account (if not, sign up). Activate Settings β†’ Additional β†’ Unlock OEM (password may be required).
  2. Download Mi Unlock Tool: Official page: en.miui.com/unlock. Select the Windows version (for example, miflash_unlock-6.5.406.24.zip).
  3. Connect your phone in Fastboot mode: Turn off Redmi 5. Press Volume Down + Power before the Fastboot logo appears. Connect your phone to your PC via USB.
  4. Open the Mi Unlock Tool on behalf of the administrator. Log in to the same Mi Account as on your phone. Press Unlock and a waiting message (usually 168 hours) will appear.

After waiting, repeat the procedure: connect the phone to fastboot, launch the Mi Unlock Tool and press Unlock. the bootloader will be unlocked and the phone will automatically restart.

⚠️ Note: If the Mi Unlock Tool is running a "Couldn't unlock" or "Device not supported" error, check: Mi Account is logged on to your phone for more than 30 days (new accounts are not working). USB-cable (cheap cables may not be fastboot) Find My Device is disabled on the phone. β†’ Google β†’ Security).

What if the Mi Unlock Tool can’t see the device?
1. Install Fastboot drivers manually through Device Manager (select "Android Bootloader Interface"). 2. Try another one. USB-port (preferably) USB 2.0 back-panel). 3. Disable driver signatures in Windows: type in bcdedit command line /set nointegritychecks on and restart the PC.

3. Installation of TWRP Recovery for Redmi 5

After unlocking the loader, you need to install a custom Recovery TWRP (Team Win Recovery Project, which will allow you to flash Magisk and others. ZIP-files and make backups of the system.

Download the latest version of TWRP for Redmi 5 (rosy):

  • πŸ”— Official website: twrp.me/redmi5
  • πŸ“₯ Direct reference: twrp-3.7.0_9-0-rosy.img (Check the relevance of the forum XDA).

Installation instructions:

  1. Copy TWRP to your phone: Rename the file to twrp.img and place it at the root of internal memory.
  2. Reboot to Fastboot: Turn off the phone. Press Volume down + Power.
  3. Fly TWRP through fastboot: Open the command line in the folder with fastboot. Enter the command: fastboot flash recovery twrp.img After successful firmware type: fastboot boot twrp.img (this will temporarily boot TWRP without overwriting the stock recaveri).

If the TWRP does not start or the phone loads into a stock recavator, repeat the command fastboot boot twrp.img. Sometimes you need to flash the TWRP twice.

Problem.Reason.Decision
FAILED (remote: 'Not allowed in Lock State')The bootloader is not unlockedRepeat the unlocking with the Mi Unlock Tool
TWRP is stitched but not launchedStock Recavery Re-records TWRPAfter the firmware immediately run fastboot boot twrp.img
Invalid sparse file format errorThe twrp.img file is damaged.Download the image again from the official website

πŸ’‘

After installation TWRP The phone is loaded into the stock recavator, try flashing disable_forceencrypt.zip through TWRP. This will disable forced data encryption, which can block custom recovery.

4. Getting root rights through Magisk

Magisk is the most reliable way to root Redmi 5 without losing functionality (like banking applications), bypassing SafetyNet checks and hiding root from certain applications.

Steps:

  1. Download Magisk: Official repository: GitHub Magisk. Select the latest stable version (e.g. Magisk-v26.4.zip).
  2. Move ZIP to your phone: Connect Redmi 5 to your PC and copy Magisk-vXX.X.zip to internal memory.
  3. Sweat through TWRP: Boot to TWRP (click Volume Up + Power when turned on). Press Install β†’ select Magisk-vXX.X.zip. Swipe to confirm.
  4. Reboot: Press Reboot System. The first download can take up to 10 minutes.

After restarting, check for root:

  • Install Magisk Manager (download APK from GitHub).
  • Open it – if root is active, you’ll see a green tick and a version of Magisk.

⚠️ Note: If after installing Magisk phone fixated on the logo MIUI, Follow the following steps: Load into TWRP (Loudness up + Food. Please pass Magisk-uninstaller.zip (Download it from GitHub. Reboot and re-install Magisk, but pre-format the partition. Dalvik/ART Cache in TWRP.

πŸ’‘

Use only official versions of Magisk with GitHub. Downloading from third-party sites can lead to the installation of malware or broken root.

5. Checking the performance and elimination of errors

After rooting, you need to make sure everything works correctly.

SafetyNet status:

  • Open Magisk Manager β†’ Press Check SafetyNet.
  • If the test fails (ctsProfile: false), install the Universal SafetyNet Fix module via Magisk.

The operation of banking applications:

  • If Sberbank Online or Tinkoff refuses to launch, turn on MagiskHide: In Magisk Manager, go to Settings. Enable MagiskHide. Add banking apps to the hideout list.

Updates to MIUI:

  • Do not install after rooting OTA-Update through Settings β†’ Update the system, it'll cause root loss.
  • To upgrade, download the full ones. ZIP-Firmware Updater and Fix It Through TWRP.
Problem.Possible causeDecision
The phone does not boot after Magisk firmwareConflict with modules or damaged boot.imgSearch Magisk-uninstaller.zip via TWRP
Applications do not see root (e.g. Root Explorer)MagiskHide hides root from all appsDisable MagiskHide or add the app to exceptions
Constant reboots (bootloop)System partition damagedSwipe the stock firmware through the Mi Flash Tool and repeat the rooting
How to return the stock firmware if something went wrong?
1. Download the official firmware for Redmi 5 from Xiaomi's site (select Fastboot version). 2. Unpack ZIP into a folder on PC. 3. Download the phone to fastboot (Loudness down + Power). 4. Launch Mi Flash Tool, select the firmware folder and click Flash (select the clean all option). 5. Once the firmware is up, the phone will be as new (all data will be deleted!).

6.Useful Magisk modules for Redmi 5

One of the main advantages of Magisk is the ability to install modules that extend the functionality of the phone.-5 modules for Redmi 5:

  • πŸ”§ ViPER4Android FX β€” Improves sound (installation with Audio Modification Library).
  • 🎯 Xiaomi Debloater – removes unnecessary system applications (Mi Browser, Mi Music, etc.).
  • πŸ”‹ Battery Charge Limit – Limits battery life (e.g. up to 80%) to extend battery life.
  • πŸ“‘ Network Speed Indicator – displays the speed of the Internet in the status bar.
  • πŸ›‘οΈ Universal SafetyNet Fix – fixes SafetyNet errors for banking applications.