- Connect your phone to your computer (with USB debugging enabled).
- Click the prompt on your phone to allow your computer to access your phone's data. If no prompt appears, go to your notification panel and click the USB notification, then change the connection type to transferring files.
- Copy the boot.img file from the platform-tools folder into your internal storage.
- Download and install Magisk, then open it.
- Press Install > Patch a file and select the boot.img you just copied.
- Once the patching has finished, locate magisk_patched-27000_XXXX.img in your Downloads folder and copy it into the platform-tools folder on your computer.
If the command does not work, you can also reboot to fastboot mode by turning the phone off whilst holding the volume down button.
adb reboot bootloader
Replace
path\to\magisk_patched.img
with the actual path of the image
fastboot flash boot_a path\to\magisk_patched.img
Do the same for boot_b
fastboot flash boot_b path\to\magisk_patched.img
fastboot reboot
- Open the Magisk app again.
- Follow the instructions on the screen, and your device should reboot after a few seconds.
After your device has booted
- A superuser request for Shell might appear on your phone's screen. If it does, grant it access.
adb shell "su -c cp /dev/block/by-name/boot$(getprop grep ro.boot.slot_suffix) /sdcard/rooted_boot.img" & adb pull /sdcard/rooted_boot.img