通过USB远程打开ADB [英] Turn on ADB remotely via USB
问题描述
我正在尝试自动化一些测试,为此,我需要启动一些ADB命令。问题是我需要在测试过程中恢复出厂设置,然后禁用USB调试选项。
你们知道一种无需触摸设备即可打开它的方法吗?
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?
推荐答案
开发过程进展顺利时到使用自动化测试的地步-开始使用专用的开发设备进行测试是一个好主意-该设备具有未锁定的Bootloader和已加载的Android开发版本。
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.
您可以自定义此类设备,以便在 FDR后默认启用
甚至预先加载了您的公共RSA密钥(因此您的PC将由您的设备自动进行身份验证)。 USB调试
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).
这篇关于通过USB远程打开ADB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!