LG G3 Europe (lg-d855)

Contributors

 * Nutcake

Fastboot
Before you can use fastboot on this device you need to remove LGs Download mode, which hides the standard fastboot mode. You can do this by zeroing out a partition called 'laf':

More detailed instructions for this can be found here

Afterwards, you can boot into fastboot by following these steps:

1. Turn of phone completely 2. Hold Volume Up. 3. Plug in USB-cable while still holding Vol. Up until fastboot pops up

Signing the boot image
pmbootstrap will successfully flash rootfs and kernel, however the device will only boot if you use the

command, as it will otherwise show this error:

ERROR : boot certification verify [630]_________________________________________ [640] [640] Secure booting Error! [640] Cause : boot certification verify [640] [640]_________________________________________ The message is shown for 3 seconds, then the screen blacks out and the LED will blink red and blue indefinitely.

This happens because the bootloader on the d855 variant of the LG G3 can not be unlocked and you have to trick the bootloader into thinking your boot image is legitimate.

To do this, you need to first export your boot.img-lg-d855:

mkdir -p /tmp/pmOS_export pmbootstrap export /tmp/pmOS_export Then we need a tool called Open_Bump, which can sign boot images for our device. (Requires Python 2. Also works for older LG devices?):

git clone https://github.com/CyboLabs/Open_Bump cd Open_Bump python2 open_bump.py &quot;/tmp/pmOS_export/boot.img-lg-d855&quot; This will create a signed image called  in.

Now first flash System and kernel images using pmbootstrap and then manually flash the signed image over these:

pmbootstrap flasher flash_rootfs pmbootstrap flasher flash_kernel fastboot flash boot /tmp/pmOS_export/boot_bumped.img-lg-d855

lk2nd
To avoid the secure boot error and get lk2nd running, download lk2nd-msm8974.img from here and remove the "SEANDROIDENFORCE"  bytes at the end of the file with a hex editor, then bump lk2nd-msm8974.img with this script and flash it to the phone with. If the bytes haven't been removed, the script will think that lk2nd has already been bumped.

Mainline kernel
List of features working on mainline kernel:

Links

 * Original Kernel Source
 * Service manual (containing lots of schematics!)
 * Mainline kernel fork for d855

Photos

 * Weston running with demos
 * Secure booting error when using unsigned image
 * /r/postmarketOS post