lk2nd
lk2nd copied to clipboard
Instructions for using lk2nd together with lineageos for d855
I couldn't figure out how to install lk2nd together with lineageos on a LG G3 D855. I always get this secure boot certificate error. From the [postmarketos] page on this device I can see that the boot image needs to be signed, but I didn't manage to transfer that to a lineageos setup.
Any hints?
To fix the secure boot error you have to remove the "SEANDROIDENFORCE" bytes with a hex editor at the end of the lk2nd-msm8974.img file and then bump it with this script. If you don't remove these bytes, the script will think that lk2nd is already bumped.
You have to remove these bytes:

Thanks a lot, that works!
If I now dd this to boot and then exec fastboot flash boot boot.img with boot.img being from the lineageos build root or image, lineage boots fine, and fastboot mode and recovery can be started like stated in the readme.
One thing thats still strange is that fastboot mode now looks like the buildin black'n'white text only and not that colourful as expected, with those fancy lk2nd functions, like seen before when fastboot flashing the lineage boot.img. Should it be like that or is what I see the original fall back fastboot?
You can check if fastboot oem lk_log && fastboot get_staged log.txt works to get a log. This command should only be supported by lk2nd. It might be that the display is initialized in "black'n'white" mode, not much lk2nd can do in that case.
fastboot oem lk_log freezes and does not return.
LineageOS becomes unstable when booted like that, sudden reboots, maybe related to bluetooth? logcat-lk2nd-boot.log