Skip to content

Use INADDR_LOOPBACK for adb serial#2609

Merged
jemoreira merged 1 commit into
google:mainfrom
jemoreira:adb
May 27, 2026
Merged

Use INADDR_LOOPBACK for adb serial#2609
jemoreira merged 1 commit into
google:mainfrom
jemoreira:adb

Conversation

@jemoreira
Copy link
Copy Markdown
Member

Instead of INADDR_ANY. INADDR_ANY is still used on the host side proxy to accept connections on all network interfaces.

When issuing the adb connect command though, the loopback address is used as it's more specific.

The loopback address is also more likely to be used when the user (or an agent on their behalf) executes the adb connect command. If the user tries to connect to the same port with a different address, the adb server will create a new connection with the device and list it separately from the one created by adb_connection_maintainer.

Bug: b/516816243

Instead of INADDR_ANY. INADDR_ANY is still used on the host side proxy
to accept connections on all network interfaces.

When issuing the `adb connect` command though, the loopback address is
used as it's more specific.

The loopback address is also more likely to be used when the user (or
an agent on their behalf) executes the `adb connect` command. If the
user tries to connect to the same port with a different address, the adb
server will create a new connection with the device and list it
separately from the one created by adb_connection_maintainer.

Bug: b/516816243
@jemoreira jemoreira requested a review from ser-io May 26, 2026 18:21
@jemoreira jemoreira enabled auto-merge May 26, 2026 18:21
@jemoreira jemoreira added this pull request to the merge queue May 27, 2026
Merged via the queue into google:main with commit eabd2f6 May 27, 2026
44 checks passed
@jemoreira jemoreira deleted the adb branch May 27, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants