[Galaxy Note 4 Android Development (Snapdragon)] fattire:
How to break your phone for no reason

I'm just going to post this as a starting point for anyone trying to get los-15 going. Following these results in a fully working build a 326 MB piece of garbage that won't boot.

lineage-15.0-20171104-UNOFFICIAL-trltetmo.zip

After a blank screen it goes eventually to odin "downloading" mode, probably because of the numerous failed startups, but I figured for anyone insane enough to experiment who doesn't mind losing their phone, this is what I did to get the .zip and it might save you some steps (and/or waste hours of your time). I wanted to document my progress. Here's what I tried:

Start with repo init to get all 51GB or whatever of lineage-15.0 source, then create a .repo/local_manifests/roomservice.xml based on los-15 when available but falling back to the 14.1 stuff for the device itself.

Be sure to run build/envsetup.sh, then repo sync and lunch lineage_trltetmo-userdebug somewhere in there.

Now for the various changes I made to the device to get the build to finish. Some of these changes are modeled after the klte changes here.

project device/samsung/apq8084-common/ with this patch (boot w/o selinux, changes to CameraWrapper and other bits to make it build)

project device/samsung/qcom-common/ with this patch (comment out some overlays that aren't in los-15 yet)

project device/samsung/trltetmo/ (create a lineage-15.0 branch first) with this patch (changes almost identical to this one).

project device/qcom/sepolicy/ with this patch (some sepolicy changes to make the build happy- shouldnt matter since the kernel will boot with it turned off)

project device/samsung/trlte-common/ (create a lineage-15.0 branch) with this patch (most of this is just removing the /sepolicy directory, but there were minor tweaks needed to make the build go through, remove unimplemented overlay settings and cmhw stuff that doesn't exist in los-15, and added some PRODUCT_PACKAGES I saw in the hlte/klte that looked right)

Also, I have no idea if this was right, but I made this change at /vendor/lineage/ -- this was a hail mary because of this change to how BSP works and I should probably just talk to Rashed to see what the right way to do it is. But it does seem to build anyway.

Anyhow, you can brunch trltetmo to start the build. Again the resulting file doesn't yet boot and I'm sure lots of ril changes (removing libshim and switching to the opensource libril thing, see klte/hlte) and other changes will be needed, but the klte and hlte are making great progress. Looks like the https://review.lineageos.org/#/q/project:LineageOS/android_device_samsung_klte-common are coming quickly too, with ten commits just today. Props to Kevin F. Haggerty and mohammad afaneh.

If you DO try building with this as your starting point, be sure to back up everything before you start flashing this stuff. Maybe someone can figure out what the deal is with the kernel not starting-- I initially set this line to "Image" but the boot.img ended up being too big and stoped the build. I wonder if it should be set to "zImage-dtb" or "Image-dtb" or something. The whole device tree thing is still years later a bit of a mystery to me and I'm not 100% sure how it's getting put in the boot image- is it part of the kernel or following the Android boot.img structure..? I guess that's something to investigate. Incidentally, [MENTION=6847876]_mone[/MENTION] this might be a possible solution to your one-kernel-to-rule-them-all.

Also note that the resulting .zip edify install script has a first line checking that it's running on a trlte, but twrp doesn't identify the model so I just manually edited that script as well to take out the device model check.

PS-- this does seem like a useless post, doesn't it... but this is how it usually starts-- an unbootable zip, then the boot gets fixed, then it comes up (maybe) without graphics or no wifi or whatever and one by one the pieces move into place. I don't have time this weekend to mess with it more, but I thought why not post what I have so far since I did get the build to finish just in case someone else wants to pursue further. For now though I'm gonna give it a break.

Please don't ask for builds etc as there is no point. You have everything you need to make your own craptastic build. I think a tiny fix is all that's needed to bring up the kernel, but I'm abandoning ship for the weekend anyway.