第三种方法是安卓命令形式:
// TODO Auto-generated method stub
String cmd = "su -c reboot";
try {
Runtime.getRuntime().exec(cmd);
} catch (IOException e) {
}
在头上需要引用import java.io.IOException;