Obtaining superuser privileges on devices running Android 8.0 Oreo i Android 8.1 opens up unlimited possibilities for the smartphone owner, but at the same time imposes a serious responsibility for the safety of data. Unlike earlier versions of the system, the eighth revision tightened bootloader integrity checks and introduced a mechanism SELinux in Enforcing mode, which makes the old methods of rooting with one click of a button practically ineffective. The user will have to go through a multi-step process that includes interacting with the computer, unlocking the bootloader and modifying the system partition.
The purpose of this article is to provide comprehensive information on how to safely and effectively access the root file system on modern devices. We will look at using the utility Magisk, which is currently an industry standard due to its ability to hide the fact of rooting from banking applications and Google Play services. It is important to understand that the procedure is not universal for all models, however, the basic principles of working with Fastboot and ADB remain unchanged for the vast majority of devices.
Preparing the device and backing up data
Before proceeding with technical manipulations, you need to realize that unlocking bootloader, which is a mandatory step for installing superuser rights, will lead to the complete deletion of all user data from the internal memory. This is a security requirement of the Android platform and cannot be bypassed through software on certified devices. Therefore, the first and most critical step is to create a complete backup of important photos, contacts, documents and application settings.
It is recommended to use not only cloud services, but also local copying to a computer or external drive to eliminate the risk of losing information due to synchronization failures. You should also make sure that the battery charge level is at least 60-70%, since interrupting the firmware process due to a low battery can turn the smartphone into a “brick”. Check the integrity of the USB cable that will be used to connect to the PC, since unstable contact often causes partition writing errors.
To work, you will need to install a specialized set of drivers and command line utilities on your computer. Without the correct ADB and Fastboot drivers, the computer simply will not see the device in debug mode. Download Platform Tools from the official website of Android developers and unpack the archive into the root directory of the disk or into a folder without spaces in the path name to avoid errors in the interpretation of commands by the Windows or Linux shell.
⚠️ Attention: Unlocking the bootloader will void the manufacturer's official warranty for the device in most cases. In addition, after this procedure, functions that depend on the integrity of the system, such as contactless payment via Google Pay or Samsung Paywill stop working, unless additional measures are taken to mask root access.
☑️ Preparing for rooting
Activating developer mode and unlocking OEM
The standard Android interface hides advanced settings from the average user to prevent accidental changes to critical system parameters. To get started, you need to activate the hidden menu “For Developers”. To do this, go to the Settings → About phone section and find the “Build number” item. Make seven quick clicks on this item, after which the system will ask you to enter the screen lock PIN code and notify you that the mode has been successfully activated.
After activation, a new section “System” or “Advanced” will appear in the main settings menu, where the “For Developers” item is located. Once you enter this menu, you need to find and activate the OEM Unlocking switch. This option allows the bootloader to accept commands to release partition signature locks. If this item is missing or inactive, this may mean that your telecom operator or manufacturer has hardware blocked this feature, which will make obtaining root access impossible without the use of paid service tools.
The next step is to enable “USB Debugging”. This feature allows the computer to send commands to the device and receive responses from it in real time. The first time you connect your smartphone to a PC with debugging enabled, you will be asked to confirm your RSA key fingerprint on the device screen. Be sure to click “Allow” and select the “Always allow from this computer” option so that the communication session is not interrupted at the most critical moment of the firmware.
If the “OEM Unlock” item is gray and cannot be clicked, connect the smartphone to the Wi-Fi network and wait a while. Sometimes the system requires a connection to the manufacturer's servers to check the status of the device before allowing unlocking.
Checking the connection is the final stage of preparation. Connect your smartphone to your computer, open the command line in the Platform Tools folder and enter the command adb devices. In response, you should see your device's serial number and status device. If the status appears as unauthorized, check your phone screen for a confirmation request. If the device does not appear at all, reinstall the drivers or try a different USB port.
Unlocking the bootloader via Fastboot
The process of unlocking the bootloader is a point of no return, after which the data will be deleted. To switch to Fastboot mode (or Download Mode on some devices), you need to turn off the smartphone and hold down a certain key combination, usually the power button along with the volume down button. Hold them down until the Android robot image or Fastboot appears on the screen. Alternatively, you can use the command adb reboot bootloaderif debugging is already configured correctly.
While in bootloader mode, connect the device to the computer and run the command fastboot devices to check visibility. The unlock command may vary depending on the manufacturer. For most devices running pure Android or custom firmware, the command is used:
fastboot oem unlock
However, on smartphones from companies Xiaomi, Huawei or Sony the syntax may be different, for example fastboot flashing unlock or require the use of special software from the manufacturer. After entering the command, a warning about data loss and security risks will appear on the smartphone screen. Confirmation of the action is usually carried out using the volume buttons and the power button. The data formatting process can take from a few seconds to a couple of minutes.
| Manufacturer | Unlock command | Features |
|---|---|---|
| Google Pixel / Nexus | fastboot flashing unlock |
Requires confirmation on the screen |
| Xiaomi / Redmi | Mi Unlock Tool (PC) | Requires account linking and waiting 7-15 days |
| OnePlus | fastboot oem unlock |
Instant unlocking without delay |
| Moto / Lenovo | fastboot oem unlock + code from the website |
You must obtain a unique code from the manufacturer's website |
After successful unlocking, the device will automatically reboot. You'll have to go through the initial Android setup again, connect to Wi-Fi, and restore your data from backup. Do not skip this step, as further steps require a fully configured system with USB debugging enabled.
Installing custom recovery TWRP
Stock recovery menu (Stock Recovery) has limited functionality and does not allow you to install files that are not signed by the manufacturer, such as an archive with superuser rights. To do this, you need to install third-party recovery, the most popular and reliable of which is TWRP (Team Win Recovery Project). It supports working with Android 8 file systems, allows you to create full backups of partitions and install ZIP archives from a memory card.
First you need to find a recovery image that strictly matches your device model. Download the file with the extension .img from the official website of the TWRP project or from a reputable forum XDA Developers. Place this file in your Fastboot tools folder and rename it to recovery.img for ease of entering commands. Make sure that you have downloaded a version that is compatible with Android 8, since older versions of recovery may not mount partitions of the new file system correctly.
Put your smartphone into Fastboot mode again and run the command to temporarily download the image:
fastboot boot recovery.img
Using the command boot instead flash allows you to download the recovery once without permanently writing it to memory. This is useful for testing, but for permanent use it is better to flash the firmware with the command fastboot flash recovery recovery.img. However, on some devices with dynamic partitions (A/B partitions), the flash command may be blocked, and then the temporary download method is used, followed by installation directly from the recovery environment.
Once the device boots into the TWRP menu, the first thing to do is swipe to allow system modifications. If you do not do this, the recovery will automatically return the original boot partition on the first reboot, and your efforts will be in vain. It is also recommended to immediately go to the Wipe settings and format the Data section (Format Data) by entering the word “yes” to remove encryption, which may interfere with access to files inside the recovery.
⚠️ Attention: On devices with A/B architecture (without a separate recovery partition), flashing the image to the recovery partition is not possible. In such cases, the recovery image is downloaded temporarily, and the rooting patch is installed directly through Fastboot mode or using the adb sideload command.
Installing Magisk and obtaining Root access
Today, the utility Magisk is the uncontested leader in the field of rooting Android 8. In Unlike the good old SuperSU, Magisk works on the systemless principle, that is, it does not make changes to the system partition directly, but loads its modifications during the kernel boot process. This allows you to bypass system integrity checks (SafetyNet), which is critical for the operation of banking applications and games with anti-cheat.
Download the latest stable version of the Magisk application in APK format from the official GitHub repository. Rename the extension file from .apk to .zipif your recovery does not know how to install APK files directly, or use the installation functionality built into Magisk Manager. Download the resulting archive to the internal memory of your smartphone or to an SD card. Reboot into TWRP mode using a key combination or command adb reboot recovery.
In the recovery menu, select “Install”, find the downloaded Magisk archive and confirm the installation with a swipe. The process will take a few seconds. Once completed, a successful installation message will appear. Do not reboot the system immediately if you plan to install additional modules. If your goal is only root, then you can reboot with the command Reboot → System.
What to do if Magisk does not see root?
If after installation and reboot the Magisk application does not display the root status, perhaps the kernel of your device does not support loading a modified boot image. In this case, try to find and flash a custom kernel for your model, or use the method of patching the stock boot image through the Magisk application itself on an already loaded system.
After loading the operating system, install the Magisk Manager application (if it is not installed automatically along with the rights). Open it and check the status at the top of the screen. If you see green “Installed” and the version of Magisk, congratulations - you have full access to the system. To check rights, you can install any terminal application and enter the command su. If the system prompts you to grant superuser rights, then everything is working correctly.
Magisk Manager allows you to manage access rights for each application individually. You can revoke rights from any app at any time by simply moving the slider in the superuser list without deleting the application itself.
Setting up hiding root access and modules
Obtaining superuser rights often leads to conflicts with applications that require a high degree of trust in the runtime environment. Bank clients, payment systems and streaming services may refuse to start when they detect a modified bootloader or the presence of a binary file su. To solve this problem, Magisk has implemented the “MagiskHide” function (in new versions it is integrated into the Zygisk settings), which hides the fact of rooting from selected processes.
To configure hiding, go to the Magisk Manager settings and activate the “Zygisk” item. After that, go to the “Configure DenyList” section. Here you need to check all the applications that should “think” that the device is clean: Google Play Services, Google Play Store, banking applications, wallets. After selecting, restart your smartphone. In some cases, you also need to clear data from Google Play Services applications and the Play Market store.
Another powerful feature is module support. Modules are small packages that change the behavior of the system without reflashing the entire device. With their help, you can change fonts, improve sound, remove pre-installed software (bloatware), or even emulate other devices for games. Installation of modules is done directly from the Magisk application in the “Modules” tab by selecting the archive file.
However, it is worth remembering the measure. Installing too many heavy modules can result in system instability, increased boot times, and rapid battery drain. Always read the description of the module before installing and make sure that it is compatible with Android 8. If after installing the module the smartphone stops booting (bootloop), boot into Recovery mode and delete the problematic module through a file manager or a special deletion folder.
⚠️ Attention: The interface and names of functions in Magisk may change with the release of new versions of the application. Magisk function