How do I disable the USB port except for charging, using the Knox SDK?

There is no one API method that disables the USB port for everything else besides charging. Instead, you can use the following API methods to disable most of the USB functions:

To disallow MTP (media transfer protocol), you can call the API method setUsbMediaPlayerAvailability(false). Setting this to false blocks MTP, and therefore is no file transfer between a device and computer via USB.

Share it: