diff options
| author | Scott Anderson <saa@android.com> | 2012-05-30 18:11:27 -0700 |
|---|---|---|
| committer | Scott Anderson <saa@android.com> | 2012-06-05 11:13:40 -0700 |
| commit | 2ca3e6b35f79136418ebc32fef57580698dbd045 (patch) | |
| tree | e691312df3690d47d2066cd107449ee96a23ac5e /adb/adb.h | |
| parent | e82c2db05cae70a0490a1f84b7211ef42c329671 (diff) | |
| download | system_core-2ca3e6b35f79136418ebc32fef57580698dbd045.tar.gz system_core-2ca3e6b35f79136418ebc32fef57580698dbd045.tar.bz2 system_core-2ca3e6b35f79136418ebc32fef57580698dbd045.zip | |
adb: Generalizing -s to take qualifiers.
Prior to this change, -s could take either a serial number or a
device path (e.g. "-s 01498B1F02015015" or "-s usb:1-4.2"). This
change extends -s to also allow product, model or device names
(e.g. "-s product:mysid"). These new qualifiers will only be
available on devices that are running an adb daemon that provides
properties in the connect message per Change-Id:
I09200decde4facb8fc9b4056fdae910155f2bcb9
The product, model and device are derived from the
ro.product.name, ro.product.model and ro.product.device
properties respectively. They are prefixed with "product:",
"model:" or "device:" as appropriate. In addition, any
non-alphanumerics in the model are changed to underscores.
If the -s parameter matches multiple devices, the result will be
the same as when multiple devices are connected but no -d, -e or
-s option is specified. In general, this means the user will get
"error: more than one device". However for get-state,
get-devpath and get-serialno, they will get "unknown".
The format of "devices -l" was changed to list all of the
qualifiers that are available. The following example output
(with the last digits of the serial numbers replaced with X's) is
with a Galaxy Prime with an older adb daemon and another Galaxy
Prime and Galaxy S both with the enhanced adb daemons:
List of devices attached
016B75D60A0060XX device usb:2-5 product:mysid model:Galaxy_Nexus device:toro
3731B535FAC200XX device usb:1-4.2 product:soju model:Nexus_S device:crespo
01498B1F020150XX device usb:1-4.1
Note that the serial number and state are now column oriented
instead of tab delimited. After the serial number and state, all
qualifiers are listed with each preceded by a space. The output
of the original devices command (without -l) is unchanged.
Change-Id: Iceeb2789874effc25a630d514a375d6f1889dc56
Signed-off-by: Scott Anderson <saa@android.com>
Diffstat (limited to 'adb/adb.h')
| -rw-r--r-- | adb/adb.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -251,7 +251,7 @@ int adb_main(int is_daemon, int server_port); ** get_device_transport does an acquire on your behalf before returning */ void init_transport_registration(void); -int list_transports(char *buf, size_t bufsize, int show_devpath); +int list_transports(char *buf, size_t bufsize, int long_listing); void update_transports(void); asocket* create_device_tracker(void); |
