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?
By far the easiest way to restart an Android device without a power button is the Quick Settings panel. This menu has the toggles for Wi-Fi, Bluetooth, Airplane Mode, and many other customizable tiles. Simply swipe down once or twice—depending on your device—and tap the power icon. Select “Restart” from the menu.
If you own a Galaxy smartphone, press and hold both the volume down and power button for 7 to 10 seconds to force the phone to reboot. If your device doesn't have a dedicated power button, hold down the side and volume down buttons for 7 to 10 seconds.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With