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手机自动重启
最新推荐文章于 2023-09-07 15:10:01 发布