Operating system Android 9 Pie, despite its age, still remains a relevant platform for millions of budget and mid-budget smartphones. For many enthusiasts, the standard functionality provided by the manufacturer is no longer enough, and there is an urgent need for access to system files. Obtaining root access opens the door to the world of deep customization for the user, allowing you to remove system garbage, change the kernel and use powerful utilities to manage energy saving.

The process of hacking the system on the ninth version of the “green robot” has its own unique features that distinguish it from earlier versions. This is primarily due to the implementation of the mechanism Verified Boot and the division of the system partition into system_a and system_b in some devices. You will need to not just download one file, but perform a sequence of actions, each of which is critical to the success of the operation. Errors at any stage can lead to a software failure.

Before taking active steps, you need to clearly understand the risks and prepare the tools. We will not use dubious “one-button” apps that often contain malicious code. Our approach is based on the use of time-tested Magisk and standard debugging tools ADB. This guarantees the cleanliness of the system and the ability to return the device to its original state at any time without losing the warranty if you use the right methods.

Preparing the device and creating a backup copy

The beginning of any intervention in system files should be accompanied by the creation of a full backup copy of the data. Obtaining superuser rights Android 9 will inevitably require unlocking the bootloader, which will lead to a complete reset of the device to factory settings. Saving contacts, photos and important documents on external media or in cloud storage is a mandatory step, ignoring which may cost you the loss of personal information.

You need to activate the hidden menu for developers. To do this, go to Settings → About phone and click seven times in a row on the “Build number” item. After this, a new section “For Developers” will appear in the settings menu, where you need to enable USB debugging. Also there, find the item “Factory unlocking” (OEM Unlocking) and activate it. Without this step, unlocking Bootloader will not work.

⚠️ Attention: On smartphones of some brands, for example Huawei or Honor, the bootloader unlock code is official no longer issued. Owners of such devices may need to find workarounds or use paid services, which carries additional risks.

Make sure that the battery charge is at least 60-70%. The process of flashing and patching takes time, and a sudden power outage at a critical moment can turn your smartphone into a brick. Use an original or high-quality USB cable to connect to your computer to avoid connection interruptions when transferring data.

  • 📱 Make a backup of all important data on your PC or to the cloud.
  • 🔋 Charge the device to at least 70%.
  • 🔌 Check the serviceability of the USB cable and port computer.
  • 📥 Download the ADB and Fastboot drivers for your OS.

Unlocking the bootloader

Unlocking the bootloader is a fundamental step, without which it is impossible to install a modified Recovery or direct patch to the boot partition. Over Android 9 he process has become more standardized, but the details may differ between manufacturers. For devices Xiaomi requires the official utility Mi Unlock and waiting for 168 hours (7 days) after linking the account.

For most other devices, such as OnePlus, Moto or Pixelthe process is performed through the command line line. Connect your phone in Fastboot mode (usually by pressing the volume down button when connecting the cable) and enter the command to check the status. If the status shows locked, you must send an unlock command. Remember that this action often voids the software warranty.

fastboot flashing unlock

or

fastboot oem unlock

After entering the command, a data loss warning will appear on the smartphone screen. Use the volume buttons to navigate and the power button to confirm your selection Unlock the Bootloader. The device will reboot, clear all data and start with an unlocked bootloader. From this moment on, the system becomes vulnerable to changes, but also open to modifications.

⚠️ Attention: On smartphones Samsung with processors Exynos unlocking the bootloader permanently trips the physical fuse e-Fuse (Knox). This will permanently disable Samsung Pay, Secure Folder and some banking applications, even if you return the stock firmware.

📊 What brand of smartphone do you have?
Samsung
Xiaomi
OnePlus
Other brand

Installing custom Recovery (TWRP)

The standard recovery menu Android has limited functionality and does not allow you to install modified files. To implement superuser rights, we need TWRP (Team Win Recovery Project). This custom recovery allows you to make full system backups, clean partitions and install ZIP archives with modifications.

You need to find the exact version of TWRP for your device model and version Android 9. The file will have the extension .img. Download it and place it in the tools folder ADB/Fastboot on your computer. Rename the file to twrp.img for convenience, so as not to enter a long name into the console.

Switch your smartphone to Fastboot mode again. At the command line, enter the command to temporarily download the recovery image. We do not “flash” it permanently right away to check its functionality. After executing the command, the phone will immediately go to the TWRP menu. If this does not happen, then the image is not suitable for your model.

fastboot boot twrp.img

In the TWRP interface, swipe to allow changes. If the system asks for a password, enter your screen unlock PIN. It is important to immediately make a backup of the current system by clicking the button Backup and selecting all partitions. This is your insurance in case something goes wrong when installing Root.

  • ⬇️ Download the latest TWRP image for your model.
  • 💻 Rename the file to twrp.img for simplicity.
  • 🚀 Boot the image via the fastboot command boot.
  • 💾 Make a full backup in the Recovery menu.

Installing Magisk to get Root

The modern standard for obtaining superuser rights is Magisk. Unlike the old method SuperSU, Magisk works system-free (systemless), which means that it does not modify the system partition directly. This allows you to hide the presence of Root from banking applications and games, which is critical for everyday use.

Download the latest Magisk APK file from the official GitHub repository. Rename the file extension from .apk to .zip. Now, while in the TWRP menu, press the Installbutton, select this ZIP archive and confirm the installation with a swipe. The process will take a few seconds, after which you need to click Reboot System.

If you use the boot image patch method (relevant for devices with A/B partitions), the process looks different. You need to extract the file boot.img from the stock firmware, transfer it to the phone, open the Magisk application, select “Install” → “Select and patch file”. The resulting file magisk_patched.img needs to be flashed via Fastboot with the command fastboot flash boot magisk_patched.img.

Why is Magisk better than SuperSU?

Magisk does not modify the system partition, which allows you to pass the Integrity Play Services check. SuperSU modified the system, causing many applications to stop working. In addition, Magisk supports modules that expand the functionality of Android without flashing it.

After reboot, find the Magisk icon in the application menu. If it appears and when opened it shows the installed version, then the rights have been obtained successfully. To check, you can download the application Root Checker from the Play Market store, which will confirm the presence of superuser rights.

Checking rights and basic setup

After successful installation Magisk it is necessary to carry out initial setup. Go to the application settings (gear) and activate the “Zygisk” item. This is a new implementation technology that replaces the old MagiskHide and allows you to more effectively hide the root from detectors. It is also recommended to enable “Enforce DenyList”.

In the “Configure DenyList” section, select all applications that should see a “clean” system without root access. Typically these are banking applications, Google Pay, various games with anti-cheat and corporate clients. After adding applications to the list, be sure to restart the device for the changes to take effect.

Application/Service The need to hide Consequences without hiding
Banking applications Critical Operation failure, login blocked
Google Pay / Wallet Critical Inability to pay NFC
Pokemon GO / Games High Account blocking, crash
Corporate mail Medium Violation of security policies

To manage the access rights of individual applications, use the built-in Magisk function. When you first launch an application that requires Root, you will be prompted to grant permissions. You can choose Grant, Deny, or Temporary Only. This gives complete control over which apps have access to the system core.

⚠️ Attention: The interface and names of items in Magisk may change with updates. Always check the official project documentation if any item is renamed or moved.

💡

Use the Universal SafetyNet Fix module via Magisk if Google Pay stops working after installing Root. This is often required on Android 9 and 10 to pass security checks.

Possible problems and solutions

The process of obtaining root access to Android 9 does not always go smoothly. One of the common problems is “bootlap” (cyclic reboot). If the phone is stuck on the manufacturer's logo, try going to Recovery and doing Wipe Cache/Dalvik. If this does not help, the version of Magisk may not be compatible with your firmware, and you need to try an older or, conversely, nightly build.

Another common problem is Wi-Fi or Bluetooth not working after installing a patched image. This often happens if the boot image was taken from a different firmware version that is installed on the device. In this case, the only solution is to reflash the stock one via Fastboot and start the process of searching for the correct image again. If you encounter the “Device is corrupted” error when loading, this means that the bootloader is locked, but the system files have been changed. You need to either unlock the bootloader again or return the stock boot image. Remember that on some devices the message may appear constantly after unlocking, and this is normal. boot.img via Fastboot and start the process of finding the correct image again.

If you encounter the “Device is corrupted” error when booting, it means that the bootloader is locked, but the system files have been changed. You need to either unlock the bootloader again or return the stock boot image. Remember that on some devices the message may remain permanently after unlocking, and this is normal.

☑️ Diagnosing problems

Done: 0 / 4

In case of complete system inoperability (Hard Brick), when the phone does not respond to buttons and does not charge, only flashing it through the manufacturer’s special utilities will help (Odin for Samsung, MiFlash for Xiaomi, SP Flash Tool for MediaTek). To do this, you need to know the exact model of your processor and the version of the region.

💡

The main key to success is using a stock boot image that matches the firmware version and the current version of Magisk. Version mismatches are the cause of 90% of errors.

Frequently asked questions (FAQ)

Will the warranty be reset after obtaining root access?

Formally, tampering with the software removes the software warranty. However, if you can return the device to its stock state (lock the bootloader and restore the original boot image), when you take it to a service center for a hardware issue (broken screen, battery), the fact of the presence of root may not be noticed unless you carry out in-depth diagnostics.

Is it possible to update Android over the air (OTA) with root access?

Standard update over the air on devices with an unlocked bootloader and a modified system partition usually does not arrive or is not installed. You will have to manually flash full firmware images each time, re-patch the boot image via Magisk, and only then update. It’s easier to wait for the release of stable custom firmware.

Is it safe to use banking applications with Magisk?

Yes, it is safe if Zygisk and DenyList are configured correctly. However, bank developers are constantly improving detection methods. You may have to periodically update Magisk or use additional hidden modules to bypass new security checks.

What to do if you forgot your TWRP password?

If you set a password on Recovery and forgot it, you can reset it only by completely flashing the recovery partition via Fastboot. The data on the phone will not be affected if you do not Wipe Data. The password encrypts access to the menu, but not the user data itself.