Application Fails to access USB Type-C Drive

25 views
Skip to first unread message

Anu P

unread,
Jan 7, 2016, 2:38:57 PM1/7/16
to android-platform
Hello,

I am developing an application to access USB mass storage drive connected to my phone.
When I create application, application is able to access USB drive in all devices having micro USB port.

When application is running in Nexus 5X or Nexus 6P, application is unable to access the USB drive. When I see the log, I can see the following exception.

01-06 12:03:29.181 30348 30348 E TYPEC     : error setting up device
01-06 12:03:29.181 30348 30348 E TYPEC     : java.io.IOException: reading failed!
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.libaums.driver.scsi.ScsiBlockDevice.transferCommand(ScsiBlockDevice.java:144)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.libaums.driver.scsi.ScsiBlockDevice.init(ScsiBlockDevice.java:77)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.libaums.UsbMassStorageDevice.setupDevice(UsbMassStorageDevice.java:312)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.libaums.UsbMassStorageDevice.init(UsbMassStorageDevice.java:268)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.kt.TYPEC.setupDevice(TYPEC.java:409)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.kt.TYPEC.access$600(TYPEC.java:92)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.test.kt.TYPEC$7.onReceive(TYPEC.java:315)
01-06 12:03:29.181 30348 30348 E TYPEC     : at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
01-06 12:03:29.181 30348 30348 E TYPEC     : at android.os.Handler.handleCallback(Handler.java:739)
01-06 12:03:29.181 30348 30348 E TYPEC     : at android.os.Handler.dispatchMessage(Handler.java:95)
01-06 12:03:29.181 30348 30348 E TYPEC     : at android.os.Looper.loop(Looper.java:148)
01-06 12:03:29.181 30348 30348 E TYPEC     : at android.app.ActivityThread.main(ActivityThread.java:5417)
01-06 12:03:29.181 30348 30348 E TYPEC     : at java.lang.reflect.Method.invoke(Native Method)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-06 12:03:29.181 30348 30348 E TYPEC     : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

It looks like SCSI command is issued, but no response is received and hence IO Exception is raised.

Any clue on the issue?
Any help to resolve the issue is highly appreciated.

Thanks,
Anu
Reply all
Reply to author
Forward
0 new messages