This is a DIY-article for you who want to root Xiaomi Redmi 5A manually using latest official TWRP build and Topjohnwu’s Magisk root. This means you won’t be necessary to ask your friend for help just for rooting your phone. Moreover, bringing the phone to Xiaomi Service Center is no use since rooting is way beyond their service.
Redmi 5A is one of Xiaomi budget phone series with a huge number of sales. Its price is very cheap while it sports a decent hardware specification. The phone, that has a codename Riva, runs both Global Stable and China Stable build of MIUI ROM. With the regular MIUI update release, there is a need to adjust the root tools necessary for the task. For instance, the phone running the latest MIUI version needs to use the latest version of TWRP recovery. There have been several either Auto or Semi-auto Windows-based root tool capable to gain root access. However, sometimes such a tool has no latest version of TWRP included within the package.
Following this article allows you to gain full root access on your Redmi 5A running MIUI v9.6.5 based on Android 7.1 Nougat. Furthermore, this is also compatible with any previous MIUI versions.
The main purposes of this article are:
- To flash TWRP Recovery v3.2.3-0 on Redmi 5A.
- To flash Magisk root tool on Redmi 5A.
You will need:
- A Redmi 5A device.
- A compatible USB data cable.
- A computer running Windows 8/8.1/10 64-bit.
- Xiaomi ADB-Fastboot Driver or Mi Flash tool.
- TWRP v3.2.3-0 for Riva.
- The latest version of the Magisk zip file.
- DM Verity Disabler zip file.
- A cup of coffee or tea (optional).
You need to accomplish the following tasks prior to rooting your MIUI device:
- Unlock your phone bootloader officially. This is particularly easy but it may take some time. Read our full guide on how to do this here.
- Disable Driver Signature Enforcement on your Windows computer. This allows smooth installation process, or else, you will end up fail on installing the necessary driver. The full tutorial is here.
- Install Xiaomi ADB-Fastboot USB driver software you have downloaded it from the above link. This allows your computer to recognize your Android device properly. On top of that, this makes sure you can establish both ADB and Fastboot connection while the phone is in Bootloader mode and USB Debugging enabled. Choose site-wide installation during the process. Once installed, you will have it in your drive C:\adb\. You may also use Mi Flash tool instead. The tool bundles all required drivers within its installation.
- Backup your important data. We hold no responsibility for any potential damage of following this article. Please proceed with caution.
Follow all the steps below to install TWRP on your phone:
- Download the TWRP image file from the above link to your computer and rename the file to recovery.img.
- Copy the recovery.img file to the C:\adb\ folder.
- Enable Developer Options. Go to Settings > About phone > tap the MIUI version several times until the developer options being enabled.
- Also, enable USB Debugging through Settings > Additional Settings > Developer Options > USB Debugging > toggle it on.
- Reboot your phone into bootloader/fastboot mode. You can either use the button combination method or use the ADB method. Read our full guide about Redmi 5A bootloader mode here.
- Connect your phone to your computer using its USB cable.
- On your computer, go to the ADB folder in Windows Explorer. This is usually located at C:\adb\.
- Type “cmd” – without quotes – in the Address bar of Windows Explorer, then hit Enter. This will launch Command Prompt window right in the current location.
- Type “fastboot devices” and hit Enter. This command asks your computer to establish the fastboot connection and to display all connected devices. You will see the code number of your phone in the list.
- Type “fastboot flash recovery recovery.img” and hit Enter. This instructs the computer to flash TWRP image file to the phone through the fastboot interface. The process should finish within seconds.
- Type “fastboot reboot” and hit Enter. This will boot your device into normal mode.
- You may disconnect it from your computer if you want.
p.s: All the command executed in the above and below steps are within quotes. Do not copy or use the quotes.
- Assuming your phone is now in normal mode. You can either download the zip files of Magisk and DM Verity Disabler directly to your phone or grab it to your computer and transfer it to your phone later. The point is you need to have both zip files in the phone storage.
- Reboot your phone to Recovery mode. The easiest way to accomplish this task is by turning off your phone completely then press Power and Volume Up (+) button simultaneously. There are a few other ways to get into recovery mode. Read here for the full tutorial on this topic.
- If this is your first time using TWRP, you will need to swipe to allow system modification.
- Next, you will see the main TWRP menu. From here, choose Install.
- Now locate the Magisk zip file you have copied earlier. Tap on its file name to choose it.
- Finally, do the “Swipe to confirm flash” action.
- TWRP will then flash Magisk to your phone.
- Go back to the main menu of TWRP.
- Again, choose Install from the menu.
- Locate the No Verity or DM Verity Disabler zip file. Tap on its file name to choose it.
- do the “Swipe to confirm flash” action.
- TWRP will then flash the zip file to your phone.
- Finally, tap the Reboot menu.
- Your phone will then reboot into the normal mode.
A new app called “Magisk Manager” will be automatically installed after flashing Magisk zip file. Look for this app icon on your phone. There is a rare case that it may not be found due to corrupted flashing process. If this happens, you can download Magisk Manager .apk file here and install it manually.
Magisk Manager is basically a root manager app. It allows you to manage and to organize all the apps allowed to use root access on your phone. You can grant or revoke root access within this app. On top of that, you can use it to hide the root status from being detection by specific apps. This feature is useful to avoid root detection performed by banking apps and some gaming apps like Pokemon Go.
You can also check the current root status by downloading Root Checker app from the Play Store. Look for it there.
While TWRP is a powerful custom recovery, it requires some efforts to flash. Moreover, it demands unlocked bootloader and DM verity Disabler. Redmi 5A is one of the devices with the dm-verity mechanism. Hence, flashing a custom recovery and third-party binaries like Magisk require you to use DM-Verity patch to avoid bootloop.
Flashing TWRP and gaining root access can sometimes be challenging while also enjoyable. Going through such a manual process is arduous but it gives distinctive experience to enhance your knowledge and to sharpen your skill. On top of that, it gives you sophisticated satisfaction when succeeded.
Feel free to leave comment below. Let us know your experience or difficulties during the process if you found one.