Install TWRP & Root Xiaomi Mi 8

Xiaomi Mi 8 arrived at the company’s eighth anniversary as the successor to the Mi 6. The Mi 8 continued Xiaomi’s love for Apple’s designs and looks very much like the iPhone X but for subtle differences. Regardless, not everyone shares Xiaomi’s Apple love and many users also aren’t fans of the iOS-esque MIUI. For those users, an easy way out is to install TWRP which is a custom recovery. After this, you can simply root Xiaomi Mi 8 and prefer to stick with MIUI or flash a custom ROM.

It’s easy to do those things but what’s not easy is apparently getting a bootloader unlock code from Xiaomi. According to some reports users have had to wait even two months for it. So before you even think about rooting your Mi 8, make sure you’ve applied for a bootloader unlock code. Obviously, you need to have your device’s bootloader unlocked in order to install TWRP and thus root it.


Rooting your Xiaomi Mi 8 will definitely void your warranty. Moreover, flashing a custom recovery and using it to flash third-party mods can be risky. You may end up bricking your device. If you’re here though you’ve probably already made up your mind about it. We can assure you that the method mentioned below has been successfully tested and that it works perfectly fine. Even if you follow all the steps mentioned below correctly, there is still a chance that things may go south for you. Make sure you know what you’re doing and do everything at your own risk. DroidViews or anyone else cannot be held responsible under such circumstances.


  • A Xiaomi Mi 8 with an unlocked bootloader.
  • You’ll need a Windows, Mac or Linux computer with ADB and fastboot installed and set up. We do have dedicated, detailed guides on how to do just that for all the three platforms. You can check them out by following the links below.
  • Enable USB debugging and OEM Unlock on your Mi 8. To do this go to your Settings > About phone. Now tap on the MIUI version 7 times until you see a toast message “Developer option enabled”. Go back to Settings > Additional SettingsDeveloper Options and enable OEM Unlock and USB Debugging.
  • Make sure the device is charged at least 50%.
  • Windows users will need to install the latest Xiaomi USB Drivers.


Download the unofficial TWRP image linked above and rename the file as recovery.img then place it inside your adb folder. Download and transfer the Magisk and files to your device.

Install TWRP and Root Xiaomi Mi 8

  1. Connect your Mi 8 to the PC with a USB cable and launch the ADB command line interface. Grant ADB debugging permissions to the PC on your phone if asked.
  2. Use the following ADB command to reboot your device into fastboot mode.
    adb reboot bootloader
  3. fastboot flash recovery /path/to/recovery.img

    In the command above, replace /path/to/ with the actual path to the twrp file. You don’t need to type a path if the twrp file is already placed in the adb folder. You’ll also need to type the correct file name of the image file in case you did not rename it to recovery.img.

  4. Now reboot your Mi 8 to recovery mode.
    • Turn off your phone.
    • Now press and hold the Volume Up + Power button for a few seconds, at the same time.
    • Let go of the buttons when you see the Mi logo on your device’s screen. You should soon see the TWRP splash screen.
  5. Swipe to allow modifications if asked and you should see the main TWRP screen. Here, select Install and then select the
  6. Swipe at the bottom to flash the zip. This will disable the device encryption.
  7. Go back to the main menu and similarly now flash the downloaded Magisk zip and then tap on the Reboot system button that appears on the bottom.

That’s it! You have successfully installed TWRP recovery and rooted your Mi 8.

sources: xda1 | xda2

This site uses Akismet to reduce spam. Learn how your comment data is processed.