adb reboot doesn't complete
I'm trying to run a few test packages on my device through a shell script which runs every night and for that I need to run the adb reboot command. My problem is that the 'adb reboot' command does make the system reboot, but it never completes (I need to do a keyboard interrupt if I run it manually in order to issue another command) I was wondering if there is anyway I could make m开发者_如何学编程y script go to the next command after a certain fixed amount of time? What could be going wrong with the adb reboot command? Sorry if my question is vague.
Thanks.
adb is waiting for the device to respond, but the device can't respond because it reboots before it responds.
Try a bash script like this:
#!/bin/bash
adb reboot & # run in background
sleep 2 # give it time to run
kill -SIGINT $! # send Ctrl-C to PID of last background process
** not tested
man kill
bash Internal Variables
精彩评论