Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[suzu] Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"$PKG/linux/fastboot flash boot \"$CACHE/suzu/firmware/halium-unlocked-recovery_suzu.img\""},"stdout":"","stderr":"fastboot: error: Couldn't parse partition size '0x'."} #1377

Closed
bpederencino opened this issue Sep 25, 2020 · 18 comments
Labels
bug a bug in the software itself

Comments

@bpederencino
Copy link

Automatically generated error report
UBports Installer Version: 0.4.20-beta
Device: suzu
OS to install: Ubuntu Touch
Settings: {"channel":"16.04/community/fredldotme/devel","wipe":true,"bootstrap":true}
Package: deb
Operating System: Debian 10 buster x64
NodeJS version: v12.0.0

Error log: https://paste.ubuntu.com//p/cMyy8b36GH/

@NeoTheThird NeoTheThird added the bug a bug in the software itself label Sep 25, 2020
@NeoTheThird NeoTheThird changed the title Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"/opt/ubports-installer/resources/app.asar.unpacked/platform-tools/linux/fastboot flash boot \"/home/zeromuslinux/.cache/ubports/suzu/firmware/halium-unlocked-recovery_suzu.img\""},"stdout":"","stderr":"fastboot: error: Couldn't parse partition size '0x'."} [suzu] Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"/opt/ubports-installer/resources/app.asar.unpacked/platform-tools/linux/fastboot flash boot \"/home/zeromuslinux/.cache/ubports/suzu/firmware/halium-unlocked-recovery_suzu.img\""},"stdout":"","stderr":"fastboot: error: Couldn't parse partition size '0x'."} Sep 25, 2020
@M3talHe4d
Copy link

I get a similar error on my OPO (bacon)

Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"/snap/ubports-installer/284/app/resources/app.asar.unpacked/platform-tools/linux/fastboot flash boot \"/home/benjamin/snap/ubports-installer/284/.cache/ubports/bacon/firmware/boot-bacon.img\""},"stdout":"","stderr":"< waiting for any device >\nfastboot: error: Couldn't parse partition size '0x'."}

Versions 0.4.19 and the new 0.4.20 both give me this error.
But version 0.4.18 (installed from Arch Linux AUR) worked for my. So seems to be a bug in 0.4.19 +

@bpederencino
Copy link
Author

I get a similar error on my OPO (bacon)

Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"/snap/ubports-installer/284/app/resources/app.asar.unpacked/platform-tools/linux/fastboot flash boot \"/home/benjamin/snap/ubports-installer/284/.cache/ubports/bacon/firmware/boot-bacon.img\""},"stdout":"","stderr":"< waiting for any device >\nfastboot: error: Couldn't parse partition size '0x'."}

Versions 0.4.19 and the new 0.4.20 both give me this error.
But version 0.4.18 (installed from Arch Linux AUR) worked for my. So seems to be a bug in 0.4.19 +

Indeed, with 0.4.18 I don't have this issue, however during the "sending files" step I have a "read-only file system" error.
With 0.4.19 I have the same error than with 0.4.20.

@retro486
Copy link

I strongly suspect something is wrong with the bundled fastboot because I was getting this error until I replaced the bundled copy with the copy from my distribution. See #1360 for steps I took to get it working (note I installed the latest preview deb package not the AppImage).

@FlorianPaintner
Copy link

I get a similar message with device dora and 0.4.20beta.

@ghost
Copy link

ghost commented Sep 27, 2020

Same here:

UBports Installer Version: 0.4.20-beta
Device: dora
OS to install: Ubuntu Touch
Settings: {"channel":"16.04/community/anpok/devel","wipe":false,"bootstrap":true}
Package: snap
Operating System: Ubuntu 20.04 focal x64
NodeJS version: v12.0.0
Error log: https://paste.ubuntu.com//p/kDZyzhPphX/

I followed retro486's recommendation and let ubports-installer use the system fastboot instead of the bundled one. As I installed using .deb package, I executed the following commands:
cd /opt/ubports-installer/resources/app.asar.unpacked/platform-tools/linux
sudo mv fastboot fastboot_bundled
sudo ln -s /usr/bin/fastboot

After that, the ubports-installer can flash as usual.

@NeoTheThird NeoTheThird reopened this Sep 28, 2020
NeoTheThird added a commit to ubports/installer-configs that referenced this issue Oct 3, 2020
@NeoTheThird
Copy link
Member

Hey, sorry about this. Could you try again with this prerelease version of the installer? This one is capable of flashing raw images, so the Couldn't parse partition size error can be circumvented. Please let me know how it goes. Thank you!

@FlorianPaintner
Copy link

UBports Installer 0.5.2-beta did not work for me and my dora-device. I tried it both with fastboot ticked and unticked

NeoTheThird added a commit to ubports/installer-configs that referenced this issue Oct 3, 2020
@NeoTheThird
Copy link
Member

@FlorianPaintner ah, sorry, i did not see that someone commented for dora as well. Try again now with 0.5.2-beta, i updated the config accordingly.

@FlorianPaintner
Copy link

I uninstalled version 0.4.20-beta and 0.5.2-beta. I installed 0.5.2-beta. Flashing seemed to work but device (dora) boots up when installer switches to "Downloading". That causes the installed operating system (Telenor Mobile NO, 41.3.A.2.149) to corrupt.

I followed the procedure described by germede above and tried to install in fastboot mode -> same behaviour

So I flashed android again (Telenor Mobile NO, 41.3.A.2.149) and tried to install in fastboot mode -> same behaviour

Flashed android again and tried to install with fastboot option unticked. Device does not reboot (from android). So brought it to flashmode manually -> nothing happend; brought it to fastboot mode manually -> device did a normal bootup (without getting corrupt)
Seems to be a problem with the reboot-loop. Sorry for my poor descriptions. I'm just an ethusiast -- no coder.

@FlorianPaintner
Copy link

Ok: wiped entire device using twrp. flashed halium-unlocked-recovery_dora.img using fastboot.

Tried to install via 0.5.2-beta. Device got i the reboot loop when using fastboot. Unticked using fastboot -> device rebooted to recocery. Installer sent files (at least that was reported), installer reported success. When device (dora) rebooted ubports-logo was shown (as always when booting after system update). But device does not boot properly (stucks with sony-logo).

@NeoTheThird
Copy link
Member

@FlorianPaintner Sorry to hear that. I opened #1420 to further track this issue on dora, as these problems are caused by the device-specific configs, not the installer itself, and this issue was originally dedicated to suzu. Could you do me a solid and attach a log over there?

To the suzu users in here: Has anyone had any success with it?

@ghost
Copy link

ghost commented Oct 4, 2020

Good morning :)

after applying the workaround of using system fastboot instead of embedded one, I followed the "official" guide https://forums.ubports.com/topic/3229/sony-xperia-x-suzu-f5121-f5122 in order to install Ubuntu Touch my Xperia X (suzu).
For the first step I recommend using the official EMMA Flash Tool on Windows instead of Flashtool on my Ubuntu distribution. Flashtool was a true pain in the ass. EMMA was the only way to get Android 8 properly flashed on my phone.
As FlorianPainter described, device didn't reboot automatically from android as well, so I selected it manually in the ubports installer.
Even by following the guide step by step (including twrp flashing of system, data and cache partitions), I was getting always the same error as described (installer reported success but phone reboots and stucks with sony-logo).
After some hours I discovered I was being an idiot, as I was flashing the unzipped file for the SW binaries:
fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.zip
instead of
fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_loire.img
After doing the whole process with img instead of zip, it worked and booted into Ubuntu Touch.
However, I'm not sure if the original cause of FlorianPaintner's issue was the same.

Have a nice day!

@FlorianPaintner
Copy link

yea, obviously it was a similar failure. I did not flash the zip-file but flashed Telenor Mobile NO, 41.3.A.2.149 with FlashTool (Xperia Flashing Tool, Version 0.9.26.0)
After fastboot flash oem SW_binaries_for_Xperia_AOSP_N_MR1_5.7_r1_v08_tone.img installing via ubports installer 0.5.2-beta succeeded.

Thanks a lot!!!

@NeoTheThird NeoTheThird changed the title [suzu] Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"/opt/ubports-installer/resources/app.asar.unpacked/platform-tools/linux/fastboot flash boot \"/home/zeromuslinux/.cache/ubports/suzu/firmware/halium-unlocked-recovery_suzu.img\""},"stdout":"","stderr":"fastboot: error: Couldn't parse partition size '0x'."} [suzu] Error: fastboot:flash: Error: flashing failed: Error: {"error":{"killed":false,"code":1,"signal":null,"cmd":"$PKG/linux/fastboot flash boot \"$CACHE/suzu/firmware/halium-unlocked-recovery_suzu.img\""},"stdout":"","stderr":"fastboot: error: Couldn't parse partition size '0x'."} Oct 10, 2020
@SilverPreece
Copy link

SilverPreece commented Oct 18, 2020

@FlorianPaintner @germede I'm trying to install Ubuntu on my X Performance and I'm trying to follow along here but I'm having issues. I was also having the reboot issue in the installer where when it tries to reboot to recovery, the phone skips recovery and tries booting the OS. This is where I currently am:

  • Installed UBports installer 0.5.4-beta
  • Used Emma on Windows to flash Android 8
  • Used fastboot to flash TWRP
  • Ran wipe from TWRP
  • Used fastboot to flash OEM binaries
  • Used fastboot to flash Halium to recovery

I'm not sure where to go from here. If I boot the phone in bootloader mode (blue LED) and try the installer, I get no difference and the reboot fails. If I boot the phone in recovery mode (green LED) and try the installer, it can't communicate with the phone.

I feel like I'm close but I don't know how to get this over the line. Was hoping you guys could give me some advice on how to replicate your successes.

Update - Near success! I was able to get the flash to work by downgrading the UBports installer and following the fastboot workaround instructions @germede provided. The installer thinks everything worked, but the phone is now stuck repeatedly rebooting to Ubuntu recovery, lol! I think I'll wipe everything except OEM in bootloader and try this again.

Second update - Actual success! I went back to bootloader, wiped everything, and started fresh using UBports installer 4.2.0-beta and the instructions given earlier in the thread. Worked perfectly! It looks like downgrading the installer is a reliable workaround for the X Performance for now. Think I'll drop that in the forum.

@NeoTheThird
Copy link
Member

Hey everyone, a lot going on here, thanks for the feedback to all :) Since i don't have any of the xperias, i'll need y'all's help to properly fix this.

First things first, downgrading the installer is not a good idea. It might be a temporary fix, but it can never become part of any recommendations given to users. The installer is still considered beta, it is a moving target and API stability is not guaranteed. Until we reach a 1.0 release, only the latest release is considered supported at any given time. The good news is: A lot can actually be fixed properly given correct feedback and testing, so let's try and make that happen! :)

Let's start with some questions.

  • Is anyone still experiencing the original issue with Couldn't parse partition size? Because this one can easily be fixed by adding a raw flag to the partition flashing instruction (example).
  • What's this business with flashing the OEM binary? If it's a plain fastboot flash and we can download it from a stable trusted location, we could have the installer do it.
  • Is Emma the only way to install Android 8?

@retro486
Copy link

retro486 commented Oct 21, 2020

Is anyone still experiencing the original issue with Couldn't parse partition size? Because this one can easily be fixed by adding a raw flag to the partition flashing instruction (example).

Personally I haven't tried since the fastboot issue was fixed.

What's this business with flashing the OEM binary? If it's a plain fastboot flash and we can download it from a stable trusted location, we could have the installer do it.

It is plain fastboot but you have to accept an agreement to get to the download. I think Jolla "solved" this by requiring users to go get it themselves and put it in an expected location.

Is Emma the only way to install Android 8?

No, there's is also FlashTool which I prefer but I don't know its license or if it supports automation. It is available on all platforms: http://www.flashtool.net/index.php
You still need to provide a stock image to flash and that is heavily region based.

@NeoTheThird
Copy link
Member

Alright! Manual downloads are included in 0.5.6-beta. If someone wants to add it to the config files where it's needed, i'd be very appreciative. See the notes for developers on the release for usage documentation.

@NeoTheThird
Copy link
Member

Alright, i updated the config a little furhter, this should be okay for now: ubports/installer-configs#42

We'll track #1479 separately. If there's more issues, let's re-open new bugs to not mix too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the software itself
Projects
None yet
Development

No branches or pull requests

6 participants