LineageOS is a free, community built, aftermarket firmware distribution of Android 8.1 (Oreo), which is designed to increase performance and reliability over stock Android for your device.
LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.
All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.
Before instaling, make sure you are running the latest Oreo firmware from the latest HTC Sense.
If you are encrypted but running an AOSP ROM then you’re fine. If you come from Sense, take a full backup of all your data, boot into TWRP and format data (the option which requires you to type “yes”) and clean flash accordingly. This is due to encryption changes. Do not skip this step or you will be locked out of your system by a password prompt.
If you are coming from any other ROM wiping /data is strongly recommended
Download the latest build and GApps (both links are below).
Reboot to TWRP.
Flash the latest build and GApps.
Reboot and enjoy (as much as currently possible)