Unlock the bootloader
Back up all important data
Install ADB and Fastboot on a computer
Download the correct factory image or firmware for your device
Obtain the matching boot image for your current firmware
Patch the boot image with Magisk
Transfer the patched boot image to the computer
Reboot the device into bootloader or fastboot mode
Flash the patched boot image with Fastboot
Reboot the device
Install the Magisk app
Verify root access with a root checker app
