我目前正在使用这段代码重新启动我的Android设备:
try {
Process proc = Runtime.getRuntime()
.exec(new String[]{ "su", "-c", "reboot" });
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}现在,我想用Java来HotBoot (or "Hot Reboot")我的安卓手机。有人知道怎么做吗?
(如果你不知道HotBoot是什么,http://www.droidxforums.com/forum/droid-x-hacks/35451-what-hot-boot.html)
发布于 2012-09-30 06:57:17
你需要一个有根的电话。(以防万一)
su
busybox killall system_server或者用你的代码
try {
Process proc = Runtime.getRuntime()
.exec(new String[]{ "su", "-c", "busybox killall system_server"});
proc.waitFor();
} catch (Exception ex) {
ex.printStackTrace();
}https://stackoverflow.com/questions/12431304
复制相似问题