Flashing Sony Xperia 10 iii by hand because script doesnt start fastbootd

Hello, first of all, I’m very happy with the whole SailfishOS experience and maturity of the project.
I’m a first-time user and installed it on an old Xperia 10iii with great results.

During installation and flashing, I very much ran into trouble with the install scripts unfortunately. They didn’t work properly so I ended up flashing the device by hand, using the scripts as a guideline what to flash (especially flash-config.sh for the Xperia 10iii).

I did ran the scripts on NixOS, not Ubuntu, in a nix shell with adb and fastboot installed. adb version 1.0.41 and fastboot (android-tools) version 34.0.1. I did put in some redirects for the different executable paths (there’s an option for that) and it wasn’t the main problem why it didn’t work.

Eventually the problem was that with holding volume down while connecting USB cable, the device gets into recovery mode (blue led) but you need fastboot mode (fastbootd started) to flash.
I managed to do this by running fastboot reboot fastbootafter booting in recovery mode, and then flashing all the images on the boot- and dtbo partitions by hand.
After that burning the userdata Sailfish image and the oem_a partition and it all worked beautifully.

I have previous experience with installing LineageOS which made this an easy excercise for me, so it was fine and not even that difficult.
The fact that the scripts aren’t working perfectly is not the question, as I’m using NixOS which is not the recommended OS to do this, so thats my problem to solve.

But why is the flash.sh not rebooting the device in fastbootd mode?

In all my years flashing SFOS it has been perfectly adequate to be in regular fastboot (blue LED) mode.

I think this is explained in the flash-on-windows.bat file, correct me if I am wrong.

On line 172 and 173

:: NOTE: Do not reboot here as the battery might not be in the device
:: and in such situation we should not reboot the device.

The instructions tell you to hold down volume up button, which will boot the device directly into fastboot mode.

2 Likes

That’s interesting, then there must be something different on my set-up.
I have a Xperia 10iii which had Android 13 installed. And from a Thinkpad X270 which has two USB 3.1 gen 1 ports.
It had a lot of problems flashing with fastboot but it worked flawlessly (even over USB 3.1) using FastbootD.
I’ll investigate further. Maybe it’s the phone which causes the problems.
Thank you for the feedback.

Yes the instructions tell that correctly. But normal fastboot mode didn’t work for me. Only FastbootD mode, which is different.

I do see a lot of references and blog posts on the internet explaining that the old fastboot (which was a firmware level thing) is phased out and that the newer phones are only flashable via the newer FastbootD, which is a userland reimplementation.

But I doubt this is already the case for Xperia 10iii, so there is probably something funky with this particular phone I have here. As you all indicate, this is “not normal” and definately a local problem here.
Could it be an Android 13 firmware update or something?

It doesn’t reboot if started in recovery mode,
If you follow the SailfishOS instructions by using Volume-UP and USB connect, then there is the blue-light recovery mode situation.
If then issued fastboot reboot fastboot (which is a weird command in itself), then it doesn’t reboot to FastbootD but just starts the FastbootD daemon.
So adding fastboot reboot fastboot to flash.sh for selected modern phones who have FastbootD mode, would actually work without a reboot (as the phone is already in recovery mode due to the Volume-UP blue-led procedure).

It’s in the ADB manual:

  • reboot fastboot
    • Reboots into fastbootd (system).
    • Enters fastbootd directly without a reboot (recovery).

My apologies, first time user on this forum.
I tend to overpost and make a mess of replies but tried to tidy it up a little bit.
I promise to better my life and behave better from now on.

3 Likes

No idea what that means. Some sort of containerisation? Maybe that affects what you’re trying to do?

The adb/fastboot version also matters, and USB port power saving. Head over to the docs and do some searches.

I did state the Fastboot version: “adb version 1.0.41 and fastboot (android-tools) version 34.0.1.”, so if the version matters (which I think is not so much the case) which version is the correct one?
Please forget about the nix shell, it’s not relevant.

I did head over to the docs and did some searches, and I have to conclude that newer(ish) Android installs on the Sony’s use FastbootD, or at least support that a lot better than the old fastboot firmware that used to be in Android <12. I did share a link to FastbootD documentation in my post supporting the fact that I did my homework and searches: https://source.android.com/docs/core/architecture/bootloader/fastbootd

I also do not have a problem right now, as I more than succesfully flashed my Sony Xperia 10iii with SailfishOS, and put the commercial license on it. Only thing I miss for now is WPA3 which is in the works, and the GPS is flakey which is known on this device.

But the point is, the bash script thing in the installer does not properly work when trying to flash one of the newer Sony’s with the newerst firmwares, as Android migrated from the firmware-based flashboot to the newer userland-based FlashbootD. The old fastboot is still there, but buggy and lagging a lot of features, thus needing “voodoo” to succesfully flash (like, the correct cable, only over USB 2.0, only when the moon aligns with Jupiter) and using FlashbootD Just Works™ in all conditions and reliably, if the phone has this newer firmware. The flashboot protocol over the USB wire is the same as it is a standard, so flashboot client version does not really matter that much.

So my point is, if someone wants to flash one of the new(er) supported Sony’s with SailfishOS and it has the newest Android firmware before flashing, it might be needed to do a fastboot reboot fastboot after the press-Volume-UP-blue-led trick and before running flash.sh.

This would only be relevant for the first-time flash, as after that the Sailfish bootloader is installed which has the old flashboot without FlashbootD so there are no problems there.

I am really surprised that this is not something open for discussion, as most reactions either send me back to the same SailfishOS documentation which I have read multiple times, or just say that it’s not a problem which ever happened to them, which is also valid of course.

But nobody seems to be actually open to discussing how we should cope with the FastbootD migration the Android world did years ago, and how that affects supporting SailfishOS on third party devices.

My Sailfish installation is fine now, and I also chipped in for the new Jolla phone (which has the correct documentation-approved firmware from factory), so I just leave my findings here for anyone who is also struggling with this and get a default “Just read the documentation” answer.

2 Likes

Jolla crew should be the best option to discuss this. So I recommend that you open that topic in the Community meetings.

2 Likes

I think you are forgetting that the script works for thousands of people, and I think you are very convinced that you did everything right and that therefore the error cannot be on your side and the script must be faulty.

Also I never admonished that you forgot to tell us the adb version, all I said was that - IME - it matters. See how defensive you’re being?

And I’m not sure why you prefer to read Android documentation before making sure that SFOS documentation doesn’t have what you need.

We do know that the flashing requires fastbootd on newer devices, as the bootloader fastboot mode does not allow flashing certain partitions. For example with Xperia 10 IV and V, the flashing script does reboot to fastbootd. But that only works with Android on the device, as Sailfish does not have fastbootd. That’s why flashing Sailfish (fully) on top of Sailfish currently does not work on those devices.

How ever, Xperia 10 III did not require the userspace fastbootd, at least not in the past. I don’t have X10III device at the moment to flash with latest Android available for it, to check whether this has changed. It is of course possible, but I would expect that someone else would also have run to this issue before, if it had changed.

4 Likes

Thank you Keto for your answer and clear explanation why FastbootD is not preferred.
As my device now has the known-good Sailfish bootloader installed, I will try to reflash it in the near future to check if any problems remain. And if there are problems, they have to be local problems.
But for now I’m daily driving it so this will come later.

How do you mark this as “solved”? There is no “solution” button, probably because I’m new and don’t have the rights yet?

The solved feature was not enabled for this category. Now you should be able to mark a solution with the tickbox under a post.

4 Likes