A collection of things you can do with adb
, such as toggling WiFi or Bluetooth.
Run a command on all connected devices in a bash script
In a bash script:
for usb in `adb devices | grep -v "List" | awk '{print $1}'`
do
do_stuff $usb
done
do_stuff() {
adb -s $1 YOUR COMMAND HERE
}
Toggle things
To mute a device, run this keypress a few times:
adb shell input keyevent 25
Turn off WiFi:
adb -s $1 shell settings put global wifi_on 0
Set the time and timezone to that of your PC:
adb -s $1 shell settings put global time_zone Europe/Amsterdam
TIMESTAMP="$(date '+%m%d%H%M%y.%S')"
adb -s $1 shell "su 0 toybox date ${TIMESTAMP}"