How to Get Root on Xiaomi: The Complete Guide

Owning a Xiaomi device is a huge opportunity, but the standard MIUI or HyperOS shell often restricts access to system files. Obtaining superuser rights, or Root rights, allows you to completely change the logic of your smartphone, remove system debris and install powerful modules.

Before you start taking action, you need to realize that getting Root access is an irreversible change in the software environment. Unlike just changing the wallpaper, embedding in the system partition requires unlocking the bootloader, which automatically voids the manufacturer's warranty. Once the bootloader is unlocked, Xiaomi service centers can refuse free repair even in case of accidental non-software breakdowns. However, for enthusiasts, this is the only way to complete freedom of the device.

The modern rooting standard is based on Magisk, which allows you to obtain administrator rights without modifying the system partition in real time, which allows you to use banking applications and Google Pay services, which usually block work on modified devices. Next, we will discuss in detail the stages of preparation, choice of tools and the process of implementing superuser rights on Xiaomi devices.

Preparation of the device and necessary tools

The beginning of any deep intervention requires careful preparation. You will need a computer running Windows (unlocking programs often do not work correctly on macOS or Linux without emulators), the original computer is designed to be a very useful tool. USB-cable and stable Internet connection. It is also critical to make a full backup of all data, as the process of unlocking the bootloader will completely clear the memory of the smartphone.

To do this, you'll need to download and install the Mi Unlock Tool on your PC. This is Xiaomi's official software for unlocking the bootloader. Without this step, you can't install Magisk or any other rights manager, and you also need to activate the developer mode on the smartphone and allow debugging over USB.

โ˜‘๏ธ Checking readiness for Root

Done: 0 / 4

Don't forget to check the firmware version. If you're on the global version and the scatter is tied to a Chinese account (or vice versa), there may be anchor errors. In some cases, you need to flash to the stock version of the software corresponding to the account region. Make sure you know your Mi Account password, as once unlocked, the phone will require you to enter it on its first run.

โš ๏ธ Note: The process of unlocking the bootloader via the Mi Unlock Tool initiates a full Wipe Data reset. All photos, contacts and applications will be deleted without recovery if a copy is not made.

Unlocking the bootloader (Bootloader)

Unlocking the bootloader is a fundamental step without which it is impossible to obtain Root rights on Xiaomi. The bootloader is a small program that runs to the operating system and checks the integrity of the software. By default, it is blocked to prevent the installation of uncertified firmware. To unlock it, you need to apply through the MIUI Unlock application in the phone settings.

Once an account is linked to a device, you will have to wait 7 to 168 hours (1 to 7 days) for this security timer introduced by Xiaomi to prevent users from impulsively unlocking the device and having time to familiarize themselves with the risks.

fastboot oem unlock

When the waiting time expires, you need to put the smartphone in Fastboot mode (clamping the volume button when the phone is turned off and connecting the cable to the PC). In the Mi Unlock utility on your computer, press the Unlock button. The process can take several minutes, after which the device will restart and clear the data. An open lock icon will appear on the boot screen, which signals the success of the operation.

What if Mi Unlock shows error 10008?
Error 10008 often occurs when you are not using a VPN or Internet connection. Try changing the network (to distribute the Internet from your phone), disable the antivirus on your PC or use a mobile hotspot from another operator, and re-associating your account in the MIUI Unlock application after clearing its cache also helps.

Selecting a rooting method: Magisk vs. other utilities

In the modern Android era, the old methods of obtaining rights through KingRoot or SuperSU are irrevocably outdated and can be dangerous. The gold standard of the industry is Magisk (from topjohnwu), which implements a system-less approach, that is, it does not physically change the partition of the system, but loads its modules at the start of the system, which ensures high compatibility and stealth.

There is also the KSU (KernelSU) project, which works at the kernel level and is suitable for devices with an unlocked bootloader, but requires support from the kernel. However, for most Xiaomi users, the classic Magisk remains the most stable and versatile choice. It allows you to manage application rights through a user-friendly interface and install modules that change fonts, system sounds or even emulate other devices.

It is important to distinguish Magisk from simple APK-Magisk installation requires a download image patch (boot.img). This means you need to find an exact copy of the firmware that is currently installed on your phone, extract the bootloader image from it and patch it through the Magisk Manager app. Using an image from another version of the software will lead to Bootloop (cyclical reboot).

๐Ÿ“Š Which Rooting Method Do You Prefer?
Magisk (classic)
KernelSU (new core)
I'm not planning on rooting.
I'm using custom recovery.

Step-by-step installation instructions Magisk

The process of establishing superuser rights consists of several technically accurate steps. First, you need to download the official firmware for your model (Xiaomi.eu or global from miui.com), which is completely the same as the version installed on the phone (the build number must be identical). boot.img (sometimes init_boot.img for new Android models 13+).

Flip this file to your phone, install the Magisk app (APK from the official GitHub) and open it. Click the "Install" button next to the Magisk version, select "Select and patch file" and specify the previously extracted file. boot.img. The application will create a patched version of the file in the Download folder with a prefix patched_.

PhaseAction.The result
1Firmware searchFull match of the software version
2Extracting boot.imgFile ready for patch
3Patch through MagiskFile. patched_boot.img
4Firmware through FastbootActivation of Root rights

The final step is done through the computer. Place the patched file on the PC, put the phone into Fastboot mode and execute the command in the console: fastboot flash boot. patched_boot.img (or fastboot flash init_boot patched_init_boot.img After the reboot, the Magisk app should have the word "Installed" in it, which confirms that it has successfully gained Root access.

๐Ÿ’ก

Save the original boot.img from your stock firmware! it will be needed if you want to return to a clean system without Root rights or if a patched file causes download errors.

Checking rights and working with banking applications

After successful installation, many users face a problem: Banks, Google Pay and various enterprise services stop working, claiming that the device is compromised, this is because Magisk does not hide its rights from other applications by default.

You need to go to Magisk settings, turn on "Zygisk" and "Hide the Magisk app" (rename the package), then check the "Setting up the denial list" section against all banking applications, Google Play Services and Google Play Store, which will force the system to give these applications "clean" status, hiding the presence of Root rights.

However, on Xiaomi devices with a shell MIUI 12.5+ Sometimes you need a Shamiko or Play Integrity Fix module to successfully pass Google Play Integrity security checks. API. Without it. NFC-Payment may not work even if the bank application is launched.

โš ๏ธ Warning: Constant updates to banking applications may reset the concealment settings. If the bank app stops letting you into your account, check the Magisk Hide settings after each major system or application update.

Possible problems and ways to solve them

Root rights are not always easy to get, and the most common problem is Bootloop, where the phone is endlessly rebooted, which happens if the incorrect boot.img is stitched or the integrity of the system files is compromised, and you need to re-enter Fastboot mode and flash the original (not patched) bootloader image, returning the phone to its pre-root state.

Another common difficulty is the loss of a broadband module (IMEI). On some Xiaomi models, improper partition manipulation can lead to loss of communication. To avoid this, never use fastboot erase commands for persist, modem, or EFS unless you know exactly what you are doing. Before any experiments, back up those partitions via TWRP or command line.

Users may also find it impossible to pass the SafetyNet/Play Integrity check, which is only solved by installing special modules and fine-tuning Zygisk. It is almost impossible to hide the fact of an unlocked bootloader with standard means, since this status is checked at the hardware level.

๐Ÿ’ก

The key to success is to match the firmware version that boot.img is taken from with the system version installed on the phone, and even a single digit difference can cause the device to fail.

Will Root-rights reset the system update over OTA?
Yes, installing system updates over the air" (OTA) It usually overwrites the boot partition, removing Magisk and returning the stock boot loader. However, the superuser rights (unlocked bootloader) will remain. To update and save the Root, you need to use the "Install on an Inactive Slot" function in Magisk before restarting, or every time after the restart. OTA patch up boot.img.
Can I get Root on Xiaomi without unlocking the bootloader?
No, on modern Xiaomi devices, this is not possible, vulnerabilities that allowed it to be done (for example, through the use of a computer). EDL-The only legal and working way is to officially unlock through the Mi Unlock Tool with a waiting timer.
Is it dangerous to use Root for a regular user?
For the average user who just calls and sits on social media, Root carries more risks than benefits: you lose your warranty, data security goes down (malware can get full access), and some applications stop working. Root is only for those who understand why they need system changes.
How to remove Root completely and return the warranty?
To remove Root, open the Magisk app and select "Delete Magisk." The phone will restart in its clean state. However, unlocking the bootloader will remain. To get it back, you need to flash the full firmware version through the Mi Flash Tool with the "Clean all" option, which will lock the bootloader back (on some models) or at least return the stock bootloader, but the unlock marks in the logs may remain.