tldr/pages.zh/common/adb-reverse.md

21 lines
600 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# adb reverse
> 安卓调试桥-反射: 反向映射安卓模拟器实例或者已连接的实体设备的套接字连接。
> 更多信息:<https://developer.android.com/tools/adb>.
- 列出所有来自模拟器和设备的映射连接:
`adb reverse --list`
- 将 TCP 端口从安卓模拟器或设备中映射到 localhost
`adb reverse tcp:{{远程端口}} tcp:{{本地端口}}`
- 从安卓模拟器或设备移除一个反向 socket 连接:
`adb reverse --remove tcp:{{远程端口}}`
- 从安卓模拟器或设备移除所有反向 socket 连接:
`adb reverse --remove-all`