How to get root rights on Xiaomi Mi 8: a complete guide to unlock the bootloader

The Xiaomi Mi 8 is still one of the brand’s most popular flagships among customization enthusiasts, and getting root rights on this device opens up access to Android’s deep settings, the ability to uninstall system applications, install modified firmware, and optimize performance, but the process requires care: wrong actions can lead to a device blink (completely inoperable) or loss of warranty.

In this guide, we will break down three key steps: unlocking the bootloader through the official Mi Unlock Tool, installing a custom TWRP recavator, and directly obtaining root with Magisk. All steps are tested on current versions of MIUI 14/15 (Android 12/13) and take into account the latest changes in Xiaomi’s security policy. If your Mi 8 runs on an older firmware, some steps may differ, we will mention this too.

We warn you beforehand that the procedure will reset all data on the device and cancel the official warranty. If you are not prepared for the risks, consider alternatives such as: ADB-commands for partial access to system functions without full root.

1.Preparation of the device: what to do before unlocking

Before you start the process, make sure your Xiaomi Mi 8 meets the following requirements:

  • πŸ“± Version. MIUI: Updated to the latest stable firmware (check in Settings) β†’ About the phone. 8 current versions based on Android 12/13.
  • πŸ”‹ Battery charge: At least 70% Interrupting process due to discharge can lead to software blink.
  • πŸ” Backup: All data (photos, contacts, messages) must be stored on a PC or in the cloud. Unlocking the bootloader erases internal memory.
  • πŸ–₯️ Computer: Required PC with Windows 7/10/11 (64-bit) free USB-Virtual machines are not recommended due to driver issues.

Also prepare the following tools:

  • πŸ”— Mi Unlock Tool (official utility from Xiaomi).
  • πŸ”§ ADB Fastboot (part of Android) SDK Platform Tools).
  • πŸ“ TWRP for Mi 8 (version 3.7.0 or later).
  • πŸ›‘οΈ Magisk (last stable assembly).

⚠️ Note: If your Mi 8 was purchased in China (the C-suffix version in the model), unlocking the bootloader may not be possible without additional manipulation. β†’ The phone. β†’ Model of the device.

Before connecting your phone to your PC, disable all antiviruses – they can block the Mi Unlock Tool or ADB. It is also recommended to use the original USB-Xiaomi cable, as cheap analogues can cause data transmission errors.

πŸ“Š What is your experience with root rights?
This is my first time.
I've already got a root on other devices.
I tried it, but it didn't work.
I haven't tried it, but I want to learn.

2 Unlock the bootloader through the Mi Unlock Tool

The Xiaomi Mi 8 bootloader is locked by default, and unlocking it is a must before installing TWRP or custom firmware, and the process consists of two steps: linking the Mi Account to the device and unlocking it.

Step 1: Linking your Mi Account

1. Enable the Developer Mode:

Go to Settings β†’ About phone and 7 times click on the MIUI version. After that, the Settings menu β†’ Additional option for developers will appear.

2. Activate the following options: Debugging over USB, Unlocking OEM (in some versions of MIUI may be called Factory Unlocking).

3. Link your Mi Account to your device:

Go to Settings β†’ Mi β†’ Mi Cloud account and make sure that the device is linked to the account. Without this, the Mi Unlock Tool will not work.

Step 2: Unlocking the bootloader

1. Turn off the phone and press Volume Down + Power to log into the Fastboot. Connect the device to the PC.

2. Launch the Mi Unlock Tool (administrator rights required) and log in to the same Mi Account as your phone.

3. The utility should detect the device. Press Unlock and wait for the process to complete (usually takes 1-3 minutes).

⚠️ Note: If the Mi Unlock Tool is a Couldn't unlock error or asks you to wait 72/168/360 The clock is a standard delay from Xiaomi. Try again at a specified time.

Once successfully unlocked, the phone will automatically restart. You can now start installing TWRP.

Device unlocked (check in Fastboot with fastboot oem device-info command)

ADB and Fastboot are installed on PC

TWRP file for Mi 8 downloaded and renamed to twrp.img

Debugging by USB is enabled-->

3. Installation of custom TWRP Recovery

TWRP (Team Win Recovery Project) is an alternative recovery that allows you to install custom firmware, create backups and get root rights. For Xiaomi Mi 8, use version 3.7.0 or later (older builds may not support data encryption).

Installation instructions:

1. Place the twrp.img file in the folder with ADB (e.g., C:\platform-tools\).

2. Transfer the phone to Fastboot (turn off and pinch Volume Down + Power).

3. Open the command prompt in the ADB folder (press Shift + right mouse button β†’ Open the PowerShell window here) and execute the command:

fastboot flash recovery twrp.img

4. After successful installation, restart the TWRP command:

fastboot boot twrp.img

If TWRP request a password (due to data encryption), enter PIN-code or pattern lock from your device.

⚠️ Note: On some versions MIUI 14/15 post-installation TWRP And the standard recap can be reset when you reset, so to avoid that, right after you enter the recap. TWRP Go to Mount. β†’ System and delete the file /system/recovery-from-boot.p (if it exists).

Now you have a working custom recaveri, and the next step is to install Magisk to get root rights.

πŸ’‘

If after installing TWRP, the phone is stuck on the Mi logo, try reflashing the recavers again or using the command fastboot erase userdata (erase data!).

4. Getting root rights with Magisk

Magisk is a universal root-rights tool that allows you to hide root from applications (such as banking or gaming) and install modules to modify the system.

Step 1: Install Magisk via TWRP

1. Download the latest version of Magisk (.zip file) and place it on the phone’s internal memory or SD-map.

2. boot into TWRP (turn off the phone and press Volume Up + Power).

3. In TWRP, select Install β†’ select Magisk.zip β†’ Swipe to Confirm Flash.

4. After installation, restart the device.

Step 2: Root rights verification

After you reboot, install Magisk Manager (or Magisk Alpha for newer versions) from Play Market. Open it and check the status:

  • βœ… Magisk: Installed (version).
  • βœ… Root: Available.

If done correctly, you’ll see a green tick and the ability to manage root rights for apps.

Problem.Possible causeDecision
Magisk is not installedIncompatible version of TWRPUpdate TWRP to 3.7.0+
Phone's fixated on loading.Improperly sewn boot imageRefuse the original boot via Fastboot
Root is not working after the MIUI updateUpdate re-recorded bootReinstall Magisk via TWRP
Detect root applications (banking, games)Magisk Hide not activatedEnable Magisk Hide in the settings

πŸ’‘

If the root phone stopped booting, try reflashing the original boot image via Fastboot with the fastboot flash boot command. stock_boot.img (You need to download the file separately for your version. MIUI).

5. Alternative methods of root production

If the standard method with Magisk didn’t work, consider alternatives:

  • πŸ”„ Patched Boot Image: Download the original boot.img For your firmware, patch it through Magisk Manager on your phone, and then run it through Fastboot. MIUI, where the.zip installation may not work.
  • πŸ“¦ Custom firmware: Install firmware on the base AOSP (Like LineageOS or Pixel Experience, where root is already built in. MIUI.
  • πŸ”§ ADB Root: On some versions MIUI You can get temporary root through the adb shell without unlocking the bootloader. Commands: adb shell su But this method does not work on all devices and is reset after restarting.

For the Xiaomi Mi 8 on MIUI 14/15, the most reliable way is Magisk + patched boot. If you are not sure about your actions, it is better to contact experienced users on the 4PDA or XDA-Developers forums.

What if Magisk can’t see the device?
If the application does not see root after installing Magisk, check: 1. Is boot.img correctly patched (should be patched through Magisk Manager). 2. Is Zygisk enabled in Magisk settings (for new versions). 3. Are there any conflicts with other modules (disable all modules in Magisk and restart). If the problem persists, try reinstalling Magisk manually through TWRP, pre-deleting the old version with fastboot erase command (beware of data loss!).

6 Risks and how to minimize them

Getting root rights always comes with risks, and here are the main ones and ways to avoid them:

  • πŸ’₯ Device Brick: Can occur when you interrupt firmware or use incompatible files. Always check the hash amounts of downloaded files (MD5 or SHA-1).
  • πŸ›‘οΈ Loss of warranty: Unlocking the bootloader voids the warranty. If maintenance is required, return the device to stock state (use the Mi Flash Tool).
  • πŸ”’ Security issues: Root opens access to system files that can be used by malware. Install applications only from trusted sources and use Magisk Hide for sensitive applications.
  • πŸ”„ Problems with OTA-Updates: After receiving root, automatic update MIUI It can break the system. Only update manually through TWRP.

To reduce the risks:

  • πŸ“Œ Create a full backup in TWRP Before any manipulation (Backup section, select all sections except for the OTA).
  • πŸ” Check the compatibility of files with your model (Mi 8 has dipper encoding).
  • πŸ“‘ Use stable versions of Magisk and TWRP. Alpha and Beta versions may contain critical bugs.

If something went wrong, don't panic.In 90% of cases, the Xiaomi Mi 8 can be restored via Fastboot or EDL-In extreme cases, there is always the possibility to flash the device through the Mi Flash Tool from a clean image.

7. What to do after obtaining root rights

Now that you have root, you can customize the device completely. Here are some useful things to do:

  • 🧹 Remove Bloat: Remove unnecessary system applications (e.g. Mi Browser, Mi Music) using Titanium Backup or System App Remover.Be careful - removing critical applications can lead to unstable work.
  • ⚑ Performance optimization: Install Magisk modules to improve autonomy or performance, such as: Greenify for hibernation of background applications. FDE.AI β€” Optimizing battery consumption. ViPER4Android β€” sound-enhancing.
  • πŸ”„ Castomic cores: Try cores like FrancoKernel or Perseus to overclock CPU/GPU or improving autonomy.
  • πŸ“± Interface Change: Install themes via Substratum or Hex Installer for deep customization MIUI.

Remember to regularly update Magisk and installed modules, and it is also recommended to disable automatic installation of MIUI updates, as they can overwrite modified system files.

If you plan to use root for specific tasks (such as backing up through Titanium Backup or changing a hosts file to block ads), study the specialized guides on these topics. Root offers almost limitless possibilities, but requires a responsible approach.

FAQ: Frequent questions about root on Xiaomi Mi 8

❓ Can I get root without unlocking the bootloader?
No, on the Xiaomi Mi 8, unlocking the bootloader is mandatory for installing TWRP or Magisk.The only workaround is temporary root through vulnerabilities in older versions of MIUI, but it is unstable and resets after a reboot.
❓ Why Mi Unlock Tool Should Wait 168 Hours?
This is Xiaomi's standard security measure, where you set a timer (usually 72-360 hours) when you first connect your account to your device, and you can't get around it, you have to wait, and you try to unlock it again before the time is up.
❓ How to hide root from banking applications?
Use Magisk Hide: Open Magisk Manager. Go to Settings β†’ Magisk Hide. Check the apps you want to hide root (e.g. Sberbank, Google Pay). Reboot your device. If the app detects root anyway, try adding Universal SafetyNet Fix to Magisk.
❓ Can I return the guarantee after receiving root?
Yes, but you need to return the device to a fully stocked state: Swipe the original firmware through the Mi Flash Tool (select clean all option); lock the bootloader with fastboot oem lock (warning: this erases all data!); delete the Mi Account from the list of unlocked devices in the Mi Unlock Tool. After that, the service center will not be able to determine that the device has been unlocked. However, some traces (for example, a modified bootloader status) may remain in service logs.
❓ How to update MIUI after rooting?
Automatic updates through Settings β†’ Updating the system can cause root loss.Manual update: Download the full service pack (.zip) for your model from Xiaomi's official website.Reboot to TWRP. Install the update via Install, but don't restart immediately.Sweep Magisk again (or patched). boot.img). Only then restart. If the update comes through OTA, Download it, but don't install it. payload.bin from the package, unpack it with the help of payload_dumper, Then patch the new one. boot.img through Magisk and run it through.