0

I need to disable/enable a USB port from an Android device, the project is Xamarin Android.

I've just test the USBManager class, from USB Host API, but I need to detach the USB device programmaticaly, and not only disconnect it.

Are there some libraries or work around to manage this kind of problems?

Thanks.

ll_gzr
  • 99
  • 10
  • 2
    As far as I know, you can disable the USB port entirely or for "groups" of devices with Knox if you are on a Samsung device and if not, maybe your manufacturer created a tool. You can use DeviceOwner, if it helps, to restrict some of USB functionality. – Dan Baruch Jul 26 '21 at 14:19
  • 1
    You could refer to the link below about the permission of USB. https://stackoverflow.com/questions/28137280/how-to-grant-permission-to-open-usb-device-with-usb-manager-opendevice-always – Wendy Zang - MSFT Jul 27 '21 at 09:44

0 Answers0