0

I'am trying to automate some tests and for that I need to launch some ADB commands. The problem is that I need to do a Factory Data Reset during the tests, and after that the USB Debugging option is disabled. Do you guys know a way to turn it on without touching the device?

2 Answers 2

1

When your development process has progressed to the point of using automated tests - it's a good idea to start using a dedicated development device for testing - the one with an unlocked bootloader and a development Android build loaded.

You can customize such device so it would have USB Debugging enabled by default after FDR and even have your public RSA key preloaded (so your PC will be automatically authenticated by your device).

0

For obvious security reasons, you can't force-enable USB Debugging on a device. Plus, if there were a "command" to enable USB Debugging, it would require USB Debugging to be executed.

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