libaums: Could not write to device, result == -1 errno 0 null
Hi, @magnusja Libaums version 0.7.3
Hardware devices:
- usb device 1: SanDisk dual-drive 128Gb with Fat32, 32/64 Kb cluster size;
- usb device 2: JetFlash 8Gb with Fat32, 32/4 Kb cluster size;
- android version 9(Samsung Galaxy S10e)/8(Xiaomi Redmi 5 Plus)
Problem
I try to copy about 1000 mixed size/type files (total size 2 Gb).
Expected behavior
Files were copied correctly.
Actual behavior
java.io.IOException: Could not write to device, result == -1 errno 0 null
Stacktrace of Excpetion
Code where problem occurs
UsbFileOutputStream.write(bytes);
Any hints!
Thanks a lot!
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 63 (20 by maintainers)
Unfortunately I am out of ideas 😕
I would suggest that you try to debug that on your own and let us know if you have any further insights. Another option is to switch to standard Android file API if your device supports mounting of USB drives out of the box. (Which most of the modern devices should I think)
Hey @kuza2010
thanks a lot for testing. That looks a lot like @Depau 's results, unfortunately 😕
@Depau Cool then I guess I will start playing around with libusb. There is also the
UsbRequest
API which might be worth trying https://github.com/magnusja/libaums/blob/develop/libaums/src/main/java/com/github/mjdev/libaums/usb/UsbRequestCommunication.kt