/*
*重启设备(需Root)
*若重启失败则会抛出异常
*/
function reboot()
{
var process=java.lang.Runtime.getRuntime().exec("su");
var out=process.getOutputStream();
out.write(java.lang.String("reboot\nexit").getBytes());
out.flush();
out.close();
if(process.waitFor()!=0)
throw new Error("root not allowed");
}
*重启设备(需Root)
*若重启失败则会抛出异常
*/
function reboot()
{
var process=java.lang.Runtime.getRuntime().exec("su");
var out=process.getOutputStream();
out.write(java.lang.String("reboot\nexit").getBytes());
out.flush();
out.close();
if(process.waitFor()!=0)
throw new Error("root not allowed");
}