magnusja / libaums

Open source library to access USB Mass Storage devices on Android without rooting your device
Apache License 2.0
1.26k stars 270 forks source link

An error was encountered when calling the UsbMassStorageDevice#init method #400

Open zengjie-android opened 11 months ago

zengjie-android commented 11 months ago

Problem

I have changed three memory cards that support fat32,but still failed at init method, here is some log maybe help me analyze what the problem is, awaiting your reply, thanks

Expected behavior

No more errors when calling the UsbMassStorageDevice#init method

Actual behavior

Stacktrace of Excpetion


09-27 10:28:25.318 25962 25962 I ScsiBlockDevice: Block size: 512 09-27 10:28:25.318 25962 25962 I ScsiBlockDevice: Last block address: 125173759 09-27 10:28:25.337 25962 25962 D ScsiBlockDevice: inquiry response: ScsiInquiryResponse [peripheralQualifier=0, peripheralDeviceType=0, removableMedia=false, spcVersion=6, responseDataFormat=2] 09-27 10:28:25.339 25962 25962 E ScsiBlockDevice: Error transferring command; errno 0 null 09-27 10:28:25.339 25962 25962 D ScsiBlockDevice: Reset bulk-only mass storage 09-27 10:28:25.340 25962 25962 D ScsiBlockDevice: Trying to clear halt on both endpoints 09-27 10:28:25.842 25962 25962 E ScsiBlockDevice: Error transferring command; errno 0 null 09-27 10:28:25.843 25962 25962 D ScsiBlockDevice: Trying to reset the device 09-27 10:28:26.620 25962 25962 E ScsiBlockDevice: Error transferring command; errno 0 null 09-27 10:28:26.620 25962 25962 D ScsiBlockDevice: Reset bulk-only mass storage 09-27 10:28:26.620 25962 25962 D ScsiBlockDevice: Trying to clear halt on both endpoints```

### Code where problem occurs
zengjie-android commented 11 months ago

The original version is implementation 'com.github.mjdev:libaums:0.7.4'

magnusja commented 9 months ago

For some reason connection to USB is lost and cant recover. Maybe try another otg adapter