Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
342 views
in Technique[技术] by (71.8m points)

android - 如何断开通过adb连接的设备(How to disconnect a device connected via adb)

I'm using the following Terminal commands to connect to an Android TV box I'm developing on:

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

cd /Library/Android/sdk/platform-tools

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

And it's working just fine.

(而且工作正常。)

But when I'm attempting to disconnect from the device using the following command:

(但是,当我尝试使用以下命令从设备断开连接时:)

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

I get the following response:

(我得到以下回应:)

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

But in fact, I'm still connected to it.

(但实际上,我仍然与之保持联系。)

This is super strange as I'm using this command for a long time now and I never had any issues disconnecting from a device.

(这真是太奇怪了,因为我已经使用了很长一段时间了,而且从设备断开连接时也没有任何问题。)

The only new thing in my setup, is a new version of Android Studio (version 3.5.2).

(我的设置中唯一的新东西是新版本的Android Studio(版本3.5.2)。)

Anybody knows what changed and how can I disconnect from my device now?

(谁知道发生了什么变化,现在如何断开与设备的连接?)

  ask by Barakuda translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

adb kill-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...