Running adb commands on all connected devices

前端 未结 6 1439
野性不改
野性不改 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:52

    This is an improved version of the script from 強大な. The original version was not matching some devices.

    DEVICES=`adb devices | grep -v devices | grep device | cut -f 1`
    for device in $DEVICES; do
        echo "$device $@ ..."
        adb -s $device $@
    done
    

提交回复
热议问题