Restart android machine

Sagar picture Sagar · Aug 6, 2013 · Viewed 104k times · Source

we have android + linux m/c, we log in into linux shell and boot the machine in android GUI. now we have the some script that is running on the same machine through linux shell. In that case when the script hangs we need to restart android machine. but it result into restarting the linux machine too. as they are on same machine. so i need the way to restart the android so it comes out of hang state and control remains on the script that is running through the linux shell.

so is there any adb or linux command that work for me?

Answer

alex picture alex · Aug 6, 2013

Have you tried simply 'reboot' with adb?

  adb reboot

Also you can run complete shell scripts (e.g. to reboot your emulator) via adb:

 adb shell <command>

The official docs can be found here.