is it pre-rooted? if no how do i root my phone after installing the rom
As far as I can tell it is not pre-rooted, but this worked for me:
0. Please read everything before trying it on your device.
1. Install the
magisk apk
2. Go into System > Developes options and enable USB debugging as well as Rooted debugging
3. Open a terminal on your PC, and type
adb root
4. Get a shell on your device with
adb shell
5. Navigate to by-name block devices
cd dev/block/by-name/
6. Using dd, copy boot_a and boot_b to your internal storage:
-
dd if=boot_a of=/storage/emulated/0/Download/boot_a.img
-
dd if=boot_b of=/storage/emulated/0/Download/boot_b.img
7. Exit the shell
exit
8. Open the Magisk app, tap "install" (the one beside Magisk) and select "Select and Patch a File"
9. Navigate to your Downloads folder, select boot_a.img and click "LET'S GO"
10. After patching is completed rename the file (file name is something like: magisk_patched-25200_NCLa0.img) to magisk_boot_a.img and copy it to your pc (
check if the file size matches your original boot_a.img file. If it is 0kb, disconnect your phone from your PC and try step 8-9 again. If it is still 0kb clear Magisk cache and app data and try again)
11. Repeat steps 8-10 for boot_b and rename everything accordingly (magisk_boot_b.img)
12. On your PC terminal type
adb reboot bootloader
13. Once you are in fastboot mode use
fastboot getvar current-slot
to determine which slot your device is currently using:
14. Flash your boot_[a/b].img
- For "current-slot: a":
fastboot flash boot ./magisk_boot_a.img
- For "current-slot: b":
fastboot flash boot ./magisk_boot_b.img
(Make sure your terminal is the folder the magisk_boot_[a/b].img files are located in or use absolute paths)
14. reboot
fastboot reboot
Done!
When you open the Magisk app again you should see Magisk "Installed [version number]".
Note: This worked for me and seems to be reliable.
However I do not take any responsibility for if something goes wrong, loss of data or anything else. If during all of this you get an error, device bootloop or other kind of brick, you can always try flashing the original boot_a.img / boot_b.img (provided you still have them), boot a custom recovery and flash the lineage-20.0-[...].zip and see if it changes anything (I havent tried either as I have never had issues with this method). Alternatively you can use
MSMDownloadTool to completely reset your device (This will wipe
everything including any custom recoverys and replace them with the stock one).
Further reading:
-
Magisk Github
-
Magisk installation instructions
-
MSMDownloadTool