Ask / Submit
8

XA2: Flashing Issues

asked 2018-11-13 19:58:10 +0200

bomo gravatar image

updated 2018-11-13 22:12:45 +0200

I am having troubles with flashing Sailfish in the last step

On first try, I got:

%bash flash.sh
Detected Linux
Searching device to flash..
Found 1 devices: CQ30019XXX
Fastboot command: fastboot -s CQ30019XXX
Flashing boot_a partition..
Sending 'boot_a' (17772 KB)                        FAILED (remote: 'unknown command')
Finished. Total time: 0.001s

Then I tried again and it said

Detected Linux
Searching device to flash..
Found 0 devices:
Incorrect number of devices connected. Make sure there is exactly one device connected in fastboot mode.

I then unplugged and plugged the phone again and I get

Detected Linux
Searching device to flash..
Found 1 devices: CQ30019XXX
Fastboot command: fastboot -s CQ30019XXX
Flashing boot_a partition..
Sending 'boot_a' (17772 KB)                        FAILED (remote: 'Requested download size is more than max allowed')

The images seem to be fine:

% md5sum -c md5.lst
AdbWinApi.dll: OK
AdbWinUsbApi.dll: OK
Jolla-3.0.0.8-h3113-armv7hl.urls: OK
fastboot.exe: OK
fimage.img001: OK
flash-on-windows.bat: OK
flash.sh: OK
flashing-README.txt: OK
hw-release: OK
hybris-boot.img: OK
hybris-recovery.img: OK
os-release: OK
sailfish.img001: OK
vendor.img001: OK

My fastboot version:

% fastboot --version
fastboot version 28.0.1-4986621

What am I doing wrong?

EDIT: Here some additional fastboot info:

% fastboot --help | grep set_active
 set_active SLOT            Set the active slot.
edit retag flag offensive close delete

Comments

1

I had same issues on latest Ubuntu. Flashed fine on Win10. I suspect ADB/fastboot issues and/or usb connection settings on XA2.

MyShipMyRulez ( 2018-11-13 21:29:06 +0200 )edit

Have you checked that your version of fastboot includes the 'set_active' command? It should look like this: $ fastboot --help | grep set_active set_active <slot> Sets the active slot. If slots are</slot>

mlohse ( 2018-11-13 22:02:48 +0200 )edit

May I ask where you got the image from? On https://shop.jolla.com/downloads/ I find onyl the images for Sony Xperia X, not XA2.

grueni ( 2018-11-13 22:09:49 +0200 )edit

@mlohse please see my updated post above. I guess my fastboot is supported, right?

bomo ( 2018-11-13 22:13:22 +0200 )edit

@grueni, I downloaded it from exactly there, but had to buy it first for 0Euro. Then, there are downloads for all different XA2 versions.

bomo ( 2018-11-13 22:14:26 +0200 )edit

6 Answers

Sort by » oldest newest most voted
9

answered 2018-11-14 15:44:55 +0200

jovirkku gravatar image

updated 2018-11-14 15:45:33 +0200

We have reproduced this issue on Ubuntu (18.04) when using a USB3 port for flashing.

Tip #1: Use a USB2 port if available on your computer.
Tip #2: Read https://jolla.zendesk.com/hc/en-us/articles/360012031854

edit flag offensive delete publish link more

Comments

i got the same problem with windows 10. I use a USB2 port. and : C:\Users\Leblanc\Downloads\Sailfish_OS-Jolla-3.0.0.8-h4213-0.0.7.11-FIXED\Sailfish_OS-Jolla-3.0.0.8-h4213-0.0.7.11-FIXED>fastboot.exe -s RQ300652EM flash boot_a hybris-boot.img target reported max download size of 134217728 bytes sending 'boot_a' (17772 KB)... OKAY [ 0.485s] writing 'boot_a'... FAILED (remote: Command not allowed) finished. total time: 0.500s

ERROR: Failed to execute 'fastboot.exe -s RQ300652EM flash boot_a hybris-boot.img'.

Choopsy ( 2018-11-16 20:32:11 +0200 )edit

Same problem with me. My system is a openSuSE tumbleweed VERSION="20181120", 4.19.2-1-default #1 SMP PREEMPT Tue Nov 13 20:56:49 UTC 2018 (8adee6e) x86_64 x86_64 x86_64 GNU/Linux. Laptop Dell xps13. There is no usb2 port and the Tip#2 didn't work. How to go on?

triessner ( 2018-11-22 21:45:32 +0200 )edit

Same problem here. Getting FAILED (remote: Requested download size is more than max allowed) I tried to force USB3 to USB2 mode with the above instructions but got setpci: Unable to parse filter -d ':' expected. Try 'setpci --help' for more information. Any ideas how to coerce USB3=>USB2 on Ubuntu18.10?

droid001 ( 2018-12-22 01:49:40 +0200 )edit

Same here, can't seem to force usb 2… even using tip #2

lzbk ( 2019-03-03 18:52:14 +0200 )edit

Same here, on Archlinux. I am glad I still had an USB 2 port. It worked without rumbles on USB 2.

Moo-Crumpus ( 2019-06-09 10:42:47 +0200 )edit
2

answered 2018-11-17 13:57:56 +0200

FrankSiebert gravatar image

I had the problem as well with Debian stable on T430s. It worked flawless with latest Ubuntu on Samsung N510.

Using old Hardware for flashing seems to be the solution.

edit flag offensive delete publish link more

Comments

Today flashed Xperia XA2 single sim with Sailfish 3.0.2 using a brand new install of Ubuntu 19.4 on an old HP 6715s Notebook from 2007! This device has only two USB2.0 ports. Seems really old Hardware and new LinuxOS is a good combination for doing the job. :)

starghost ( 2019-04-29 23:36:57 +0200 )edit
1

answered 2019-05-23 17:20:35 +0200

wap15294 gravatar image

I do seem to experience the same issues. Unlocking the bootloader was not super easy but I managed well enough. While flashing the XA2 I get the following error:

MD5SUM 'ed5a809dc0024d83cbab4fb9933d598d' match for file 'AdbWinApi.dll'. MD5SUM '0e24119daf1909e398fa1850b6112077' match for file 'AdbWinUsbApi.dll'. MD5SUM 'c980ea6caa9140ee3f30cdc0e98844c4' match for file 'fastboot.exe'. MD5SUM '1263d75ac4fef698e3c971a5826d8a3b' match for file 'flash-on-windows.bat'.

Searching for a compatible device...

Firmware version identifier '50.1.A.13.123' matches the compatible Android 8.1 version. Continuing...

The device is unlocked for the flashing process. Continuing..

Das System kann das angegebene Laufwerk nicht finden.

Found 'SW_binaries_for_Xperia_Android_8.1.6.4_r1_v17_nile.img' that will be used as vendor image. Continuing.. MD5SUM '69c78727fe0d9d38e7257fc68e8f5d55' match for file 'hybris-boot.img'.

C:\Users\fsjga\Desktop\sailfish x\Sailfish_OS-Jolla-3.0.3.9-h3113-0.0.7.4>fastboot.exe -s CQ3001LAGU flash boot_a hybris-boot.img target reported max download size of 536870912 bytes sending 'boot_a' (18464 KB)... FAILED (data write failure (Too many links)) finished. total time: 2.687s

ERROR: Failed to execute 'fastboot.exe -s CQ3001LAGU flash boot_a hybris-boot.img'.

FLASHING FAILED

Please go to https://together.jolla.com/ and ask for guidance.

Sometimes when trying to flash the cmd- terminal crashes alltogether.

edit flag offensive delete publish link more

Comments

Ok so after trying first with ubuntu 18.04(which didn't work) and installing ubuntu budgie 19.0x (2 I think) on an old acer ultrabook I finally managed to flash the XA2.

wap15294 ( 2019-05-24 13:59:25 +0200 )edit

The unreliable USB was the last straw for me; Manjaro Cinnamon works like a Swiss wstch!

Direc ( 2019-05-31 19:29:44 +0200 )edit
0

answered 2019-02-01 20:47:25 +0200

shanti gravatar image

flashing on an USB2-only-device did the trick for me

edit flag offensive delete publish link more
0

answered 2019-02-10 02:00:38 +0200

Blizzz gravatar image

It is not an answer, but too long for a comment, sorry.

I am also having a rough ride (starting with a borked USB-C cable…)

On Antergos (Arch based) I was not able to unlock the boot loader, no matter whether I used USB 2 or 3 or 3 in 2 mode.

FAILED (command write failed (Success))
finished. total time: 0.000s

Guessing it was too new software versions (Sony says somewhere platfrom-tools 26.0.2 and older would work) I tried it with a recent KDE Neon live session, which is based on Ubuntu 18.04.

With this unlocking somehow worked, but not smoothly. Instead of having a nice OK, fastboot hung. After disconnect the device I was presented with the "XA2 bootloader is unlocked screen", so it seems successful. Flashing failed however:

$ sudo bash flash.sh 
Detected Linux
Searching device to flash..
Found 1 devices: CQ3000U5VE 
Fastboot command: fastboot -s CQ3000U5VE  
Flashing boot_a partition..
target didn't report max-download-size
sending 'boot_a' (17764 KB)...
FAILED (remote: Requested download size is more than max allowed
)
finished. total time: 0.001s

was all i got. Since someone reported it working on Ubuntu 18.10, I created another live usb stick with that and tried again. It failed differently:

Detected Linux
Searching device to flash..
Found 0 devices: 
Incorrect number of devices connected. Make sure there is exactly one device connected in fastboot mode.

I looked into the flash.sh script a bit, and spotted the line that leads to this output. Essentially it is

sudo fastboot -s $SERIALNO getvar product 2>&1

So it tried this to see what it retrieves. And to my surprise it is different with each call:

ubuntu@ubuntu:~$ sudo fastboot -s CQ3000U5VE getvar product 2>&1 
getvar:product FAILED (remote: unknown command)
finished. total time: 0.000s
ubuntu@ubuntu:~$ sudo fastboot -s CQ3000U5VE getvar product 2>&1 
getvar:product FAILED (remote: GetVar Variable Not found)
finished. total time: 0.000s
ubuntu@ubuntu:~$ sudo fastboot -s CQ3000U5VE getvar product 2>&1 
getvar:product FAILED (remote: GetVar Variable Not found)
finished. total time: 0.001s
ubuntu@ubuntu:~$ sudo fastboot -s CQ3000U5VE getvar product 2>&1 
getvar:product FAILED (remote: unknown command)
finished. total time: 0.000s
ubuntu@ubuntu:~$ sudo fastboot -s CQ3000U5VE getvar product 2>&1 
getvar:product FAILED (remote: GetVar Variable Not found)
finished. total time: 0.000s
ubuntu@ubuntu:~$ sudo fastboot -s CQ3000U5VE getvar product 2>&1 
product: H3113
finished. total time: 0.000s

That's already very suspicious. And something seems to be odd. Now my guess is, trying it often enough, this step would be taken and maybe flashing gets started. It turns out, every fifth execution of the script indeed gets beyond this point, alas always ending up with:

Detected Linux
Searching device to flash..
Found 1 devices: CQ3000U5VE 
Fastboot command: fastboot -s CQ3000U5VE  
Flashing boot_a partition..
target didn't report max-download-size
Sending 'boot_a' (17764 KB)...

And getting stuck there (until disconnecting the phone). In journalctl I'll find:

Feb 09 22:33:23 ubuntu kernel: INFO: task fastboot:7346 blocked for more than 120 seconds.
Feb 09 22:33:23 ubuntu kernel:       Not tainted 4.18.0-10-generic #11-Ubuntu
Feb 09 22:33:23 ubuntu kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Feb 09 22:33:23 ubuntu kernel: fastboot        D    0  7346   7321 0x00000000
Feb 09 22:33:23 ubuntu kernel: Call Trace:
Feb 09 22:33:23 ubuntu kernel:  __schedule+0x29e/0x840
Feb 09 22:33:23 ubuntu kernel:  schedule+0x2c/0x80
Feb 09 22:33:23 ubuntu kernel:  schedule_timeout+0x258/0x360
Feb 09 22:33:23 ubuntu kernel:  ? __do_page_fault+0x25a/0x4d0
Feb 09 22:33:23 ubuntu kernel:  wait_for_completion_timeout+0xac/0x140
Feb 09 22:33:23 ubuntu kernel:  ? wake_up_q+0x80/0x80
Feb 09 22:33:23 ubuntu kernel:  usb_start_wait_urb+0x8c/0x180
Feb 09 22:33:23 ubuntu kernel:  usb_bulk_msg+0xb8/0x170
Feb 09 22:33:23 ubuntu kernel:  proc_bulk+0x2a7/0x350
Feb 09 22:33:23 ubuntu kernel:  usbdev_do_ioctl+0x763/0x10f0
Feb 09 22:33:23 ubuntu kernel:  ? do_mmap+0x38c/0x5a0
Feb 09 22:33:23 ubuntu kernel:  usbdev_ioctl+0xe/0x20
Feb 09 22:33:23 ubuntu kernel:  do_vfs_ioctl+0xa8/0x620
Feb 09 22:33:23 ubuntu kernel:  ksys_ioctl+0x67/0x90
Feb 09 22:33:23 ubuntu kernel:  __x64_sys_ioctl+0x1a/0x20
Feb 09 22:33:23 ubuntu kernel:  do_syscall_64+0x5a/0x110
Feb 09 22:33:23 ubuntu kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Feb 09 22:33:23 ubuntu kernel: RIP: 0033:0x7fc1ab4673c7
Feb 09 22:33:23 ubuntu kernel: Code: Bad RIP value.
Feb 09 22:33:23 ubuntu kernel: RSP: 002b:00007ffeaed644b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Feb 09 22:33:23 ubuntu kernel: RAX: ffffffffffffffda RBX: 0000000000004000 RCX: 00007fc1ab4673c7
Feb 09 22:33:23 ubuntu kernel: RDX: 00007ffeaed644c0 RSI: 00000000c0185502 RDI: 0000000000000004
Feb 09 22:33:23 ubuntu kernel: RBP: 000000000113d000 R08: 0000000000000003 R09: 0000000000000000
Feb 09 22:33:23 ubuntu kernel: R10: 0000000000000001 R11: 0000000000000246 R12: 000000000001c000
Feb 09 22:33:23 ubuntu kernel: R13: 0000564ae1db0d90 R14: 00007ffeaed644c0 R15: 00007fc1a964f000

Back on Antergos, trying the same, I have the same results (with and without android-udev installed). That's were I am stuck now.

edit flag offensive delete publish link more

Comments

I know its not satisfying, but just try flashing via windows and USB 2 port ;-)

bomo ( 2019-02-10 11:05:25 +0200 )edit
1

I don't have a "smart" home, so my windows do not have USB ports.

However, today I tried it with Ubuntu 16.04 on an old Thinkpad Edge 15, and here flashing worked with the first attempt :) Previously I tried with my 3yo Tuxedo InfinityBook and a Samsung Ultrabook we got used. The Thinkpad Edge does not have a single USB 3 interface, only 2 ones. How/why this should or could make a difference, but whatever.

Blizzz ( 2019-02-10 23:00:43 +0200 )edit

Same problem here for ArchLinux. Doesn't work on USB3 or USB2 port...

tourdetour ( 2019-04-02 19:05:32 +0200 )edit

I've just tried to flash on an old Atergos install, and it worked flawlessly. I had also tried from a Windows 10 VM, it did not work. Currently posting from the awesome app Voyager :D

tourdetour ( 2019-04-02 22:57:26 +0200 )edit
0

answered 2019-02-10 14:16:35 +0200

Fuzzillogic gravatar image

updated 2019-02-10 20:51:10 +0200

I had issues with flashing from Kubuntu 18.10 as well, even when using an USB2 cable on an USB2 port. Unlocking the bootloader worked after a few retries, but flashing was a no-go. Eventually I plugged my XA2 into an USB2 hub, and then suddenly It Just Worked. If you don't have a hub laying around, you might want to check your monitor, which sometimes also includes a hub.

I just saw there's a BIOS update for my mainboard, stating improved compatibility with USB devices. Not sure if that could have had anything to do with these problems. But given that USB controllers have their own firmware as well these days, it might be worth a try to update.

edit flag offensive delete publish link more

Comments

Had the same problem, flashing on USB3 didn't work and when using USB2, fastbooot didn't see the phone at all. After updating BIOS to latest version, fastboot started to see my phone using USB2 and flash succeeded.

bugear ( 2019-03-02 19:16:42 +0200 )edit

Same problem here. Ubuntu 18.04 only USB3 or USB-C available. Unlocking bootloader went without issue, but flashing is no-go. Went through all current computers (3 others) and found Thinkpad T430U which had USB-port marked with yellow, but even that failed (might have been USB-3 port with high power output etc). So as a last resort I dub up old Asus EeePC 900. Trying to put OS in it tomorrow and then, maybe, I get the phone flashed. There's apparently a patch available for fastboot: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759611#10 but I sounds like I need to build the toolkit myself. Don't want to go down that rabbit hole. Other option seemed to be to force USB2 only: https://www.systutorials.com/241533/how-to-force-a-usb-3-0-port-to-work-in-usb-2-0-mode-in-linux/ But it isn't clear to me yet how to enable USB3 afterwards, so I try EeePC first. USB3 seems to be an issue also on Windows machines too. I will report back if I get working solution on USB3 ports, I will investigate that while I try to get the EeePC into running order.

Lupin ( 2019-11-16 22:28:18 +0200 )edit

Doh, how stupid do I feel myself. I fought to get my ancient EeePC 900 up and running, it has USB 1.1 and 2.0 support. So Bodhi Linux 5 instal, update add flasboot tools and all stuff required for update. Connect Xperia 10, blue led and try run flash.sh. No joy, always "zarro devices found". Changed to Ubuntu 16.04, same results. Every installations was able to detect that bootloader was already unlocked. Then I finally scrathed my head a bit further, and run fastboot -l devices, and sure enough, it allways finds and reports same id, so fastboot is actually working? Back on my main laptop, Xperia again connected and again:

fastboot devices | cut -d$'\t' -f1 CQ3001UKC4 Then: fastboot -s CQ3001UKC4 getvar product product: I4113 So I get product Id out of it too, so why doesn't the flashing succeed: flash.sh: if [ ! -z "$(echo $PRODUCT | grep -e "F512[12]")" ]; then No wonder, if my script recognizes only XA2 dual sim, it will not work with Xperia 10 dual sim I4113 WIll continue experimenting, I'm going to modify the flash.sh and I will report back.

Lupin ( 2019-11-24 16:44:57 +0200 )edit

If you go this way and modify flash.sh, you need to compute new md5sum for your modified script and update md5.lst accordingly. But I seem to stumble on every corner on this, I have followed this to flash my xperia 10 and now to flash.sh is requesting kernel for Android 6. Something fishy here, have to dig further. Like if I bought the Sailfish X far a back, does that mean I have support on it only for Xperia X? What a bummer.

Lupin ( 2019-11-24 17:05:48 +0200 )edit

In my case the sulution is to shell out more money (30 € for an existing customer) to get Sailfish license for another device, in my case Xperia 10,all 4 models included. Maybe someone else is in same situation than me, Sailfish X license bought when it came available but not used, and now trying to flash Xperia 10 with X's images won't work.l.

So, if in problems, check that your Sailfish X license corresponds with your phone model.

Lupin ( 2019-11-24 17:16:33 +0200 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2018-11-13 19:58:10 +0200

Seen: 2,819 times

Last updated: May 23