I have to install Applications on dozens of android smartphones and I am currently writing a program to automate this process. I know I can't remotely enable USB Debugging, so my question is: Can I use ADB.exe to send a command to the smartphone that disables USB Debugging immediatly or puts the disable in a command queue to execute at next reboot?



If the device in question is ed, you can write to the system settings directly from a shell command in adb shell. The name of the setting to write depends on which Android version you have.

If your device isn't rooted, you can't change the USB debugging setting from adb or any non-system app.

  • It's not rooted. Thanks for the answer. Is it possible to switch usb debugging off through SQLite? Sadly I have little knowledge with Android.
    – d3rrial
    Sep 10 '13 at 13:28
  • No: that's the method that requires root.
    – Dan Hulme
    Sep 10 '13 at 13:30

Yes it is possible using ADB to disable USB debugging.

Using the appropriate shell input keyevent commands you can navigate the GUI and change the setting.

  • And what are those commands?
    – ale
    Jun 28 '14 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.