Obtaining superuser rights on modern devices has become much more difficult with the release of Android 13 due to the strengthening of Verify Boot security mechanisms and system integrity. However, the possibility of deep customization, installing ad blockers at the system level or full backup still attracts advanced users. Root access on this version of the OS requires not just pressing one button, but performing an exact sequence of actions using a personal computer.
In this instruction we will look at the most relevant and universal method, which involves using a tool Magisk to patch the boot image. This approach is the de facto standard for Android 10โ14 and avoids damaging factory recovery partitions. You will need a stable connection, an unlocked bootloader and basic PC command line skills.
It is worth noting right away that the procedure is irreversible for factory security settings: unlocking Bootloader will inevitably lead to the complete deletion of all user data. Therefore, before starting any manipulations, it is critical to create a complete backup of photos, documents and application settings to external media or cloud storage.
Preparing tools and drivers for PC
The first stage is organizing a workspace on your computer. To interact with the smartphone operating system at a low level, you need a set of utilities, which includes ADB (Android Debug Bridge) and Fastboot. Without these components, transmitting commands from the PC to the phone is impossible. Android SDK Platform-Tools, which includes ADB (Android Debug Bridge) and Fastboot. Without these components, transmitting commands from the PC to the phone is impossible.
You also need to make sure that you have the correct USB drivers for your device. Owners of Xiaomi, OnePlus or Pixel smartphones can often use generic Google drivers, while Samsung devices may require installation of specific software or Samsung USB drivers. Check the hardware in Device Manager after connecting the cable. Odin or Samsung USB drivers. Check the hardware in Device Manager after connecting the cable.
โ ๏ธ Attention: Use only an original USB cable or a certified high-quality analogue. Cheap charging cables often do not support data transfer, which will lead to connection errors in Fastboot mode.
Download the latest version of the ZIP archive from the Android Developers platform and unzip it to the root of drive C or to any folder without spaces in the path name. This will make it easier to enter commands in the terminal. Next, you will need the firmware file itself, corresponding to your current build version.
โ๏ธ Ready for the procedure
Activating debugging and unlocking the bootloader
To start interacting, you must activate the hidden developer menu. Go to Settings โ About phone and quickly click 7 times on the item Build number. After the notification appears, return to the main settings menu, where a new section will appear For developers.
Inside this menu, find and turn on the switch USB debugging. When you connect to your computer for the first time, a request to confirm the RSA key will appear on your smartphone screenโbe sure to click โAllow.โ Now the system is ready to accept commands from the PC.
The next step is to unlock the bootloader. In the developer menu, activate the option OEM unlock. If this item is missing or inactive, the procedure is impossible without additional manipulations depending on the manufacturer. Connect the phone in Fastboot mode (usually holding down the volume down button when turning it on) and run the command:
fastboot flashing unlock
A data loss warning will appear on the device screen. Confirm the action with the volume buttons. After rebooting, the phone will be completely cleared, and the bootloader status will change to Unlocked. This is a fundamental requirement for implementation Magisk.
Some manufacturers, such as Huawei or Honor, have officially closed the possibility of obtaining an unlock code. For such devices, the methods may differ and require paid services.
Search and extract the Boot Image
The most difficult part of the instructions is obtaining the file boot.img. You need to find the exact firmware version that is currently installed on your smartphone. Go to Settings โ About phone and write down the build number, for example, TP1A.220905.001.
Download the full firmware image (Factory Image or OTA zip) from the manufacturer's official website. If you downloaded an OTA archive, there may not be a direct image file inside it. In this case, use the Payload Dumper utility to extract the contents of the file payload.bin.
| File type | Where to find | Action |
|---|---|---|
| Factory Image | Official website (Google, Xiaomi) | Unpack archive, find boot.img |
| OTA Update | Phone settings or forums | Extract via Payload Dumper |
| Recovery Image | Inside the firmware | Do not use for root |
After extraction, copy the file boot.img to the internal memory of the smartphone. It is this file that will be modified by the Magisk application to implement superuser rights without changing the rest of the system.
What if the file is called boot.img.lz4?
Files with the .lz4 extension must first be unpacked using the lz4 utility for Windows or Linux before transferring them to the phone for patching.
Installing Magisk and patching the image
Download the official application Magisk from the GitHub repository of the developer topjohnwu. Install the APK file on your smartphone as usual. Launch the application and grant it the necessary permissions if requested.
In the main Magisk interface, find the "Magisk" block and click the button Installation. In the menu that appears, select the method Select and patch the file. Using the file manager, find the previously copied boot.img and confirm your choice.
The modification process will take a few seconds. Upon completion, a new file with the name of the view Download . Copy this file back to your computer to the folder where Platform-Tools is installed. This is a ready-made boot image with embedded rights. magisk_patched_[random].imgwill appear in the folder
Flashing a modified image via Fastboot
Put your smartphone into Fastboot mode again. Make sure that the PC sees the device with the command fastboot devices. Now you need to write the patched file to the bootloader section. The command may vary depending on the device, but the standard syntax is:
fastboot flash boot magisk_patched.img
For devices with dynamic partitions (using an A/B scheme), the command may require specifying a slot, for example fastboot flash boot_a and fastboot flash boot_b. Carefully study the documentation for your specific model so as not to flash the image into the wrong slot.
โ ๏ธ Attention: On Samsung smartphones, the procedure is different: instead of Fastboot, Download Mode and the Odin app are used, and the file is flashed in the field
AP. Using the fastboot flash command on Samsung may result in a brick.
After successful recording, enter the command fastboot reboot. The first boot may take longer than usual as the system checks integrity and initializes new components. Do not interrupt this process.
Checking rights and setting up the environment
After loading the operating system, open the Magisk application. If the main menu displays the version number and the status "Installed", congratulations - the procedure was successful. To check the actual availability of rights, download any terminal application or use ADB.
Enter the command adb shell, and then su. If your phone screen asks you to grant superuser rights, allow it. In the terminal, the invitation symbol will change from $ to #, which confirms that you have received access.
Now you can install modules, change system fonts, remove pre-installed software (bloatware) and use specialized utilities for fine-tuning Android 13. It is recommended to immediately enable the Zygisk function in the Magisk settings for better compatibility with modern modules.
The successful appearance of the # icon in the terminal after entering the su command is the only reliable confirmation of the presence of root access.
Possible problems and methods for solving them
When modifying the system, users often encounter a cyclic reboot (bootloop). If your phone won't boot, try entering Recovery mode and performing a data reset (Wipe Data). In more complex cases, you will need to flash the stock firmware boot.img via Fastboot.
Some banking applications and games with anti-cheat protection may refuse to work. To bypass these restrictions in the Magisk settings, you need to activate Zygisk and enable the function Enforce DenyListby adding the necessary applications there. You may also need to install the Universal SafetyNet Fix module.
Remember that over-the-air (OTA) system updates are most often not installed automatically after receiving root access. You will have to manually download the firmware, patch the new image and flash it again, or use special scripts to save the root after the update.
Will the warranty be erased after receiving Root?
In most cases, unlocking the bootloader and obtaining superuser rights will void the official manufacturer's warranty. Service centers may refuse free repairs if they find traces of software modification, although it is difficult to carry out a visual check.
Is it possible to remove Root and return everything as it was?
Yes, this is possible. The Magisk app has a "Full uninstall" feature that will restore the stock boot image. However, if you have unlocked the bootloader, you cannot officially return it to a locked state (Relock) without flashing the full stock firmware.
Is it safe to enter bank card details on a rooted phone?
Root itself does not steal data, but it reduces the level of system security. If you install a malicious application and give it root access, it will be able to intercept input. When DenyList is configured correctly, risks are minimized.
Why does the fastboot command not see the phone?
Most often the problem is in the USB drivers or cable. Try another USB 2.0 port, replace the cable and reinstall the ADB drivers. Also make sure that USB debugging is enabled in the developer menu.
Do you need a computer for each use of Root?
No, a PC is only needed for the initial installation and flashing images. After successfully installing Magisk, rights management, installation of modules and settings are carried out directly through the app on the smartphone without the participation of a computer.