android power off
https://android.stackexchange.com/questions/47989/
how-can-i-shutdown-my-android-phone-using-an-adb-command
reboot //linux 命令
reboot -p
reboot --help usage: reboot [-p] [rebootcommand]am //启动 activity
am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN
am
usage: am [subcommand] [options] usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] [--R COUNT] [-S] [--opengl-trace] [--user <USER_ID> | current] <INTENT>am start: start an Activity. Options are: -D: enable debugging -W: wait for launch to complete --start-profiler <FILE>: start profiler and send results to <FILE> -P <FILE>: like above, but profiling stops when app goes idle -R: repeat the activity launch <COUNT> times. Prior to each repeat, the top activity will be finished. -S: force stop the target app before starting the activity --opengl-trace: enable tracing of OpenGL functions --user <USER_ID> | current: Specify which user to run as; if not specified then run as the current user.setprop //android prop
setprop sys.powerctl reboot,recovery
usage: setprop <key> <value>svc //android service
svc power shutdown
svc
Available commands: help Show information about the subcommands power Control the power manager data Control mobile data connectivity wifi Control the Wi-Fi manager usb Control Usb statesvc power
Control the power manager usage: svc power stayon [true|false|usb|ac|wireless] Set the 'keep awake while plugged in' setting. svc power reboot [reason] Perform a runtime shutdown and reboot device with specified reason. svc power shutdown Perform a runtime shutdown and power off the device.