As you all know that Xiaomi Mi A1 is stock Android smartphone and you may want to unlock its bootloader to install Custom ROM and Bypass Pattern Lock. So here are the steps to do so:
1. Power off your handset.
2. Press and hold volume down button and connect the handset to the pc/laptop.
3. Handset will now enter into fastboot mode.
4. Open command prompt on your pc/laptop and run the following command: