This tutorial will guide you on how to root Xiaomi Mi 5s using TWRP and Magisk v14. The root process will be systemless and hence you can install apps like mobile banking app, Android Pay, Netfilx, games like Pokemon Go, and many other apps that should not run on a rooted Android device. Thanks to the Magisk tweak to allow us doing so. Moreover, the tweak also has built-in modules to manage root privileges, and so on.
Systemless root on an Android device allows SELinux to run securely under enforcing mode. In other words, systemless root does not make any odification to the system files which therefore it allows installation of OTA updates without problems. Speaking in simpler terms, Magisk Manager app will help Android users to pass google Safetynet check.
What is this article all about?
This article will answer your following questions:
- How to root Mi 5s?
- How can I root Mi 5s without sacrificing my banking app, Android Pay feature, or Netflix?
- How to install Magisk v14?
- How to systemless root an Android device with Magisk?
- How to hide the root status on an Android phone?
Prerequisites
Some preliminary steps and some necessary requirements that must be fulfilled before you proceed are:
- Make sure the phone’s bootloader has been unlocked. Follow our previous guide on how to unlock MIUI bootloader step by step if you haven’t do so yet.
- Download and install one of these software: Mi Flash tool, Mi Flash Unlock Tool, or Universal Android ADB Drivers for Xiaomi device. Basically you will need the ADB drivers to be installed on your computer. Installing Mi Flash tool is the easiest one to get this job done since the tool contains all necessary drivers. Moreover, it is advised to firstly disable Windows Driver Signature Enforcement before installing ADB driver.
- You will need a Windows-based PC/laptop. It is recommended to use the 64-bit version.
- You will also need a USB data cable to connect your phone to computer. You can use the one comes with your device or use any other. Just make sure the cable can transfer data and not just a charging cable.
- Check your Android version and ensure it is Android 5.0 or newer.
- Download TWRP Recovery installer tool for Mi 5s.
- Download Magisk v14 and Magisk Manager app.
- Download dm-verity and force disabler tweak.
- Make sure your phone battery is not under 60%.
- You may also need
Useful information:
- This article is intended for those who want to install Magisk for the first time. Users with old version of Magisk installed can simply update the app via Magisk Manager app.
- Proceed with caution since neither us nor Magisk Developer will hold any responsibilities to any damage like risks of boot failure, bootloop, bricked device, or hardware failure. Please proceed responsibly and do on your own risks.
- Rooting your device and flashing custom binaries might get your phone warranties obsolete.
- Magisks v14 only works on device with Android version 5.0 or above. Make sure your phone runs at least MIUI 8 or MIUI 9. This has been tested to work well on MIUI 8.5 and MIUI 9 Android 7.0 Nougat.
- Please backup your data and files especially contacts information and messages. This will wipe all your data and files.
Steps to Root
Follow steps below to root your device. You may click on each image to view its larger version.
Step 1 – First, you will need to enable Developer Options, then enable USB Debugging. However, you should have done this when unlocking your phone bootloader. This is just in case if you disable it again.
Settings > Additional Setting > Developer Options > enable usb debugging
Step 2 – Next, you will also need to enable installation from Unknown Sources inside Security section of your phone Settings.
Step 3 – Reboot your phone into Fastboot mode. Turn off your hone completely and press the Power button and Volume down (-) button until you see the Mi Bunny Fastboot logo.
Step 4 – Next, install custom Recovery. Please read and follow our previous guide on how to flash TWRP Recovery easily using installer tool on Mi 5s. Follow the steps in that tutorial but do not flash SuperSU because you are going to replace it with Magisk.
Step 5 – Now transfer the downloaded Magisk v14 .zip file, Magisk Manager .apk file, and no-verity-opt-encrypt-5.1.zip into your phone internal storage. You can use the USB cable for this task.
Step 6 – Assuming you have TWRP installed, now reboot into recovery mode. Turn off your phone completely. While it is turned oof, press and hold the Power button and Volume Up (+) button together until it enters Recovery.
Step 7 – Next, tap the Install button.
Step 8 – Now locate the Magisk v14 .zip file you have copied earlier. Tap on it to select it.
Step 9 – In the next page, do the popular TWRP’s “Swipe to confirm flash” action. TWRP will then start flashing Magisk package into your phone.
Step 10 – Wait for TWRP to do its job. The task will take not much longer than 15 minutes (usually way faster). The success message will be displayed like below. Do not choose Reboot System yet or your phone will get bootloop error.
Step 11 – At this point Magisk has been installed. However, there are still additional steps to make the whole process finished without problem. Now go back to TWRP main menu and choose Install again.
Step 12 – Next, locate the no-verity-opt-encrypt-5.1.zip file you have copied earlier. Flashing this package is necessary for your phone to prevent bootloop.
Step 12 – In the next screen, again, do the “Swipe to confirm flash” action to start flashing.
Step 13 – Once done, you will see the Success message being displayed. Eventually, you are now safe to Reboot to normal system now.
Step 14 – Once your phone has been turned on and rebooted completely in normal mode, you will see a new app installed which is Magisk Manager (or you may installed it manually using its .apk file if you don’t). At this point your phone has been rooted.
Step 15 – The last step, open up the Magisk Manager app. You can see the status of your root access and which Magisk version has been installed.
As you may can see that MagiskSU is installed. This is the root exploit package flashed to gain root access (systemless root) on your device. MagiskSU is the replacement of SuperSU.
Congratulation, your phone is now rooted successfully. Even better, you can still install any app you want without worrying about your root status. Magisk Hide is hiding the root status so that apps like mobile banking will still be able to function properly. However, there are still additional Steps for this.
Step 1 – Click the Menu button at the top left corner.
Step 2 – Choose Magisk Hide and enable it.
Alternatively if you cannot find the Magisk Hide option in the menu, simply go to Settings and enable Magisk Hide from there.
Last but not least, for your information, Magisk Manager have additional – and some are third-party – modules. Simply click the Menu button at the top left corner of the app and tap on Downloads option.
From there, you will find many additional modules can be downloaded and installed through Magisk Manager app. Many are interesting but not all of them are really compatible with your device. You can try Dolby Atmos modules to enhance the sound quality produced by your phone.
However, not all modules are available with automatic installation. Some require manual installation. How to install a module in Magisk Manager app? Simply click the Menu button >> Modules >> click the yellow (+) button >> and choose the downloaded module’s .zip file.
Module Flashing Error Solution
In several cases you might find installing a module ended up failed or with errors. If this happen, the main solution is to switch from Stable to Beta update channel. Doing this is also simple. In Magisk Manager app, go to Menu >> Settings >> Update Channel >> and choose Beta.
That’s all and congratulation. Your phone is now rooted awesomely with Magisk. Credit and thanks go to Magisk developers, its modules developers, TWRP dev team, and most importantly MIUI Community. Do not hesitate to drop a comment below this article and tell us about your experience.
Also read: How to root Xiaomi Mi 5s with SuperSU.