Sony Xperia XA2 not flashing

I have a Sony Xperia XA2 that I am trying to flash with the free version of Sailfish OS. I’m at part 6.1 of the Jolla provided guide and trying to flash. All other sections were completed successfully. A terminal window was opened in the folder that the Sailfish OS files were extracted to. The Sony bin file is in there. The Xperia has all the required settings inside that were described in the guide. I ran “fastboot devices” to see if there was a connection and received a value. When I run “bash ./flash.sh”, I get “Detected Linux”, “Searching device to flash…”. It stays this way like it is hung up. I was able to use an Android file transfer app to look at files, too, so there are no cable problems. The little blue light as described is on. Is there anything that I can check that may fix my flashing problem?

I do not know by heart what step 6.1 is. :wink:
But I guess this could be the (in)famous USB3 thing? Did you try other ports?

Please have a look at this very detailed guide by olf
https://together.jolla.com/question/222126/guide-installing-sailfish-x-on-xperias/
There is also explained how to force your USB3 to USB2.

From Windows, you just run a batch file. Practically one-click. Does everything except backup your Android partition.

Yes (same as on Linux, one bash shell command).
If* you have not updated Windows to 2004 and cannot install the needed drivers!

So it looks like both OS flavours are flawed when it comes to flashing SFOS?

1 Like

I had the same issue (XA2 as well, linux as well). After trying various things (USB2 hubs etc) I managed to flash by not using my newest laptop but an older one that has no USB3 whatsoever.

I am using Pop OS (A flavor of Ubuntu Linux) to try and flash the phone. I listed all the USB ports in the terminal window and tried to connect to a port that supported USB2. I have a USB2 hub on order that I will try when it arrives. The computer I am using is a Meerkat from System 76. There was a command line in a troubleshooting guide mentioned above that was extremely long. I copied and pasted it, but there was an error. One of the parts of the command was not configured properly. The command was to help force all ports to USB2 temporarily. I’ll keep trying. Thanks for all the replies.

This is the line that did not work correctly:
lspci -nn | grep USB | cut -d ‘[’ -f3 | cut -d ‘]’ -f1 | xargs -I@ sudo setpci -H1 -d @ d0.l=0
After I put in my password to run the command, the error message below appeared:
setpci: Unable to parse filter -d ‘:’ expected.
Try `setpci --help’ for more information.
I’m not a guru yet, so I will try the USB2 hub and go from there.

Interesting, so what is the output from:

lspci -nn | grep USB | cut -d '[' -f3 | cut -d ']' -f1

Looks like that is outputting something in your case that is not acceptable to setpci’s -d option (it is expecting a vendorid:productid pair like 8086:8c31).

From the failing line, it doesn’t appear that that is your problem.

Small remark from me to proliferate workaround to flash on Win 10, because I had to search for it quite a while: With Zadig Tool it is possible to install driver under Win 10 2004, see
https://together.jolla.com/question/227831/unable-to-install-fastboot-driver-in-windows-10-v2004/
Worked for me with XA2 Ultra

5 Likes

I didn’t try looking at the output from: lspci -nn | grep USB | cut -d ‘[’ -f3 | cut -d ‘]’ -f1
because the new USB2 hub arrived in the mail. I tried the new hub and it worked. It might have been that USB2 problem mentioned. My Sony is flashed and working fine. The flashing went well with the last two lines appearing as described. I’m impressed with the fit and finish of the OS so far. The USB2 hub I used is the “Plugable” brand USB 2.0 Hub. The model number is USB2-2PORT. It has it’s own chipset inside. I plugged it into my USB3 port on my Meerkat with Pop OS Linux and followed the Jolla directions exactly and had no problems. The hub I have is this one:
https://plugable.com/products/usb2-2port
I bought mine from eBay. Thanks again for all the replies.

1 Like

Thanks for pointing this out. Was having troubles with the script not detecting the phone. With Zadig Tool, the driver install went fine, and SFOS flashed fine :slight_smile:

Is there a way to check updates for this? Is there a formal bug posted somewhere or do we just wait for someone to write back here?

A little bit late but I want to share my workaround for the USB3.0 Bug. Just install a whatever OS in a Virtual Machine and switch the USB Settings to 2.0 and connect the phone to the VM. I did this more than 3 times in the past, works perfectly.

5 Likes

I have an ISO for Windows 1909. I’m going to try it again but last I tried, it still didn’t work even though I have the latest Virtualbox + extensions and Guest Additions in the guest/VM. Let me try one more time…

Windows wouldn’t be my first choice.

Another cheap method is using something like a raspberry 2 or 3. It is possible to flash everything via ssh. And copy install files via scp.

I would agree given the current topic.

Apparently my VM can see the phone and transfer files just like my host but also like my host machine, Windows cannot get the right driver installed to see the device when in fastboot mode.

I tried Ubuntu and this VM could also see the phone and transfer stuff, adb commands work but fastboot command cannot see the phone in fastboot mode.

At this point I get the good feeling Windows is interfering in something and might as well use a Linux PC.

I used a Meerkat mini PC with Pop! OS from System 76 to flash my Sony Xperia XA2. I had to use a USB2 hub from “plugable”, but it all worked by the book. It’s an investment, but I decided to leave my 2007 iMac behind after 13 years (including several iphones). I started having trouble getting anything interesting going on the iMac with its terminal and some of the new software was not allowed because my iMac was so old. The chip upgrade did not help either. I like my Meerkat system. I download apps and do system updates via terminal alot and it is so fast.