adb cannot start because something already holds its port
could not install *smartsocket* listenerShort answer
The adb server must bind local TCP port 5037, and every adb client talks to it there. The smartsocket listener error means the bind failed, because an old adb server or another program already holds that port. Stop the old server with adb kill-server, find and end any process still on 5037, or start adb on a different port with -P.
Fix it fast
1Find out which cause you have
Ask the operating system which process is listening on port 5037. If a process shows up, note its name and PID. If nothing shows up, the port is free and the cause is something else.
# macOS and Linux lsof -nP -iTCP:5037 -sTCP:LISTEN # Windows (Command Prompt) netstat -ano | findstr :50372Match what you see, then jump to its fix
What does the error look like?
could not install *smartsocket* listeneradb start-server failed
Cause 1 of 2
An old adb server is still running
1Check
adb starts a background server on first use and that server keeps the port until it is stopped. While it is running, a second server cannot bind the same port.
adb version
adb kill-server2Fix
Stop the server with adb kill-server. If a process named adb is still listed on port 5037 afterwards, end it by PID, then start the server again.
# macOS and Linux
kill <PID>
# Windows (Command Prompt)
taskkill /PID <PID> /F
adb start-server3Verify
adb reports that the daemon started and lists your devices.
adb devicesConfirmed by developer.android.com
Cause 2 of 2
A different program is using port 5037
1Check
The listener lines from the first step name the owner. The adb docs say all adb clients use port 5037, so any other program bound there blocks the server.
# macOS and Linux
lsof -nP -iTCP:5037 -sTCP:LISTEN
# Windows (Command Prompt)
tasklist /FI "PID eq <PID>"2Fix
Close that program if you can. If you need both running, start adb on another port with the -P option and pass the same option to every adb command from the terminal.
adb -P 5038 start-server
adb -P 5038 devices3Verify
The device list prints on the new port without the listener error.
adb -P 5038 devicesConfirmed by android.googlesource.com
How do I stop it coming back?
- Keep one copy of SDK Platform-Tools on your PATH, so only one adb binary ever starts the server.
- Run adb kill-server before you switch between the Android SDK adb and the adb bundled with another tool.
- Close emulator and device-manager tools that bring their own adb before you open Android Studio.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fixMobile apps
adb tcpip 5555 fails because no device is found
adb: more than one device/emulator
adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.
4 causes, each with a fixMobile apps
The Android Emulator says /dev/kvm is not found
KVM acceleration can NOT be used
The emulator wants a hypervisor and cannot find one.
4 causes, each with a fixMobile apps
The emulator says the GPU driver is unsupported and falls back to software
vulkan-1.dll cannot be found
The emulator picks a graphics mode when it starts.
4 causes, each with a fixMobile apps
The Android Emulator will not start with hardware acceleration (HAXM, Hyper-V, KVM)
KVM acceleration can NOT be used
Intel HAXM is discontinued, and current emulators no longer use it.
4 causes, each with a fix