magnusja / libaums

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

Could not read from device, result == -1 errno 0 null #416

Open motosheep opened 4 months ago

motosheep commented 4 months ago

Problem

runing program in the redmi mobile phone with android13 system。when use the api "createdirectory(String xxx)",the app no response and tips anr error after few second.

Expected behavior

can create the usb diretory

Actual behavior

Stacktrace of Excpetion

2024-03-16 21:08:41.093 10315-10315 ScsiBlockDevice com.example.demo W Could not read from device, result == -1 errno 0 null, retrying... 2024-03-16 21:08:41.194 10315-10315 System.err com.example.demo W java.io.IOException: MAX_RECOVERY_ATTEMPTS Exceeded while trying to transfer command to device, please reattach device and try again 2024-03-16 21:08:41.195 10315-10315 System.err com.example.demo W at me.jahnen.libaums.core.driver.scsi.ScsiBlockDevice.transferCommand(ScsiBlockDevice.kt:190) 2024-03-16 21:08:41.195 10315-10315 System.err com.example.demo W at me.jahnen.libaums.core.driver.scsi.ScsiBlockDevice.initAttempt(ScsiBlockDevice.kt:105) 2024-03-16 21:08:41.196 10315-10315 System.err com.example.demo W at me.jahnen.libaums.core.driver.scsi.ScsiBlockDevice.init(ScsiBlockDevice.kt:83) 2024-03-16 21:08:41.196 10315-10315 System.err com.example.demo W at me.jahnen.libaums.core.UsbMassStorageDevice.setupDevice(UsbMassStorageDevice.kt:138) 2024-03-16 21:08:41.196 10315-10315 System.err com.example.demo W at me.jahnen.libaums.core.UsbMassStorageDevice.init(UsbMassStorageDevice.kt:100) (if exists)



### Code where problem occurs
           fileSystem.createDirectory("dd");
PratikLahagora commented 1 month ago

Hello @motosheep Have you found any solution ?