android libaums-usb驱动器被允许记忆自动启动应用程序失败

f4t66c6m  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(341)

我的android应用程序正在使用libaums库进行usb闪存驱动器通信。清单已注册到附加的usb_设备,并检测闪存驱动器的插入、删除和权限。但是,我有一个例子,在权限警报中,如果用户选择“记住”自动启动,那么当插入usb设备时,应用程序启动,usb驱动器被识别,但在usbmassstoragedevice.init()中,由于scsi错误而失败。
usb驱动器有一个活动指示灯,在使用过程中闪烁。在这种状态下,此灯一直亮着。
我只使用“me.jahnen:libaums:0.8.0”模块。这是唯一发生这种情况的情况。卸下和重新插入usb驱动器会导致相同的错误。有解决办法吗?

2021-07-09 11:19:33.196 8520-8520/com.muskokatech.Crawfisher W/System.err: com.github.mjdev.libaums.driver.scsi.commands.sense.UnitAttention: Unit attention (ASC: 40, ASCQ: 0)
2021-07-09 11:19:33.196 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.commands.sense.ScsiRequestSenseResponse.checkResponseForError(ScsiRequestSenseResponse.kt:146)
2021-07-09 11:19:33.196 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.requestSense(ScsiBlockDevice.kt:214)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.handleCommandResult(ScsiBlockDevice.kt:195)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.transferCommand(ScsiBlockDevice.kt:149)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.transferCommandWithoutDataPhase(ScsiBlockDevice.kt:187)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.initAttempt(ScsiBlockDevice.kt:110)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.init(ScsiBlockDevice.kt:83)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.UsbMassStorageDevice.setupDevice(UsbMassStorageDevice.kt:138)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.github.mjdev.libaums.UsbMassStorageDevice.init(UsbMassStorageDevice.kt:100)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.muskokatech.PathAwayPro.USBSupport.setupUSBDevice(USBSupport.java:288)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.muskokatech.PathAwayPro.USBSupport.discoverUSBDevice(USBSupport.java:108)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.muskokatech.PathAwayPro.USBSupport.access$200(USBSupport.java:44)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.muskokatech.PathAwayPro.USBSupport$1.onReceive(USBSupport.java:1369)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1666)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at android.os.Handler.handleCallback(Handler.java:938)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:99)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at android.os.Looper.loop(Looper.java:246)
2021-07-09 11:19:33.197 8520-8520/com.muskokatech.Crawfisher W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:8512)
2021-07-09 11:19:33.198 8520-8520/com.muskokatech.Crawfisher W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2021-07-09 11:19:33.198 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
2021-07-09 11:19:33.198 8520-8520/com.muskokatech.Crawfisher W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题