How to unlock bootloader and install TWRP recovery:
1. Boot into Android
2. Navigate into Developer Settings
3. Enable "Unlock Bootloader"
4. Reboot phone while holding the Volume Up key
5. Pick fastboot from the menu
6. Connect your phone to a computer capable of communicating with fastboot
7. Execute the following command on your command line terminal to unlock the bootloader: fastboot oem unlock
8. Accept the terms of use on your Android device's screen
9. Execute the following command on your command line terminal to flash TWRP recovery: fastboot flash recovery TWRP.img
10. Execute the following command to reboot your Android device: fastboot reboot