[Xperia Z5 General] threader:
The selinux errors will probably be fixed by this :

https://github.com/sonyxperiadev/device-qcom-sepolicy

and

https://github.com/sonyxperiadev/device-sony-sepolicy

In the kitakami-common/BoardConfigCommon.mk add

include device/sony/sepolicy/sepolicy.mk

I am including a modified Sony local_manifest but it is not without problems, I have to comment out stuff in the main LOS manifests, but it does produce a system.img, just check out local_manifest/LA.BR.1.3.3_rb2.14.xml and choose either my kernel or the old msm8994 that i also carry the changes from, or provide your own, or manually.

Including that file caused most of the warnings to vanish, I see this tho that looks like it needs to be solved, even with androidboot.selinux=permissive and ro.build.selinux=0 in the boot. img.

01-02 10:41:04.499 980 980 I init : type=1400 audit(0.0:236): avc: denied { create } for name="sap_uim_socket1" scontext=u:r:init:s0 tcontext=u:object_r:socket_device:s0 tclass=sock_file permissive=1
01-02 10:41:04.549 981 981 I init : type=1400 audit(0.0:238): avc: denied { execute_no_trans } for path="/system/bin/netmgrd" dev="mmcblk0p43" ino=350 scontext=u:r:init:s0 tcontext=u:object_r:system_file:s0 tclass=file permissive=1
01-02 10:41:04.549 1 1 I init : type=1400 audit(0.0:239): avc: denied { unlink } for name="sap_uim_socket1" dev="tmpfs" ino=19583 scontext=u:r:init:s0 tcontext=u:object_r:socket_device:s0 tclass=sock_file permissive=1

I'm doing this from TWRP to get adb.

echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggble=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop

I think these are the last obstacles for booting with my kernel, some quick googling suggests It's a problem with keystore and qseecom.

Edit; My kernel now boots Android 8 with a different qseecom, I need to confirm a few things before i commit, like if this will kill msm8974 support as there were a few ifdefs for that case.

01-02 10:42:24.198 1480 1480 W SystemServer: ***********************************************
01-02 10:42:24.198 1480 1480 E SystemServer: BOOT FAILURE making Lock Settings Service ready
01-02 10:42:24.198 1480 1480 E SystemServer: java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.exist(java.lang.String, int)' on a null object reference
01-02 10:42:24.198 1480 1480 E SystemServer:	at android.security.KeyStore.contains(KeyStore.java:210)
01-02 10:42:24.198 1480 1480 E SystemServer:	at android.security.keystore.AndroidKeyStoreSpi.engineContainsAlias(AndroidKeyStoreSpi.java:813)
01-02 10:42:24.198 1480 1480 E SystemServer:	at java.security.KeyStore.containsAlias(KeyStore.java:1293)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.server.locksettings.LockSettingsService.migrateOldData(LockSettingsService.java:740)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.server.locksettings.LockSettingsService.systemReady(LockSettingsService.java:596)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.server.SystemServer.startOtherServices(SystemServer.java:1630)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.server.SystemServer.run(SystemServer.java:411)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.server.SystemServer.main(SystemServer.java:274)
01-02 10:42:24.198 1480 1480 E SystemServer:	at java.lang.reflect.Method.invoke(Native Method)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
01-02 10:42:24.198 1480 1480 E SystemServer:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:787)
01-02 10:42:24.199 1480 1480 D SystemServerTiming: MakeLockSettingsServiceReady took to complete: 10ms

01-02 10:42:24.801 1480 1480 W SystemServer: ***********************************************
01-02 10:42:24.802 1480 1480 E SystemServer: BOOT FAILURE making Connectivity Service ready
01-02 10:42:24.802 1480 1480 E SystemServer: java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.exist(java.lang.String, int)' on a null object reference
01-02 10:42:24.802 1480 1480 E SystemServer:	at android.security.KeyStore.contains(KeyStore.java:210)
01-02 10:42:24.802 1480 1480 E SystemServer:	at android.security.KeyStore.contains(KeyStore.java:218)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.net.LockdownVpnTracker.isEnabled(LockdownVpnTracker.java:92)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.ConnectivityService.updateLockdownVpn(ConnectivityService.java:3615)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.ConnectivityService.systemReady(ConnectivityService.java:1660)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.SystemServer.lambda$-com_android_server_SystemServer_78011(SystemServer.java:1794)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo$1.$m$0(Unknown Source:98)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo$1.run(Unknown Source:0)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.am.ActivityManagerService.systemReady(ActivityManagerService.java:14334)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.SystemServer.startOtherServices(SystemServer.java:1722)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.SystemServer.run(SystemServer.java:411)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.server.SystemServer.main(SystemServer.java:274)
01-02 10:42:24.802 1480 1480 E SystemServer:	at java.lang.reflect.Method.invoke(Native Method)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
01-02 10:42:24.802 1480 1480 E SystemServer:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:787)
01-02 10:42:24.802 1480 1480 D SystemServerTiming: MakeConnectivityServiceReady took to complete: 7ms
01-02 10:42:24.802 1480 1480 I SystemServer: MakeNetworkPolicyServiceReady

01-02 10:42:24.776 1711 1711 E JniUtils: Could not load native library jni_latinimegoogle
01-02 10:42:24.776 1711 1711 E JniUtils: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/app/LatinIME/LatinIME.apk"],nativeLibraryDirectories=[/system/app/LatinIME/lib/arm64, /system/fake-libs64, /system/app/LatinIME/LatinIME.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64, /system/lib64, /system/vendor/lib64]]] couldn't find "libjni_latinimegoogle.so"
01-02 10:42:24.776 1711 1711 E JniUtils:	at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
01-02 10:42:24.776 1711 1711 E JniUtils:	at java.lang.System.loadLibrary(System.java:1657)
01-02 10:42:24.776 1711 1711 E JniUtils:	at com.android.inputmethod.latin.utils.JniUtils.<clinit>(JniUtils.java:29)
01-02 10:42:24.776 1711 1711 E JniUtils:	at com.android.inputmethod.latin.utils.JniUtils.loadNativeLibrary(JniUtils.java:47)
01-02 10:42:24.776 1711 1711 E JniUtils:	at com.android.inputmethod.latin.LatinIME.<clinit>(LatinIME.java:577)
01-02 10:42:24.776 1711 1711 E JniUtils:	at java.lang.Class.newInstance(Native Method)
01-02 10:42:24.776 1711 1711 E JniUtils:	at android.app.ActivityThread.handleCreateService(ActivityThread.java:3321)
01-02 10:42:24.776 1711 1711 E JniUtils:	at android.app.ActivityThread.-wrap4(Unknown Source:0)
01-02 10:42:24.776 1711 1711 E JniUtils:	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1677)
01-02 10:42:24.776 1711 1711 E JniUtils:	at android.os.Handler.dispatchMessage(Handler.java:106)
01-02 10:42:24.776 1711 1711 E JniUtils:	at android.os.Looper.loop(Looper.java:164)
01-02 10:42:24.776 1711 1711 E JniUtils:	at android.app.ActivityThread.main(ActivityThread.java:6494)
01-02 10:42:24.776 1711 1711 E JniUtils:	at java.lang.reflect.Method.invoke(Native Method)
01-02 10:42:24.776 1711 1711 E JniUtils:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
01-02 10:42:24.776 1711 1711 E JniUtils:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

01-02 10:41:46.612 1480 1480 E SystemServiceRegistry: No service published for: trust
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry: android.os.ServiceManager$ServiceNotFoundException: No service published for: trust
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.os.ServiceManager.getServiceOrThrow(ServiceManager.java:75)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.app.KeyguardManager.<init>(KeyguardManager.java:331)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.app.SystemServiceRegistry$24.createService(SystemServiceRegistry.java:363)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.app.SystemServiceRegistry$24.createService(SystemServiceRegistry.java:361)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.app.SystemServiceRegistry$CachedServiceFetcher.getService(SystemServiceRegistry.java:962)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:914)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at android.app.ContextImpl.getSystemService(ContextImpl.java:1667)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at org.lineageos.internal.notification.LineageNotificationLights.<init>(LineageNotificationLights.java:126)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.server.notification.NotificationManagerService.onStart(NotificationManagerService.java:1410)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:124)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:111)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.server.SystemServer.startOtherServices(SystemServer.java:1187)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.server.SystemServer.run(SystemServer.java:411)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.server.SystemServer.main(SystemServer.java:274)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at java.lang.reflect.Method.invoke(Native Method)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
01-02 10:41:46.612 1480 1480 E SystemServiceRegistry:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:787)

A copy of my latest build with kernel 3.10.108 and some hardening. I've confirmed bluetooth works. The OTG button works, though the mouse did not show up until i altered pointer location preference :S Wifi works.

https://drive.google.com/open?id=1d8FNiFlMN6Bey6xD606pBomqBgSiZ-MO