亚行着远程端口到本地机器端口、机器、亚行着

由网友(吃柠檬的橘子)分享简介:这是关于亚行对机器人的使用情况的查询。This is a query regarding the usage of adb on android.有没有办法来转发远程端口,即端口上的Andr​​oid设备/模拟器设备连接到本机?Is there a way to forward the remote port i...

这是关于亚行对机器人的使用情况的查询。

This is a query regarding the usage of adb on android.

有没有办法来转发远程端口,即端口上的Andr​​oid设备/模拟器设备连接到本机?

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.

阅读全文

相关推荐

最新文章