The original post on Reddit with some more background about the issue.
I have re-signed all system apps of LineageOS with my own key and have replaced them all before the first boot. LineageOS boots normally but then all re-signed system apps crash with an error like:
SystemUI has stopped, Settings has stopped.

The screen stays dark. It seems that the re-signed system apps are unusable. Maybe I made some mistake or LineageOS has some anti-tampering check implemented?
What I have done: I opened all system apps with the WinRAR zip manager and removed the CERT.RSA and CERT.SF files in each META-INF folder and deleted all the names and SHA-256 digest entries in all MF manifest-files. Also, all other APK for example, in the framework folder, like the framework-res.apk file, I edited them like this. Then I created a keystore with Key, using the Java keytool, I think this is self-signed. Then I signed all APKs with the Uber Apk signet tool and successfully performed zip-aligning. Then I flashed Lineage OS with TWRP on the phone. Before the first boot, I deleted the system APKs with the TWRP file manager and replaced them with my self-signed ones. Uber-Sign-Tool: https://github.com/patrickfav/uber-apk-signer
I have now adapted with the TWRP terminal chmod with the following commands: Before I adapted chmod, I checked everything with ls -l.
Then I adjusted everything as it is right in the system so for me: chmod 644 for system-apk's and the apk-folders and chmod 755 for the /system/app and /system/priv-app folders. Now I'm stuck again in bootloop when I edit chmod.
The chown-Settings were already on root. Also I tried chown 0.0 -R and chcon u: object_r: system_file: s0 (see also installing apk in /system/app with android 5.1 or higher (simple adb push doesn't work anynore) push does) I stuck again in bootloop when I edit chmod.
There are no Odex files available.
Why can I edit the AndroidManifest.xml from all Systemapps without problems if I keep the original signature except at the framework-res.apk? Does anyone know why it doesn't work with the framework-res.apk? The only way I find which works is to turn off signature verification in the whole system, but this is bad for the security.
apktoolhas the-coption for that, though yes you will loseAndroidManifest.xmlchanges, so it might not work for you. What I want to say is that the OS likely does check for that signature. – Andy Yan Dec 02 '18 at 02:21