Skip to main content
Version: 1.0.0

power

Shut down or reboot the device.

Power off the device

declare class AdbPowerCommand extends AdbCommandBase {
powerOff(): Promise<string>;
}

Example:

await adb.power.powerOff();
Equivalent ADB Command
adb shell reboot -p

Reboot the device

declare class AdbPowerCommand extends AdbCommandBase {
reboot(mode?: string): Promise<string>;
}

Example:

await adb.power.reboot();
Equivalent ADB Command
adb reboot

The mode parameter allows rebooting into different modes, including custom ones from device manufacturers.

await adb.power.reboot("download");
Equivalent ADB Command
adb reboot download

Reboot into recovery

declare class AdbPowerCommand extends AdbCommandBase {
recovery(): Promise<string>;
}

Example:

await adb.power.recovery();
Equivalent ADB Command
adb reboot recovery

Reboot into bootloader

declare class AdbPowerCommand extends AdbCommandBase {
bootloader(): Promise<string>;
}

Example:

await adb.power.bootloader();
Equivalent ADB Command
adb reboot bootloader