aboutsummaryrefslogtreecommitdiff
path: root/adb.h
diff options
context:
space:
mode:
authorJason Jeremy Iman <jasongustaman@google.com>2019-07-19 12:44:39 +0900
committerJason Jeremy Iman <jasongustaman@google.com>2019-12-04 10:05:05 +0900
commit84613875270fb3d083bf5da280ffc6f32529270d (patch)
treec9ec302978f2c9bf5b531d5fdb33a74a1ae1ea3e /adb.h
parentcf8040b9d0936306c06aaeb961fb9d8b72f67509 (diff)
downloadadb-84613875270fb3d083bf5da280ffc6f32529270d.tar.gz
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
Diffstat (limited to 'adb.h')
-rw-r--r--adb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/adb.h b/adb.h
index c6cb06af..e7fcc912 100644
--- a/adb.h
+++ b/adb.h
@@ -200,7 +200,7 @@ void put_apacket(apacket* p);
#define ADB_SUBCLASS 0x42
#define ADB_PROTOCOL 0x1
-void local_init(int port);
+void local_init(const std::string& addr);
bool local_connect(int port);
int local_connect_arbitrary_ports(int console_port, int adb_port, std::string* error);