Obtaining superuser rights on managed devices Android 9 Pie remains a popular procedure for enthusiasts who want complete control of their device. Unlike older versions of the operating system, version nine introduces stricter security protocols, such as Project Treble and enhanced bootloader integrity checking, which makes the process of gaining root access more difficult, but still doable. The main goal of this operation is to remove software restrictions imposed by the manufacturer, which opens up access to system files and hidden settings.

Before proceeding with technical manipulations, you must be clearly aware that any intervention in the system partition carries certain risks. Warranty the device is most often canceled immediately after unlocking the bootloader, and incorrect actions can turn the smartphone into a โ€œbrick.โ€ However, if you follow all the steps of the instructions and use proven tools, such as Magisk, you can safely modify the system by installing modules for blocking ads or fine-tuning power consumption.

Device preparation and data backup

First and foremost The critical step is to save all important information. The process of unlocking the bootloader, which is a prerequisite for rooting Android 9, completely erases all user data from the internal memory. This includes photos, contacts, messages and installed applications. Therefore, creating a full backup on external media or in cloud storage is not just a recommendation, but a strict necessity.

You will also need to enable developer mode and activate USB debugging. To do this, go to Settings โ†’ About phone and quickly click on the build number seven times. After the message โ€œYou have become a developerโ€ appears, return to the main settings menu, select a new item For developers and activate the switch USB debugging. Without this parameter, the computer will not be able to send commands to the device via the ADB interface.

โš ๏ธ Attention: Unlocking the bootloader on many devices (for example, Samsung or Huawei) may permanently block some security features, such as Knox or access to banking applications, even after reverting to stock firmware.

Make sure your smartphone's battery charge is at least 60-70%. Interruption of the firmware process due to battery discharge is one of the most common reasons for device failure. In addition, download and install on your computer drivers for your phone model, as well as a package of platform tools Platform Tools (ADB and Fastboot), which will be used to interact with the hardware.

โ˜‘๏ธ Preparing for rooting

Done: 0 / 4

Unlocking the bootloader

Bootloader is a special app that runs before the operating system and verifies the digital signature of the loaded software. By default, it is blocked by the manufacturer to prevent the installation of uncertified system images. On Android 9, the unlocking procedure varies depending on the brand, but the general principle remains the same: obtaining a unique token and sending it via_fastboot_.

For devices running pure Android or custom firmware (Xiaomi, OnePlus, Pixel), the process often looks like this. Connect the switched off phone to the PC by holding down the combination of buttons to enter Fastboot mode (usually Volume Down + Power). In the computer command line, enter the command to check the connection:

fastboot devices

If the device is displayed in the list, you can proceed to unlocking. On some models, for example Xiaomi, you need to wait from 7 to 168 hours after linking your account to the device through a special Mi Unlock application. For other brands, such as OnePlus or Moto, the unlock command is entered directly into the console:

fastboot flashing unlock

After entering the command, a data loss warning will appear on the smartphone screen. Confirm the action with the volume buttons. The device will reboot and perform a factory reset. Only after successfully unlocking the bootloader is it possible to write a modified recovery image or kernel, which is necessary to implement superuser rights.

What to do if the bootloader does not unlock?

Some carriers or manufacturers (for example, Verizon in the US or Huawei in the latest models) completely block the ability to unlock the bootloader. In this case, obtaining root access using standard methods is impossible without using exploit vulnerabilities, which is extremely risky.

Installing custom TWRP recovery

The standard recovery menu (Stock Recovery) has limited functionality and does not allow installing third-party ZIP archives or modifying system partitions. Therefore, the next step is to install a custom recovery, the most popular of which is TWRP (Team Win Recovery Project). It provides a graphical interface and support for touch controls, which greatly simplifies the firmware process.

You need to find a TWRP image that is compatible specifically with your device model and version of Android 9. Download the file with the extension .img from the official project website or trusted forums. Place this file in your ADB tools installation folder. Switch your smartphone to Fastboot mode and execute the command to temporarily download recovery:

fastboot boot twrp-3.x.x-x-model.img

Using the command boot instead flash allows you to load TWRP once without permanently writing to memory. This is useful for testing, but for permanent installation it is better to use the command fastboot flash recovery twrp-3.x.x-x-model.img. After loading into the TWRP menu, first of all, swipe to allow changes and create a full backup of the current system state (Nandroid Backup). This is your insurance in case of unsuccessful root installation.

๐Ÿ’ก

If after installing TWRP the system boots into standard recovery, it means that the stock image has overwritten the custom one. In this case, immediately after flashing TWRP, reboot into recovery mode without loading the main OS.

Magisk firmware for obtaining root access

Today Magisk is the de facto standard for obtaining root access on Android 9. Unlike the outdated SuperSU, Magisk works on systemless principle, that is, it does not make changes to the system partition directly. This allows you to hide root access from banking applications and Google Pay services using the Magisk Hide feature (or Zygisk in new versions).

The installation process is as follows:

  • ๐Ÿ“ฅ Download the latest version of the Magisk APK file from the official GitHub repository.
  • ๐Ÿ“‚ Rename the extension file from .apk to .zip (in some versions of TWRP you can install apk directly, but zip is more reliable).
  • ๐Ÿ”„ Boot into TWRP Recovery mode.
  • ๐Ÿ“ Select item โ€œInstallโ€, find the downloaded archive and confirm the installation with a swipe.

After completing the firmware process, click the โ€œReboot Systemโ€ button. The first time you boot, the process may take longer than usual. After turning on your smartphone, find the new Magisk icon in the application menu. Open it - if the application starts and the โ€œVersionโ€ line displays a number and not โ€œN/Aโ€, then root access have been successfully obtained. You can check the access status using the Root Checker utility from Google Play.

It is important to note that Magisk allows you to install modules that expand the functionality of the system without flashing the entire image. These could be modules for improving sound, changing fonts, or controlling gestures. However, installing too many modules can lead to unstable operation of the device or a cyclic reboot (bootloop).

๐Ÿ“Š Which method of obtaining Root do you prefer?
Magisk (Systemless)
SuperSU (Classic)
KernelSU (Via Kernel)
Not I use Root

Solving common problems and errors

Even if you strictly follow the instructions, users may encounter technical failures. One of the common problems on Android 9 is a boot verification error, when the system refuses to start due to a modified boot image. In this case, it often helps to re-flash the stock image boot.img via Magisk (function โ€œInstall โ†’ Select and patch the fileโ€) and write it back via fastboot.

Another common situation is the inability to encrypt data after unlocking the bootloader or, conversely, problems with accessing internal memory in Recovery mode. This is due to changes in the encryption policy of Android 9. If TWRP cannot mount the Data partition, try formatting the data (not just a wipe, but Format Data) through the partition management menu in recovery. Please note that this will permanently delete all files.

Problem Possible cause Solution
Bootloop (cyclic reboot) Incompatible Magisk module or kernel Boot to TWRP โ†’ Removing modules via file manager or ADB
Root not detected Missing binary file su Reinstalling Magisk ZIP archive via Recovery
Error 7 when installing ZIP Android version mismatch Checking archive compatibility with Android 9 Pie
Google does not work Pay The system sees root access Enabling Magisk Hide for the Google Pay application and services

โš ๏ธ Attention: If your device is stuck in an endless reboot and logging into Recovery is impossible, the only solution may be to flash the stock firmware via EDL mode (for Qualcomm) or Download Mode (for Samsung), which requires special cables or service software.

Security and hiding root access

After successfully obtaining superuser rights, the issue of security and hiding the fact of system modification becomes relevant. Many banking applications, anti-cheat games and streaming services block operation on rooted devices. The built-in Magisk mechanism allows you to configure the list of applications for which root access will be hidden.

To enhance protection, it is recommended to enable the Zygisk function (in new versions of Magisk) and configure an exception list. It is also worth considering installing a module Universal SafetyNet Fixthat helps you pass Google's SafetyNet system integrity check. This is necessary for applications that require device certification. However, remember that the arms race between developers of hiding and detection methods is constant, and methods may no longer work after application updates.

Update your Magisk application and modules regularly. Outdated versions may contain vulnerabilities that could theoretically be exploited by malware that gains root access. Never grant root privileges to applications from untrusted sources. The rights request should appear only for those apps that you are 100% sure are needed.

๐Ÿ’ก

You can hide root access on Android 9 through the Magisk settings, but this does not guarantee 100% operation of all banking applications, since detection methods are constantly being improved.

Frequently asked questions (FAQ)

Will the Knox counter reset after receiving Root?

Yes, on Samsung devices, unlocking the bootloader and obtaining root access is irreversibly triggered by the Knox trigger (0x1). This is a physical fuse change that cannot be reset in software. Even returning to the stock firmware will not restore the operation of Samsung Pay and the protected folder.

Is it possible to get OTA system updates with Magisk installed?

Automatic installation of over-the-air (OTA) updates is most often impossible or leads to an error, since the modified boot partition does not pass signature verification. Usually you need to download the full firmware image, extract boot.img from it, patch it via Magisk and flash it manually via Fastboot.

Will a hard reset remove root access?

No, a regular reset through the settings or Recovery menu clears only user data and cache, but does not affect the system partition, where resides Magisk. To remove root, you need to re-flash the stock image of the boot partition (boot.img) or perform a complete flashing of the device.

Is it dangerous to grant root access to the Cleaner application or Anti-Virus?

Granting root access to dubious cleaners often does not make sense, since modern versions of Android manage memory well themselves. Antiviruses with root access can only be trusted if they are from well-known vendors, otherwise you risk giving full control over the device to potential malware.