How to put a root on Xiaomi Mi 8: a safe guide with unlocking the bootloader

Getting root rights to Xiaomi Mi 8 (codenamed dipper) opens up access to hidden Android features, but requires care. This smartphone, released in 2018, is still popular thanks to the flagship hardware (Snapdragon 845 processor, 6/8 GB of RAM), but the manufacturer limits the user experience through a locked bootloader and security policy MIUI. Unlike the newer Xiaomi models, the Mi 8 unlock process is simplified โ€“ you do not need to wait for 720 hours of account confirmation, as on devices of 2020+ years.

But even here, there are pitfalls. For example, an incorrect anti-rollback firmware can turn a phone into a brick, and a mistake when installing a TWRP can lead to a reboot cycle. In this guide, we will analyze three proven root-right methods (via Magisk, a boot image patch and an alternative OrangeFox Recovery**), discuss preparation and recovery after possible failures. All instructions are relevant for MIUI 12/13/14 based on Android 10-13.

โš ๏ธ Critical warning: Xiaomi Mi 8 with firmware older V12.0.3.0.QEACNXM (Android 10 is in place for protection ARB 4.Attempting to sew through an older version MIUI After the update, it will lead to an irreversible lock of the bootloader (hard-brick). โ†’ The phone. โ†’ Version. MIUI beforehand.

1. Preparation for unlocking the loader

The first step is to unlock the bootloader, without which you can't install custom recavers or patch system files. 8 process 2-3 hourly (including waiting) SMS-code from Xiaomi, but requires pre-configuration.

First, back up your data. Unlocking will reset your phone to factory settings! Use Mi Cloud or third-party utilities like Swift Backup (unrooted).

  • ๐Ÿ“ฑ Contact and SMS (export to.vcf and.xml)
  • ๐Ÿ“ท Photo/video in the folder DCIM (copy it to a PC)
  • ๐Ÿ”‘ Wi-Fi passwords (save network list in Settings) โ†’ Wi-Fi)
  • ๐ŸŽฎ Save games (use the game cloud or Helium)

Next, link the device to your Mi Account:

  1. Go to Settings โ†’ Xiaomi Account and log in.
  2. Turn on data synchronization.
  3. Activate the option Settings โ†’ Additional โ†’ For developers โ†’ Unlock OEM (if there is no item, tap 7 times on the MIUI version in the About Phone section).

โš ๏ธ Note: If you have previously changed IMEI or baseband, unlocking may result in a Couldn't verify device error, which requires a rollback to the stock firmware via the Mi Flash Tool.

๐Ÿ“Š What method of unlocking the bootloader you used before?
Official Mi Unlock Tool Officially
Bypassing through EDL
Xiaomi server patch
Never unlocked.

2 Unlock the bootloader through the Mi Unlock Tool

Xiaomiโ€™s official tool, the Mi Unlock Tool, is the only safe way to unlock for beginners. Download the latest version from the official website (avoid third-party sources โ€“ viruses are often planted there).

Algorithm of action:

  1. Install Mi Unlock Tool on Windows 7/10/11 PC (on macOS/Linux works via Wine, but bugs are possible).
  2. Turn off the phone and press Volume Down + Power to log into the Fastboot.
  3. Connect your device to your PC via the original cable (cheap cables may cause a USB device not recognized error).
  4. Launch the Mi Unlock Tool and log in with the same account as your phone.
  5. Press Unlock and wait for the SMS with the confirmation code (comes within 1-10 minutes).

Once successfully unlocked, the phone will automatically reset. Check the bootloader status with the ADB team:

fastboot oem device-info

In the answer, look for the line Device unlocked: true. If you see false, repeat the procedure.

Registered Mi Account with a linked phone number

USB debugging and OEM unlocking enabled

Xiaomi drivers installed on PC (check in Device Manager)

Battery Charge > 60%

Backup of all data.-->

3. Installation of custom recaveri (TWRP or OrangeFox)

Xiaomi stock reavers do not allow you to install unofficial firmware or patches. For the Mi 8, two stable options are available:

  • TWRP 3.7.0 is a classic recovery with MIUI 12-14 support.
  • OrangeFox R11.1 is an alternative with improved interface and built-in support for Magisk.

Download the image of the recovery for dipper from the official website:

  • ๐Ÿ”— TWRP for Mi 8
  • ๐Ÿ”— OrangeFox for Mi 8

Installation via fastboot:

fastboot flash recovery twrp-3.7.0-dipper.img


fastboot boot twrp-3.7.0-dipper.img

After the first download, a request will appear to TWRP for permission to modify the system - swipe to the right, otherwise the recovery will not be able to patch files.

โš ๏ธ Attention: If after installation TWRP The phone is loaded into the stock recavator, so the anti-rollback protection is activated. MIUI Using the Mi Flash Tool with clean all mark.

What to do if TWRP does not start?
If after the command fastboot boot phone goes into a reboot or hangs on the Mi logo, try it: 1. Swipe Recovery in both slots: fastboot flash recovery twrp.img and fastboot flash recovery_b twrp.img (for devices A/B partition). 2. Disable signature verification in TWRP: In the Recovery menu go to Settings โ†’ Disable DM-Verity. 3. Use OrangeFox instead of OrangeFox TWRP โ€” It works better with new versions. MIUI.

4. Getting root rights through Magisk

Magisk is a universal tool for obtaining root rights without changing the systemless root. The latest stable version is Magisk 26.4 (check the relevance on GitHub).

There are two ways to install:

  1. Patch boot image: Suitable for stock firmware. download the original boot.img for your version MIUI (You can get it out of the firmware package.tgz. boot.img In Magisk, press Install. โ†’ Select and Patch a File. magisk_patched.img Fastboot: Fastboot Flash boot magisk_patched.img
  2. Installation through the Recovery: For custom firmware. Download Magisk-v26.4.zip. Reboot to TWRP. Install. ZIP-file via Install.

After installation, check the root rights with the Root Checker app or the team in Terminal:

su

If you see the # invitation, the root is successfully activated.

๐Ÿ’ก

To hide root rights from banking applications (Sberbank, Tinkoff), activate MagiskHide and add apps to the exclusion list. For Google Pay, additionally install the Universal SafetyNet Fix module.

5. Solving common problems

Even with the correct following of the instructions, errors can occur. Below is a table of the most common problems and their solutions:

Mistake.Reason.Decision
Fastboot: unknown commandNo ADB/Fastboot drivers installedInstall Platform Tools or Minimal ADB Package
This device isn't connected in Mi UnlockIncorrect cable or USB portUse the original cable and USB 2.0 port (blue USB 3.0 ports often don't work)
Cyclical reboot after Magisk installationIncompatibility with the MIUI versionSweep boot.img without a patch or upgrade Magisk to the latest version
Couldn't verify device when unlockingIMEI or baseband changedRestore the original modem via the Mi Flash Tool with firmware clean all
TWRP asks for password when downloadingData Encryption (FBE)Enter the password from the lock screen or format /data (data loss!)

If the phone has turned into a brick (no switching on, no button response), try to recover through the phone. EDL-This will require a box of Mi Authorized Account or help from a service center.

๐Ÿ’ก

On Xiaomi Mi 8 with firmware newer than V12.5.1.0 (Android 11), installing Magisk via boot.img patch can result in data loss in the /data partition. Always back up TWRP before manipulation!

6. Alternative methods of obtaining root rights

If the standard methods didnโ€™t work, consider these options:

1. Custom ROM firmware

Some firmware (like LineageOS 20 or Pixel Experience) already include root rights.

  • ๐Ÿ”„ Google Security Updates (Relevant for Android 13)
  • ๐Ÿš€ Lack of Xiaomi services (battery savings)
  • ๐Ÿ”“ Root rights out of the box (without additional manipulations)

Cons: loss of camera functions (Mi 8 is known for excellent shooting on stock firmware) and possible bugs with VoLTE.

2.Use of OrangeFox Recovery + Magisk

OrangeFox is better adapted for MIUI 13/14 than TWRP.

  • ๐Ÿ”ง Bypassing the DM-Verity test
  • ๐Ÿ“ฆ Supports Magisk installation in one click
  • ๐Ÿ”„ Save data when switching between firmware

3. Unlocking through EDL (for experienced)

If the Mi Unlock Tool refuses to unlock the bootloader, you can use the emergency mode EDL.

  • ๐Ÿ’ป Windows PC and Qualcomm 9008 drivers
  • ๐Ÿ”Œ Cable with support EDL (not USB-cables fit!)
  • ๐Ÿ”‘ Authorized Mi Authorized account (you can buy access on forums)

โš ๏ธ Attention: Incorrect actions in EDL damage UEFI The device, making it unsuitable for recovery even in a service center.

7. System optimization after obtaining root rights

Root rights give you access to the deep customization of the Xiaomi Mi 8.

1. Disable unnecessary MIUI services

With Titanium Backup or SD Maid, freeze:

    2. Improve autonomy

    Install Magisk modules:

    • ๐Ÿ”‹ Battery Charge Limit โ€“ Limiting up to 80% to save battery life
    • โšก Fast Charge Toggle โ€“ Forced fast charging

    3. Accelerate productivity

    For gamers:

    • ๐ŸŽฎ Game Turbo Magisk Module โ€“ Optimizes the Game Turbo Magisk Module FPS play
    • ๐Ÿ”ฅ CPU Boost โ€“ overclocking the processor (caution, warms up!)

    โš ๏ธ Attention: On the Snapdragon 845, overclocking above 2.8GHz can lead to trottling (automatic frequency reduction due to overheating.

    8 How to get it all back (rolling back to drain)

    If you no longer need root rights or plan to sell your phone, return the device to its original state.

    1. Download the latest stable MIUI firmware for Mi 8 from Xiaomiโ€™s website (select the Fastboot version).
    2. Unpack the archive and launch the Mi Flash Tool.
    3. Connect your phone in Fastboot mode (Loudness down + Power).
    4. In the Mi Flash Tool, select the firmware folder and click Refresh โ†’ Flash.
    5. Select Clean All (Full Reset) or Clean All and Lock (Reset + Lock bootloader) mode.

    Once you've done the firmware, the phone will go back to the factory settings, and the bootloader will lock, so to get the root rights back, you'll have to repeat the whole procedure from the beginning.

    โš ๏ธ Note: If you have installed custom firmware with modified anti-rollback (such as LineageOS), rollback to stock MIUI This may result in an error, so you can first run through the intermediate version. MIUI (for example, V12.0.3.0), And then it's relevant.

    ๐Ÿ’ก

    Before selling the phone, be sure to clean all and lock in the Mi Flash Tool. Buyers often check the status of the bootloader through fastboot oem device-info, and an unlocked bootloader can cause bargaining.

    FAQ: Frequent questions about root rights on Xiaomi Mi 8

    โ“ Can I get a root without unlocking the bootloader?
    No. On the Xiaomi Mi 8 (as on all modern Xiaomi smartphones), unlocking the bootloader is a must. Alternative methods like exploits (DirtyCOW, KingRoot) do not work on MIUI 12+ due to the enhanced kernel protection.
    โ“ Why Banking Apps Donโ€™t Work After Magisk Installation?
    Banks (Sberbank, Tinkoff, VTB) block access when root rights are detected. Solutions: Activate MagiskHide in Magisk settings. Add the bank app to the exclusion list (MagiskHide โ†’ select the app). Install the Universal SafetyNet Fix module. Reboot your phone. If it doesn't work, use the second user space (Island or Shelter) for banking applications.
    โ“ How to update MIUI after-root?
    Update via Settings โ†’ Updating the system will result in the loss of root rights. Alternative methods: Manual firmware: Download the full service package (.tgz), unpack and run through TWRP (Patched Boot: After the update, remove a new one boot.img, Patch it through Magisk and stitch it back. โš ๏ธ Don't update through OTA โ€” This will lead to a bootloop!
    โ“ Can I get a rut on Mi? 8 global-fixed (EEA/Russia)?
    Yes, the process is identical for all regions (China, Global, EEA, Russia). The only difference is the firmware versions: China: updates are released more often, but without Google Services. Global/EEA/Russia: more stable, but there may be delays with security patches. For root rights, it is better to use China Stable - it is more often tested by enthusiasts on the XDA and 4PDA forums.
    โ“ What to do if after unlocking the bootloader the phone does not turn on?
    Symptoms and Solutions: Black screen, no response to buttons: Try to pinch the volume up + Meals for food 20 Floating on the Mi logo: Fly the stock Recovery through fastboot flash recovery stock_recovery.img. Cyclical reboot: Most likely damaged partition /data. V TWRP run the Wipe โ†’ Format Data (loss of all data!) Red LED when connecting to a charger: Critical bootloader error. Requires firmware through EDL. If nothing helps, then you should address the topic. 4PDA โ€” There are instructions for recovery through TestPoint.