[英]ADB Bluestacks - Connect 2 PC
I've two PCs, say PC1 and PC2. 我有两台电脑,比如PC1和PC2。 I've Bluestacks installed in PC1 and I've Android Studio Installed in PC2. 我在PC1中安装了Bluestacks,并在PC2中安装了Android Studio。 So my question is : "Is it possible to connect to the Bluestacks emulator through the ADB installed in PC2 ?" 所以我的问题是:“是否可以通过安装在PC2中的ADB连接到Bluestacks仿真器?” So that I can install the application from PC1 to PC2's bluestacks. 这样我就可以将应用程序从PC1安装到PC2的bluestacks。
NOTE: PC1 and PC2 are on the same network. 注意:PC1和PC2在同一网络上。
To connect an adb
hosted on a remote computer to a Bluestacks
running on the local computer , you can try.: 要将远程计算机上托管的adb
连接到本地计算机上运行的Bluestacks
,您可以尝试:
The problem: 问题:
Bluestacks listens on the localhost interface only ( localhost
, 127.0.0.1
), it doesn't listen on ex: 192.168.1.4
. Bluestacks仅侦听localhost接口 ( localhost
, 127.0.0.1
),它不侦听ex: 192.168.1.4
。 Based on this, and at first, you cannot connect remotely to Bluestacks using ADB
. 基于此,首先,您无法使用ADB
远程连接到Bluestack。
The solution: 解决方案:
Internal Port forwarding 内部端口转发
How to: 如何:
1 - Download http://www.quantumg.net/trivial_portforward.zip 1 - 下载http://www.quantumg.net/trivial_portforward.zip
2 - On the computer running Bluestacks , run: 2 - 在运行Bluestacks的计算机上 ,运行:
trivial_portforward.exe 9999 127.0.0.1 5555
//usage: portforward [port to listen on] [ip of host to connect to] [port to connect to].
3 - On the computer running Eclipse or Android Studio , run: 3 - 在运行Eclipse或Android Studio的计算机上 ,运行:
adb connect 192.168.1.4:9999
//Connected to 192.168.1.4 9999
(change to the ip of the computer running Bluestacks) (更改为运行Bluestacks的计算机的ip)
That's it. 而已。
Notes: 笔记:
Make sure the firewall isn't blocking outgoing/incoming connections on both computers. 确保防火墙不阻止两台计算机上的传出/传入连接。
I've tested deploying an application and it works :) 我已经测试了部署应用程序,它的工作原理:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.