Skip to content

android file box

Repository for All Android Files

Menu
  • Home
  • Apps
  • Tools
  • ROMs
  • Themes
  • Wallpapers
  • Tips
  • Miscellaneous
  • Privacy Policy
Menu

How to Flash TWRP on Mi 8

Posted on September 14, 2018 by Fariez N

Xiaomi has rolled out its latest flagship phone in early 2018 (announced in May). This flagship is known as Mi 8 series available in there variants: Mi 8 SE, the standard MI 8 and Mi 8 Explorer Edition (EE). While the latest two are powered with Snapdragon 845, the Mi 8 SE is powered with Snapdragon 710. For you who are lucky enough to hand on this phone, you may not regret it despite Xiaomi has also rolled out another Snapdragon 845 device with a cheaper price: the Poco F1. However, some might feel a little bit of regret due to the fact that Xiaomi has implemented the Anti Rollback Protection mechanism onto the Mi 8 and Mi 8 EE.

The anti-rollback protection has been implemented in the latest versions of MIUI. This security mechanism is originally introduced within Android 8.0 Oreo. Google has made such a mechanism to be enabled by default in Android 9.0 Pie. Nevertheless, there is a discrepancy on how Google and Xiaomi have implemented the protection. On Google devices, such as Pixel 2/2XL/3, the anti-rollback protection will disabled if you unlock the bootloader. On the other hand, the case with Xiaomi devices is different. The Anti-rollback protection cannot be disabled even if you unlock the bootloader.

Ending up with a totally bricked device that you cannot fix even by reflashing the ROM unless you bring it to the official service center is just one of the impact of this protection. There is another impact though: you cannot sideload custom recovery just the way you flash it as usual through ADB/Fastboot. The Google’s anti-rollback protection works by making use of the Android Verified Boot 2.0 (which is generally known as Verified Boot). This prevents the device from booting whenever it detects that the device has been downgraded. On top of that, the anti-rollback protection also blocks you from flashing any custom recovery image like TWRP or RWRP. Fortunately, you can still boot the TWRP image and then flash the actual recovery image through the boot-only recovery. This tutorial tells you exactly how to do that.

Requirements

There are some points you have to prepare. You will need:

  1. A Xiaomi Mi 8 / Mi 8 EE device (codename Dipper) with an unlocked bootloader.
  2. A sufficient battery power remaining. Make sure your phone has at least 75% of juice.
  3. A USB Data cable compatible with your device. You can simply use the one comes shipped with your phone.
  4. A Desktop or Laptop computer running Windows 8/8.1/10. A 64-bit system is recommended.
  5. The Minimal ADB & Fastboot Driver. Download the installer here.
  6. The TWRP v3.2.3-0 Unofficial for Mi 8 Dipper. Download the flash-able .img file here.
  7. The DM Verity Disabler tool for Mi 8 device. The file is available in the same download page here.
  8. A spare time of your life which is not more than 30 minutes.
  9. A cup of tea or coffee – if you want.

Words of caution:

Please read thoroughly the article before really implementing the steps. Make sure you understand what you are going to do prior to doing it. We hold NO responsibility for any risks of the broken device so please proceed with caution. Do not forget to create a backup of all your important data and files including Contact, Call logs, messages, photos, apps, and so on.

This procedure will wipe your phone’s data partition. Please be aware beforehand.

Read: How to create a full backup on Mi 8/Mi 8 EE/Mi 8 SE without root.

Prior to flashing a custom recovery, your phone bootloader have to be unlocked officially. The unlocking mechanism is basically easy but you have to wait for official permission from Xiaomi developers team. Please read and follow our previous guide on how to unlock your phone bootloader. Read: How to properly unlock the MIUI bootloader – a complete guide.

The Steps to Install

Step 1 – Extract and install Minimal ADB & Fastboot driver into your computer. It is recommended to firstly disable Windows Driver Signature Enforcement mechanism prior to installing the driver. You can re-enable that Windows feature again once you have installed the driver.

A useful tool: Windows Driver Signature Disabler and Enabler tool.

Step 2 – Now install Minimal ADB & Fastboot driver software onto your computer.

Step 3 – Grab your phone and enable Developer options and USB Debugging options on your phone.

Enabling Developer Options on Mi 8:

Settings > about phone > click MIUI Version 7 to 8 times continuously

Enabling USB Debugging on Mi 8:

Settings > Additional Settings > Developer Options > enable usb debugging

Step 4 – At this point, we assume you have already unlocked your device bootloader. Now copy or transfer the .img file of TWRP into your phone’s internal storage. Alternatively, you may simply open the download page with your favorite mobile browser and fetch it directly into your phone. You may save it in the “Downloads” folder or simply put it in the root directory (not inside any folder).

Step 5 – Open up Windows Explorer on your computer. Find the newly downloaded twrp .img file. Now rename that file from “twrp-3.2.3-0-dipper.img” to “recovery.img“. Copy that recovery.img file to your ADB folder which is commonly located at drive C:\adb.

Note: At this point, you should already have the TWRP .img file saved in both your computer and your phone.

Now, you should already have a “recovery.img” file inside C:\adb\ folder.

Step 6 – Again, you should now already have two TWRP image files: One is saved in your computer in the ADB folder (renamed as recovery.img), and another one is in your phone storage (it does not need to be renamed). Next, grab your phone again, and turn it off completely. Reboot your phone into bootloader mode (which also known as Fastboot mode) by pressing Volume Down (-) and Power buttons together simultaneously until you see the Bunny Fastboot logo.

Step 7 – Connect your device which is already in Fastboot mode into your computer using its USB cable.

Step 8 – Now back to Windows Explorer. Go to the location of where you have put the TWRP flash-able image file (Step 5 above).

Step 9 – Hold down the “Shift” button on your keyboard and right-click on anywhere inside that folder. Next, choose “Open command window from here” or “Open Powershell Window here“.

Step 10 – Now in command prompt / Powershell window, type the following command to check the status of your device whether it has been connected successfully or not:

fastboot devices

Your device will be displayed there. Otherwise, you may try either reinstalling the ADB & Fastboot driver, use the full ADB Fastboot Platform Tools, or try installing Mi Flash tool. In some cases, replacing the USB cable and changing USB port may come helpful.

Step 11 – Next, issue the command below to boot your phone into TWRP. This is just booting and it is not flashing just yet.

fastboot boot recovery.img

Your phone shall now reboot into TWRP Recovery.

Step 12 – You will now see the user interface of TWRP being displayed. You may need to do the “Slide to allow system modification”.

Step 13 – After that, you will then see TWRP main menu. Choose “Install“.

Step 14 – Then tap the “Install Image” button in the lower right.

Step 15 – Now locate the TWRP’s .img file you have copied/downloaded earlier. Tap on its file name to select it.

Step 16 – Select “Recovery” from the partition list to make sure the file will be flashed there. Do the “Swipe to confirm flash” action.

Step 17 – Wait for it to do the job. The flashing should be finished in a couple of minutes. Once done, tap the Back/Home button to bring you back to the main menu.

Step 18 – Next, choose “Reboot” then choose “Recovery“. This will reboot your device again into recovery mode but this time using the already flashed TWRP instead of using its image file.

Step 19 – Once you are in the main menu of TWRP again, after rebooting, choose “Wipe“.

Step 20 – Chose the /data partition and proceed with it. This step is crucial since the /data description is not working as for now in the unofficial build of TWRP. The wiping process should complete in minutes. Again, this stage will wipe all your data and you’ve been warned.

Once done wiping, go back to the main menu.

Step 21 – Once you are in TWRP menu again, but this time you will need to go back to your computer. Now copy the downloaded “Disable_Dm-Verity_FEC_v1.1.zip” file earlier inside your ADB folder.

Step 22 – Jump over to the command prompt or PowerShell window you have used earlier. Type following commands:

adb devices
adb push Disable_Dm-Verity_FEC_v1.1.zip /sdcard/

The first line tells your computer to recognize your device, again, while the second one asks to copy the file from your computer to your phone.

Step 23 – Next in TWRP, choose “Install” then tap the “Install Zip” then locate the “Disable_Dm-Verity_FEC_v1.1.zip” file you have it copied earlier. Tap on its file name to select it.

Step 24 – Again, do the “Swipe to confirm flash” action. Wait few seconds for TWRP to finish its job flashing the zip file.

Step 25 – Once done, go back to the main menu. Select “Reboot” then reboot into the system.

That’s all. You now have TWRP v3.2.3-0 installed on your Mi 8/Mi 8 Explorer. The next time you reboot into recovery you will see TWRP UI instead of the MIUI stock recovery.

Give it a try!

How to reboot into recovery? There are two methods to boot Xiaomi Mi 8 into Recovery Mode which in this case has been replaced with TWRP.

The first method is through the Updater app:

  1. On your phone, open up Settings.
  2. Tap on “About phone”.
  3. Then tap on “System Update”.
  4. Tap the three dots at the top right-hand corner of the screen.
  5. Then choose “Reboot to Recovery Mode”

The second method is much more simple.

  1. Turn off your phone completely.
  2. Once it has been off, press the Volume Up and Power button simultaneously.
  3. Your phone will reboot into Recovery mode.

Where to go after this point? Most users will flash (read: Install) Magisk through TWRP to gain root access on their devices. You can start with it if you want. Some users also want to replace MIUI with many cool custom ROMs available out there. However, the decision is up to you. Just make sure you proceed with caution and full responsibility.

p.s: This guide is not for Mi 8 SE.

Leave a Reply Cancel reply

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

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

©2023 android file box