platform_system_core/adb
Jason Jeremy Iman 8bde191202 Enable "localfilesystem" UNIX domain socket for ADB.
This patch introduce "service.adb.listen_addrs", a new
string type property, while keeping the old properties.
The new property added in this patch is used to listen
on UNIX domain socket "localfilesystem".

"service.adb.listen_addrs" can be used to listen on
multiple addresses, such as tcp:5555 and tcp:5556.
It is separated by ',' (comma) character.

In the process of introducing the new socket type, the
method tcp_connect is removed and combined into
socket_spec_connect.

Without specifying using the new property, adb will
try to listen on both tcp and vsock (following the
previous implementation).

Some examples of the new property value are:
  - "tcp:5555"
  - "vsock:5555"
  - "localfilesystem:/tmp/test"
  - "tcp:5555,vsock:5555"

Bug: 133378083
Test: On master-arc-dev:
        adb root;
        setprop service.adb.listen_addrs localfilesystem:
	    <path_to_socket>;
        adb connect localfilesystem:<path_to_socket>;
        adb -s localfilesystem:<path_to_socket> shell;
	    inside Chrome OS.
Test: On aosp_bluefin:
        setprop service.adb.listen_addr tcp:5555;
        adb connect <IP>:5555; adb shell;
Test: On aosp_bluefin:
        setprop service.adb.tcp.port 5555;
        adb connect <IP>:5555; adb shell;
Test: On aosp_bluefin:
        setprop service.adb.listen_addrs tcp:5555,tcp:6666;
        adb connect <IP>:5555; adb shell;
        adb connect <IP>:6666; adb shell;
Test: On aosp_bluefin:
        ./adb_test;
Test: On cuttlefish:
        launch_cvd;
        adb -s 127.0.0.1:6520 shell;
Test: Ran host tests:
        ./adb_test;
        ./adb_integration_test_adb;
        ./adb_integration_test_device;

Change-Id: I8289bf0ab3305cf23ce5695ffba46845d58ef6bb
2019-12-04 10:05:05 +09:00
..
apex Move adbd to an apex. 2019-11-04 15:52:16 -08:00
client Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
daemon Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
fastdeploy fastdeploy: fix tests. 2019-11-08 15:39:50 +00:00
fdevent adb: fdevent: add fdevent_context_epoll. 2019-08-14 13:56:08 -07:00
sysdeps Allow the adb server to bind on ::1 2019-11-07 08:32:01 -08:00
tools Add stub code to read MS OS 2.0 descriptors. 2019-09-06 14:45:11 -07:00
.clang-format
adb.bash Adb and fastboot completion supports zsh users. 2018-07-17 14:19:35 +08:00
adb.cpp Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
adb.h Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
adb_auth.h Notify the framework when an adb key is authorized 2019-05-09 16:05:40 -07:00
adb_integration_test_adb.xml Add adb integration test to general-tests 2018-08-08 12:08:50 -07:00
adb_integration_test_device.xml Add adb_integration_test_device to general-tests 2018-10-12 13:48:14 -07:00
adb_io.cpp Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
adb_io.h Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
adb_io_test.cpp switch to using android-base/file.h instead of android-base/test_utils.h 2018-11-14 09:35:34 -08:00
adb_listeners.cpp adb: convert more stuff to unique_fd. 2019-01-23 17:11:13 -08:00
adb_listeners.h
adb_listeners_test.cpp adb: move fdevent to its own folder. 2019-07-08 14:37:27 -07:00
adb_mdns.h
adb_trace.cpp adbd: compile for host. 2019-01-23 12:59:41 -08:00
adb_trace.h
adb_unique_fd.cpp adb: actually enable fdsan. 2018-08-06 18:50:10 -07:00
adb_unique_fd.h Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
adb_utils.cpp Allow overriding the log path. 2019-07-30 12:26:31 -07:00
adb_utils.h [adb] Use STL for ParseUInt() implementation 2019-08-02 11:33:41 -07:00
adb_utils_test.cpp Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
Android.bp [adb] Optimize adbd's usb reading 2019-11-28 18:24:01 -08:00
benchmark_device.py adb: add benchmarks for sink/source. 2019-02-28 15:53:48 -08:00
bugreport_test.cpp adb: Avoid extra std::string copies 2019-03-26 12:00:19 -07:00
file_sync_protocol.h adb: split file_sync_service.h into client and daemon parts. 2018-07-25 18:08:32 -07:00
MODULE_LICENSE_APACHE2
NOTICE Revert "Revert "Revert "adb: append the libwinpthread COPYING to adb's NOTICE.""" 2018-11-29 23:14:02 +00:00
OVERVIEW.TXT
OWNERS
protocol.txt
security_log_tags.h
services.cpp libbase: add ConsumePrefix/ConsumeSuffix. 2019-05-03 12:49:31 -07:00
services.h Support adb rescue wipe command 2019-04-29 15:21:50 -07:00
SERVICES.TXT
shell_protocol.h Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
shell_service_protocol.cpp Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
shell_service_protocol_test.cpp adb: split shell_service.h into client/daemon/protocol parts. 2018-07-25 18:08:44 -07:00
socket.h adb: move fdevent to its own folder. 2019-07-08 14:37:27 -07:00
socket_spec.cpp Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
socket_spec.h Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
socket_spec_test.cpp Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
socket_test.cpp adb: move fdevent to its own folder. 2019-07-08 14:37:27 -07:00
sockets.cpp Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
sockets.dia
SYNC.TXT
sysdeps.h FastDeploy refactor: 2+GB APK support, optimizations, tests. 2019-10-02 13:25:03 -07:00
sysdeps_test.cpp adb: win32: silence wine test failure. 2019-07-16 15:22:51 -07:00
sysdeps_unix.cpp Revert "Revert "Add a way to turn off unique_fd's operator int."" 2019-05-06 16:18:02 -07:00
sysdeps_win32.cpp Allow the adb server to bind on ::1 2019-11-07 08:32:01 -08:00
sysdeps_win32_test.cpp switch to using android-base/file.h instead of android-base/test_utils.h 2018-11-14 09:35:34 -08:00
test_adb.py Allow the adb server to bind on ::1 2019-11-07 08:32:01 -08:00
test_device.py adb: disable failing test. 2019-10-01 14:15:31 -07:00
trace.sh
transport.cpp adb: use shell for remount to forward return codes. 2019-08-12 18:31:45 -07:00
transport.h Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
transport_benchmark.cpp Revert "adb: make benchmarks build on the host." 2018-11-13 11:28:29 -08:00
transport_fd.cpp [adb] Optimize adbd's usb reading 2019-11-28 18:24:01 -08:00
transport_local.cpp Enable "localfilesystem" UNIX domain socket for ADB. 2019-12-04 10:05:05 +09:00
transport_test.cpp adb: move fdevent to its own folder. 2019-07-08 14:37:27 -07:00
transport_usb.cpp adb: make adb reconnect perform a USB reset. 2019-03-28 15:47:44 -07:00
types.cpp [adb] Optimize adbd's usb reading 2019-11-28 18:24:01 -08:00
types.h [adb] Optimize adbd's usb reading 2019-11-28 18:24:01 -08:00
types_test.cpp [adb] Optimize adbd's usb reading 2019-11-28 18:24:01 -08:00
usb.h adb: make adb reconnect perform a USB reset. 2019-03-28 15:47:44 -07:00