How to change Genymotion port

后端 未结 1 1429
名媛妹妹
名媛妹妹 2021-01-15 06:24

I would like to run automatized test on different Genymotion devices in the same time. For this I have to give seperate port numbers for each device.

Is it possible?

1条回答
  •  一整个雨季
    2021-01-15 06:48

    From the Genymotion Launcher, you are able to start multiple VMs. Although these each will have the same default port (5555), they will get different IP addresses from the VirtualBox host-only adapter. For example, I just launched two Genymotion machines and now adb devices shows:

    $ adb devices
    List of devices attached 
    192.168.56.101:5555 device
    192.168.56.102:5555 device
    $
    

    Each can be addressed separately by specifying IP address and port in your TCP/IP socket program, or by using adb -s if you're doing manual command line work or writing scripts. I won't go into socket programming here, but here's a quick example of selective access using adb to see if the Location service is running on the second device:

    $ adb -s 192.168.56.102:5555 shell service check location
    Service location: found
    $
    

    0 讨论(0)
提交回复
热议问题