0

我正在使用以下Terminal命令连接到我正在开发的 Android 电视盒:

cd /Library/Android/sdk/platform-tools

./adb connect [my.device.ip.address]:5555

它工作得很好。但是当我尝试使用以下命令断开与设备的连接时:

./adb disconnect [my.device.ip.address]:5555

我得到以下回复:

disconnected [my.device.ip.address]:5555

但事实上,我仍然和它有联系。这非常奇怪,因为我现在使用这个命令很长时间了,而且我从来没有遇到任何与设备断开连接的问题。我的设置中唯一的新东西是新版本的 Android Studio(版本 3.5.2)。

任何人都知道发生了什么变化以及我现在如何断开与我的设备的连接?

4

2 回答 2

1

Just use

adb disconnect

and it will disconnect all devices connected via TCP. No need to specify the IP address if you're using just one device.

If it still reconnects instantly then you might have an app/script running in the background that automatically reconnects to adb.

于 2019-12-05T08:51:36.010 回答
0

如果您需要 100% 终止连接,请使用

adb kill-server
于 2019-12-01T12:25:25.463 回答