public static void main(String[] args)throws IOException,Exception {
for(int j=0;j<10;j++) {
Thread.currentThread().sleep(10000);
Process process1 = Runtime.getRuntime().exec("adb reboot");
Thread.currentThread().sleep(5000);
System.out.println("设备重启中。。。");
process1.waitFor();
Process process2 = Runtime.getRuntime().exec("adb wait-for-device");
process2.waitFor();
System.out.println("设备连接成功...");
}
}
使用Java让android手机自动执行重复重启
最新推荐文章于 2021-10-25 11:08:18 发布