Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

adb cannot start because something already holds its port

Errorcould not install *smartsocket* listener

Short 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.

  • Applies to Android SDK Platform-Tools current stable, Android Studio current stable, Windows 11, macOS 26, Ubuntu 24.04
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 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 :5037
  2. 2Match what you see, then jump to its fix

    1. 1The listener shows a process named adb (adb.exe on Windows), for example one started earlier by another terminal or by Android Studio.An old adb server is still runningFix
    2. 2The process on port 5037 is not adb, or it comes back every time you end it.A different program is using port 5037Fix

What does the error look like?

  • could not install *smartsocket* listener
  • adb 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-server

2Fix

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-server

3Verify

adb reports that the daemon started and lists your devices.

adb devices

Confirmed by developer.android.com

Did this fix it?

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 devices

3Verify

The device list prints on the new port without the listener error.

adb -P 5038 devices

Confirmed by android.googlesource.com

Did this fix it?

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 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 fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.