亚行着远程端口到本地机器 [英] adb forward remote port to local machine

查看:149
本文介绍了亚行着远程端口到本地机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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:

      
  1. 清单转发
  2.   
  3. 前锋:其中,地方取代;&LT;远程&GT;
  4.   
  5. 前锋:norebind:其中,地方取代;&LT;远程&GT;
  6.   
  7. killforward-所有
  8.   
  9. killforward:其中,地方&GT;
  10.   
  1. list-forward
  2. forward:<local>;<remote>
  3. forward:norebind:<local>;<remote>
  4. killforward-all
  5. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆