This is the proven trick to bypass Anti-rollback Protection on Redmi Note 5 (Whyred) and hence we can flash TWRP and root with Magisk. This workaround saves your time and helps you avoid risks of a bricked device. We manage to explain the whole steps clearly. You can follow all the steps confidently.
It is always a good practice to understand why you should need to follow this procedure instead of traditional TWRP-flashing and MIUI-rooting method. This discussion brings back the topic to a security feature that Google has introduced since Android 8.x Oreo.
Enter Anti-rollback Protection! It is a security measure that prevents any device to run an older version of firmware. This security protection, which we call it as ARB from here on, is adopted by Xiaomi. The company has managed to implement the ARB Protection on some MIUI devices including Redmi Note 5 and Mi 6X. Despite being available as an optional feature (not mandatory at all), Xiaomi has adopted it as MIUI Anti-rollback Protection. There are some discrepancies between the original Google’s Android ARB vs Xiaomi’s MIUI ARB.
In related to rooting your Redmi Note 5, ARB changes the way you can flash a custom recovery and how you can use ADB-Fastboot interface.
The main purposes of this article are:
- To do a quick-check for ARB index.
- To flash TWRP Recovery v3.2.3-1 on Redmi Note 5 Pro/Global/China (Whyred).
- To flash Magisk root tool on Redmi Note 5.
You will need:
- A Redmi Note 5 (whyred) 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-1 for Whyred.
- ARB Bypasser and Fastboot unlocker.
- The latest version of the Magisk zip file.
- DM Verity Disabler zip file (optional).
- 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.
- Download the latest version of the Magisk zip file or DM Verity Disabler zip file directly to your phone (link available above). You may copy the zip file from the Downloads folder to the root directory of your phone storage for an easier access.
- Backup your important data. We hold no responsibility for any potential damage of following this article. Please proceed with caution.
A Quick Check for ARB Index
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.
- Download the ARB Bypasser zip file and extract the image file.
- Copy the recovery.img and dummy.img files 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 Note 5 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 getvar anti” and hit Enter. This instructs your computer to check for ARB index of your phone.
- If your ARB index is 4 or greater, type “fastboot flash antirbpass dummy.img” and hit Enter. The command order your computer to flash dummy.img file to your device through the Fastboot interface. Skip this step and use Step 2 below if your ARB index is 3.
- 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 recovery” and hit Enter. This will boot your device into TWRP. Alternatively, you can also use this command: “fastboot boot recovery.img“
- Your phone will now reboot into TWRP recovery mode.
Root Redmi Note 5
- The first time you boot into TWRP, you will need to do the “Slide to allow system modification“. By doing this, it will trigger the MIUI DM-Verity security check. Without flashing Magisk or its disabler module, your phone will fail to boot.
- Choose “Install” from the main menu.
- If you want to flash TWRP without rooting, flash the Lazyflasher DM-Verity Disabler zip file. Locate the file, tap on it to select it, and do the “Slide to confirm flash“.
- Otherwise, flash Magisk if you want to have full root access on your phone. Locate the Magisk zip file, tap on it to select it, and do the “Slide to confirm flash“.
- Wait for a few seconds for TWRP to finish its job.
- Once done, tap Reboot.
Congratulation, your Redmi Note 5 is now fully rooted systemlessly.
A new app called “Magisk Manager” is 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.
You can also check the current root status by downloading Root Checker app from the Play Store. Look for it there.
Redmi Note 5 is a mid-range Xiaomi device that runs MIUI version with Anti-rollback Protection. While it provides an additional layer of security, it also makes the process of flashing TWRP harder and more difficult than usual. Therefore, some additional steps are necessary to bypass the Anti-rollback Protection and reactivate Fastboot commands. Otherwise, default fastboot command, such as the one used to flash TWRP, will not work. Once ARB Protection is bypassed, users can execute any Fastboot command including flashing a custom ROM.
Found a broken link? Write a comment below!