3

I'm trying to flash cm13 boot.img to my phone and it stuck on this for more than 20 minutes:

$fastboot flash boot boot.img
target didn't report max-download-size
sending 'boot' (5760 KB)...

and after I disconnect the cable I get this error:

FAILED (data transfer failure (Protocol error))

here is the result of other fastboot commands. since I already erase the system, boot, and recovery, fastboot is the only way I can interact with my phone.

$ fastboot devices
BX90319AH2&ZLP  fastboot

$ fastboot erase boot
erasing 'boot'...
(bootloader) Erase of partition 'boot' requested
(bootloader) S1 partID 0x00000003, block 0x00000148-0x00000179
(bootloader) Erase operation complete, 0 bad blocks encountered
OKAY [  0.183s]
finished. total time: 0.183s


$ fastboot erase system
erasing 'system'...
(bootloader) Erase of partition 'system' requested
(bootloader) S1 partID 0x00000004, block 0x00000182-0x000007c1
(bootloader) Erasing block 0x00000200
(bootloader) Erasing block 0x00000300
(bootloader) Erasing block 0x00000400
(bootloader) Erasing block 0x00000500
(bootloader) Erasing block 0x00000600
(bootloader) Erasing block 0x00000700
(bootloader) Erase operation complete, 0 bad blocks encountered
OKAY [  5.745s]
finished. total time: 5.745s

p.s. I installed cm12.1 on this phone before without any problem. any suggestions?

1

3 Answers 3

1

Alternatively, because I'm guessing you're in a process to flash a new Custom ROM and you want to flash manually using fastboot, you can look for a compatible custom recovery, download it and place it in the computer you're using. On fastboot, if bootloader is unlocked, as it probably might be since you're already on custom ROM, write these commands

fastboot boot [path-to-custom-recovery]

It will boot up on a custom recovery that you downloaded

  1. Select Wipe
  2. Advanced Wipe
  3. Check system, dalvik, data, cache
  4. Swipe to wipe
  5. Back to install
  6. Locate the zip and install it or send it from computer using adb sideload
2

I had the same problem and solved it by changing the way of the connection between the phone and the PC. First I connected an old USB Extension cable between the USB cable from my phone to the PC, I tried it on a USB2 port and on a USB3 port. When entering fastboot devices it shows the number of the device and therefore an active connection, but trying to flash anything took forever and I had to interupt it by rebooting into the bootloader.

The solution was, when I connected the phone's USB cable directly to a USB3 port.

fastboot flash bootloader bootloader.img
target reported max download size of 494927872 bytes
sending 'bootloader' (3554 KB)...
OKAY [  0.116s]
writing 'bootloader'...
OKAY [  0.220s]
finished. total time: 0.336s

The old USB Extension cable was the problem.

2
  • When trying to replace LineageOS 16 with stock ROM on my Moto X4 payton, I experienced the same issue - my new Lenovo X390 running Arch Linux wouldn't send the .img files while everything worked fine on my good old T410s (also running Arch)... So before suspecting your Android device make sure to try another PC.
    – F1iX
    Commented Nov 15, 2020 at 20:49
  • I just experienced the same thing: In my case fastboot didn't output anything and neither kill nor kill -9 managed to stop the process – apparently because it was stuck in a syscall. Accordingly, the kernel also started writing messages to /var/log/syslog along the lines of "INFO: task fastboot:803155 blocked for more than 604 seconds". At some point I turned off the phone upon which fastboot finally stopped. Then I tried out a different USB cable, started fastboot again and it finally worked!
    – balu
    Commented Apr 4, 2021 at 1:54
0

In my case I had to install Motorola drivers on my PC, then fastboot boot foo.img worked.

You must log in to answer this question.