Rooting your Xiaomi Mi 5X and installing TWRP recovery involves unlocking the bootloader, flashing TWRP, and then installing root through Magisk or SuperSU. Here’s a step-by-step guide to help you achieve this.
Warning:
- Unlocking the bootloader and rooting your device will void your warranty and may cause potential security risks.
- Data Loss: Unlocking the bootloader will wipe your device’s data. Make sure to backup everything.
- Proceed at your own risk!
Prerequisites:
- Xiaomi Mi 5X (fully charged).
- PC/Laptop with Windows.
- USB Cable.
- ADB and Fastboot tools installed on your PC (download from here).
- TWRP Recovery Image for Mi 5X.
- Magisk or SuperSU ZIP file for rooting.
Step 1: Unlock Bootloader
- Create a Mi Account: If you haven’t already, create a Mi account and log in on your Mi 5X.
- Enable Developer Options:
- Go to Settings > About phone and tap MIUI version 7 times to unlock Developer Options.
- Enable OEM Unlocking and USB Debugging:
- Go to Settings > Additional settings > Developer options.
- Enable OEM Unlocking and USB Debugging.
- Apply for Bootloader Unlocking:
- Visit Xiaomi’s unlock website.
- Apply for bootloader unlocking permission (you’ll need to sign in with your Mi account).
- Download Mi Unlock Tool:
- After approval, download the Mi Unlock Tool from Xiaomi’s website.
- Unlock the Bootloader:
- Boot your Mi 5X into Fastboot mode by turning it off and holding Volume Down + Power.
- Connect the phone to your PC.
- Open the Mi Unlock Tool, sign in with your Mi account, and follow the instructions to unlock the bootloader.
Step 2: Install TWRP Recovery
- Download TWRP for Mi 5X:
- Download the latest TWRP recovery image for Mi 5X from here
Name :mi5x_twrp_3.6.0_9_with_patched_root
Size : 44 mb
password :twcd
Download link : Download
- Make sure the file is named something simple like
twrp.img
.
- Move the TWRP Image to the ADB/Fastboot Directory:
- Move the
twrp.img
file into the folder where you have the ADB and Fastboot tools installed.
- Move the
- Boot into Fastboot Mode:
- Power off your Mi 5X.
- Press and hold Volume Down + Power to enter Fastboot mode.
- Connect your phone to your PC via USB.
- Open Command Prompt:
- Navigate to the folder where you have ADB and Fastboot installed.
- Hold Shift + Right-click in the folder and choose “Open command window here” or “Open PowerShell window here.”
- Flash TWRP:
- In the command window, type the following command to ensure the device is detected:bashCopy code
fastboot devices
- If your device is listed, proceed with flashing TWRP:bashCopy code
fastboot flash recovery twrp.img
- Once the flashing is complete, reboot the device into TWRP recovery:bashCopy code
fastboot boot twrp.img
- In the command window, type the following command to ensure the device is detected:bashCopy code
Step 3: Root Using Magisk or SuperSU
- Download Magisk or SuperSU:
- Download the latest Magisk ZIP (recommended) from the official Magisk GitHub page.
- Alternatively, download SuperSU ZIP from Chainfire’s official page.
- Transfer the ZIP File to Your Phone:
- Transfer the downloaded ZIP file (Magisk or SuperSU) to your Mi 5X’s internal storage or SD card.
- Boot into TWRP Recovery:
- If you haven’t already, boot into TWRP recovery by turning off your phone and pressing Volume Up + Power.
- Install the ZIP File:
- In TWRP, go to Install and locate the Magisk ZIP (or SuperSU ZIP) that you transferred to your device.
- Swipe to confirm the flash.
- Wait for the flashing process to complete.
- Reboot System:
- After the installation is done, tap on Reboot System.
Step 4: Verify Root
Once your phone reboots, check if the rooting process was successful:
- Install Root Checker:
- Download and install the Root Checker app from the Google Play Store.
- Verify Root:
- Open the Root Checker app and tap on “Verify Root”. If the device is rooted successfully, you will get a confirmation.
That’s It!
Your Xiaomi Mi 5X is now rooted, and you have TWRP recovery installed. You can now install custom ROMs, mods, and kernels, or make full backups using TWRP.