How to Root Xiaomi Mi 8/Mi 8 Lite/Mi 8 SE and Install TWRP Recovery

How to Install TWRP Recovery and Root Xiaomi Mi 8

Rooting your Xiaomi Mi 8 using Magisk will allow you to use root apps, perform modifications to the phone’s software, and do much more, all while passing Google’s SafetyNet. In this tutorial, we will show you how to install TWRP recovery and simultaneously root Xiaomi Mi 8/Mi 8 Lite/Mi 8 SE. Compatible with any Mi 8 device running MIUI 9 (Android 8.1 Oreo), MIUI 10 (Android 9 Pie), and MIUI 11 (Android 10).


The Xiaomi Mi 8 is the company’s 2018 flagship and the successor to the Mi 6. Powered by the Snapdragon 845 chipset, it totes a 6.21″ 1080 x 2248 display, 6 GB of RAM, and comes in storage options of 64/128/256 GB.

As is the case for most Xiaomi devices, the development community is pretty quick to get down to work on these as soon as the device is launched. With the availability of TWRP recovery for Xiaomi Mi 8/Mi 8 Lite/Mi 8 SE, you can now easily root the phone using Magisk.

Rooting the Xiaomi Mi 8 is a 3-step process, as is the case with almost every modern-day Xiaomi device. In brief, you will have to start by first unlocking the phone’s bootloader. Once unlocked, the second step is to install TWRP recovery, and finally flash Magisk to root Xiaomi Mi 8 devices.

Recommended: Download Latest Google Camera Port for Xiaomi Mi 8 (Works without Root)

How to Install TWRP Recovery and Root Xiaomi Mi 8


Table of Contents


Make sure that you fulfill all the requirements listed below before you head to the instructions.

  • First and foremost, ensure that you take a full backup of all the data on your phone. This includes messages, contacts, and everything else that you feel necessary. We also have a tutorial that will help you backup your data with ease.
  • Charge the Xiaomi Mi 8’s battery to at least 70% to avoid any shutdown during the process.
  • Enable USB debugging: To do so, go to the device ‘Settings’ -> ‘About phone’. Then tap on the ‘MIUI version’ continuously until ‘You are now a developer!’ message appears on the screen.
  • Also, enable OEM Unlocking in Developer Options. For that, go to ‘Settings’ -> ‘Aditional settings’ and tap on ‘Developer options’. Scroll down and enable the ‘OEM Unlocking’ toggle.
  • Make sure to install Android platform-tools on the PC. Here’s a quick guide on how to do it. If you’d like a simpler approach, then you can use Minimal ADB and Fastboot tool.
  • Download and install the latest Xiaomi USB drivers on the PC.


When asked to download a file during the steps, come back here and download it.

Unlock Bootloader on Xiaomi Mi 8

In order to install TWRP and root Xiaomi Mi 8, you must first unlock the bootloader. If you have already done it, you can head over straight to the steps below, If not, you can follow our comprehensive guide to Unlock Bootloader on Xiaomi Devices.

Once unlocked, head over to the next section below to install TWRP recovery on the phone.

How to Install TWRP Recovery on Xiaomi Mi 8

  1. First, download TWRP Recovery for Xiaomi Mi 8/Lite/SE.
  2. Transfer the downloaded image (.img) file to the folder where the ADB/fastboot binaries are present (e.g. C:\platform-tools).
  3. Hold the SHIFT key on the keyboard and right-click on any empty space inside this folder.
  4. Select the “Open PowerShell window here” option.How to Install TWRP Recovery on Xiaomi Mi 8 - Open PowerShell window here
  5. Power off your phone completely.
  6. Now hold the Volume Down and Power button simultaneously to boot into Fastboot mode.
    Boot Xiaomi Mi 8 into Fastboot Mode to Install TWRP Recovery
  7. Connect the phone to the PC while it is in Fastboot mode.
  8. Enter the following command to ensure that your phone is properly being detected by the PC over fastboot:
    .\fastboot devices
  9. The command should return the device ID. If it doesn’t, then make sure that you have the proper USB drivers installed.
  10. Enter the following command to install TWRP recovery on Xiaomi Mi 8:
    .\fastboot flash recovery twrp-recovery.img

    Replace “twrp-recovery.img” with the actual filename of the file. Example:

    .\fastboot flash recovery twrp-3.4.0-0-dipper-mauronofrio.img
  11. Now it is very important to boot directly to TWRP first before you can boot into the OS. To do so, enter the following command:
    .\fastboot boot recovery twrp-recovery.img

    Again, replace “twrp-recovery.img” with the actual filename of the file. Example:

    .\fastboot boot recovery twrp-3.3.1-2-dipper-mauronofrio.img

Your phone should now be in TWRP recovery mode. Go ahead and follow the steps below to root Xiaomi Mi 8 using Magisk.

Instructions to Root Xiaomi Mi 8

  1. First, download Magisk installer zip on the PC.
  2. Swipe the ‘Swipe to Allow Modifications’ button in TWRP when prompted.
    Xiaomi Mi 8 TWRP Recovery - Swipe to Allow Modifications
  3. Connect your Xiaomi Mi 8 to the PC using the USB cable.
  4. Go to the ‘Mount’ menu in TWRP and press the ‘Enable MTP’ button.
  5. Copy the downloaded Magisk file to the phone’s internal storage.
  6. Now go to the ‘Install’ menu in TWRP and select the ‘‘ file.How to Root Xiaomi Mi 8 - Flash Magisk v17.1 using TWRP
  7. Finally, swipe the button on the bottom of the screen to flash Magisk and root Xiaomi Mi 8/Mi 8 Lite/Mi 8 SE.
  8. Once the installation is complete, tap the ‘Reboot System’ button and let the device reboot.

After the phone boots, you should see the Magisk Manager app among the installed apps. Simply launch the application to verify that Magisk has been successfully installed. You should now have full root access on your Xiaomi Mi 8. You may now go ahead and install root apps, use Magisk to hide root from root-detecting apps, install audio mods like ViPER4Android, and do much more.

Also, with TWRP installed on your Mi 8, you can now flash custom ROMs, mods, and kernels on your phone, or use it to backup/restore the complete OS.

So, this was our detailed guide on how to Install TWRP recovery and root Xiaomi Mi 8/Mi 8 Lite/Mi 8 SE using Magisk. If you have any questions or face any issues during the process, do feel free to let us know via the comments section below, and we will do our best to help you out. Enjoy your rooted Xiaomi Mi 8 now!


  1. Don’t Need A Specific Miui Version For Rooting?
    My Version Is: Miui | Android 10

    1. Hi. I have updated the post with the latest TWRP that works with Android 10 too.

  2. Ahoj . odemkl jsem bootloader, recorvery menu se mi povedlo dat do tel ale když dám kopirovat soubory do tel nic se nezkopíruje?

    1. Hi Roman. Please post your comment in English so that it’s easier for me to understand your question and answer it accordingly.

    2. Hello.
      I can’t copy files to my phone as instructed.
      Loading bootloader dam mount my phone opens in the window and if I put the files in zip into the phone and after a few minutes it crashes and nothing is copied,
      Do you know where I’m making a mistake?

    3. Hi again Roman. I have updated the guide with the latest TWRP and Magisk zip files, along with the revised instructions. Please try again.

  3. I followed the instructions to a T, but the device stays on the boot screen for over a minute, then reboots to Mi-Recovery.

    1. Me too, my device stays on the boot screen and then reboots to mi-recovery. What should i do? thx.
      My device running Pie and MIUI

    2. Hi Wisnu. I have updated the post with the latest TWRP, which will work with MIUI 9/10/11.

  4. Why i need to wait until 360 hour. Is that mean it will appear the same after second trial

    1. Hi. That’s Xiaomi’s standard wait time for unlocking the bootloader. Bootloader unlocking is a one-time process, so you will not have to after this.

  5. i corectly follow the step, but my device still unroot… all my step same like that but still not work. can u help me?

  6. hey i did all the things you told me, but once i installed everything, the magisk doesnt appear anywhere, thanks

    1. Hi. There seems something odd with the ending instructions, I will try and figure it out.

      For now, simply boot back into TWRP and re-flash Magisk 18.1 zip. You should then see Magisk installed on your phone.

    2. I tried many aways I installed twrp recovery but I couldn’t find own storage of device .

  7. The waiting error is not happening anymore but All of the folders are encrypted and i tried formatting and they woudnt decrypt.

  8. Hey When i boot twrp recovery it never makes it passed the lr team screen and ive been waiting for about 10 minutes? any leads

    1. Hi Sam. It’s the same password as that of the lockscreen. Simply enter that and you’d be good to go.

      Let me know if you have any further questions.

  9. Hello Dhananjay,

    I bought Xiaomi Mi 8 (youth version, not released in INDIA yet)from China. in this there was no google applications or anything. I am trying to install google play store via some tutorial from YouTube. After Installing successfully via google framework, when I am trying to open google play store, it is not able to connect to goggle servers. currently I am in china only. Is there any way to make play store working.

    i will be really thankful for your help.

  10. Can you help me root my mi 8 lite?? or can I do exact the same as above???
    looking forward to hearing from you

    1. Hi. That’s an error related to an improper connection between your phone and the PC/Laptop. Simply restart your computer and use a different USB port this time. Also, ensure that your Mi 8 is in Fastboot Mode when you execute the command.

  11. Hi!
    Help me, please!
    I can’t exit from recovery mode on Xiaomi MI8 (+volume but. and Power – not working)

  12. Hello, I need some help…. I am stuck at step 7, 8 I transfer the files to the phone but I cant find them through twrp…. I copied them in many locations but I cant find them through twrp Actually the folders that I see in the phone are not the same with the folders I see in twrp. Any ideas?

    1. Hi Nick, that’s because the folders you see is the ROOT directory of your device. In that list, you will find a folder named “sdcard” or “storage” which will be your internal storage.

  13. Thanks mate, best tutorial posted to date to successfully root the Mi 8. Couple of issues noted though once the root is done.

    I cannot update to 10.0.2 Global. Via OTA or Manual with TWRP installed or Normal Recovery even after i uninstalled root.

    I tried to root the device after I installed the 10.0.2 update and that doesn’t work either.

    If you can check this option out, that will be awesome. Root you MI 8 with MIUI version 10.0.2

    1. Thanks for the appreciation. I think (Though not fully sure) that it could be due to the Anti-rollback Protection by Xiaomi. Please refer to this article and check your current rollback index.

      If activated, then we’ll need to follow a slightly different approach to install TWRP.

Leave a Reply

Your email address will not be published. Required fields are marked *