gpt4 book ai didi

android - 如何禁用 adb 端口转发?

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:52:33 25 4
gpt4 key购买 nike

如何禁用之前启用的 adb 中的端口转发规则

    adb forward tcp:1234 tcp:1234

除了杀死并重启 adb 服务器,还有其他方法吗?

最佳答案

Setting Up Redirection through ADB

The Android Debug Bridge (ADB) tool provides port forwarding, an alternate way for you to set up network redirection. For more information, see Forwarding Ports in the ADB documentation.

You can also remove a redirection by killing the ADB server.

但是您可以使用模拟器控制台提供的网络重定向,它提供了删除方法。访问类型:

telnet localhost emulator_port

通常第一个模拟器在端口 5554 上运行。

使用命令“rdir”添加、删除或列出网络重定向。

请参阅 Using Network Redirection 中的文档.

祝你好运。

编辑:

停止转发使用

adb forward --remove tcp:<port> , 或 adb forward --remove-all .

它于 2012 年 12 月添加到 adb ( see patch here )。为 Android 4.3 (API 18) 发布的 SDK 更新率先支持它。

关于android - 如何禁用 adb 端口转发?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12718348/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com