platform_system_core/adb/sysdeps
Callum Ryan 8539cb3f75 Allow the adb server to bind on ::1
Currently the adb server can only bind on 127.0.0.1 or * if -a is
provided. This diff adds the ability for adb to bind on ::1 as
well for use cases where you might want to force adb to be IPv6
only.

To bind the adb server on ::1
```
$ ./adb -L tcp:[::1]:1234 server
$ lsof -nPi :1234
COMMAND ... NODE NAME
adb     ...  TCP [::1]:1234 (LISTEN)
```
The original behaviour is also retained, so this would only affect
users explicitly specifying ::1 in the socket spec
```
$ export ANDROID_ADB_SERVER_PORT=1234
$ ./adb server
$ lsof -nPi :1234
COMMAND ... NODE NAME
adb     ...  TCP 127.0.0.1:1234 (LISTEN)
```

Note: I've only implemented this behaviour for posix base systems,
due to my limited understanding of networking on windows. If
needed I can do some research to implement it there as well, but
there is currently no IPv6 support at all on the windows side.

Test: New unit test and the commands in the summary

Change-Id: I23e4531e8dfda4de9348124ad7491d728aecdbf7
2019-11-07 08:32:01 -08:00
..
posix Allow the adb server to bind on ::1 2019-11-07 08:32:01 -08:00
win32 Revert "Revert "adb: move adb_strerror to sysdeps/win32/errno.cpp."" 2016-12-05 17:38:30 -08:00
chrono.h adb: implement fdevent_set_timeout. 2019-01-31 23:36:41 -08:00
errno.cpp Adapt to switch to libc++ for Windows 2018-09-21 10:46:25 -07:00
errno.h Revert "Revert "adb: extend sync protocol's stat support."" 2016-12-05 17:38:30 -08:00
network.h Allow the adb server to bind on ::1 2019-11-07 08:32:01 -08:00
stat.h adb: make sure that file mode macros match linux. 2016-11-21 18:39:21 -08:00
stat_test.cpp switch to using android-base/file.h instead of android-base/test_utils.h 2018-11-14 09:35:34 -08:00
uio.h Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
vm_sockets.h Add native vsock support to ADB. 2019-01-25 17:55:06 -08:00