Reputation: 557
When I try to run adb commands from terminal, especially adb devices
, adb kill-server
and adb start-server
it hangs and I need to type CTRL+C
to exit proccess. Its not possible to deploy APK to physical or virtual devices. Something is block adb proccess/port. I have anti-virus uninstalled and firewall disabled.
In the example below, I type adb devices and terminal show me List of devices attached and hangs in there.
Upvotes: 12
Views: 21381
Reputation: 1
i recently started having this problem too out of nowhere my adb commands are hanging and i cant use any device to debug.The only fix i have found so far is to kill all processes on port 5037 but there must be a 1 stop solution once and for all
Upvotes: 0
Reputation: 451
SOLVED! Windows 10. TURN ON YOUR FIREWALL FOR DOMAIN AND PRIVATE AND PUBLIC.
something must be trying on the network to connect to this port. after doing so the issue just gone with even no rebbot.
it is been a week already I am stugglind with this pc. where I have 10 PCs each with 150 devices.
Upvotes: 0
Reputation: 33
What ended up working for me was killing the server and then restarting it.
It takes a little bit of time but has worked for everytime.
Kill command adb kill-server
¨
Start command adb start-server
The kill command will take a minut or so but it will work.
after that you can run your other adb commands
Upvotes: 1
Reputation: 131
just like @par said and to kill the processes, just look at their PID number and to kill them you use "taskkill /PID (their pid) /f" and put the PID number there, /f is for force kill
Upvotes: 0
Reputation: 1
Apart from checking for updated USB drivers...
In Windows, I've experienced hangs when using a USB hub with a harddrive, and/or other input devices attached. With my particular hardware setup, either my USB hardware is crappy, (maybe my latest USB hub is crappy) or the USB drivers for the USB controller are crappy, or I'm just running into what may be some more-or-less natural limitations to USB on the Windows platform (in regards to android hardware on Windows anyway).
EDIT: I'm particularly referencing USB3 here. I also happen to have a USB3 non-powered hub plugged into a USB2 port -- that port connects my mouse, an HDD, and my android device -- I've since had to re-think what is plugged where to ensure adb works properly.
One last helpful Windows tip, if you haven't restarted in days or weeks, might be a good idea to just restart and start fresh, and of course, Windows Updates (usually not a hindrance to how my android hardware works). Doing this can take care of another application using port 5037 (as mentioned by @par above).
I also experience issues when I try to batch several "adb pull" commands in sequence. I have been working on a setup to selectively pull a list of folders that aren't nested and thus can't be pulled in only one command that I know of (part of my custom backup solution). I sometimes find I have to pull one folder at a time. This is more likely related to my USB issues, and not so much and adb issue.
EDIT: Depending on what version of Win10 you use, you might have to manually initiate the update-check for your drivers, through the Device Manager. I actually managed to get an Android driver update by doing this recently. So far that update, and rethinking what is plugged where, things are working slightly better lately.
Upvotes: 0
Reputation: 191
adb binds to TCP port 5037, if this port is in use by different process you might see that any adb commands would just hang and wont do anything.
Upvotes: 19
Reputation: 11
Something similar happened to me, I didn't have Android drivers correctly installed. You need to install Google USB Driver and then:
Go to Control Panel Home
Click on the "Device Manager" link.
Complete tutorial here: http://visualgdb.com/KB/usbdebug-manual/ Hope it works!
Upvotes: 1
Reputation: 1597
Try to:
Step1: Open android studio.
Step2: Choose Android device monitor.
Step3: At the device window: choose triangle icon then choose reset adb. (Try to repeat 2-3 times if it is not show some devices)
Upvotes: 0