以编程方式热启动(热重启)Android设备
我目前正在使用此代码重新启动我的Android设备:以编程方式热启动(热重启)Android设备,android,reboot,root,Android,Reboot,Root,我目前正在使用此代码重新启动我的Android设备: try { Process proc = Runtime.getRuntime() .exec(new String[]{ "su", "-c", "reboot" }); proc.waitFor(); } catch (Exception ex) { ex.printStackTrace(); } 现在,我想HotBoot(或“热重启”)我的Android手机使用Java。
try {
Process proc = Runtime.getRuntime()
.exec(new String[]{ "su", "-c", "reboot" });
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}
现在,我想HotBoot(或“热重启”)
我的Android手机使用Java。有人知道怎么做吗
(如果你不知道HotBoot是什么,)你需要一部有根的手机。(以防万一) 或者用你的代码
try {
Process proc = Runtime.getRuntime()
.exec(new String[]{ "su", "-c", "busybox killall system_server"});
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}
你需要一部有根的电话。(以防万一) 或者用你的代码
try {
Process proc = Runtime.getRuntime()
.exec(new String[]{ "su", "-c", "busybox killall system_server"});
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}