Getting root access (root) on Android allows access to hidden system functions, but requires caution. This process via computer is considered more reliable than mobile applications, as it allows you to control every stage. However, incorrect actions can turn the smartphone into a โ€œbrickโ€ or void the warranty. In this article we will look at current methods for different versions of Android, from preparation to the final verification of superuser rights.

The main advantages of rooting via a PC are the ability to work with ADB and Fastboot, using proven utilities like Magisk or SuperSU, as well as backing up data before starting. But remember: manufacturers (for example Samsung, Xiaomi, Google Pixel) actively block such manipulations, so the algorithm may differ depending on the model. Below is a detailed analysis taking into account the nuances.

1. Preparing the device and computer

Before you begin, make sure that your Android is unlocked OEM Unlock (in the developer settings) and enabled USB debugging. Without this, neither ADBn Fastboot will be able to interact with the device. Also check:

  • ๐Ÿ”Œ Battery charge at least 70% - a sudden shutdown will interrupt the process.
  • ๐Ÿ“‹ Backup copy important data (photos, contacts, messages) on the cloud or external drive.
  • ๐Ÿ–ฅ๏ธ Drivers for your smartphone model, installed on a PC (download from the manufacturer's official website).
  • ๐Ÿ› ๏ธ Tools: Platform Tools (from Google), Magisk Manager or TWRP (depending on method).

For devices with MediaTek additional software like SP Flash Toolmay be required, and for Qualcomm โ€” QPST or EDL mode. Check the compatibility of the tools with your model on the forums XDA Developers or 4PDA.

โš ๏ธ Attention: On some devices (for example, Huawei after 2018 or Samsung s Knox) unlocking the bootloader resets all data and can activate hardware protection, making it impossible to use services like Samsung Pay or Google Pay.
๐Ÿ“Š What is the brand of your Android device?
Samsung
Xiaomi
Google Pixel
OnePlus
Huawei/Honor
Other

2. Unlocking the bootloader

The bootloader is a โ€œlockโ€ that protects system files from changes. Unlocking it is a mandatory step before obtaining root access. The procedure varies depending on the manufacturer:

  • ๐Ÿ“ฑ Google Pixel, OnePlus, Motorola: Unlocking is carried out by the command fastboot flashing unlock (confirmation on the smartphone screen is required).
  • ๐Ÿ“ฑ Xiaomi: You need to obtain permission through Mi Unlock Tool (linking the account to the device is required).
  • ๐Ÿ“ฑ Samsung: You need to enable OEM Unlock in the settings and use Odin to flash custom recovery.

After unlocking the bootloader, the device will be reset to factory settings. This is normal - this is how protection against unauthorized access works. On devices with a chip Exynos (for example, Samsung Galaxy S22), unlocking may lead to activation of the flag Knox, which will void the warranty and block some functions.

fastboot oem unlock

For some devices (for example, Huawei) may require a unique unlock code, which is issued on the official website.

โš ๏ธ Attention: Manufacturers periodically update protection mechanisms. For example, Xiaomi since 2023, it requires linking the device to an account for at least 7 days before unlocking. Check the current conditions on official resources.

3. Installing custom recovery (TWRP)

TWRP (Team Win Recovery Project) is an alternative recovery that allows you to flash ZIP files (for example, from Magisk) and create backups. Its installation takes place via Fastboot:

  1. Download the official version TWRP for your model from the website twrp.me (file with extension .img).
  2. Connect the smartphone to the PC in mode Fastboot (press Volume down + Power with the device turned off).
  3. On the command line, run:
    fastboot flash recovery twrp-3.7.0_9-0-your_device.img
    

    fastboot reboot recovery

If after reboot TWRP it does not start, and instead the standard recovery, then the manufacturer is blocking it replacement. In this case, you will need:

  • ๐Ÿ”ง Flash TWRP to the section boot (risky, can lead to freezing on the logo).
  • ๐Ÿ”ง Use Magisk for patching boot image (boot.img) without completely replacing the recovery.

Download the correct version of TWRP for your model|Check the integrity of the file (MD5 hash)|Disable antivirus on your PC|Connect the device in Fastboot mode|Make a backup of data-->

4. root access via Magisk

Magisk is the most popular tool for rooting, as it allows you to hide root status from applications (for example, banking or games). The process includes two stages: patching boot.img and its firmware.

Step 1. Extracting boot.img

  • Download the original firmware for your model (for example, from the site Xiaomi or Samsung).
  • Extract the file from the archive boot.img (you can use 7-Zip or Payload Dumper for .ozip/.payload.bin).

Step 2. Patching via Magisk

  1. Install Magisk Manager on your smartphone (APK file is downloaded from GitHub).
  2. In the application, select Install โ†’ Select and Patch a File and specify the path k boot.img.
  3. After patching, the file magisk_patched.img will appear in the folder Download.

Step 3. Firmware patched boot.img

Move the file to the PC and flash it via Fastboot:

fastboot flash boot magisk_patched.img

fastboot reboot

If the device is not is loading, try flashing magisk_patched.img into both sections (boot and boot_b for devices with A/B markup).

๐Ÿ’ก

If after flashing Magisk the smartphone is stuck on the logo, try booting into safe mode (press and hold data-i="137">when turned on) and remove conflicting modules through Magisk Manager. Volume down when turned on) and remove conflicting modules through Magisk Manager.

5. Checking root access and troubleshooting

After reboot, install from Play Market application Root Checker and run the check. If root status is confirmed, but some applications (for example, Pokรฉmon GO or SberBank Online) refuse to work, activate the Magisk options:

  • ๐Ÿ”’ MagiskHide (hides root from selected applications).
  • ๐Ÿ”„ Zygisk (allows you to modify processes at the kernel level).

Common errors and solutions:

Problem Possible cause Solution
Device does not turn on after flashing Incompatible boot.img or TWRP Flash original boot.img via Fastboot
Root not detected Wrong patched file or outdated version of Magisk Repeat patching with the latest version of Magisk
Applications detect root MagiskHide is not activated or the exclusion list is not configured Add the application to MagiskHide and reboot
Stuck on logo Magisk modules conflict or damaged vendor Remove modules via TWRP or flash a clean one boot.img
โš ๏ธ Attention: On devices with Dynamic Partition (Android 10+) patching boot.img may lead to an error avb verification failed. In this case, you need to disable the check AVB command fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img.

6. Alternative rooting methods

If Magisk is not suitable (for example, on older versions of Android), you can use:

  • ๐Ÿ“ฆ SuperSU: Outdated, but working method for Android 5โ€“7 Flashed via TWRP as a ZIP file.
  • ๐Ÿ”ง KingRoot: One-click solution for PC (supports MediaTek), but often installs malware.
  • ๐Ÿ–ฅ๏ธ ADB commands: For some devices (for example, Nokia or Lenovo), root can be obtained with the command adb shell su, but this is temporary access.

SuperSU is no longer updated, but can be found on the forums. To install:

  1. Download the latest version SuperSU.zip.
  2. Flash through TWRP (section Install).
  3. Reboot the device.

KingRoot easier to use, but has risks:

  • โš ๏ธ Installs backdoors for remote control.
  • โš ๏ธ Not compatible with MagiskHide (applications will detect root).
  • โš ๏ธ Often requires manual removal after receiving root.
How to remove KingRoot after receiving root?

1. Install Magisk over KingRoot (flash magisk_uninstaller.zip via TWRP).

2. Uninstall the application KingRoot and related services via ADB:

adb shell

su

pm uninstall --user 0 com.kingroot.kinguser

pm uninstall --user 0 com.kingroot.rush

3. Reboot the device.

7. Security after rooting

root access give full control over the system, but also open it to threats:

  • ๐Ÿ” Disable ADB over Wi-Fi (if not. are using): adb tcpip 0.
  • ๐Ÿ›ก๏ธ Install a firewall (for example, AFWall+) to block suspicious connections.
  • ๐Ÿ”„ Update Magisk regularly and modules via Magisk Manager.
  • ๐Ÿ“ฑ Do not install applications from unknown sources โ€”even with root access.

To check the system for vulnerabilities, use:

  • Root Checker โ€”confirm root status.
  • Titanium Backup โ€” backup and restoration of applications with data.
  • LSPosed โ€” management of Xposed modules (an alternative to the original Xposed Frameworkwhich is not updated).

On devices with Samsung Knox or Huawei root access can lead to hardware blocking of functions like Secure Folder or Huawei Mobile Services. Before rooting, check whether you depend on these services.

๐Ÿ’ก

Even after successful rooting, avoid manually modifying system files (for example, through Root Explorer).An error in /system or /vendor can make the device inoperable.

FAQ: Frequently asked questions about root access via PC

Can I get root without unlocking? bootloader?

No, on most modern devices (Android 8+) unlocking the bootloader is required. Exceptions are vulnerabilities in older versions of Android (for example DirtyCOW for Android 6-7), but they are closed in current firmware.

Why doesn't Magisk hide root from banking applications?

Since 2022, many banks (for example, SberBank or Tinkoff) are using new detection methods, such as integrity check /proc or safetyNetTry:

  1. Activate Zygisk and Enforce DenyList in Magisk.
  2. Install module Universal SafetyNet Fix.
  3. Use Island (sandbox) to launch banking applications.
How to return the warranty after rooting?

Technically, no way, since unlocking the bootloader and changes in boot are recorded in special flags (for example, Knox for Samsung). However, you can:

  • Flash the original firmware via Odin (for Samsung) or Fastboot.
  • Return the stock recovery.
  • Reset counter Knox (possible only on older models through Triangle Away).

But even after this, the service center can detect traces of interference.

What to do if the camera or sensors stop working after rooting?

This is a typical problem when flashing incompatible Magisk modules or damaged section vendor. Solutions:

  1. Remove all Magisk modules and reboot the device.
  2. Flash the original vendor.img via Fastboot.
  3. If the problem persists, perform a full reset and flash stock firmware.
Is it possible to get root on Android 13/14?

Yes, but the process has become more complicated due to tightened security. On Android 13+ you need:

  • Patching init_boot.img instead of boot.img (in Magisk 26+).
  • Disable AVB 2.0 (Android Verified Boot).
  • Using a custom kernel with support for new versions of SELinux.

For Google Pixel 7/8 or Samsung Galaxy S23 may require waiting for exit stable versions of tools (for example, Magisk Delta).