简体   繁体   English

使用Java自动打开Android设备的USB调试模式

[英]Automatically turn ON usb debugging mode of Android device using java

Java中有什么技术可以使我们进入android设备并打开其USB调试模式。

I hope not. 我希望不是。 It is obiviously an inherent security risk to enable and should thus only be enabled if you are really sure what you are doing (eg if you are a developer testing an app). 显然,启用它是固有的安全风险,因此只有在您确实确定自己在做什么时(例如,如果您是测试应用程序的开发人员),才应启用它。

This is only available for system apps in respect of security. 就安全性而言,这仅适用于系统应用程序。 If your device is rooted you are able to call this: 如果您的设备已植根,则可以调用此命令:

Settings.Secure.putInt(getActivity().getContentResolver(),Settings.Secure.ADB_ENABLED, 1);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM