Many Xiaomi smartphone owners are looking to expand the functionality of their device by gaining superuser rights. However, the classic Magisk installation method often requires a computer to run a modified bootloader. This creates a barrier for users who only have the smartphone at hand and want to experiment. Fortunately, modern methods allow you to bypass the need to use a PC by performing all the manipulations directly on the device.
The process of obtaining root access without third-party technology has become more accessible thanks to the development of tools like Termux and specialized applications for working with memory partitions. The key to successful installation is an unlocked bootloader, without which none of these methods will work. If you have already unlocked the bootloader of your Mi or Redmi, you are on the right path to full control of the system.
In this article, we will discuss a step-by-step algorithm that allows you to implement Magisk Manager and obtain root rights using only the resources of the phone itself. We will consider file preparation, download image patching and final installation, paying special attention to data security. Careful follow-up to the instructions minimizes risks, although working with system partitions always requires accuracy.
Preparation of the device and necessary files
The first step is to ensure that the smartphone is running smoothly during the procedure. You will need to download the official firmware corresponding to the current version of MIUI or HyperOS installed on your device. Accurate matching is critical, since trying to flash boot.img from another build can lead to a cyclical restart or complete system failure.
Once the firmware archive is uploaded, it needs to be unpacked. You'll find some files inside, but we're only interested in it. boot.img. In some cases, especially on devices with MediaTek processors, a file may be required. init_boot.img, However, for most Xiaomi models with Snapdragon, the main object of manipulation remains the standard boot image.
You will also need the latest version of Magisk in APK format. Only download it from the official repository on GitHub to avoid malicious code. Installing third-party builds from unverified sources can compromise the security of your personal data and banking applications.
- ๐ฑ Smartphone with at least 60% battery charge to prevent shutdown at critical moment.
- ๐พ Firmware file that corresponds exactly to the current version of the software on the device.
- ๐ Unlocked bootloader (Bootloader) with active status in the developer settings.
- ๐ File Manager with access to system folders, for example, MT Manager or ZArchiver.
Patching a boot image through Magisk
Once you install the Magisk app on your smartphone, launch it and look at the "Magisk" section. In some versions, the interface may offer installation, but we need a manual method. Click the "Install" button next to the Magisk version. The installation method selection menu will open, where the default is often "Automatic".
You need to select the option "Select and Patch a File" (Select and Patch a File). The system will open the file manager where you need to find the previously extracted boot.img. Make sure you choose the file from the unpacked firmware rather than the system file from the active partitions, unless you do the backup.
The patching process takes a few seconds, and the app will embed its code into the boot image, creating a new file with a name like this. magisk_patched_[random].This file is usually saved in the Download folder.Important: do not delete the original file or rename the patched image until all procedures are completed to avoid confusion.
What to do if the patching ended in a mistake?
Using Termux to Work with Partitions
To move a patched file to the system partition or execute commands without a PC, Termux Terminal Emulator is often used. This is a powerful tool that allows you to execute Linux commands directly on Android. Once you install Termux from F-Droid or GitHub (the version from Google Play is outdated), you will need to provide the application with access to the storage command termux-setup-storage.
You need to get permission to do the file operations. Although the full root is not activated yet, Termux allows you to manipulate files in the available directories. magisk_patched.img The command line allows you to quickly rename and copy files, which is especially useful when working with long names.
Some installation methods require renaming the file to zip and installing it via Recovery, but on modern Xiaomi devices with dynamic partitions, this may not work. So we're looking at a method of directly replacing or using specialized scripts that can be run through the terminal. If you're not familiar with the command line, be extremely careful when typing commands, as one error can lead to data loss.
- ๐ Enter commands carefully, checking syntax and file paths.
- ๐ Do not attempt to delete system files via Termux without root rights.
- ๐ป Use a keyboard with easy navigation to enter long paths.
Alternative methods: KernelSU and modules
KernelSU has become an alternative to the classic Magisk in recent years, which is a kernel-level solution that makes it more stealthy for banking and Google Play Protect security applications. KernelSU is also possible without a PC, but requires a compatible kernel or the use of GKI (Generic Kernel Image) modules on Android 12 and above devices.
If your device supports GKI, the process is simplified to install the KernelSU Manager app and image patching similar to Magisk. However, for older Xiaomi devices, this method may not work. In such cases, users turn to modules implemented through Recovery, but this requires a custom recovery such as TWRP or OrangeFox.
Installing custom recavators without a PC is possible through the TWRP Installer app or similar utilities if root access is available, or through ADB commands if the phone is connected to another Android device via OTG. However, if the goal is to get the first root, then the method of patching boot.img through Magisk Manager remains the most versatile and secure for most Redmi Note and Mi models.
๐ก
Use MagiskHide Props Config if some applications have stopped working after installing root, allowing you to change the system's fingerprints, making it invisible for security checks.
Instructions for installing a patched image
The most critical step is to insert a patched file into the boot section. Since there is no PC, we use the capabilities of Android itself. If you already have root rights (for example, temporary ones obtained through exploits, which is rarely true for new versions of Android), you can use direct firmware applications. However, in the context of "clean" installation on an unlocked bootloader without root, a method is often used with renaming and installation via flashcovery, if it allows zip archives containing img files.
Consider a method that often works on Xiaomi: creating an installation zip archive. You'll need a file manager capable of creating archives. Inside the archive, there must be the right structure to let Recovery know that this is an image for a boot partition. However, a more reliable way without a PC is to use the Flash It flash app or analogues that can img files directly if the device already has minimal privileges or uses specific exploits of the boot loader.
If none of the software methods is suitable, there is an option with the use of OTG-cable and flash drive connected to the phone and start the recovery process through the standard Recovery menu (if it supports installation from the phone) USB), But it's rare for stock recovery. MIUI. Therefore, the most realistic โno PCโ scenario for the end user often involves using another Android device as a host for the user. ADB, or the presence of a previously installed custom recavery.
โ๏ธ Checklist before firmware
Compatibility table and risks
Understanding the risks and compatibility of your device is key to success. Not all Xiaomi models respond equally to system partitioning interference. Below is a table illustrating the process for different series of devices.
| Device series | Processor type | Complexity of installation | The risk of blocking |
|---|---|---|---|
| Xiaomi Mi 9 / 10 / 11 | Snapdragon | Low. | Minimum |
| Redmi Note 8 / 9 / 10 | MediaTek / Snapdragon | Medium. | Medium (depending on region) |
| Poco F3 / F4 / F5 | Snapdragon | Low. | Minimum |
| Xiaomi 12 / 13 / 14 | Snapdragon / Dimensity | High (GKI) | Medium (requires KernelSU) |
It is worth noting that MediaTek-based devices sometimes require additional preparation (partitions), and an error in choosing a boot.img file can cause the phone to stop loading altogether. For such devices, having a PC to use the SP Flash Tool is still highly desirable, even if the main installation of Magisk is planned through the phone.
โ ๏ธ Attention: Firmware of the wrong image boot.img This can lead to a brick in your device. Always have the original file on hand. boot.img from the stock firmware, in order to return everything as it was, if necessary.
Completion of installation and first loading
Once the patched file has been inserted into the system (whether through an installer application, custom recap or script), it is necessary to reboot. The first download after the bootloader modification can take longer than usual - from 2 to 5 minutes. This is normal behavior, since the system conducts integrity checks and initializes new modules.
If the phone is on and you see the MIUI/HyperOS logo, and then the desktop โ congratulations, the hardest step is passed. Open the Magisk app. If the version number (e.g. 26.0 or 27.0) is displayed in the status bar, then the root rights are active. If the application offers a "re-install" or a reboot, agree.
Now you need to configure root hiding. Go to Magisk settings and turn on Zygisk, which will allow you to use exclusion lists (DenyList) so that banking applications and Google Pay do not see changes in the system. Without this step, many services may not work.
๐ก
A successful first download and display of the version in the Magisk app means that the process was successful.Do not delete the original firmware files immediately, store them for several days in case you need to roll back.
โ ๏ธ Note: Once root rights are granted, the software guarantee may be cancelled, and some banking applications require root access to be completely disguised, otherwise they will not be able to function.