when I updated Android Studio to 3.6.1 adb is automatically connected by the remote device,but I did not use adb connect。These devices are under the same wifi。How can I solve this problem?
-
I created an issue and got the solution. On linux/mac: adb kill-server && ADB_MDNS=0 adb start-server On windows: cmd /C "set ADB_MDNS=0 && adb kill-server && adb start-server" – Nemoyang Mar 08 '20 at 03:28
2 Answers
This seems to be an issue with the latest version of Android Studio 3.6. A couple of my colleagues seem to have the same problem where any adb-over-wifi devices are discovered automatically and added to the device list in adb.
I could not find anything about this in the changelogs for the IDE or the platform tools, nor could I find a setting to turn this discovery off. I suggest you create an issue on the bugtracker.
@Nemoyang commented that you can disable this behavior by setting an environment variable ADB_MDNS
to 0. It seems Google is working on an improved adb over wifi through mDNS, but hasn't really disclosed any information.

- 1,959
- 18
- 19
-
On linux/mac: adb kill-server && ADB_MDNS=0 adb start-server On windows: cmd /C "set ADB_MDNS=0 && adb kill-server && adb start-server" – Nemoyang Mar 08 '20 at 03:26
-
Created a IssueTracker ticket for this. https://issuetracker.google.com/issues/161244414 – Dustin Jul 17 '20 at 15:18
Try to restart your devices , the WIFI-debug mode will be disable. If it still connect again and you are using android device, going to develop and turn of this.

- 860
- 4
- 15
-
The problem is that these devices are not mine,will connect to my computer in just a wifi network,I can't turn off someone else's device.The weird thing is why the computer does not have adb connect, the device can actively connect to the computer – Nemoyang Mar 04 '20 at 07:04
-
oh i see, try this command `adb disconnect` and check again `adb devices` – Khanh Le Tran Mar 04 '20 at 07:10
-
That doesn't work, disconnect is only temporary, and will be connected automatically after a while.And I tried to kill adb server and restart,doesn't work. – Nemoyang Mar 04 '20 at 07:39