运行广播“adb connect”到网络中的所有设备

发布于 2025-01-16 00:50:51 字数 297 浏览 4 评论 0原文

我的网络中有许多 Android 设备,所有设备都为 adb 打开相同的端口 5555。
要连接到特定设备,在知道网络内部的特定 IP 的情况下,我只需运行以下代码行:

adb connect 192.168.43.1

如果我想尝试一次连接到所有设备怎么办?有没有办法以广播方式发送此命令,而无需尝试为每个可能的 IP 启动它。
在我的具体情况下,设备约为 100 个,即使我有 IP 列表,我也更愿意找到一种以广播方式发送它的方法,这样我就可以自动捕获是否将新设备添加到网络中,而无需手动更新列表。

I have many android devices in my network, all with same port 5555 open for adb.
To connect to a specific device, knowing the specific IP inside of the network I simply run this line of code:

adb connect 192.168.43.1

What if I want to try to connect to all devices in one shot? Is there a way to send this command in broadcast without trying to launch it for every single possible IP.
The devices in my specific case are ~100, even if I have the list of IPs I would prefer to find a way to send it in broadcast so I can automatically catch if a new device is added to the network without manually updating the list.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文