My adb can't connect devices.
I am runing adb start-server
ulucudeMacBook-Pro:~ ulucu$ adb start-server
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
Then run "lsof -i tcp:5037"
ulucudeMacBook-Pro:~ ulucu$ lsof -i tcp:5037
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
adb 2308 ulucu 7u IPv4 0x440443a862048a7b 0t0 TCP localhost:5037 (LISTEN)
But when I run adb kill-server
ulucudeMacBook-Pro:~ ulucu$ adb kill-server
* server not running *
or run adb devices or adb shell
List of devices attached
* daemon not running. starting it now at tcp:5037 *
adb E 03-31 09:30:26 2350 95705 usb_osx.cpp:333] Could not open interface: e00002c5
adb E 03-31 09:30:26 2350 95705 usb_osx.cpp:294] Could not find device interface
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
The adb has been running.
No other processes using "5037" port.
No other simulator like "genymotion".
My system is Mac 10.12.14.
My adb version is 1.0.39.
What's the problem?
If you have updated to Platform Tools 25.0.4(you can check running android from command line) and it's not working
Just download previous stable version e.g: https://dl.google.com/android/repository/platform-tools_r25.0.2-macosx.zip
Then go to your Android SDK home directory and replace platform-tools folder with the downloaded one.
Then do:
ps aux | grep 5037
kill -9 <pid of process of your incorrectly running adb>
And go
adb devices
adb kill-server
if happens an error with port:
adb reconnect solve it for me
Based from this thread, you cannot connect because the address is already in use. You may try busybox netstat -antp to check who is using the port. Here's another workaroung which might help:
Solve this problem on
MacBookby first running the following command to list the process which is using port5037lsof -n -i4TCP:5037 | grep LISTENThen, I kill it:
kill -9 <PID>Then,
adb devicesworks!
Hope this helps!