Is there any toolbox or app that will support issuing shutdown command via ssh to a rooted android smartphone? Note that I'm not asking how to restart Android via command line (remotely) – but to really shut it down / turn it off.
Asked
Active
Viewed 1.3k times
2 Answers
1
For me with an Android 4 device reboot
doesn’t have a -p
option, but there’s an alternative:
su -c "am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN"
This is what’s used by Android as well, see AndroidManifest.xml.
If you want to perform a more graceful shutdown broadcast ACTION_SHUTDOWN
first, e.g.:
su -c "am broadcast android.intent.action.ACTION_SHUTDOWN && sleep 5 && am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN"

dessert
- 111
- 3
reboot -p
, then? – Sopalajo de Arrierez Sep 19 '15 at 11:12