I installed the newest version form AOSP website (v5.8) (u need a TWRP treble for it to work).
Works like a charm.
Now i tried to get the buttons of my xiaomi piston headset to work similar to this description
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer? | Terms of Service