How to unlock bootloader on Sony Xperia XZ Premium
Warning; Unlocking bootloader voids your warranty
Here are the steps:
- Enable developer options
- Enable USB Debugging
- Download adb and fastboot. Example below on debian/Ubuntu
sudo apt install adb fastboot
- Go the the following page: developer.sony.com/open-source/aosp-on-xperia-open-devices/get-started/unlock-bootloader/how-to-unlock-bootloader and get your unlock code. Follow the steps outlined there
Source(s):