Skip to content
On this page

Magisk

Setup

Android Platform Tools

Install Android Platform Tools in order to use fastboot and adb. Use one of the following methods to install needed tools:

  • Download from Android Developers site
  • Install with Android Studio
  • Install with sdkmanager command-line tool
  • Install fastboot and adb packages from Ubuntu's repositories (Not recommended! May contain very old versions)

With Android Studio

Open Android Studio's SDK Manager and install the Android SDK Platform-Tools tool.

On Linux installed binaries can be found in ~/Android/Sdk/platform-tools directory. Add them to the $PATH.

Payload dumper

  1. Install Python 3.6+
  2. Run pip3 install protobuf
  3. Copy payload_dumper.py and update_metadata_pb2.py files to your computer

Unlock the bootloader

THIS WILL WIPE ALL DATA FROM YOUR DEVICE

Boot the device to fastboot mode:

  1. Turn off the device
  2. Hold down power and volume down buttons

Connect the device to computer through USB and run fastboot devices in terminal. If nothing shows up try another USB controller or install necessary drivers.

Unlock the bootloader with fastboot oem unlock command and run fastboot reboot to boot the device to fresh Android. Complete the setup normally.

Install Magisk

Download latest release of Magisk App directly from Github under assets section and install it to your device.

Extract OTA zip

bash
adb shell
su
# Please grant Superuser permissions if prompted
cd /data/data/com.android.providers.downloads/app_fota
cp (press tab, it will auto complete the OTA zip filename) /sdcard
adb shell
su
# Please grant Superuser permissions if prompted
cd /data/data/com.android.providers.downloads/app_fota
cp (press tab, it will auto complete the OTA zip filename) /sdcard
1
2
3
4
5

Sources

https://topjohnwu.github.io/Magisk/install.html#patching-images