List of utility methods to do System Reboot
void | rebootSystemNow() Function hot reboot system String[] commands = { "-c", "busybox killall system_server" }; try { runAsRoot(commands); } catch (IOException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); |
void | rebootInstallPackage(final Context context, final File packageFile) reboot Install Package Log.w(TAG, "!!! REBOOT INSTALL PACKAGE !!!"); Log.d(TAG, "file path is " + packageFile.getPath()); Thread thr = new Thread("Reboot") { @Override public void run() { try { RecoverySystem.installPackage(context, packageFile); } catch (IOException e) { ... |
void | rebootNormal(Context context) reboot Normal Log.w(TAG, "!!! REBOOT NORMAL !!!"); PowerManager pm = (PowerManager) context .getSystemService(Context.POWER_SERVICE); pm.reboot("normal_reboot"); |
void | rebootRecovery(Context context) reboot Recovery Log.w(TAG, "!!! REBOOT RECOVERY !!!"); PowerManager pm = (PowerManager) context .getSystemService(Context.POWER_SERVICE); pm.reboot("recovery"); |
void | rebootWipeUserData(final Context context) reboot Wipe User Data Log.w(TAG, "!!! REBOOT WIPE USER DATA !!!"); Thread thr = new Thread("Reboot") { @Override public void run() { try { RecoverySystem.rebootWipeUserData(context); } catch (IOException e) { Log.e(TAG, "Can't perform rebootInstallPackage", e); ... |