diff options
| author | Nick Pelly <npelly@google.com> | 2009-05-07 12:48:03 -0700 |
|---|---|---|
| committer | Nick Pelly <npelly@google.com> | 2009-05-07 12:48:03 -0700 |
| commit | db4492640313be9d3fd65ee5bd7648a9570411bb (patch) | |
| tree | c6e33fef6c5e4463b45d12993c85c67e009c675a /adb/commandline.c | |
| parent | 41e3a2c5e8d5f23f3c280dbba10f464570622e39 (diff) | |
| download | system_core-db4492640313be9d3fd65ee5bd7648a9570411bb.tar.gz system_core-db4492640313be9d3fd65ee5bd7648a9570411bb.tar.bz2 system_core-db4492640313be9d3fd65ee5bd7648a9570411bb.zip | |
Allow adb to use ANDORID_SERIAL env variable to specify the device to talk to.
Overridden by -s.
Diffstat (limited to 'adb/commandline.c')
| -rw-r--r-- | adb/commandline.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/adb/commandline.c b/adb/commandline.c index 7410dce5..41b340ab 100644 --- a/adb/commandline.c +++ b/adb/commandline.c @@ -96,7 +96,8 @@ void help() " -e - directs command to the only running emulator.\n" " returns an error if more than one emulator is running.\n" " -s <serial number> - directs command to the USB device or emulator with\n" - " the given serial number\n" + " the given serial number. Overrides ANDROID_SERIAL\n" + " envivornment variable.\n" " -p <product name or path> - simple product name like 'sooner', or\n" " a relative/absolute path to a product\n" " out directory like 'out/target/product/sooner'.\n" @@ -766,6 +767,8 @@ int adb_commandline(int argc, char **argv) } // TODO: also try TARGET_PRODUCT/TARGET_DEVICE as a hint + serial = getenv("ANDROID_SERIAL"); + /* modifiers and flags */ while(argc > 0) { if(!strcmp(argv[0],"nodaemon")) { |
