libaums: Permission request + Wrong CSW status

Experiencing similar problem as #124: When not using intent-filter and only requesting permission inside MainActivity, the application works fine. The problem is that with usbManager.requirePermission() the user “default checkbox” selection is not saved and the permission dialog keeps opening each time USB device is attached.

Now I tried adding intent-filter with USB_DEVICE_ATTACHED action code which by documentation should save permission choice that user selected the first time. The first time USB is attached the code works like it should - but each next time USB attaches, the library throws me:

E/UsbDocumentProvider: error setting up device
    java.io.IOException: Unsuccessful Csw status: 1
        at com.github.mjdev.libaums.driver.scsi.ScsiBlockDevice.transferCommand(ScsiBlockDevice.java:184)

Any ideas why this would happen? I understand if library was throwing this in both cases (using intent-filter and just requesting for permission) but what bothers me is that when manually requesting for permission, library works as supposed but when using filter-intent not.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

awesome 😃 will merge, will be in the next release