Obtaining root access on Android opens access to hidden system functions, allows you to remove built-in applications, optimize performance and install modified firmware. However, the process requires caution: one wrong step can turn your smartphone into a brick. This guide will help you figure out how to safely get root via a PC, what tools are needed for this and how to avoid common mistakes.

Unlike utilities like KingRoot or Framaroot, which work directly with a smartphone, the method through a computer is considered more reliable. It is suitable for devices with a locked bootloader (bootloader), where โ€œone-clickโ€ solutions are powerless. But there are nuances: for example, for Samsung you will need Odin, and for Xiaomi โ€” unlocking via Mi Unlock Tool. We will analyze the universal stages and features for popular brands.

Before you start, please note: root access will void the warranty, they can disrupt the operation of banking applications (due to SafetyNet) and increase the risk of malware infection. If you are ready for these consequences, let's get started.

1. Preparing the device and PC

The first step is checking compatibility and setting up the environment. Without proper preparation, even the most precise instructions will not work.

Start with data backup. Getting root access often requires a factory reset (wipe), so copy photos, contacts and files to the cloud or external drive. Pay special attention to:

  • ๐Ÿ“ฑ IMEI (write it down via *#06# - useful for restoring the network)
  • ๐Ÿ”‘ Logins and passwords from accounts (Google, social networks, banks)
  • ๐Ÿ“ DCIM folder (photos and videos)
  • ๐Ÿ“ฑ List of installed applications (can be exported via Titanium Backup or App List Backup)

Next check processor model your device. The choice of firmware and kernel depends on this:

  • ๐Ÿ”ง For Qualcomm (Snapdragon) Magisk + custom recovery (TWRP).
  • ๐Ÿ”ง For Mediatek (Helio, Dimensity) you need SP Flash Tool and patch boot.img.
  • ๐Ÿ”ง For Exynos (Samsung) - only Odin + modified AP-file.

You can find out the chipset through the app CPU-Z or in the settings (Settings โ†’ About phone โ†’ Processor model).

โš ๏ธ Attention: If your device runs on Android 12+ s Dynamic Partition, standard root methods may not work. In this case, you will need a patch init_boot.img instead boot.img.

On PC, install:

  • ๐Ÿ–ฅ๏ธ ADB and Fastboot (part Android SDK Platform-Tools)
  • ๐Ÿ–ฅ๏ธ Drivers for your device (download from the manufacturer's website)
  • ๐Ÿ–ฅ๏ธ 7-Zip or WinRAR for unpacking archives
  • ๐Ÿ–ฅ๏ธ Python 3.x (needed for some scripts, for example, MagiskBoot)

Install ADB/Fastboot|Download drivers for the model|Make a backup of IMEI and data|Checking the processor model|Disable antivirus (may block utilities)

-->

2. Unlocking the bootloader

Bootloader (bootloader) is a โ€œguardianโ€ of the system, which by default blocks changes in the /boot and /recoverysections. Unlocking it is a mandatory step for most devices, except for some models Xiaomi and OnePlus, where this is done through official tools.

The process differs for different brands:

Brand Tool Features
Google Pixel fastboot flashing unlock Requires confirmation on the phone. After unlocking, the data is reset.
Samsung Odin + mode Download Mode You need to enable OEM Unlock in the developer settings. On new models, it requires a wait of 7 days.
Xiaomi Mi Unlock Tool Linking to a Mi account requires a wait of 168 hours.
OnePlus fastboot oem unlock On new devices you need to get a token. unlocking via the OnePlus website.

Universal instructions for most devices (except Samsung i Xiaomi):

  1. Activate developer mode: go to Settings โ†’ About phone and click on Build number.
  2. Enable USB debugging i OEM unlocking in the developer menu.
  3. Connect the phone to the PC and run in the command line:
    adb reboot bootloader
    

    fastboot flashing unlock

  4. Confirm unlocking on the phone screen (volume + power buttons).
โš ๏ธ Attention: On devices c Android 10+ unlocking the bootloader may lead to loss of access to Widevine L1 (no HD in Netflix, Disney+). This is irreversible on some chipsets. Qualcomm.
What to do if fastboot does not see the device?

If the command fastboot devices returns an empty list:

1. Check the USB connection (try a different cable/port).

2. Install the drivers manually through Device Manager (select "Android Bootloader Interface").

3. Disable driver signing in Windows (press Win + X โ†’ Runtime options โ†’ Reboot with disabling verification).

4. Try running the command line as an administrator.

3. Installing custom recovery (TWRP)

TWRP (Team Win Recovery Project) is an alternative recovery that allows you to install ZIP archives (for example, from Magisk) and make system backups without it, it is impossible to get root on most devices.

Download the current version TWRP for your model from the official website twrp.me. Please note:

  • ๐Ÿ“ฑ Exact name models (for example, Redmi Note 10 Pro is sweet, and not sweetin for the Indian version).
  • ๐Ÿ”„ Android version (TWRP for Android 11 may not work on Android 12).
  • ๐Ÿ”ง Firmware type (A-only or A/B) using the command adb shell getprop ro.boot.slot_suffix.

Installation via fastboot:

  1. Downloaded file twrp-3.x.x-x-device.img place in the folder with fastboot.
  2. Reboot the phone into mode fastboot (adb reboot bootloader).
  3. Run the command:
    fastboot flash recovery twrp-3.x.x-x-device.img
  4. Immediately boot into TWRP (not into the system!):
    fastboot reboot recovery

If after a reboot TWRP is replaced with stock recovery, then protection is enabled on the device. Anti-RollbackSolution:

  • ๐Ÿ”ง Install TWRP via fastboot boot twrp.img (temporary download).
  • ๐Ÿ”ง In TWRP, go to Advanced โ†’ Flash Current TWRP.
  • ๐Ÿ”ง Disable signature verification in the TWRP settings (Settings โ†’ Disable DM-Verity).
๐Ÿ’ก

If TWRP asks for a password at boot, and you did not set it, this is a consequence of data encryption (FBE). Solution: in the TWRP menu, select Wipe โ†’ Format Data (erases all data, but removes encryption).

4. Obtaining root access through Magisk

Magisk is the most popular tool for obtaining root access without changing the system partition (systemless rootIt bypasses SafetyNet). allowing you to use banking applications, and supports modules for deep customization.

Download the latest version Magisk from GitHub (linkYou will need the file Magisk-vXX.X.zip (for installation via TWRP) and Magisk.apk (for managing root access).

Instructions for devices with unlocked bootloader and TWRP:

  1. Copy Magisk-vXX.X.zip to your phone or a flash drive.
  2. Boot into TWRP (adb reboot recovery).
  3. Click Install, select the archive with Magisk and swipe to confirm.
  4. After installation, reboot into the system (Reboot System).

For devices with locked bootloader (for example, some Huawei or Oppo) you will need a patch boot.img:

  1. Download the stock firmware for your model and extract from it boot.img (usually located in the archive with firmware).
  2. Move boot.img to your phone and open it via Magisk Manager (click Install โ†’ Select and Patch a File).
  3. Copy the resulting file magisk_patched.img to your PC.
  4. Flash it via fastboot:
    fastboot flash boot magisk_patched.img
โš ๏ธ Attention: On devices with AVB 2.0 (Android 10+) after flashing boot.img an error may appear Orange StateTo fix it, you need to disable signature verification with the command:
fastboot flash vbmeta vbmeta.img

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

The file vbmeta.img can be extracted from the stock firmware or downloaded from the forum XDA Developers.

Via TWRP + Magisk|Patch boot.img|Odin for Samsung|SP Flash Tool for Mediatek|Another method

-->

Each manufacturer brings its own "chips" to the process of unlocking and obtaining root access. Let's look at the nuances for top brands.

Samsung (Exynos/Snapdragon)

Devices Samsung require the use of Odin utilities for firmware. Features:

  • ๐Ÿ”ง You need to download the firmware from the site SamMobile or Frija (choose the version for your country, for example SER for Russia).
  • ๐Ÿ”ง In Odin load files into slots:
    • BL โ€” bootloader
    • AP โ€” patched boot.tar (with Magisk)
    • CP โ€” modem
    • CSC โ€”region (select HOME_CSCso as not to reset the data)
  • ๐Ÿ”ง On new devices (Galaxy S22+), root is only possible through Patched AP + Magisk in AP-slot.

Xiaomi/Redmi/Poco

For devices Xiaomi the process is complicated by linking to an account Mi:

  • ๐Ÿ”ง Unlocking the bootloader takes up to 7 days (168 hours of waiting).
  • ๐Ÿ”ง Use Mi Unlock Tool only on the official website (link).
  • ๐Ÿ”ง On some models (Redmi Note 11) you need to roll back to an older version MIUI before unlocking.
  • ๐Ÿ”ง After unlocking install TWRP via fastboot, but keep in mind: on new devices (Xiaomi 12) TWRP may not work due to Dynamic Partition.

Google Pixel

Devices Pixel support official unlocking, but have nuances:

  • ๐Ÿ”ง On Pixel 6/7 with a chip Google Tensor root is only possible through a patch init_boot.img (and not boot.img).
  • ๐Ÿ”ง Use Magisk Canary (experimental version) for new models.
  • ๐Ÿ”ง After rooting Now Playing (music recognition) and some camera functions may stop working.

Mediatek (Helio/Dimensity)

For devices on Mediatek (for example, Realme, Oppo, Tecno) will be required SP Flash Tool:

  • ๐Ÿ”ง Download Scatter file for your model (memory section description).
  • ๐Ÿ”ง B SP Flash Tool select Download Only and specify the path to the patched boot.img.
  • ๐Ÿ”ง On new chips (Dimensity 1200+), you may need to disable SLA (Secure Launch Area) via MTK Client.
๐Ÿ’ก

For devices with Dynamic Partition (Android 10+) standard root methods do not work. You need to patch init_boot.img instead boot.img and use Magisk Canary.

6. Checking root access and bypassing SafetyNet

After installation Magisk you need to make sure that root access work and set up bypass SafetyNet (otherwise banking applications and Netflix in HD will not work). Google Pay, banking apps and Netflix in HD).

Checking root access:

  1. Install from Magisk module Root Checker or download the application of the same name from Play Market.
  2. Run the test. If you see a message Root access is properly installed -everything was successful.
  3. Open Magisk Manager check the status at the top of the screen (should be Installed: XX.X (XXXXX)).

Bypass SafetyNet:

  1. In Magisk go to Settings โ†’ Enable Zygisk.
  2. Install modules:
    • ๐Ÿ”ง Universal SafetyNet Fix (by kdrag0n)
    • ๐Ÿ”ง MagiskHide Props Config (to change the device fingerprint)
  • Reboot the device and check the status SafetyNet via the app YASNAC.
  • If SafetyNet fails:

    • ๐Ÿ”ง Remove all modules Magisk and leave only Universal SafetyNet Fix.
    • ๐Ÿ”ง In MagiskHide Props Config select a certified fingerprint (for example, for Pixel 5).
    • ๐Ÿ”ง Disable Enforce DenyList in settings Magisk (if enabled).
    โš ๏ธ Attention: The Android 13+ Google tightened checks SafetyNetIf banking applications still do not work, try:
    • ๐Ÿ”ง Use Island or Shelter to isolate applications.
    • ๐Ÿ”ง Install Magisk Delta (fork with improved Zygisk).
    • ๐Ÿ”ง Roll back to an older version of Android (if possible).

    7. Possible problems and their solutions

    Even if you follow the instructions exactly, errors may occur. Let's look at the most common ones and how to eliminate them.

    Problem Cause Solution
    fastboot: error: cannot load 'twrp.img' Incorrect file path or access rights Place twrp.img in the folder with fastboot and run the command line as administrator.
    Phone stuck on logo after flashing Incompatible version of TWRP or Magisk Boot into fastboot and flash the stock one boot.img.
    Invalid sparse file format at header magi Damaged file boot.img Download the firmware again and repeat the patch via Magisk.
    Netflix does not work in HD Loss Widevine L1 after unlocking Install the module Widevine L1 for Magisk (does not work on all devices).
    Magisk cannot be installed via - this Encryption enabled FBE In TWRP do Format Data (erases all data!).

    If after flashing the device does not turn on (brick), and fastboot doesn't see him - it's hard brick. In this case, only flashing via EDL mode (for Qualcomm) or SP Flash Tool (for Mediatek) will help, but this requires special equipment (for example, QFil or UFi Box).

    If Magisk is installed, but root access do not work:

    • ๐Ÿ”ง Check if the option is enabled Superuser in settings Magisk.
    • ๐Ÿ”ง Reinstall Magisk via TWRP (select Direct Install).
    • ๐Ÿ”ง Remove conflicting modules (for example, Riru or EdXposed).
    What to do if the PC does not see the phone in fastboot?

    1. Check the cable (you need the original USB-Type C).

    2. Try another USB port (preferably USB 2.0 on the back of the PC).

    3. Install the drivers manually:

    - Open the Manager devices.

    - Find the device with a yellow exclamation mark (for example, Android or MSM8998).

    - Update the driver by specifying the folder with android_winusb.inf (lies in platform-tools).

    4. Disable driver signing in Windows (see spoiler in section 2).

    8. Alternative methods of obtaining root access

    If the standard methods do not work, you can try alternative options. They are less universal, but sometimes they save in difficult cases.

    ๐Ÿ”น Patched Boot Image without TWRP

    Suitable for devices where it is impossible to install custom recovery (for example Huawei or some Oppo).

    1. Download the stock firmware for your model and extract boot.img.
    2. Patch it via Magisk Manager (as described in section 4).
    3. Flash via fastboot:
      fastboot flash boot magisk_patched.img
      

      fastboot reboot

    ๐Ÿ”น Magisk in RAMDisk (for devices with A/B partitions)

    On devices with Seamless Updates (for example, Pixel, OnePlus) you need to patch init_boot.img instead boot.img:

    1. Download the full firmware and find init_boot.img.
    2. Patch it via Magisk.
    3. Flash into both slots:
      fastboot flash init_boot_a magisk_patched.img
      

      fastboot flash init_boot_b magisk_patched.img

    ๐Ÿ”น Root without unlocking the bootloader (exploits)

    For some devices there are exploits that allow you to get root without unlocking bootloader. Popular tools:

    • ๐Ÿ”ง DirtyCOW (works on older versions of Android).
    • ๐Ÿ”ง CVE-2023-21036 (vulnerability in Mali GPU, relevant for some Samsung and Xiaomi).
    • ๐Ÿ”ง MatriDroid (for Mediatek with kernel 4.9+).

    Disadvantages of the method:

    • โŒ It works not on all devices.
    • โŒ Often requires manual entry of commands into ADB.
    • โŒ The root may crash after a reboot.
    โš ๏ธ Attention: The use of exploits can lead to soft brick or data leakage. Before use, check reviews on XDA Developers or 4PDA.

    FAQ: Frequently asked questions about root access on Android

    โ“ Is it possible to get root without a computer?

    Yes, but only on devices with unlocked bootloader. Use applications like Magisk Manager (for patch boot.img) or TWRP Official App (for installing recovery). However, for most modern smartphones, a PC will still be required to unlock bootloader.

    โ“ How to remove root access and return the warranty?

    To return the device to stock state:

    1. Delete Magisk through its menu (Uninstall โ†’ Complete Uninstall).
    2. Flash stock boot.img via fastboot.
    3. For Samsung perform full firmware via Odin with flag Re-Partition.
    4. Lock the bootloader with command fastboot flashing lock.

    This will not restore the warranty, but will return the device to working condition.

    โ“ Why do banking applications not work after rooting?

    Banking applications (Sberbank, Tinkoff) and games (Pokรฉmon GO) check the integrity of the system through SafetyNet and Play Integrity API. Solutions:

    • ๐Ÿ”ง Install modules Universal SafetyNet Fix and MagiskHide Props Config.
    • ๐Ÿ”ง Enable Zygisk and Enforce DenyList in the settings Magisk