
Unlocking the full potential of your Xiaomi, Redmi, or Poco smartphone goes beyond the features offered in the standard MIUI or HyperOS environment. For enthusiasts who want ultimate control, improved performance, and deep customization, rooting is the key. The term „root” refers to gaining root access or „superuser” permissions on an Android device. Think of it as having administrator rights on your computer—it allows you to modify the system software in ways the manufacturer never intended.
This comprehensive guide will walk you through the entire process in a detailed, step-by-step manner. We will focus exclusively on the latest and most widely accepted methods, primarily using Magisk for a „systemless” root. This approach is cleaner, safer, and better at preserving the functionality of sensitive apps.
Before we dive in, it’s essential to understand both the powerful benefits and the significant risks involved.
Advantages of Rooting:
- Total Customization: Install custom ROMs (like LineageOS or Pixel Experience) to completely change your phone’s look and feel.
- Performance Enhancement: Overclock or underclock the CPU/GPU for better performance or improved battery life.
- Remove Bloatware: Uninstall pre-installed system apps that you don’t use.
- Advanced Backups: Create full, byte-for-byte backups of your entire system with tools like TWRP.
- Powerful Applications: Use apps that require root access for ad-blocking, advanced firewalls, and deep system automation.
Risks and Disadvantages:
- Voided Warranty: In most cases, unlocking the bootloader and rooting your device will void its warranty.
- Security Risks: If not managed properly, root access can be a gateway for malware.
- „Bricking” your device: A mistake during the process can leave your phone unusable (a „brick”). This is rare if you follow instructions carefully, but the risk is always present.
- Issues with certain apps: Some banking, payment, and streaming apps (like Netflix or Google Pay) may refuse to run on a rooted device due to security checks. Magisk helps to hide root status, but it’s not always a guaranteed solution.
This guide is designed to be as safe as possible, but you are proceeding at your own risk. Let’s begin.
Chapter 1: The essential preparation phase
Preparation is the most critical part of the rooting process. Rushing through these steps is the most common cause of problems. Take your time and ensure you have everything in order before you modify your device.
1.1. Create a complete backup of your data 💾
This is not optional. The first step in the rooting process, unlocking the bootloader, will completely wipe all data on your phone. This includes your apps, photos, messages, contacts, and internal storage files.
- Photos, Videos, and Documents: Manually copy these files to a PC, a USB OTG drive, or upload them to a cloud service like Google Photos, Google Drive, or OneDrive.
- Contacts, Calendar, and App Data: Ensure these are synced with your Google Account. You can check this in Settings > Accounts & sync > Google.
- Xiaomi Cloud: You can also use Xiaomi’s own cloud service to back up your device layout, system settings, and messages. Go to Settings > Accounts & sync > Xiaomi Cloud.
Do not proceed until you are 100% certain that your important data is backed up in a safe location.
1.2. Enable developer options and USB debugging ⚙️
To allow your computer to communicate with your phone on a deeper level, you need to enable a hidden settings menu called Developer Options.
- Go to Settings > About phone.
- Tap on the „MIUI version” (or „OS version” on HyperOS) box repeatedly—usually about 7-8 times. You will see a small message saying, „You are now a developer!”
- Now, go back to the main Settings menu and navigate to Additional settings > Developer options.
- Scroll down and enable the toggle for USB debugging. A prompt will appear asking for confirmation; accept it.
- You should also enable the OEM unlocking toggle in this same menu. This is a prerequisite for unlocking the bootloader.
1.3. Install ADB and Fastboot on your computer 💻
ADB (Android Debug Bridge) and Fastboot are command-line tools that are part of the official Android SDK. They are the primary way you will send commands from your PC to your phone when it’s in a special mode.
The easiest way to get them is by using the „15 seconds ADB Installer” for Windows, which is a widely trusted tool from the XDA Developers community. This will install ADB and Fastboot system-wide and also install the necessary Google USB drivers. For macOS or Linux users, you can install them via package managers (like Homebrew) or by downloading the official Android SDK Platform Tools.
To check if the installation was successful:
- Connect your phone to your PC with a high-quality USB cable.
- Open a Command Prompt (cmd) or PowerShell window on your PC.
- Type the command
adb devices
and press Enter. - You should see a prompt on your phone’s screen asking to „Allow USB debugging”. Check the box that says „Always allow from this computer” and tap „OK”.
- Type
adb devices
again. If you see your device’s serial number followed by the word „device”, you are successfully connected.
Chapter 2: The first major step: Unlocking the bootloader
The bootloader is a piece of software that runs every time you turn on your phone. It tells the device which operating system to load. By default, Xiaomi (like most manufacturers) locks the bootloader to prevent users from installing unauthorized software. To root your phone, you must unlock it first.
Warning: This is the step that will erase all of your data. Double-check your backup.
2.1. Bind your Mi account to your device
Xiaomi has a security mechanism that requires you to associate your Mi Account with the phone before you can unlock it.
- Go to Settings > Additional settings > Developer options > Mi Unlock Status.
- Tap on „Add account and device”. You will need to be signed into your Mi Account on the phone and have your mobile data turned on (Wi-Fi might not work for this step).
- If successful, you will see a message „Added successfully. Mi Account is associated with this device now.”
If you get an error, try signing out and back into your Mi Account, or wait a few hours and try again. Do not try to bind the account repeatedly in a short period, as this might temporarily block you.
2.2. The waiting period ⏰
This is perhaps the most frustrating part of the process for new users. After binding your account, Xiaomi imposes a mandatory waiting period before it will allow the unlock to proceed. This waiting time can be anything from 72 hours to 168 hours (a full week) or sometimes even longer.
There is no way to bypass this waiting period. It is a server-side security measure. Trying to do so will only reset the timer.
2.3. Using the Mi Unlock Tool
Once you have bound your account, it’s time to use the official Xiaomi tool to perform the unlock.
- Download the Mi Unlock Tool from the official Xiaomi Global Community website. Be sure to download it from the official source to avoid malicious software.
- Extract the downloaded ZIP file into a folder on your PC.
- Turn off your phone completely.
- Boot your phone into Fastboot mode. To do this, press and hold the Power button + Volume Down button simultaneously until you see the Fastboot logo (a rabbit repairing an Android robot).
- Connect your phone to your PC with the USB cable.
- Open the folder where you extracted the Mi Unlock Tool and run the
miflash_unlock.exe
file as an administrator. - Sign in to the tool using the exact same Mi Account that you bound to your device.
- The tool should detect your phone and show a message „Phone connected”. If it doesn’t, you may have a driver issue. Try reinstalling the drivers or using a different USB port/cable.
- Click the „Unlock” button. You will see several warnings about the risks of unlocking. Acknowledge them to proceed.
- The tool will now attempt to unlock your device.
- If you are still within the waiting period, it will fail and show you exactly how many hours you have left to wait. Simply close the tool, disconnect your phone, and try again after the specified time has passed.
- If your waiting period is over, the process will take a few seconds, and you will see a green „Unlocked successfully” message.
Your phone will now automatically reboot. As it was factory reset, you will need to go through the initial Android setup process again. You can verify the unlock status by going back to Settings > Additional settings > Developer options > Mi Unlock Status, where it should now say „Unlocked”.
Chapter 3: Method 1 – The classic path with TWRP and Magisk
This is the traditional method for rooting. It involves flashing a custom recovery environment (TWRP) and then using that recovery to install Magisk.
3.1. What is TWRP?
TWRP (Team Win Recovery Project) is a custom recovery for Android devices. It replaces your phone’s stock recovery mode with a much more powerful, touch-based interface. TWRP allows you to flash ZIP files (like custom ROMs or Magisk), make full system backups, wipe partitions, and perform other advanced maintenance tasks.
3.2. Find and download the correct TWRP for your device
TWRP builds are device-specific. Flashing a TWRP image meant for a different phone model will almost certainly cause problems.
- The Official Source: The first place to check is the official TWRP website. Find your device manufacturer (e.g., Xiaomi) and then your specific model (e.g., „Poco F5”).
- XDA Developers Forums: If an official build isn’t available, the next best place is the XDA Developers forum for your specific device. Often, talented developers will release unofficial but stable builds there. Search for „[Your Phone Model] TWRP XDA” on Google.
Download the .img
file for the TWRP recovery and save it to the ADB/Fastboot folder on your PC for convenience. Rename it to something simple, like twrp.img
.
3.3. Flashing the TWRP recovery
- Download the latest Magisk APK from its official GitHub repository. Do not download Magisk from any other source.
- Connect your phone (which is now on and set up) to your PC and transfer the downloaded Magisk APK file to the root of your phone’s internal storage or a microSD card.
- Reboot your phone into Fastboot mode again (Power + Volume Down).
- Connect it to your PC.
- Open a command prompt or PowerShell window in your ADB/Fastboot folder.
- Verify the connection by typing
fastboot devices
. You should see your device’s serial number. - Type the following command to flash the TWRP image:
fastboot flash recovery twrp.img
(Replacetwrp.img
with the actual filename of your TWRP image if you didn’t rename it). - This next step is extremely important! Once the flash is complete, you must boot directly into TWRP. Do not let the phone boot into the system. If you do, the system may overwrite your custom recovery with the stock one. To do this, press and hold the Power button + Volume Up button while the phone is still in Fastboot mode. Release the buttons as soon as you see the phone’s logo.
3.4. Rooting with Magisk via TWRP
If you successfully booted into TWRP, you will be greeted with its main menu.
- TWRP may ask if you want to „Allow System Modifications”. It’s generally recommended to Swipe to Allow Modifications.
- Tap the „Install” button.
- Navigate to the location where you saved the Magisk APK file earlier. (TWRP can install from
.apk
files directly in recent versions). - Tap on the Magisk file to select it.
- „Swipe to confirm Flash”. The installation process will begin, and you will see a log of the process on the screen.
- Once it’s finished successfully, tap the „Reboot System” button.
Your phone will now reboot. The first boot after rooting might take a little longer than usual. Once it’s on, look for a new app in your app drawer called Magisk. Open it. If it shows „Installed” with a version number at the top, congratulations! ✅ Your Xiaomi phone is now rooted.
Chapter 4: Method 2 – The modern approach: Patching the boot image
This method is becoming more common, especially for devices that do not have a stable or official TWRP build. This method does not require a custom recovery. Instead, you will use the Magisk app itself to „patch” your phone’s stock boot image, and then flash that patched image via Fastboot.
4.1. Obtaining the stock boot image (boot.img
)
This is the most challenging part of this method. You need the exact boot.img
file that corresponds to the exact version of the MIUI/HyperOS ROM currently installed on your phone.
The best way to get this is by downloading the full Fastboot ROM for your device.
- Identify your exact ROM version in Settings > About phone. Note the full version string (e.g.,
V14.0.5.0.TKLMIXM
). - Go to a trusted firmware repository, such as the Xiaomi Firmware Updater website or community channels.
- Find and download the Fastboot ROM (not the Recovery ROM) that matches your device model and version string. These are large files, often over 5GB.
- Extract the downloaded
.tgz
file using a tool like 7-Zip. Inside the extracted folder, you will find another folder, and within that, animages
folder. Inside theimages
folder, you will find theboot.img
file. This is what you need.
4.2. Patching the boot.img
with the Magisk app
- Install the latest Magisk APK on your phone (if you haven’t already).
- Copy the stock
boot.img
file you just extracted from your PC to your phone’s Downloads folder. - Open the Magisk app on your phone.
- Next to the „Magisk” heading, tap the „Install” button.
- Under „Method”, choose the option „Select and Patch a File”.
- A file manager will open. Navigate to your Downloads folder and select the
boot.img
file you transferred. - Tap „LET’S GO”. Magisk will now patch the file. It will save a new file, usually named
magisk_patched-[random_chars].img
, in your Downloads folder. The log screen will tell you the exact location and filename.
4.3. Flashing the patched boot image
- Copy the newly created
magisk_patched-....img
file from your phone back to your PC’s ADB/Fastboot folder. - Reboot your phone into Fastboot mode (Power + Volume Down).
- Connect it to your PC.
- Open a command prompt in the ADB/Fastboot folder and verify the connection with
fastboot devices
. - Type the following command to flash the patched boot image:
fastboot flash boot magisk_patched-....img
(Be sure to use the full, correct filename of the patched image). - Once the flash is complete, reboot your phone with the command:
fastboot reboot
Your phone will restart. Open the Magisk app, and it should show that Magisk is installed and fully functional. You have successfully rooted your device without using a custom recovery.
Final checks and what to do next
- Verify Root: You can download a „Root Checker” app from the Play Store to confirm that root access is working correctly.
- Manage Superuser Permissions: Whenever an app requests root access, Magisk will pop up a prompt asking you to grant or deny permission. You can manage these permissions in the „Superuser” tab of the Magisk app.
- Explore Modules: The true power of Magisk lies in its module system. You can browse and install modules from the „Modules” tab to add features like advanced ad-blocking, custom fonts, and system-level tweaks.
Disclaimer: This article is for informational and educational purposes only. The procedures described, including unlocking the bootloader and rooting your device, carry inherent risks. These actions may void your device’s warranty, and if performed incorrectly, could potentially damage or „brick” your device. The author and publisher of this article cannot be held responsible for any damage, data loss, or other issues that may arise from following this guide. Proceed at your own risk.