亚行着远程端口到本地机器 [英] adb forward remote port to local machine
问题描述
这是关于亚行对机器人的使用情况的查询。
This is a query regarding the usage of adb on android.
有没有办法来转发远程端口,即端口上的Android设备/模拟器设备连接到本机?
Is there a way to forward the remote port i.e. port on the android device/emulator to the local machine to which the device is connected?
$ adb中转发TCP:TCP端口1:端口2#转发本地端口PORT1在机器上PORT2设备上的
$ adb forward tcp:port1 tcp:port2 # forwards the local port port1 on the machine to port2 on the device.
在此先感谢!
推荐答案
最近更新的google亚行的服务。而加入逆转
命令应该做的工作。
Recently google updated ADB service. And added reverse
command that should do the job.
在逆转
文档(来源:的https://android.googlesource.com/platform/system/core/+/master/adb/SERVICES.TXT):
这实现了亚行反向
功能,即扭转的能力
从设备到主机套接字连接。 <前锋命令>
是一个
被如上所述,由于在转发命令:
This implements the
adb reverse
feature, i.e. the ability to reverse socket connections from a device to the host.<forward-command>
is one of the forwarding commands that are described above, as in:
-
清单转发
-
前锋:其中,地方取代;&LT;远程&GT;
-
前锋:norebind:其中,地方取代;&LT;远程&GT;
-
killforward-所有
-
killforward:其中,地方&GT;
list-forward
forward:<local>;<remote>
forward:norebind:<local>;<remote>
killforward-all
killforward:<local>
请注意,在这种情况下,&LT;地方&GT;
对应插座设备上
和&LT;远程&GT;
对应主机上的插槽
Note that in this case, <local>
corresponds to the socket on the device
and <remote>
corresponds to the socket on the host.
的输出反向:列表转发
是一样的主持人:列表进
除了&LT;串行&GT;
将只是主机
The output of reverse:list-forward
is the same as host:list-forward
except that <serial>
will be just host
.
这篇关于亚行着远程端口到本地机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!