How can i root Xiaomi Mi 5

How to Unlock Xiaomi Mi5 Bootloader and Root via TWRP

Xiaomi's flagship Mi5 is one of the most incredible smartphones out there, offering hardware specs and performance comparable to the Samsung S7 at a fraction of the cost of Samsung. However, unlocking the Xiaomi bootloader and rooting the device is an adventure. These instructions will walk you through the process step by step.

How to Unlock Xiaomi Mi5 Bootloader and Root - Official Request

While locked bootloaders are often a point of contention for Android enthusiasts, Xiaomi offers an official method to unlock your Xiaomi Mi5 bootloader. It does, however, require a bit of prep work - namely a Xiaomi forum account in good standing. While anyone can create an account and send an unlock request, this has come up Xiaomi forum accounts with a certain post threshold take precedence. Diamond Tier forum accounts are instantly whitelisted and approved the fastest.

  1. Download the Latest Official China Dev ROM for Xiaomi Mi5 Here. Only the China Dev ROM can request the unlock!
  2. Drag the downloaded zip file to a folder named “downloaded_rom” in the root folder of the device. If there is no downloaded_rom folder, just create one.
  3. Navigate to your updater app and press the button […] symbol in the upper right corner.
  4. Select “Select update package” (see figure below). Now select the Rom / Zip file that you previously saved in your root folder.
  5. Go to the official unblocking requests section on the Xiaomi website here. Sign in to your account and fill in the requested information (name, country, phone number and reason for the unlock request).
  6. After several days (or up to a week)you will receive an activation code via SMS. Return to the Unlock website and enter the code you were given.
  7. Download the Mi Unlock software from the website or an alternative link here.
  8. Run the MIFlashUnlock.exe tool with administrator rights. Log into your account using the flash tool.
  9. Turn off your phone and press and hold the volume + power button to boot into fastboot mode. Now connect the phone to your PC via USB. Finally, click “Unlock Now” in the Flash Tool.

Wait for the process to be 100% complete and then restart the phone. Navigate to Security App> Permissions and select “Allow Root Access”. Note: This is a restricted version of root access. Instructions on SuperSu rooting can be found below.

How to unlock the Xiaomi Mi5 bootloader without an official request

Note: This method only works with certain ROM versions linked below.

Required: 7.1.20 China Weekly ROM or Global Stable V8.1.2.0 ROM

  1. Create a Mi Account if you don't already have one.
  2. Activate developer options on your Mi5. Go to Settings> About> tap repeatedly on Miui Version until you are notified that Developer Options has been enabled.
  3. Go to Additional Settings> Developer Options and enable USB debugging.
  4. Enter your Mi Account on your device and enable “OEM Unlocking” in Developer Options.
  5. Download Mi Unlock on your PC HereThen open it up and log into your Mi account (the same one you used on your device!).
  6. Restart your device to sync your Mi account. Then turn off your device completely and switch to Fastboot mode (decrease volume + power supply).
  7. Connect your Xiaomi Mi5 to your PC via USB and click the "Unlock" button in the Mi Unlock tool.

How to install Custom Recovery and Root Xiaomi Mi5

Note: For this, ADB must be configured on your PC, which is beyond the scope of this manual. Download links are provided here for convenience only.

  1. Download the Android SDK Command Line Tools to your computer (here).
  2. Download the latest TWRP version compatible with Xiaomi Mi5 here.
  3. Open a command line in Windows after installing the Android SDK command line tools. Connect your device to your computer via USB (with activated USB debugging!)
  4. Enter this into your command prompt: Restart adb bootloader
  5. Copy the TWRP image file to the folder that contains your ADB and Fastboot binaries. Rename the TWRP file to twrp.img
  6. Enter the following commands in the command prompt:

    Fastboot Flash Recovery twrp.img
    Fastboot restart

  7. TWRP should now be installed on your Xiaomi Mi5. Now we're going to root with SuperSu.
  8. Download the latest Recovery from SuperSu here.
  9. Copy the SuperSu zip file to your device's memory. Turn off your phone and restart it Recovery mode (Louder + Power).
  10. Select “Install” in TWRP and flash the SuperSu zip file. Once the flashing is complete, restart your device.

That's it! Your Xiaomi Mi5 should now be successfully rooted.