Ok, we have to make this clear so you don’t get confused – the Xiaomi Mi A1 is basically the same phone as the Xiaomi Mi 5X. The only difference is in the software. The Mi A1 is a global model which launched with stock Android One as software, while the Mi 5X launched with Xiaomi’s proprietary MIUI 9.
But users of the Mi 5X are now given a choice to run with the Mi A1’s Android One software – and officially at that, which doesn’t happen all too much with Xiaomi. But it has happened, the Chinese manufacturer has officially released a port of the Mi A1’s software for the Mi 5X. All you have to do is install it.
To use the port, you have to unlock the bootloader of your Mi 5X. Then you have to install the port which can be downloaded from the source link below. You will have to use TWRP custom recovery, and then flash the ROM. A little bit of knowledge flashing a custom ROM is needed here, and a backup of your important data is always recommended.
Ok, so there’s a little bit more to it – but you get the idea. If you want stock Android over MIUI on your Mi 5X, then this is your chance.