How to change Genymotion port

烂漫一生 提交于 2019-12-04 01:48:40

问题


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:


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
$


来源:https://stackoverflow.com/questions/24906377/how-to-change-genymotion-port

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!