How to Root Redmi Note 5A & Install TWRP
In this article
Rooting your Redmi Note 5A and installing TWRP recovery gives you full system access, allowing you to install custom ROMs, remove bloatware, and use root-only apps. This guide covers the complete process, from unlocking the bootloader to flashing TWRP and Magisk. You will need a Windows PC, an unlocked bootloader, and a backup of your data—everything else is included below.
What You'll Need
- A Windows PC (Mac/Linux can work but steps differ for driver installation)
- USB cable (preferably original) and a working USB port
- Redmi Note 5A (both regular and Prime variants are supported, but verify your model: ugg for Prime, uggl for regular)
- Unlocked bootloader (required—see Step 1)
- Backup of all important data (rooting wipes your phone)
- Downloaded files: TWRP image (twrp-3.x.x-x-ugg.img), Magisk ZIP (Magisk-vXX.X.zip), and ADB/Fastboot tools (platform-tools)
Step-by-Step
- Unlock the bootloader (if not already done). Go to Settings > About Phone and tap “MIUI version” 7 times to enable Developer Options. Then go to Settings > Additional Settings > Developer Options and enable “OEM unlocking” and “USB debugging”. Apply for unlock permission on Xiaomi’s official unlock website (en.miui.com/unlock). Once approved, download the Mi Unlock tool, sign in, and follow its instructions. This wipes your phone, so back up first.
- Install ADB and Fastboot on your PC. Download the official platform-tools from Google’s developer site, extract the ZIP to a folder like C:\adb, and open a command prompt in that folder (Shift+Right-click > “Open command window here”). Verify by typing
adb versionandfastboot version. - Install USB drivers. Download and install the latest Xiaomi USB drivers from Xiaomi’s official site. If the driver doesn’t auto-install, open Device Manager, right-click the unknown device, and choose “Update driver” > “Browse my computer” > point to the driver folder.
- Enable USB debugging and connect your phone. On your phone, go to Developer Options and enable “USB debugging”. Connect the phone to your PC via USB. When prompted, allow USB debugging on the phone. Check with
adb devices—your device should appear as “device”. - Boot into Fastboot mode. With the phone connected and USB debugging on, run
adb reboot bootloader. The phone will reboot into a black screen with a fastboot logo. Verify withfastboot devices—it should list your device ID. - Flash TWRP recovery. Place the TWRP image (e.g., twrp-3.6.0_9-0-ugg.img) in the same folder as fastboot.exe. Run
fastboot flash recovery twrp-3.6.0_9-0-ugg.img(replace with your actual filename). Wait for “OKAY” message. Do not reboot yet—if you reboot normally, the stock recovery will overwrite TWRP. - Boot directly into TWRP. After flashing, use the volume keys to select “Recovery mode” and press power, or run
fastboot reboot recovery. You should see the TWRP interface. If it asks to allow system modifications, swipe to allow. - Install Magisk for root. Download the Magisk ZIP (from the official Magisk GitHub releases) and transfer it to your phone’s internal storage. In TWRP, tap “Install”, navigate to the Magisk ZIP, select it, and swipe to flash. After flashing, tap “Wipe cache/dalvik” and then “Reboot System”.
- Verify root. After reboot, install the Magisk Manager app (comes with the ZIP) from the Play Store or the Magisk app. Open it—you should see “Installed” and “Ramdisk: Yes”. You can also use a root checker app from the Play Store.
Common Mistakes
- Not unlocking bootloader first. Flashing TWRP will fail or brick if the bootloader is locked. Always verify unlock status.
- Rebooting to system after flashing TWRP. This causes MIUI to overwrite TWRP with stock recovery. Always boot directly into recovery after flashing.
- Using wrong TWRP image. The Redmi Note 5A has two variants (ugg and uggl). Using the wrong image can cause a bootloop. Check your model in Settings > About Phone > Model.
- Skipping driver installation. Without proper drivers, fastboot won’t recognize your device. Install drivers before starting.
- Not backing up data. Unlocking and rooting wipes your phone. Always back up your photos, contacts, and files.
Tips
- Use a short, high-quality USB cable and connect directly to a rear USB port on your PC to avoid disconnections.
- Keep your phone charged above 70% before starting—a power loss during flashing can brick it.
- After rooting, you can use Magisk modules to add features, but only install modules from trusted sources.
- If you ever need to unroot, use Magisk Manager’s “Uninstall” option, or flash the stock ROM via Mi Flash tool.
- Always download TWRP and Magisk from official sources—XDA Developers or the official Magisk GitHub—to avoid malware.
Troubleshooting
- Fastboot doesn’t recognize my device. Reinstall drivers, try a different USB port, or run
fastboot devicesas administrator. Also, ensure USB debugging is enabled. - TWRP doesn’t stick (boots to stock recovery). This happens when you reboot to system before booting into TWRP. Re-flash TWRP and immediately boot into recovery using
fastboot reboot recovery. - Phone stuck in bootloop after rooting. Boot back into TWRP (volume up + power), wipe cache and dalvik, and try again. If that fails, flash the Magisk ZIP again. As a last resort, flash the stock firmware using Mi Flash tool—this will unroot and restore the phone.
- Magisk Manager says “Ramdisk: No”. This usually means TWRP was not flashed correctly. Re-flash TWRP and then reinstall Magisk.
- Wi-Fi or fingerprint not working after root. Some custom ROMs or kernels can cause this. If you’re on stock MIUI, reflash the stock boot image or restore a backup.
Frequently Asked Questions
Will rooting void my warranty?
Yes, unlocking the bootloader and rooting will void Xiaomi’s warranty. However, you can restore the stock ROM and relock the bootloader to regain warranty in most cases.
Can I get OTA updates after rooting?
No, OTA updates will fail on a rooted device. You’ll need to manually flash updates via TWRP or use Magisk’s “Install to inactive slot” feature for seamless updates (if using A/B partitions, which the Note 5A doesn’t have).
Is it safe to root my Redmi Note 5A?
If you follow the steps carefully, it’s generally safe. The main risks are data loss and potential bricking if you flash wrong files. Always use official sources and keep a backup.
What is the difference between rooting and unlocking the bootloader?
Unlocking the bootloader allows you to flash custom recovery and ROMs. Rooting (via Magisk) gives you superuser access within the Android OS. You must unlock the bootloader first to root.
Will I lose my data during rooting?
Yes, the bootloader unlock process wipes your phone completely. Also, flashing TWRP and Magisk may not wipe data, but it’s recommended to back up anyway.
Can I unroot later?
Yes, you can unroot by opening Magisk Manager and tapping “Uninstall” > “Complete Uninstall”. This will restore the stock boot image. You can also flash the stock ROM via Mi Flash tool.