Heinrisch Heinrisch - 1 year ago 131
Android Question

Running adb commands on all connected devices

Is there a way of running adb commands on all connected devices? To uninstall an app from all connected devices with "adb uninstall com.example.android".

The commands I am interested in is mainly install and uninstall.

I was thinking about writing a bash script for this, but I feel like someone should have done it already :)

Answer Source

Create a bash (adb+)

adb devices | while read line
    if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
        device=`echo $line | awk '{print $1}'`
        echo "$device $@ ..."
        adb -s $device $@

use it with

adb+ //+ command
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download