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

后端 未结 20 1986
余生分开走
余生分开走 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:10

    Here's a functional one line command tailored from kichik's response (thanks!):

    adb devices | tail -n +2 | cut -sf 1 | xargs -iX adb -s X install -r *.apk

    But if you happen to be using Maven it's even simpler:

    mvn android:deploy

提交回复
热议问题