cannot kill adb.exe manually

Viewed 2422

After android studio running several hrs,suddenly the connected device shows as offline.And what's annoying is that it always show an offline device no matter connecting or not by usb.

As what we always do, I try to call adb kill-server or adb start-server.From the process list, it shows an new adb.exe was created while the former one wont disappear even i try to stop it from the list.

So far my only solution is restart pc, i mean, FORCE restart.Normal stop or restart will keep my pc in the stopping screen.

Hope someone facing the same issues can support a better solution.Thanks anyway.

2 Answers

This is how I deal with my case which happens periodically. Per the tip of this answer, I find the processes using port 5037 wit command netstat as following:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\Hong>netstat -a -n -o | find "5037"
  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       9232
  TCP    127.0.0.1:5037         127.0.0.1:52034        ESTABLISHED     9232
  TCP    127.0.0.1:52034        127.0.0.1:5037         ESTABLISHED     10824

In the above results, process 9232 is adb.exe and process 10824 is Visual Studio. I can kill adb.exe after closing the other process using port 5037 - Visual Studio

Related