I’m trying to shutdown my s912 using ssh. This is going to come across as a real n00b question, but it’s not behaving as I would expect. If I issue, for example:
1. poweroff
2. halt -p
3. shutdown -p now
4. reboot -p
5. setprop sys.powerctl shutdown
6. svc power shutdown
The shutdown routine starts, but there’s only a brief flicker of red LED then it turns blue and the box boots again. This isn’t a box or ROM incompatibility issue, as pressing the power button or choosing the shutdown option do indeed behave as expected. The box shuts down and the power light goes red.
What magic wizardry are you calling when the shutdown power menu option is clicked? I need the box to be gracefully shutdown before an automation kills power to the unit.
Thanks
Edit: don’t worry I’ve found it, the magic words are:
Code: Select all
am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN
Code: Select all
ssh -p 2222 -i keyfile user@ipofbox -t “su -c ‘am start -a android.intent.action.ACTION_REQUEST_SHUTDOWN’”