Open a CMD window inside the platform-tools folder, then (while your phone is in fastboot mode) run
fastboot boot path\to\twrp.img
Sometimes flashing Magisk can cause a bootloop. To fix this, you'll need to restore a boot.img backup.
Use the TWRP backup feature to make a backup of the boot partition.
- Flash the magisk.apk (you may have to rename it to magisk.zip) and reboot your phone.
- Once booted, locate the Magisk app and open it.
- Follow any instructions provided. Select the direct install method if you are provided with several methods.
Your phone will now reboot, and you have succesfully rooted it.
Important
After you've rooted your phone, create a new boot.img backup in Android and in Windows (using the WOA Helper app) and remove any remaining boot.img backups you have made previously. If you don't do this, switching to Android will unroot your phone.
After updating or changing your rom (and rerooting) you will have to repeat all the steps on this page.