Running adb commands on all connected devices

前端 未结 6 1453
野性不改
野性不改 2020-12-24 13:30

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 comma

6条回答
  •  忘掉有多难
    2020-12-24 13:53

    Create a bash (adb+)

    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 $@
        fi
    done
    

    use it with

    adb+ //+ command
    

提交回复
热议问题