diff options
author | Vince Harron <vharron@google.com> | 2021-11-12 12:40:58 -0800 |
---|---|---|
committer | Vince Harron <vharron@google.com> | 2021-12-02 10:31:56 -0800 |
commit | 5703eb352612566e8e5d099c99c2cecfaf22429d (patch) | |
tree | faf21a4919626c0306a4605de1baa521cdf4ff0b /adb.h | |
parent | 9864dad883fab140c65171f84d6c2dead338726e (diff) | |
download | adb-5703eb352612566e8e5d099c99c2cecfaf22429d.tar.gz |
adb --one-device feature.
Added support for a new server option, --one-device.
When a server is started with that option, it will only communicate with
the USB device serial number or device address specified.
This allows multiple adb servers to run in parallel on a single host,
each communicating only with a single USB device.
example usage:
$ adb --one-device usb:2-4 -P 1138 start-server
$ adb --one-device usb:2-6 -P 1139 start-server
$ adb -P 1138 devices -l
List of devices attached
97221FFBA00016 device usb:2-4 transport_id:1
$ adb -P 1139 devices -l
List of devices attached
13031FDEE0000C device usb:2-6 transport_id:1
Test: Manually tested as shown above with & without libusb, Linux & macOS.
Change-Id: Ibc4e3df7ecdefce737291185fa6a84071bff5340
Diffstat (limited to 'adb.h')
-rw-r--r-- | adb.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -135,8 +135,9 @@ void print_packet(const char* label, apacket* p); void handle_packet(apacket* p, atransport* t); -int launch_server(const std::string& socket_spec); -int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply_fd); +int launch_server(const std::string& socket_spec, const char* one_device); +int adb_server_main(int is_daemon, const std::string& socket_spec, const char* one_device, + int ack_reply_fd); /* initialize a transport object's func pointers and state */ int init_socket_transport(atransport* t, unique_fd s, int port, int local); |