Potato.Fastboot icon indicating copy to clipboard operation
Potato.Fastboot copied to clipboard

Invalid Response from Device Exception

Open ybtag opened this issue 2 years ago • 4 comments

When I send a large (> 800MB) file to the device, I get an exception: System.Exception: Invalid response from device! (data size: 834666496) at Potato.Fastboot.Fastboot.SendDataCommand(Int64 size) at Potato.Fastboot.Fastboot.UploadData(FileStream stream) at Potato.Fastboot.Fastboot.UploadData(String path)

ybtag avatar May 18 '23 23:05 ybtag

The problem is caused when the file is larger than the Max Download Size of the bootloader. The Max Download Size should be checked first by getvar:max-download-size. If the file is larger than the Max Download Size then it needs to be converted to a sparse image (if it is raw) and split.

ybtag avatar May 22 '23 13:05 ybtag

However, now I have a different issue. I split the sparse image and it flashes fine with Google's fastboot without being further split. But when I send it with Potato.Fastboot, the USB pipe gets URB_FUNCTION_ABORT_PIPE when I send the flash command. The uploading works fine and receives OKAY but for some reason it seems to break the pipe afterwards.

ybtag avatar May 22 '23 13:05 ybtag

I also faced this issue when I try to build Mi Fastboot flash tool with Potato.Fastboot btw.

I don't know how to implement sparse function to Potato.Fasboot.

image-2023-06-13-222314810.png

But for write RAW sparse file from Qualcomm EDL function it's like this.

image-2023-06-13-222852071.png

You can see more at my repository.

HadiKhoirudin avatar Jun 13 '23 15:06 HadiKhoirudin

I managed to implement Sparse but I still had problems flashing large files, I got USB pipe issues. I don't know how to solve this so I didn't bother pulling my implementation. I used https://github.com/TalAloni/SparseConverter

ybtag avatar Jun 13 '23 18:06 ybtag