Testing multiple Android devices on one machine

后端 未结 4 1796
误落风尘
误落风尘 2021-02-15 11:48

I have two different Android devices plugged into the same machine. What I would like to do is to target each device and execute a test on it separately.

Unfortunately,

4条回答
  •  失恋的感觉
    2021-02-15 12:11

    You can specify the targeted device on the adb command with -s

    1) Get the device serialNumber by doing

    $ adb devices 
    List of devices attached 
    emulator-5554  device
    emulator-5556  device
    emulator-5558  device
    

    2) Pass in the serialNumber into the adb command with -s argument

    $ adb -s   
    

    For example

    $ adb -s emulator-5556 install helloWorld.apk
    

提交回复
热议问题