Files
oam/knowledge base/magisk.md
2023-07-09 20:48:18 +02:00

2.1 KiB

Magisk

Worked on:

  • OnePlus One
  • OnePlus 5

Table of contents

  1. TL;DR
  2. Further readings

TL;DR

  1. download and flash the os' recovery-flashable zip file
  2. start the newly installed system
  3. download and install the latest version of Magisk's app
  4. open Magisk
  5. check the value of Ramdisk

If the value of Ramdisk is yes:

  1. extract the boot.img or init_boot.img file from the firmware's zip file
  2. check if the firmware also has a vbmeta.img or vbmeta_*.img file
  3. press the Install button in the Magisk app
  4. if the firmware did NOT have a vbmeta image file, check the Patch vbmeta in boot image option
  5. hit Next in the Options section
  6. choose Select and Patch a File in the Method section
  7. select the boot image
  8. hit Let's go
  9. flash the patched boot image

If the value of Ramdisk is no, follow the instructions at magisk in recovery

Now:

  1. Flash the patched boot image:

    • from the recovery, or
    • from your computer with adb and fastboot
  2. reboot to the system

To flash the patched boot image from your computer with adb and fastboot:

  1. copy the patched boot image to your computer using the file transfer mode or adb:

    adb pull '/sdcard/Download/magisk_patched_<random strings>.img'
    
  2. reboot the device to the bootloader (fastboot)

  3. flash the modified boot image:

    fastboot flash boot 'path/to/modified/boot.img'
    
  4. if the firmware HAD a separate vbmeta image file, patch the vbmeta partition:

    fastboot flash vbmeta --disable-verity --disable-verification 'path/to/vbmeta.img'
    

Further readings