2020-11-04 20:12:56 +00:00
|
|
|
# adb reverse
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 安卓调试桥-反射: 反向映射安卓模拟器实例或者已连接的实体设备的套接字连接。
|
2021-08-31 08:13:49 +01:00
|
|
|
> 更多信息:<https://developer.android.com/studio/command-line/adb>.
|
2020-11-04 20:12:56 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 列出所有来自模拟器和设备的映射连接:
|
2020-11-04 20:12:56 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
`adb reverse --list`
|
2020-11-04 20:12:56 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 将 TCP 端口从安卓模拟器或设备中映射到 localhost:
|
2020-11-04 20:12:56 +00:00
|
|
|
|
|
|
|
`adb reverse tcp:{{远程端口}} tcp:{{本地端口}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 从安卓模拟器或设备移除一个反向 socket 连接:
|
2020-11-04 20:12:56 +00:00
|
|
|
|
|
|
|
`adb reverse --remove tcp:{{远程端口}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 从安卓模拟器或设备移除所有反向 socket 连接:
|
2020-11-04 20:12:56 +00:00
|
|
|
|
|
|
|
`adb reverse --remove-all`
|