How can I adb install an apk to multiple connected devices?

后端 未结 20 2018
余生分开走
余生分开走 2020-11-30 19:03

I have 7 devices plugged into my development machine.

Normally I do adb install and can install to just a single device.

Now

20条回答
  •  爱一瞬间的悲伤
    2020-11-30 19:27

    Another short option... I stumbled on this page to learn that the -s $SERIAL has to come before the actual adb command! Thanks stackoverflow!

    for SERIAL in $(adb devices | grep -v List | cut -f 1);
    do `adb -s $SERIAL install -r /path/to/product.apk`;
    done
    

提交回复
热议问题