For those of you that opted to import the premium-mid range Xiaomi Mi 5X from China, have no fear that you’re relegated to running stock forever. Although Xiaomi has been providing decent updates, one can’t deny the fact, Custom skins are laggy at time! Stock Android has always been more user friendly and performance friendly. If you are bored of the MIUI skin, you can install a clean Stock Android after rooting. Here we have provided the how to’s to root the phone and install TWRP and unbrick it just in case you mess it up asking the way.


  1. A Windows PC.
  2. Mi Unlock Tool: Download
  3. ADB Fastboot Tool (Installation is shown in link)
  4. ADB USB Drivers (Installation is shown in link)
  5. Mi 5X Toolkit: Download


How to unlock Bootloader on Mi 5X

Step 1. Go to MiUnlock, Sign in with your Mi ID and request for Bootloader unlock with proper reason.


How to unlock Bootloader on Xiaomi Mi 5XStep 2. Login with the same Mi account in your Xiaomi Redmi Note 4.

Step 3. Extract the Mi Unlock tool and launch “MiFlashUnlock.exe” file as an Administrator.

Step 4. Run exe file from toolkit folder and follow screen Instructions


How to Install TWRP and Root MI 5X

Step 1. Download and extract the Toolkit folder from the above link and Follow screen Instructions.

Step 2. Type 41 hit enter to flash twrp, just after flashing the recovery your phone will boot in TWRP.

Step 3. Now type 45 and hit enter it will transfer Required files to your Phone.

Step 4. After installation, boot your Mi 5X into TWRP mode and go to backup tab and create a Nandroid backup.

Step 5. Go to Wipe > Select System, Cache, Dalvik & confirm wipe.

How to perform Complete wipe in TWRP recovery
How to perform Complete wipe in TWRP recovery

Step 6. Go to Install tab/From SD card/ locate No verity and flash the file.

Step 7. Again Go to Install/ From SDcard Locate magisk zip and flash it.

Step 8. Reboot System Now. If the device doesn’t boot up, again flash noverity file.

Step 9. Done, you have Successfully Rooted your Mi 5X.

How to unbrick Mi 5X by Flashing official Firmware

Note: You can use below Method [unofficial way] to unbrick Without locking the Bootloader [100% working]

  1. Download official fastboot ROM From here: Download
  2. Extract inside a Folder
  3. Run MI flash from the extracted Folder.
  4. Turn off the device. Press the Volume– key and the Power button at the same time to enter Fastboot mode. Then connect the device to the Windows PC/laptop via a micro USB cable
  5. On MI flash, Click on Flash.
  6. Wait for the flashing process to complete, once it’s completed you’ll see a Success message.
  7. Done, that’s it! You have reverted back to stock firmware as new!

So there you have it folks. You’re no longer stuck with stock firmware and are free to flash custom ROMs and have full root access over your phone.

  • Chris G.

    Don’t you know that you can’t unlock the bootloader for the 5X, even with the unlock tool ?
    It’s been disabled on 5X for about 1 month now !
    Maybe You should give a try before write a “HowTo”… Thanks