Android Rooting Guide


🌐 Resources πŸ”—

e.g. with a Google Pixel phone

πŸ”— Pixel 6a

πŸ”— A13 detailed guide to Root & OTA's & pass SafetyNet / Play Integrity


Introduction

This guide will walk you through the process of rooting your Google Pixel device using Magisk


Prerequisites

Before we begin, make sure you have the following:

  • A Google Pixel device (e.g., Pixel 6a).

Android SDK Platform Tools

  • Android SDK Platform Tools installed on your PC. You can install it using the following command:

Developer Options / USB Debugging

  • Developer Options enabled on your device. To do this:

    • Go to Settings > About phone.

    • Tap on the Build number several times to enable Developer Options.

    • Enter System > Developer options.

    • Set the following options:

      • Enable OEM Unlocking

      • Disable Automatic system updates

      • Enable USB debugging

      • Enable Wireless debugging

      • Enable Disable adb authorization timeout


Unlock Bootloader (Google Devices)

  1. Connect your device to your PC and authorize it. Reboot the device into bootloader mode using the following commands:

  1. Wait for the Fastboot Mode screen to appear on your device and run the following command in the terminal:

  1. Use volume keys to select Unlock the bootloader option and confirm with the power button.

  2. The Device state will change to unlocked.

  3. Start the device and complete the initial setup.


Rooting Android with Magisk

Downloads

Before we begin, read the device OEM unlocking guide and make sure to download the necessary files:

  1. Magisk App - Download the latest Magisk app version from the official repository on GitHub - Magisk Latest Release

  2. Factory Image for Your Device - Download the factory image for your device, based on the installed release. You can find guidance on downloading Android 13 factory images here: XDA Developers - How to Download Android 13 Factory Image

    • Be sure to select the Unlocked link for the installed version in the Factory column!

Enable USB Debugging

  • Throughout this process, you may need to enable USB debugging mode on your device when needed, because this option will be disabled when the device is unlocked or new images are flashed.

Installation

  1. Installing Magisk on Your Android Device:

    • Connect your Android device to your computer.

    • Use the following adb command to install the Magisk APK on your device:

  1. Preparing the Boot Image:

    • Extract the downloaded factory image on your computer.

    • Inside the extracted files, locate another zip file and extract it as well.

    • Look for the boot.img file within these extracted files.

  2. Copying Boot Image to Your Android Device:

    • Open a Terminal into the boot.img folder

    • Use the following adb command to copy the boot.img file to your Android device with Magisk installed:

  1. Patching the Boot Image:

    • Open the Magisk app on your Android device.

    • In the app, tap Install, Select and Patch a file and proceed with patching the boot.img file you copied earlier in the /sdcard/Download/ directory.

  2. Copying the Patched File Back to Your Computer:

    • After patching, use the following adb command to copy the patched file from your device back to your computer:

Rooting the Device

  1. Prepare Your Unlocked Device:

    • Ensure that your Android device is unlocked.

    • Turn off the device.

  2. Boot into Fastboot Mode:

    • Turn the device back on by holding down both the volume down and power buttons simultaneously. This should boot your device into fastboot mode.

    • or use the adb commands

  1. Connect to the Computer:

    • Connect your Android device to your computer via USB.

  2. Boot Magisk Image:

    • In the command prompt or terminal on your computer, run the following command:

  • Your device should now be booted with Magisk.

  1. Enable USB Debugging as Needed:

    • Enter the System > Developer options screen

      • OEM Unlocking should be Enabled and greyed out

      • Turn off Automatic system updates

      • Enable USB debugging, Wireless debugging, Disable adb authorization timeout

  2. Confirm Root Access:

    • After rebooting, you can confirm that your device is rooted by using the following ADB command:

  1. Complete device setup by connecting to WiFi.


Magisk Modules

Notes

  • The Installed status shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.

  • App simply shows the version of the app itself.

  • Module Download & Zip from Github - e.g - MagiskSSH

SSH for Magisk

πŸ”— SSH by D4rCM4rC

  • Put SSH keys into /data/ssh/root/.ssh/authorized_keys and /data/ssh/shell/.ssh/authorized_keys

This module makes all installed user certificates part of the system certificate store, so that they will automatically be used when building the trust chain. This module makes it unnecessary to add the network_security_config property to an application's manifest.

-------^^^^^^^--------NOT WORKING-------^^^^^^^--------

  • script

Magisk Movecert (WORKS)

Magisk Frida Server


Last updated

Was this helpful?