Xiaomi’s smartphones are generally well received by the developer community so this tutorial will walk you through installing TWRP on the Redmi Note 5 Pro.
To do things such as gaining root access or installing a popular modification you will first need to have TWRP on the smartphone. There are two different ways to do this though as one way is a full install while the other method is to temporarily boot into TWRP. A full install (which is what I did in the main tutorial and video) is for those who don’t mind using a custom recovery and flashing the ZIP file after booting into TWRP is required if you choose to stay on MIUI. This is ideal for people who flash things frequently.
However, you may just want to temporarily boot into TWRP to flash your systemless mods (such as Magisk, SuperSU, Xposed, etc.) if you plan to continue using MIUI and also want to install the new OTA updates as quickly as possible.
This method is the same except we don’t need to flash the dm-verity ZIP file since the stock kernel will overwrite the custom recovery (TWRP) when you boot back into MIUI. This method is ideal for people who want to keep the stock recovery installed so that official OTA updates of MIUI are easier to install.
If you plan on using a custom ROM like LineageOS or a custom kernel then it will include support for dm-verity already and you won’t have to install the ZIP file.
Install TWRP on the Redmi Note 5 Tutorial
- Download TWRP for your Redmi Note 5 model
- Rename that file to twrp.img
- Then move or copy the file to the same folder as your ADB and Fastboot tools
- Download the no-verity ZIP file to the Redmi Note 5
- Boot the Redmi Note 5 into Fastboot Mode
- Connect the Redmi Note 5 to the PC with a USB cable
- Open up a Command Prompt in the same folder as ADB and Fastboot
- Then type out the following command. . .
- fastboot flash recovery twrp.img
- . . .and press Enter on the keyboard
- Wait for the Finished response and then type the following command. . .
- fastboot boot twrp.img
- . . .and press Enter on the keyboard
- Swipe the arrows to the right to allow modifications and fully install TWRP
- Tap the Install button at the TWRP main menu
- Locate and tap on the no-verity ZIP file we downloaded
- Swipe the white arrows to the right to confirm the installation
- Then tap the Reboot System button when that completes
Explanation
First of all, you’re going to need to have USB drivers installed for Xiaomi devices if you haven’t done so already. Then we need to have ADB and Fastboot tools downloaded and extracted to a folder on the computer. Once that is done we can go ahead and download TWRP for our version of the Redmi Note 5 Pro and then rename it to twrp.img before moving or copying it to the same folder as your ADB and Fastboot tools are located. We can also download the dm-verity ZIP file to the phone right now as well.
Then we can boot the Redmi Note 5 into Fastboot Mode before we connect it to the PC with a USB cable. With that done we will need to open up either a Command Prompt or a Windows PowerShell in the same folder as our ADB and Fastboot tools. This is so we execute the fastboot flash recovery twrp.img command which will install TWRP to the recovery partition. With that done we then need to execute the command fastboot boot twrp.img which will boot us directly to the TWRP main menu.
When you first boot into TWRP you will be asked if you want to allow modifications. If you’re doing a full install of TWRP then yes, you want to allow modification so go ahead and swipe the white arrows to the right. This will then take us to the TWRP main menu and from here we need to tap the Install button. Next, browse to and tap on the dm-verity ZIP file if you need it installed (so we can keep TWRP installed on MIUI) and then swipe the white arrows to the right to confirm the installation.
You’ll see a Reboot System button appear after the ZIP file has been flashed and tapping it will take us right back into MIUI. Now, if you just want to temporarily boot into TWRP then you can skip the first fastboot command that I mentioned (step 9) and instead just do the one I listed in step 12. This will just temporarily boot into TWRP so that even if you swipe the white arrows to allow modifications MIUI will still overwrite your recovery image with the stock recovery instead of the custom TWRP recovery image.
Again, it just depends on what type of setup you want on your device. I plan on installing a custom ROM so I am happy to fully install TWRP but you may want to keep using MIUI so sticking with the stock recovery would be your best bet as it means you can easily install OTA updates.
This didn’t work for me. The command in your instructions: “fastboot boot twrp.img”, comes back with error message “FAILED (remote: Anti-rollback check failed). I had to resort to “fastboot boot C:sdk\platform-tools\twrp.img” in order to get the TWRP on my screen.
After rebooting, Xiaomi bootloader pops up to replace it with no TWRP unfortunately.
The commands. . .
– fastboot boot twrp.img
and. . .
– fastboot boot C:sdk\platform-tools\twrp.img
. . .should be the same thing assuming you put the TWRP image file in the ADB/Fastboot tools folder like I instructed. So I’m not sure why that error would have come up. That confuses me but thank you for the feedback (as it could be helpful to others).
In any case, once you were able to boot into TWRP, did you flash the no-verity ZIP file as I mentioned in step 4?
Same error here
same for me too
I wish I could replicate this issue. Not only am I new to the whole Xiaomi ecosystem (so I’m still learning their quirks), but the company is also making a lot of changes with their code lately (like with the anti-rollback protection stuff).
I’m hoping they start to settle in and surprises like this stop popping up.
This is a terrible guide. You have 3 parts to this guide on different pages …
That’s the whole point. Why is it smarter/better to repeat myself on parts like ‘booting into Fastboot Mode’ when someone needs to boot into Fastboot Mode to install TWRP while someone else needs to boot into Fastboot Mode to flash a Fastboot ROM.
It makes much more sense to compartmentalize each of those technical steps and then just refer back to them whenever they are needed. Same thing with stuff like installing ADB and Fastboot tools. Why do I need to write the same 300-500 words for each tutorial (and I refer to some of these mini-guides dozens of times throughout the tutorial writing process of a smartphone) that requires it when I can just write it out once and then link back to it whenever it is needed.
I was askinf for password and unable to mount the internal storage in twrp please help
Yea, Android has now gotten to the point where you need to tap Wipe -> Format Data (this erases everything on your phone) -> Then installing Magisk to get TWRP to stay (Thanks to project treble and all)
Everything was working fine.
But when I tap install on twrp main menu I have to locate a file. But internal storage is not showing any files stored on my device