Sony Xperia XA2 unable to unlock bootloader (again)

Hi,
I managed to buy one Xperia XA2 with Android 9 (for a second time I am trying this).
And for a second time it is unable to unlock the bootloader.

Sailfish_OS-Jolla-3.4.0.24-h3113-0.0.7.52$ sudo fastboot oem unlock 0x7660E4XXXXXXXXX
...
FAILED (remote: Command did not succeed)
finished. total time: 0.082s

interestingly it can read from the device

Sailfish_OS-Jolla-3.4.0.24-h3113-0.0.7.52$ sudo ./flash.sh
Detected Linux
Searching device to flash..
Found H3113, baseband:1311-2845_50.2.A.3.77, bootloader:1310-0301_X_Boot_SDM630_LA3.0_P_38
Found 1 devices: XXXXXXXX
Fastboot command: fastboot -s XXXXXXXX
Your device firmware version identifier is 50.2.A.3.77

The OS is debian buster with fastboot version

Sailfish_OS-Jolla-3.4.0.24-h3113-0.0.7.52$ fastboot --version
fastboot version 1:8.1.0+r23-5
Installed as /usr/lib/android-sdk/platform-tools/fastboot

Sailfish_OS-Jolla-3.4.0.24-h3113-0.0.7.52$ fastboot getvar unlocked
unlocked: no
finished. total time: 0.002s

I tried two different cables and the PC does not have USB3.0 port. Any idea?

thanks

1 Like

try with a USB hub, sometimes it get things done :slight_smile:

OpenSuse as live distribution on thumbdrive also worked for me. Supports flashing over USB3.

I did it with Ubuntu18 and USB3.

But I do remember that it was a hassle.
I certainly do not remember what was it. But I know that I restarted the phone into Android once or twice, maybe after setting the unlock possibility (did you enable this in Android at all? you did not mention explicitly) or maybe after trying to unlock and found that the setting was not remembered or something like this…

Sorry for being unspecific :frowning:

Is it a branded device? Branded devices do not allow bootloader unlocking.

Thank you for your responses.

I follow the instructions on the Xperia XA2 installation guide.

The bootloader can be unlocked on the phone (not branded), in developer mode enabled OEM unlocking and USB debugging.

I have followed the same procedure on the Xperia X without any issues (I actually unlocked two of them)
I think my hardware/software simply does not work right with the XA2.

Next I am thinking to try is raspberry 4 with USB2 hub. Last option will be to ask a friend or dig up an older notebook and try there.

It is HUGE time loss

Any further ideas?

I just unlocked a telekom branded XA2. Key for me was to use the usb2 ports of my mainboard. It didnt work from the usb3 ports. I remember fiddeling around every time, but I always got it done somehow. Good luck!

(From previous times I remember that some specific ports did not work, I think I eventually flashed it with one of the usb3 ports back then…)

However, there is a difference. Iirc the unlocking worked fine on any port, but the flashing caused the problems then… might be luck tho.

It is not working here on debian buster amd64 linux on fujitsu siemens PC. It has no usb3 ports.
fastboot version 1:8.1.0+r23-5
fastboot version 29.0.4-5871666
fastboot version 30.0.5-6877874

I now tried on RPi4 on the USB2 ports.
fastboot version 1:8.1.0+r23-5

No luck. I am following the instructions step by step.

Do I have to sign in somewhere to be able to unlock?

So it is the unlock command?
As said above I cannot remember but maybe try this command:

fastboot -i 0x0fce oem unlock 0xYourKey

Did you read my first post? this same command says

# fastboot oem unlock 0x7660xxxxxxxxxx
...
FAILED (remote: Command did not succeed)
finished. total time: 0.081s

the -i 0x0fce doesn’t really matter

See https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/#222126-2-flashing-sailfish-os

Thank you - very instructive guide.

Two things I noticed - don’t know if they are related.

After inserting the SIM Android says emergency calls only and asks for network pin, which seems to be not the SIM PIN.
It says this is to prevent using the SIM in another device. I honestly do not remember setting such PIN - well it was 2017 when I started using the Xperia X - I have no memories of that. On the second Xperia X I bought for testing and backup, I also do not remember being asked such question.

Could be the device is locked by the network operator?

I asked here before buying used XA2 and someone mentioned it doesn’t matter for bootloader and flashing.
The system says the bootloader can be unlocked.

Let me know what you think.

Searching device to flash…

lspci -nn | grep USB | cut -d '[' -f3 | cut -d ']' -f1 | xargs -I@ sudo setpci -H1 -d @ d0.l=0

from https://jolla.zendesk.com/hc/en-us/articles/360012031854-Flashing-Sailfish-to-Xperia-phone-fails-Troubleshooting-

Without that, I did get to

The supported Sony Vendor partition image wasn’t found in the current directory.

before then, which just needs the Software binaries for AOSP Oreo (Android 8.1) – Kernel 4.4 – Nile (v16) - Sony Developer World) unzipped as an .img file and put in the folder you are running flash.sh from :slight_smile:

In my case it turned out that the phone is locked because wrong unlock code was entered 5 times.

I am still waiting for Sony to provide code for unlocking.

1 Like