Many Android smartphone users eventually encounter limitations of the standard operating system. Built-in tools do not allow you to remove system junk, change the processor frequency, or install specialized modules for deep customization. It is in such cases that there is a need to obtain root access, which provide full access to the deviceโs file system. Using a personal computer in this process is often the only reliable way, especially if the phone does not turn on completely or is locked.
The process of rooting via a PC is completely different from installing applications like KingRoot directly on the phone. Here we will work with low-level tools, such as ADB and Fastbootthat allow you to interact with the bootloader and system partitions directly. This gives more control, but also requires strict adherence to the sequence of actions so as not to turn the device into a โbrick.โ
In this article we will analyze all the stages: from preparing drivers to flashing a modified boot image. You will learn how to safely unlock the bootloader and install the privilege manager Magiskwhich is the industry standard today. Remember that any manipulation of system files carries risks, so carefully study the material before starting.
Preparation of the workplace and necessary tools
Before you start hacking the system, you need to prepare the software environment on your computer. Without correctly installed drivers and utilities, communication with the phone will be impossible, especially in bootloader mode. You will need a computer running Windows, macOS or Linux, as well as a high-quality USB cable, preferably an original one, since cheap analogues often only support charging.
The first step will be installation Platform Tools. This is an official package from Google containing critical executable files. Download the archive from the Android developers site and unpack it to the root of the C drive or to a convenient folder without spaces in the path name. It is from this folder that we will run terminal commands.
โ ๏ธ Attention: Make sure that USB debugging is enabled on your smartphone. To do this, go to
Settings โ About phoneand click on the build number 7 times to activate the developer menu. Then in the section that appearsSystem โ For developersswitch the switch USB debugging to the active position.
Next you need to install specific drivers for your device. Processors often require Qualcomm HS-USB QDLoader drivers, and processors often require MTK VCOM drivers. If you are using a phone from Snapdragon Qualcomm HS-USB QDLoader drivers are often required, and for MediaTek โ MTK VCOM. If you are using a phone from Samsung, you must install the package Odin and the corresponding Samsung USB drivers. Lack of the correct driver is the most common cause of failure at the initial stage.
โ๏ธ Ready for rooting
Unlocking the bootloader
Most modern smartphones come with a locked bootloader, which is a safety measure of the manufacturer. This prevents unsigned code from running, including custom recoveries and modified kernels. Therefore, the first technical step is unlocking Bootloader. This process is individual for each vendor.
For devices running pure Android or from companies like Xiaomi, OnePlus i Motorola the procedure often comes down to executing a command in Fastboot mode. Connect the switched off phone by holding down a combination of buttons (usually Volume Down + Power), and enter the command in the computer console:
fastboot oem unlock
However, the situation with Huawei or Honor is more complicated: the company has officially stopped issuing unlock codes, which makes the procedure extremely difficult without third-party paid services. Owners Samsung need to switch the phone to Download Mode and confirm unlocking through the menu, which will automatically erase all data from the device.
What will happen to the data when unlocked?
The process of unlocking the bootloader initiates a full reset of the device to factory settings (Factory Reset). All your photos, contacts, applications and files in the internal memory will be permanently deleted. Be sure to back up your important data to a cloud drive or computer before starting the procedure.
After successfully completing the command, a warning will appear on the phone screen indicating that the device is no longer protected. This is fine. Restart your smartphone and make sure that when you turn it on, a corresponding message appears or the status changes in the developer menu. Now the way to install modified software is open.
Installing custom recovery (TWRP)
The standard recovery menu (Stock Recovery) has extremely limited functionality and does not allow installing third-party ones zip archives or make full backups of partitions. To obtain root access, we will need an advanced solution, such as TWRP Recovery. This is a touch-enabled environment that allows you to work with the file system at a deep level.
You need to find a recovery image (.img file) created specifically for your phone model. Using an image from another model is guaranteed to damage the device. Download the file from the official TWRP website or a trusted forum XDA Developers. Place the file in the folder with Platform Tools and rename it to recovery.img for convenience.
Put your smartphone into Fastboot mode (bootloader) and connect it to the PC. Enter the command to flash the image:
fastboot flash recovery recovery.img
Important nuance: on some devices with dynamic partitions (A/B partition), this command may not work directly, or you will need to use the flag --slot=all. After flashing the firmware, do not press the power button to boot normally. Immediately hold down the key combination to enter Recovery (often Volume Up + Powerto boot into the newly installed TWRP.
โ ๏ธ Attention: If you simply reboot the phone into the system after flashing TWRP without entering recovery mode, the stock Android firmware may automatically replace custom recovery with factory recovery. You will have to repeat the firmware procedure again.
Magisk firmware to obtain Root access
Today, the gold standard for obtaining superuser rights is the manager Magisk. Unlike the outdated SuperSU, Magisk works on a systemless system, that is, it does not make direct changes to the system partition. This allows you to bypass security checks in banking applications and anti-cheat games.
Download the latest version of Magisk in format .apk from the official GitHub repository. Rename the extension file to .zip (for example, Magisk-v26.0.zip) and copy it to the phone's internal memory. Boot into the previously installed TWRP Recovery.
In the recovery menu, select Install, find the Magisk archive and swipe to confirm the installation. The process will take a few seconds. When finished, click the Reboot Systembutton. When you first boot the system, the process may take longer than usual - this is normal, applications are being optimized.
If TWRP does not see the internal memory, connect the phone to the PC in MTP mode directly from the recovery menu and copy the Magisk.zip file through the computer. Or use the adb push command from your computer.
After loading Android, find the Magisk icon in the application menu. Open it. If the application offers additional configuration and reboot, agree. In the main window opposite the item "Magisk" there should be a status of "Installed" with a version number. This means that root access successfully received and active.
Alternative method: patching boot.img
For modern devices with encryption or a complex partition structure, the flashing method via Recovery may be unavailable or dangerous. In such cases, the method of directly patching the boot image is used. This method requires extracting the file from the stock firmware of your model. Copy the file to your phone, open the Magisk application and select โInstallโ โ โSelect and patch fileโ. Specify the path to the image. Magisk will create a new file with the name of the view boot.img from the stock firmware of your model.
Copy the file boot.img on your phone, open the Magisk application and select "Install" โ "Select and patch file." Specify the path to the image. Magisk will create a new file with the view name magisk_patched_[random].img in the Download folder. Return this file to your computer.
Now, while in Fastboot mode, run the command to flash the modified image:
fastboot flash boot magisk_patched.img
This method is the most secure for devices with boot partition verification (AVB), since it minimally interferes with the system structure. After flashing the firmware, run fastboot reboot. If the phone boots up and Magisk shows the installed version, congratulations, you have successfully rooted the device.
| Method | Complexity | Data risk | Compatibility |
|---|---|---|---|
| One-click applications (KingRoot) | Low | Low | Only old Androids (up to 6.0) |
| Via TWRP Recovery | Average | Medium (requires unlocking) | Most devices with unlocked BL |
| Patching boot.img (Magisk) | High | Low (without data reset) | Modern Android 10-14 |
| Kernel exploits | Very high | High | Depends on the specific kernel version |
Rights checking and access control
After installation, you need to make sure that the system actually issues superuser rights when requested. Download any application from Google Play to check Root, for example Root Checker. Run the test. If you see a green checkmark and a message indicating that access was granted correctly, then everything was successful.
You can now manage access requests through the Magisk app. The first time you launch a app that requires Root, a pop-up window will appear on your screen asking for permission. You can choose Grant, Reject, or Grant Permanently. This gives you complete control over which applications access system files.
โ ๏ธ Warning: Do not grant root access to dubious applications from unknown sources. Malware with root privileges can completely destroy your system, steal data, or lock your device. Trust only proven software.
You can also enable the "Zygisk" function in the Magisk settings. This allows Magisk code to run in the process of all applications, which is necessary for many modern modules to work. However, be aware that enabling this option may be detected by some security-sensitive applications.
The presence of the Magisk icon in the menu does not guarantee that Root will work. Be sure to check through a specialized application or try running the su command in the terminal.
Possible problems and solutions
The rooting process does not always go smoothly. One of the common problems is "Bootloop", when the phone endlessly reboots at the manufacturer's logo. This can happen if you flashed an incompatible Recovery image or damaged the boot partition. In this case, you need to enter Fastboot mode again and flash the stock one from the original firmware. Another common situation is the lack of access to the Internet after unlocking the bootloader on some models. data-i="150">. This can be solved by flashing the stock system through the official utility (Mi Flash Tool or HiSuite) with preliminary unlocking, or by installing custom firmware without such restrictions. boot.img And recovery.img from the original firmware.
Another common situation is the lack of access to the Internet after unlocking the bootloader on some models Xiaomi or Huawei. This can be solved by flashing the stock system through the official utility (Mi Flash Tool or HiSuite) with preliminary unlocking, or by installing custom firmware without such restrictions.
If the computer does not see the phone in ADB or Fastboot mode, try changing the USB cable or port. Often the problem lies in the drivers: go to Device Manager Windows and check for devices with an exclamation mark. Try manually updating the driver by specifying the path to the folder with Android USB drivers.
Will root access erase the warranty on the phone?
In most cases, unlocking the bootloader and obtaining root access will void the manufacturer's official warranty. However, you can always return the device to its original state by locking the bootloader back and flashing the stock firmware. But traces of unlocking (Knox trigger on Samsung) can remain on the hardware level and be detected by the service center.
Is it possible to get Root without unlocking the bootloader?
On modern devices (Android 8.0 and higher) this is almost impossible. Unlocking the bootloader is a prerequisite for flashing a modified kernel or recovery. Old exploits that worked without BL have long been closed by security updates.
Is it safe to use banking applications with Root?
Root itself does not block banks, but they detect the presence of superuser rights. Using Magisk Hide (or the DenyList setting in new versions) you can hide the fact of rooting from specific applications, and they will work correctly.
What to do if the phone goes into an endless reboot?
Don't panic. Press the Volume Down and Power buttons for 10-15 seconds to force the device to turn off. Then try entering Fastboot or Recovery mode. If the menus are available, try doing a Wipe Data/Factory Reset or flashing the stock image again.
Do you need to reflash the phone every time you update Android?
Yes, official system updates via OTA (over the air) often overwrite the modified boot partition, which is why root access is lost. You will need to patch the new boot.img from the updated firmware again and flash it via Fastboot.