[Android General] JayMontana36:
Hey so I've been working for a few months now on and off on trying to build LineageOS 14.1 for this device (the Luna TG-L800S in particular, though all other variants of this device are welcome as with the initial/existing CyanogenMod versions), however I've only been able to find the kernel source, no device trees; I've managed to achieve several successful builds including a newer more modern TWRP recovery with access to more partitions and all that does boot and work properly as it should (or at least it does for as far as I've tested), however I'm having issues with booting up into the system itself despite recovery using the same exact kernel successfully. What's happening exactly is for some reason, whatever reason, SELinux has errors which seemingly cannot be fixed nor bypassed when it comes to booting into the LineageOS system (the Lineage logo doesn't even get to appear at all) and I found out that it was SELinux's fault by forcing a boot kernel boot via fastboot, and then waiting for it to then reboot itself into recovery mode afterwards; once in recovery mode I use adb to pull the "last_kmsg" file from "/proc" which contains what exactly happened with the system boot process, and I see SELinux is the reason for the crashes/bootloop/failure.

SELinux: avtab: invalid type or class
init: SELinux: Could not load policy: Invalid argument
init: failed to load policy: Invalid argument
init: Security failure; rebooting into recovery mode...

No matter what I do or try with recompiling the kernel, whether that's with the permissive commandline option (androidboot.selinux=permissive) or setenforce=0 in commandline or modifying the system build.prop to disable it (or make it permissive) or even straight up outright disabling/removing SELinux completely from the kernel (which actually will then throw another different error about SELinux not being found since apparently it is a requirement for you to have enabled in your kernel config for Android), and so I'm at this point just stuck wondering if there's a way around this. I've also tried replacing some files with older ones (contexts and policy files) which also produced another different error and still failed/bootlooped. I would really love to finally have at least Android 7.1 Nougat (and then eventually newer) as this device is obviously more than capable of handling it, and I also would love to share it with the community, likely with monthly updates or something along those lines, and of course also releasing my sources as they are (which by the way are based off of the OnePlus One X aka ONYX being that these devices are extremely similar if not practically pretty much the exact same apart from branding and minor design differences (and bootloader). The kernel source I'm using is based upon the one linked to from the "sayanogenmod" site posted by the person who I suppose owns and compiled the last/latest CyanogenMod build (from August 26, 2016) here, my device tree is based upon the LineageOS ONYX/OnePlus One X device tree, and my vendor tree is also based upon the ONYX/OnePlus One X vendor tree (due mainly to the similarities between these devices being practically the same with a lot of the same exact vendor/firmware file hashes (if not all the same except for the OnePlus having more and/or newer ones on top as well), and also because the device and vendor trees that were used to build all the other ROMs don't seem to be existent or publicly available anywhere, not even from the same place that I got the kernel source from). So umm, yeah anyone have any suggestions or want to help or know anything about possibly potentially bypassing the SELinux bs that is currently inhibiting a successful boot instead replacing what would be a successful boot with a reboot into recovery?