: In Settings > System > Developer Options , enable both USB Debugging and OEM Unlocking .

For older devices or specific manufacturers, you might need to use the legacy command: fastboot oem unlock

adb reboot bootloader