I have app in KioskMode. Cannot allow user to use usb connection to remove app. Want to make sure user cannot tamper with the app at all via USB. I want to detect if user has connected via USB to the device, and if they do not have the right permissions, terminate that connection. Or not allow connection in the first place for normal users. Detecting the connection seems possible, but dont see how to prevent or terminate the connection programatically. I have not found the API to do this.
UPDATE: changing debug mode programmatically does not appear to be an option for a non-system app, SO question is can the connection be detected and then terminated?