-2

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?

MuayThai
  • 441
  • 1
  • 5
  • 19
  • Guys! The point is I want to kill an existing detected ums connection within my kiosk app. Is there a way to do this or not? – MuayThai Sep 04 '15 at 04:21

1 Answers1

0

The adb commands are only accessible in debug mode. Disable USB-Debugging and you can't execute these commands anymore.

Steffen H
  • 116
  • 5
  • Right. But are there any USB connections that could be used to remove the app? That was just one possible connection scenario. How to disable USB Connections? – MuayThai Sep 02 '15 at 08:45
  • Also how could USB-Debugging be disabled? – MuayThai Sep 02 '15 at 08:51
  • The adb interface is the only interface that allows uninstalling apps besides flashing the whole device, but flashing requires also interaction with the device itself and cannot be prevented by an app or similar. – Steffen H Sep 02 '15 at 08:51
  • USB Debugging: http://stackoverflow.com/questions/16707137/how-to-find-and-turn-on-usb-debugging-mode-on-nexus-4 – Steffen H Sep 02 '15 at 08:55
  • Ok, understood. Is there a way to terminate a USB connection when the connection is detected? BroadcastReceiver can detect the connection, but is there a way to terminate the connection when it is established? – MuayThai Sep 02 '15 at 09:11
  • So? whats the answer? – MuayThai Sep 04 '15 at 04:20