Android Utililty Methods System Reboot

List of utility methods to do System Reboot

Description

The list of methods to do System Reboot are organized into topic(s).

Method

voidrebootSystemNow()
Function hot reboot system
String[] commands = { "-c", "busybox killall system_server" };
try {
    runAsRoot(commands);
} catch (IOException e) {
    e.printStackTrace();
} catch (InterruptedException e) {
    e.printStackTrace();
voidrebootInstallPackage(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) {
...
voidrebootNormal(Context context)
reboot Normal
Log.w(TAG, "!!! REBOOT NORMAL !!!");
PowerManager pm = (PowerManager) context
        .getSystemService(Context.POWER_SERVICE);
pm.reboot("normal_reboot");
voidrebootRecovery(Context context)
reboot Recovery
Log.w(TAG, "!!! REBOOT RECOVERY !!!");
PowerManager pm = (PowerManager) context
        .getSystemService(Context.POWER_SERVICE);
pm.reboot("recovery");
voidrebootWipeUserData(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);
...