I would like to reboot many Android devices to download mode simultaneously.
Both of the following work from the command line:
adb reboot
adb reboot download
The following bash script also works:
adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
device=`echo $line | awk '{print $1}'`
echo "$device $@ ..."
adb -s $device "reboot" &
fi
done
However, when I replace 'reboot' with 'reboot download', the script only provides ADB usage instructions:
user@user /home
$ ./rebootToDownload.bsh
29f7654c ...
user@user /home
$ Android Debug Bridge version 1.0.31
-a - directs adb to listen on all interfaces for a connection
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
...
Could someone please explain why 'ADB reboot' executes successfully, but not 'ADB reboot download'?
Is there any way around this?
Any help is appreciated.