Project Treble has made it easier for OEMs to port newer Android versions to their devices, but it has also facilitated custom AOSP ROM development on our forums. Recently, a developer on our forum portedAndroid P beta unofficially to a variety of Qualcomm Snapdragon Treble-enabled devices. Now, that unofficial port of Android P has been released for the Xiaomi Mi A1, the company’s first Android One device. Although, the device doesn’t actually support Project Treble so you have to “Trebelize” it first, as the developer says.
The initial build had quite a bit of issues like a broken fingerprint scanner, camera, and Bluetooth, but all of them are now fixed. The only major issue right now is that VoLTE doesn’t work and SELinux is set to permissive. Please keep in mind that installing the custom ROM requires repartitioning your device, which will require you to erase EVERYTHING from your phone—so be prepared to make backups!
The flashing instructions are quite long and detailed, so make sure to follow every step carefully. The thread linked below also contains some tweaks for fixing weird bugs so take a look at them, too.