Way to root Lineage after installation

Hi, download the LOS image to your computer, and get payload-dumper-go (GitHub - ssut/payload-dumper-go: an android OTA payload dumper written in Go), then you can extract the boot.img (e.g. payload-dumper-go -p boot lineage-19.1-20230220-nightly-FP3-signed.zip)

If you don’t have already, get twrp also (Fairphone 3).

Then, transfer boot.img to the device (adb push boot.img /storage/emulated/0/Download), go into the magisk app, say install to file, select boot.img and have it patched.
Get this back on your computer: adb pull /storage/emulated/0/Download/magisk… (you have to check the chosen file name).

Then reboot into bootloader: adb reboot bootloader, temporarily boot twrp: fastboot boot twrp-3.7.0_9-0-FP3.img, and if twrp is there put the patched boot image on the device, e.g. adb push magisk… /cache
Then start a shell on twrp: adb shell and flash the boot image: dd if=/cache/magisk…,. of=/dev/block/bootdevice/by-name/boot

Then you can reboot and your devices should be rooted.
Don’t forget to setup magisk according your needs, especially the actions required to really grant root if requested

3 Likes