If you’re reading this article I assume you are interested in rooting your Xiaomi device. 

Now, I have specifically written articles about rooting Xiaomi Redmi 4 and Xiaomi Redmi Note 4

if you go through both of these articles you will notice that 90%  of the process is same.

In case you have got a different device from Xiaomi, you can use this guide to root your Xiaomi device.

There are three steps involved in rooting a Xiaomi device.  

The First step is it to unlock the bootloader,  this process is pretty much same for all the Xiaomi devices

Step 1: Unlock the Bootloader

Xiaomi has tightened the security of their smartphones by locking the bootloader, which keeps anyone from flashing a custom recovery,  which is something required for rooting the device.

So, you will need to have the bootloader unlocked, fortunately, you can request for the unlock code from Xiaomi but it requires a bit of patience since it might take a few days to get it.

You can head over to this webpage to request the unlock code,  simply fill up the form mentioning the reason why you want to unlock the bootloader.

You will get the bootloader unlock code in one or two days.  Once you get the code you will have to wait for at least 72 hours before unlocking the bootloader.

Once you are past that date,  you can download unlock tool and unlock the bootloader.

The second step is to flash the custom recovery for your particular device,  this is tricky because you will have to download the specific TR develop file for your device.  

Step 2: Flash Custom Recovery

Now that the bootloader is unlocked,  it’s time to flash a custom recovery for your Xiaomi device. You will need to download the TWRP file for your particular Xiaomi Device, use the link below to search for it. 

Download TWRP.img

There is now an app available for finding the TWRP file for your particular device, the app can be installed from Play Store using this link.

There are several methods to flash custom recovery but the one we would be using is probably the easiest and requires an additional software called Minimal ADB Fastboot.

If you use the app to donwload the TWRP file, you will have to transfer it to your PC for this method. And for the ease of understanding this guide, rename the twrp file to twrp.img

Download Minimal ADB Fastboot

Once you have downloaded and installed minimal ADB, move the TWRP.img file to the minimal ADB folder in the program files,  the file path is mentioned below.

C:\Program Files\Minimal ADB Fastboot

Once you are done with that,  launch minimal ADB and Launch Minimal ADB Fastboot and type this command.

fastboot flash recovery twrp.img

This picks up the recovery image and loaded to the phone.

Type this command. “fastboot boot twrp.img

(This will flash the twrp recovery image to the phone, might take few minutes)

The TWRP would be flashed to your Xiaomi Device.

The third step is to root the Xiaomi device which is also pretty much is same for all the devices from Xiaomi. You will need to download magisk.zip and lazyflasher.com.

The only thing you will have to keep in mind is that you download the latest version of these files.

Step 3: Root Xiaomi Redmi 4

Now, download the magisk.zip*,  lazyflasher.zip file on your PC and transfer it to your mobile,  and flash the Magisk.zip from TWRP, and then the lazyflasher.zip, and then reboot the phone.

*Note: Make sure you check this page for downloading the latest version of Magisk.zip. 

Note: The first reboot takes a few minutes and it will be rooted.

Install the ES explorer app if you haven’t already, and enable root access. which will also let you uninstall system apps and much more.

This is it I hope this works for your Xiaomi device, do let us know in the comments below if it works or not so that we can modify the guide accordingly.