Reputation: 1
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?
Upvotes: 0
Views: 919
Reputation: 31676
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).
Upvotes: 1
Reputation: 779
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.
Upvotes: 0