[Sony Xperia XZ1  Questions & Answers] koromaru:
Hi,

I'm having trouble getting the kernel to boot after entering the unlock code for my XZ1 on the FlashTool. I tried to follow the instructions from Sony's website on Command Prompt, but the unlock code didn't work there. This is what I've done so far:

Phone did tell me "Yes" for Bootloader Unlock Allowed

I turned on USB Debugging and OEM unlock on my phone

I got the unlock code from Sony

I installed the fastboot and adb drivers

I entered the unlock code on the FlashTool

This is the code I got from the FlashTool:

02/034/2020 15:34:16 - INFO - Device connected in fastboot mode

02/034/2020 15:34:21 - INFO - Device disconnected

02/034/2020 15:34:33 - INFO - Device connected in flash mode

02/034/2020 15:34:36 - INFO - Please connect your device into flashmode.

02/034/2020 15:34:37 - INFO - Using Gordon gate drivers version 3.1.0.0

02/034/2020 15:34:37 - INFO - Opening device for R/W

02/034/2020 15:34:37 - INFO - Device ready for R/W.

02/034/2020 15:34:37 - INFO - Reading device information

02/034/2020 15:34:37 - INFO - Reading phone properties

02/034/2020 15:34:37 - INFO - Sending getvar:max-download-size

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:version

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:version-bootloader

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:version-baseband

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:product

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:serialno

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:secure

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Sector-size

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Version-sony

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:USB-version

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:max-download-size

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Loader-version

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Phone-id

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Device-id

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Rooting-status

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Sector-size

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Ufs-info

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Emmc-info

02/034/2020 15:34:37 - INFO - getvar status : FAIL

02/034/2020 15:34:37 - WARN - Emmc-info not supported

02/034/2020 15:34:37 - INFO - Sending getvar:Default-security

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Platform-id

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Keystore-counter

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Security-state

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:S1-root

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Sake-root

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Battery

02/034/2020 15:34:37 - INFO - getvar status : FAIL

02/034/2020 15:34:37 - WARN - Battery not supported

02/034/2020 15:34:37 - INFO - Sending getvar:Frp-partition

02/034/2020 15:34:37 - INFO - getvar status : OKAY

02/034/2020 15:34:37 - INFO - Sending getvar:Stored-security-state

02/034/2020 15:34:37 - INFO - getvar status : FAIL

02/034/2020 15:34:37 - WARN - Stored-security-state not supported

02/034/2020 15:34:37 - INFO - Sending getvar:Keystore-xcs

02/034/2020 15:34:37 - INFO - getvar status : FAIL

02/034/2020 15:34:37 - WARN - Keystore-xcs not supported

02/034/2020 15:34:37 - INFO - Sending Get-root-key-hash

02/034/2020 15:34:37 - INFO - Get-root-key-hash status : OKAY

02/034/2020 15:34:37 - INFO - Sending Read-TA:2:2202

02/034/2020 15:34:37 - INFO - Read-TA status : OKAY

02/034/2020 15:34:37 - INFO - Sending Read-TA:2:2205

02/034/2020 15:34:37 - INFO - Read-TA status : OKAY

02/034/2020 15:34:37 - INFO - Sending Read-TA:2:2210

02/034/2020 15:34:37 - INFO - Read-TA status : OKAY

02/034/2020 15:34:37 - INFO - Sending Read-TA:2:4900

02/034/2020 15:34:37 - INFO - Read-TA status : OKAY

02/034/2020 15:34:37 - INFO - Sending Read-TA:2:10021

02/034/2020 15:34:37 - INFO - Read-TA status : OKAY

02/034/2020 15:34:37 - INFO - Sending Getlog

02/034/2020 15:34:37 - INFO - Getlog status : OKAY

02/034/2020 15:34:37 - INFO - Sending Get-ufs-info

02/034/2020 15:34:37 - INFO - Get-ufs-info status : OKAY

02/034/2020 15:34:37 - INFO - Connected device : G8343 / SW release 1307-7470_47.1.A.2.313 / Customization 1309-7056_R2B

02/034/2020 15:34:37 - INFO - Last flash date : 2019-11-25 14:38:26

02/034/2020 15:34:37 - INFO - Phone ready for flashmode operations.

02/034/2020 15:34:37 - INFO - Sending Read-TA:2:2226

02/034/2020 15:34:37 - INFO - Read-TA status : FAIL

02/034/2020 15:34:37 - WARN - Unable to read TA unit 2226, error=-22 ( Hex unit value 000008B2 )

02/034/2020 15:34:49 - INFO - Unlocking device

02/034/2020 15:34:49 - INFO - Writing TA unit 000008B2 to partition 2

02/034/2020 15:34:49 - INFO - download:00000010

02/034/2020 15:34:49 - INFO - download status : OKAY

02/034/2020 15:34:49 - INFO - Write-TA:2:2226

02/034/2020 15:34:49 - INFO - Write-TA status : OKAY

02/034/2020 15:34:49 - INFO - Unlock finished

02/035/2020 15:35:04 - INFO - Sending Sync

02/035/2020 15:35:58 - INFO - Flash canceled

02/036/2020 15:36:31 - ERROR - This action needs a connected device in ADB mode

02/036/2020 15:36:38 - INFO - Device connected in flash mode

02/036/2020 15:36:38 - INFO - Device disconnected

02/037/2020 15:37:56 - INFO - Device connected in fastboot mode

02/038/2020 15:38:00 - INFO - Now plug your device in Fastboot Mode

02/038/2020 15:38:14 - INFO - Selected kernel (boot.img or kernel.sin): C:\Users\nakam\Downloads\fastboot\twrp-3.3.1-0-20200210-poplar_10.img

02/038/2020 15:38:14 - INFO - Flashing selected kernel

02/038/2020 15:38:15 - INFO - Sending 'boot' (35680 KB) OKAY [ 0.929s]

02/038/2020 15:38:15 - INFO - Writing 'boot' FAILED (remote: 'Flashing is not allowed in Lock State')

02/038/2020 15:38:15 - INFO - Finished. Total time: 0.931s

02/038/2020 15:38:15 - INFO - FASTBOOT Output:

Sending 'boot' (35680 KB) OKAY [ 0.929s]

Writing 'boot' FAILED (remote: 'Flashing is not allowed in Lock State')

Finished. Total time: 0.931s

I have no idea what I can do from here. I'm using Windows 10, so I don't know if I missed something relating to that OS. Any help would be greatly appreciated! Thanks!