Go to Settings → About phone

Scroll way down the bottom and tap Build Number for a few times until you enabled Developer Mode


Go back to System → Developer options


Turn on USB Debugging and OEM Unlocking

Follow this tutorial to install ADB on your computer
<aside> 👉
For Windows users, if you only download the platform-tools, you will need to use ./adb.exe or ./fastboot.exe instead of just adb and fastboot
</aside>
Open Terminal and type adb devices, an alert should show on the phone, allow it


Reboot in Bootloader mode using
adb reboot bootloader
After it reboot, run
fastboot flashing unlock
Quickly press VOLUME UP and unlocking is finish
Warning: ALL DATA WILL BE ERASED!


Run this to reboot the phone and you’re done!
fastboot reboot
