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

Unable to flash SailfishX to Xperia XA2 from Ubuntu

asked 2019-03-31 14:12:48 +0300

Pim gravatar image

updated 2019-11-20 22:31:28 +0300

Sebix gravatar image

Hi,

I bought an Xperia XA2 and SailfhishX license and tried to install SailfishX from Ubuntu 14.04 following the instructions at:

https://jolla.com/sailfishx-linux-instructions-xa2/

Until step 4.7 (fastboot OEM unlock), everything worked fine. It took me a combination of attempts to get the phone unlocked. The the fastboot command never ended cleanly but hung in unresponsive but the phone eventually was unlocked.

The flash command did not work, the connected phone (with blue light) is recognized by my Ubuntu laptop (lsusb), but the flash.sh command says there is not connected phone.

Then I found the information at https://jolla.zendesk.com/hc/en-us/articles/360012031854, I used the indicated commands to force USB3 ports to USB2 mode temporarily. This gets me one step further, i.e. fastboot recognizes one devices. But:

pvde@alicante:~/SailfishX/Sailfish_OS-Jolla-3.0.2.8-h3113-0.0.7.13$ bash ./flash.sh 
Detected Linux
Searching device to flash..
Found 1 devices: CQ3001NBST 
Fastboot command: fastboot -s CQ3001NBST  
Flashing boot_a partition..
sending 'boot_a' (17724 KB)...
FAILED (remote: unknown command)
finished. total time: 0.001s

If I re-run the command, no device is found, and the connection light on the phone switches from "blue" to "green", briefly going through red.

Checking further, if I connect the phone and run "sudo fastboot devices" a few times, it reports the device a few times, then drops the connection. I repeated this also on another laptop also running Ubuntu 14.

So I'm lost, and wondering if I need a Windows computer, is there more chance of success?

The instructions talk about a USB hub. I don't have a separate USB hub and connect my laptop directly using the Sony USB cable, is it necessary to get a USB hub? I tried other cables, but apparently the Xperia is a different type of micro-USB as my other older micro-USB cables don't fit.

Any suggestions? My Jolla 1 is unstable so I can't use it any more and I don't want to leave Sailfish.

Pim

edit retag flag offensive close delete

Comments

Maybe its completely useless, but did you try ugrading ubuntu to get a more recent kernel (and drivers)? Ubuntu 14 is anyway out of date at the end of april this year.

bomo ( 2019-03-31 17:02:29 +0300 )edit
1

@Pim i've done it with my ubuntu 14.04 successfully. but it worked only with the admin user using sudo before. maybe it helps you...

cemoi71 ( 2019-04-01 23:21:05 +0300 )edit

forgot to tell that it was on usb3 port without special tricks, but direct from mother board. with usb hub i had always a problem with stable connectivity. Directly bound to motherboard is always better...

cemoi71 ( 2019-04-01 23:25:17 +0300 )edit

Up-to-date openSUSE Tumbleweed:

  • on a Dell Lattitude E6510 with USB2 only : FAILED
  • on a Gigybyte-990FX mobo, on one of the USB2 ports : Success.

Seems to be port/hardware related.

During the preliminary parts, when connected to the Dell, the XA2 seemed to try to spontaneously get out of fastboot mode (color switching to blue, then green, then red and the "play dead" charging animation starts). Maintaining the volume button did keep it in "blue" mode.

After failing to flash, the phone again spontaneously tried rebooting into "play dead".

At that point instead of investigating further I moved it from the laptop to the workstation, exact same OS, USB2 port also (I don't even own a USB3-to-USBC cable to begin with).

DrYak ( 2019-04-03 19:44:38 +0300 )edit

Thanks everyone for your suggestions.

I tried on two other laptops, one running Ubuntu 16, also tried a USB hub. No results. So I tried on Windows using a colleague's PC. No success there either:

https://together.jolla.com/question/203356/unable-to-flash-sailfish-to-xperia-xa2-from-windows/

Pim ( 2019-04-05 14:46:38 +0300 )edit

5 Answers

Sort by » oldest newest most voted
0

answered 2020-02-19 20:45:33 +0300

olf gravatar image

updated 2020-02-19 21:36:25 +0300

Following the USB precautions described at the beginning of section 2 of the "Guide: Installing Sailfish X on Xperias" might be helpful, besides the troubleshooting guides at Jolla's Zendesk instance:

edit flag offensive delete publish link more
5

answered 2019-04-15 18:51:50 +0300

Pim gravatar image

Hello everybody,

A status update from my side: I am happy to let you know that I now have Sailfish running on an XA2 !!

How did I do it? The answer is that I didn't do it. I got someone more experienced to help me with it.
I outsource the management of my company's server to a specialist company that also does Linux consulting and training, they have some really talented technical people. It turns out one of them has a lot of (hobbyist) experience in installing and running alternative mobile OSes, he even knew Sailfish. So I asked this company to do it for me.

He told me he did experience many of the same issues that I did. It looks like the fastboot connection is never very stable, commands sometimes work, sometimes don't. The bash script supplied by Jolla runs a number of commands in sequence, each of which can fail, so it doesn't normally run to completion successfully since sooner or later one or the other command fails. What he did was read the script, and execute the commands manually, flashing the various partitions, re-connecting and re-starting if needed. So with some trial and error he quickly managed to get things going.

Bottom line, I'm very pleased with the end result. Being used to an old Jolla 1 phone, Sailfish looks gorgeous on this phone with its superior display.

There's surely a business opportunity in selling these devices with Sailfish pre-installed. I'd happily have paid for it.

Pim

edit flag offensive delete publish link more

Comments

2

A detailed report from the "really talented technical people" to Jolla could be of great help if he would be inclined to do that. Thank you for your feedback.

Maximilian1st ( 2019-04-15 20:55:54 +0300 )edit
2

@Pim i'm glad for you that you're lucky on this long long process.
I'm sorry that you waited for it for such a long time for this. and win. cool. your patience is an inspiration

you may close your ticket with this answer as accepted... wish you have good continuation

cemoi71 ( 2019-04-16 00:38:06 +0300 )edit
2

answered 2019-04-02 14:11:21 +0300

manu007 gravatar image

updated 2019-04-03 15:30:48 +0300

I had more or less the same mistakes with a USB3 port, I put a USB2 HUB between the computer and the phone and everything worked.

Operating System: Ubuntu 18.4.3
Graphical User Interface: KDE Neon 5.15.3

edit flag offensive delete publish link more

Comments

Here too (Kubuntu 18.10). I had problems flashing the device, even when connected via an USB2 port directly on the mainboard. No luck. But when I connected through an external USB2 hub, It Just Worked. I've just flashed the 17B ROM, again via this USB2 hub. No problems whatsoever. Didn't even need root.

Fuzzillogic ( 2019-04-02 18:01:09 +0300 )edit

@manu007 that's not an answer, but a remark, please convert it. if you give your pc-os version too,it would make your remark more interesting. we don't know really on how do you talking about...

cemoi71 ( 2019-04-03 12:22:11 +0300 )edit

@Fuzzillogic is a known issue already linked from Thread holder

cemoi71 ( 2019-04-03 12:25:59 +0300 )edit
1

I also hd a nightmare, I have a longish thread on here and this was the most significant part of it for me - " FASTBOOT needs to be the latest version, so if like me, you're using an LTS linux distro, you won't have it in synaptic ! (that was from Zendesk) And credit to dieterhaack on the XDA forums: use only USB 2 Ports directly connected to PC mainboard (rear ports on access plate) NEITHER of these things seem to pointed out anywhere on forums I've come across "

davekelly ( 2019-04-03 22:29:51 +0300 )edit

Finally! I had also some trouble with unlocking. The issue was resolved after attaching USB hub between phone and PC. I did try all USB2 and USB3 ports available with no luck.

OS: Ubuntu 18.04.2 LTS (4.15.0-47-generic) Fastboot: 1:8.1.0+r23-5~18.04

$ sudo fastboot oem unlock 0x###########
...
OKAY [  4.693s]
finished. total time: 4.693s
simosays ( 2019-04-22 11:10:20 +0300 )edit
0

answered 2019-03-31 23:06:26 +0300

juru2 gravatar image

"Until step 4.7 (fastboot OEM unlock), everything worked fine. It took me a combination of attempts to get the phone unlocked. The the fastboot command never ended cleanly but hung in unresponsive but the phone eventually was unlocked."

  • Did you turn on USB debugging in your phone?
  • What do you mean by "never ended cleanly"?? Did you get back an error message? If so, which?
  • Are you sure that your android-tools-fastboot is the latest / correct version?

Last year, I flashed XperiaX with ubuntu 14.4 and this year I flashed XA2 with ubuntu 18.4. It worked well both times.

edit flag offensive delete publish link more

Comments

Yes USB debugging is turned on. I did the unlock command, it started but then nothing happened for minutes, I interrupted it. Maybe it was still doing things and I messed up the phone by interrupting it. Anyway, the rooting status is that Bootloader is unlocked.

Pim ( 2019-04-01 04:42:33 +0300 )edit

@Pim As your bootloader is unlocked, my suggestion would be to check out "fastboot" again. You might not have installed the latest version, you might need to (re)define your udev rules; you'll find more about it about at askubuntu.com (or, if you can read German, wiki.ubuntuusers.de). However as Bomo has already stated, this problem might not occur with the latest ubuntu LTS (18.4).

juru2 ( 2019-04-01 08:20:32 +0300 )edit

You better try it from Windows, its ubuntu is very old, it will have problems with dependencies.

Chris_ ( 2019-04-01 20:11:25 +0300 )edit

@juru2 seems that by him it is some user and user rights issue. By me it worked only with admin user (not necessary root user) but with sudo too. Have a 14.04...

cemoi71 ( 2019-04-01 23:29:38 +0300 )edit

@Chris_ no no not very old. it's still supported! that an LTS. support ends in april. If it is corrected updated, then it is not a problem

cemoi71 ( 2019-04-01 23:31:58 +0300 )edit
0

answered 2019-03-31 15:11:28 +0300

nepomuk gravatar image

I had no issues using fedora to flash SailfishOS on my XA2. Try to use root for flashing via fastboot

edit flag offensive delete publish link more

Comments

Thanks for the reply , no difference running the command as root (sudo su) unfortunately though.

The device is connected on "Bus 001" which is a 2.0 hub.

Could something have gone wrong during the OEM unlocking? It did unlock, but did not complete cleanly. Maybe something is wrong on the phone. It still boots to Android correctly though.

Pim ( 2019-03-31 15:30:21 +0300 )edit

I havent used Ubuntu for years, but i will try to help you. First i would suggest to connect your phone directly to a usb port on the back of your PC. Then enter: sudo fastboot devices ...if your device shows up go further and always use sudo in front of a fastboot command. Example: sudo ./flash.sh Hope this helps or someone actually using ubuntu knows a solution

nepomuk ( 2019-03-31 16:22:20 +0300 )edit

@Pim what does it display when you enter *#*#7378423#*#* Tap Service info > Configuration > Rooting Status. If Bootloader unlock....?

Chris_ ( 2019-03-31 23:03:17 +0300 )edit

It says "Bootloader unlocked: Yes"

Pim ( 2019-04-01 04:41:39 +0300 )edit
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2019-03-31 14:12:48 +0300

Seen: 1,443 times

Last updated: Feb 19 '20