Here you can find the source of rebootDevice()
static public void rebootDevice()
//package com.java2s; //License from project: Open Source License import java.io.DataOutputStream; public class Main { static public void rebootDevice() { try {/* w w w . j a v a 2s.c o m*/ Process process = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream( process.getOutputStream()); os.writeBytes("reboot \n"); } catch (Throwable t) { t.printStackTrace(); } } }