We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2019-11-26 08:19:14 +0200

Xperia XA2: flashing worked after unlock, despite secure: yes

In the end, I successfully flashed Sailfish_OS-Jolla-3.2.0.12-h3113-0.0.7.10.zip and SW_binaries_for_Xperia_Android_8.1.6.4_r1_v16_nile.zip to an Xperia XA2 (single SIM) model H3123.

However, even though the sudo fastboot oem unlock 0x... completed successfully, flash.sh was refusing to proceed because getvar secure was yes. When I ran the oem unlock again, it told me that the device was already unlocked. I sabotaged the getvar secure check in flash.sh. (I edited a copy of the script, because flash.sh itself is covered by the MD5 check.) With the getvar secure check sabotaged, flashing worked without any problem.

I now have Sailfish running on the XA2 and it works.

When I run sudo fastboot getvar secure now, it says secure: no.

It is perhaps relevant that when I did the oem unlock and the flashing, I did it without disconnecting the device between the two steps. In other words, when I made it to section 6, I skipped to step 6.5.

It is probably obvious from the description, but this is how the script that worked differed from the original:

$ diff -U4 flash.sh my_flash.sh                                                                                                                                                                                                  
--- flash.sh    2019-11-24 22:49:05.587796864 -0800
+++ my_flash.sh 2019-11-24 22:47:39.631569661 -0800
@@ -133,9 +133,9 @@
 if [ "$($FASTBOOTCMD getvar secure 2>&1 | head -n1 | cut -d ' ' -f2 )" == "yes" ]; then
   echo; echo "This device has not been unlocked, but you need that for flashing."
   echo "Please go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/ and see instructions how to unlock your device."
   echo;
-  exit 1;
+  #exit 1;
 fi

 if [ -z ${BINARY_PATH} ]; then
   BINARY_PATH=./

Xperia XA2: flashing worked after unlock, despite secure: yes

In the end, I successfully flashed Sailfish_OS-Jolla-3.2.0.12-h3113-0.0.7.10.zip and SW_binaries_for_Xperia_Android_8.1.6.4_r1_v16_nile.zip to an Xperia XA2 (single SIM) model H3123.

However, even though the sudo fastboot oem unlock 0x... completed successfully, flash.sh was refusing to proceed because getvar secure was yes. When I ran the oem unlock again, it told me that the device was already unlocked. I sabotaged the getvar secure check in flash.sh. (I edited a copy of the script, because flash.sh itself is covered by the MD5 check.) With the getvar secure check sabotaged, flashing worked without any problem.

I now have Sailfish running on the XA2 and it works.

When I run sudo fastboot getvar secure now, it says secure: no.

It is perhaps relevant that when I did the oem unlock and the flashing, I did it without disconnecting the device between the two steps. In other words, when I made it to section 6, I skipped to step 6.5.

This is on Arch Linux. The fastboot command is from version 29.0.5-1 of the package android-tools.

It is probably obvious from the description, but this is how the script that worked differed from the original:

$ diff -U4 flash.sh my_flash.sh                                                                                                                                                                                                  
--- flash.sh    2019-11-24 22:49:05.587796864 -0800
+++ my_flash.sh 2019-11-24 22:47:39.631569661 -0800
@@ -133,9 +133,9 @@
 if [ "$($FASTBOOTCMD getvar secure 2>&1 | head -n1 | cut -d ' ' -f2 )" == "yes" ]; then
   echo; echo "This device has not been unlocked, but you need that for flashing."
   echo "Please go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/ and see instructions how to unlock your device."
   echo;
-  exit 1;
+  #exit 1;
 fi

 if [ -z ${BINARY_PATH} ]; then
   BINARY_PATH=./

Xperia XA2: flashing worked after unlock, despite secure: yes

In the end, I successfully flashed Sailfish_OS-Jolla-3.2.0.12-h3113-0.0.7.10.zip and SW_binaries_for_Xperia_Android_8.1.6.4_r1_v16_nile.zip to an Xperia XA2 (single SIM) model H3123.

However, even though the sudo fastboot oem unlock 0x... completed successfully, flash.sh was refusing to proceed because getvar secure was yes. When I ran the oem unlock again, it told me that the device was already unlocked. I sabotaged the getvar secure check in flash.sh. (I edited a copy of the script, because flash.sh itself is covered by the MD5 check.) With the getvar secure check sabotaged, flashing worked without any problem.

I now have Sailfish running on the XA2 and it works.

When I run sudo fastboot getvar secure now, it says secure: no.

It is perhaps relevant that when I did the oem unlock and the flashing, I did it without disconnecting the device between the two steps. In other words, when I made it to section 6, I skipped to step 6.5.

This is on Arch Linux. The fastboot command is from version 29.0.5-1 of the package android-tools.

It is probably obvious from the description, but this is how the script that worked differed from the original:

$ diff -U4 flash.sh my_flash.sh                                                                                                                                                                                                  
--- flash.sh    2019-11-24 22:49:05.587796864 -0800
+++ my_flash.sh 2019-11-24 22:47:39.631569661 -0800
@@ -133,9 +133,9 @@
 if [ "$($FASTBOOTCMD getvar secure 2>&1 | head -n1 | cut -d ' ' -f2 )" == "yes" ]; then
   echo; echo "This device has not been unlocked, but you need that for flashing."
   echo "Please go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/ and see instructions how to unlock your device."
   echo;
-  exit 1;
+  #exit 1;
 fi

 if [ -z ${BINARY_PATH} ]; then
   BINARY_PATH=./