Closed bongbui321 closed 3 months ago
Did you test if writing really writes that data by fully erasing and rewriting the data ? Because using a larger packetsize than usb supports may lead to package data being dropped.
yes I did. Not sure if my method was a good test. Tested on Linux 20.04 usb 2.0 and 3.0 cable
./edl e system
partition./edl w system.img system
I was trying to find a way to speed up the writing speed, and found these: https://learn.microsoft.com/en-us/dotnet/api/android.hardware.usb.usbdeviceconnection.bulktransfer?view=net-android-34.0 https://developer.android.com/reference/android/hardware/usb/UsbDeviceConnection
all have max usb bulk transfer size of 16384, and tried it out and it works. I guess this is what bulk
means, maybe it has some buffer? Not entirely sure, but through my tests it seem to work.
Also the writing speed on usb 2.0 is 25MB and around 56MB usb 3.0 on my ubuntu 20.04 machine
Ok, thanks. I did changes of the bulk transfer size before as well but I always had issues with older devices that would only support a max of 4096. Let's see if anyone reports issues, until then, merged :)
@bkerler This is the max usb bulk buffer size --> improve writing speed by a lot