Score:2

fastboot doesn't work anymore in Ubuntu 21.10?

in flag

I'm having trouble flashing my smartphone via fastboot.

The smartphone in fastboot-mode is recognized:

sudo fastboot devices
BH905FBU9E  fastboot

but flashing results in no reaction until the usb cable is pulled :-(.

sudo fastboot flash recovery twrp-3.5.0-0-20210117-lilac.img 

with no output until after pulling the cable:

Sending 'recovery' (33824 KB)                      FAILED (Write to device failed (No such device))
fastboot: error: Command failed

adb on the other hand is working fine!

What might be going wrong? Ubuntu 20.04 on another machine works fine!

Thanks in advance for ideas, pheidrias

Score:0
in flag

In my case on Ubuntu 20.04, it was a USB 3.0 port problem. It was detect device with fastboot devices but other commands does not has a response. My laptop hasn't got a USB 2.0 port. Then I disabled internal USB 3.0 support in my BIOS and now fastboot is working normally. But all USB 3.0 support is stopped. It seems USB 2.0 hub is the better option. I will set back the BIOS setting later.

Score:0
us flag

Could be your driver as an ADB device. Download and install the latest USB drivers with SDK manager on your Ubuntu machine.

Have you done this process yet?

First sudo apt-get update

Then sudo apt-get upgrade

After sudo apt-get dist-upgrade

After sudo apt-get install android-tools-fastboot

fastboot devices
fastboot reboot

Have you also turned on USB debugging? What processor of the computer that has Ubuntu vs the computer that it works on? Is it an AMD processor? Try a different port or a different cable on the machine too.

pheidrias avatar
in flag
Hello CraigslistCesium, all packages are/were up-2-date. I also tried different cables and different ports. Both machines are Intel-bases (working: z20t-b, not working: Thinkpad X1 yoga carbon 4th). And yes: USB debugging was turned on. Otherwise, all the other things wouldn't have worked...
CraigslistCesium avatar
us flag
I went to the official xda site and looked up your Sony Xperia compact, there seems to be a different twrp img that provides hot fixes. https://twrp.me/sony/sonyxperiaxz1compact.html which is 3.5.2-liliac, maybe try a different image, where is your image located?
pheidrias avatar
in flag
I tried different versions of twrp, too. And I don't see, how this could influence the (not even starting!) fastboot process? The above referenced twrp was suggested by the LineageOS developer for the correspondig ROM on xda.
CraigslistCesium avatar
us flag
Since fastboot can discover the device but not flash the image it was worth a try. Try a manual flashing by "fastboot boot "The place of the image file"" This will yield an error, disconnect the usb. Then reboot the phone, after connect the usb. Then try the command again.
pheidrias avatar
in flag
When using "fastboot boot twrp...", I do at least get "Sending 'boot.img' (33824 KB)" but nothing more... I have to disconnect the cable, to stop the command. The following error message is: "FAILED (Write to device failed in SendBuffer() (Cannot send after transport endpoint shutdown))" But "reboot the phone, after connect the usb." is not possible, as fastboot mode is entered by connecting the USB-cable while pressing VolumeUp... Or do you mean something else?
CraigslistCesium avatar
us flag
Unplug the phone, pressing now together VOLUME-UP and POWER until device going black and logo showing and devices vibrates. => logo with android symbol/text/animation. Then plug the phone in and manually boot it. I would also try renaming the twrp image to twrp or recovery like twrp.img or recovery.img.
Score:0
es flag

You say that it works on 20.04 but not 21.10 and all packages are up to date. It looks like you have different versions of fastboot with apt delivering version 1:8.1.0+r23-5ubuntu2 for 20.04 and version 1:10.0.0+r36-7 for 21.10. I would recommend downloading the SDK Platform-Tools directly, where fastboot is currently version 31.0.3-7562133. https://developer.android.com/studio/releases/platform-tools

I'm not sure how the binaries in the repos are versioned, but I have found that, for example, fastboot 1:8.1.0+r23-5ubuntu2 does not support dynamic partitions (i.e. fastboot delete-logical-partition product) while the the version from platform-tools does.

A note that may help others running into a similar problem: to flash recovery, you must use fastboot from the bootloader and not from fastbootd. Generally, for a powered up device, adb reboot fastboot will get you to fastbootd and then fastboot reboot bootloader will get you to the bootloader from where you can flash the recovery partition. More info: https://source.android.com/devices/bootloader/fastbootd

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.