This is a magisk module that will enable Always on Display. This is confirmed to work on Android Pie on the Google Pixel (XL), however it will probably work for most devices.
The way this works is explained here. As you can see, it's super simple!
This also requires Magisk 17.0+.
To use it, simply flash it in Magisk Manager, then reboot. AOD will then automatically be enabled, and you can toggle it on or off in Display settings.
Happy Always on Displaying!