For those of you who need to root your Android smartphone or tablet running Resurrection Remix/LineageOS ROM with Magisk root method, you may be ending up in a bootloop due to incompatibility with official Magisk versions. For that, you can try using this modified version of Magisk. This will work also on most AOSP ROMs(What is AOSP?) you may have trouble rooting with official Magisk.
Now, we do still recommend “trying” to root using official Magisk first. You can try flash TWRP recovery then simply flash the official Magisk zip file, refer to How to Install TWRP & Root w/ Magisk. If that fails, you can uninstall Magisk by flashing the uninstaller zip file in TWRP then try the modified version of Magisk below:
Credits – XDA
Join the HighOnAndroid VIP Fans List for free help from Max and discounts on Android accessories.