Update: This applies to Sony Xperia XA2 Ultra and likely many other models, too.
I just had a little Fun™ trying to flash my Sony Xperia X with Sailfish OS 188.8.131.52 on Manjaro Linux (not officially supported, I know!) and I was constantly hitting this wall:
$ sudo ./flash.sh ----8<---- Flashing boot partition.. fastboot: error: Couldn't parse partition size '0x'.
I sure had Fastboot installed:
$ fastboot --version fastboot version 30.0.5
Then I remembered that I had seen this before, and dug up the Download Platform Tools page, and downloaded version 29.0.5 for Linux. I extracted only the
fastboot binary to the folder with
chmod +x fastbooted it, and finally succeeded flashing my device with this command:
# PATH=./:$PATH ./flash.sh
That is, temporarily prepend the current folder to the path, so that the older Fastboot gets found first, and it can successfully flash the boot partition, and all the remaining operations succeed as well.
Before you suggest running this command:
# fastboot flash:raw boot hybris-boot.img
I did try raw flashing with my Sony Xperia Z3 Compact Tablet, and it didn’t solve the issue. So, the only thing that worked for me was downgrading Fastboot. I don’t know about other Linux distributions at the moment, but it is very likely that the Fastboot version can and will cause issues sooner or later. Perhaps the flashing documentation could be updated accordingly?