Commit Graph

2106 Commits

Author SHA1 Message Date
Elliott Hughes a6d5587f78 resolve merge conflicts of b40756a to nyc-dev-plus-aosp
am: fe807214ef

Change-Id: Ibcfd7f5c9c67084c754b2b60ff1e9eed976e3249
2016-09-30 17:07:03 +00:00
Elliott Hughes fe807214ef resolve merge conflicts of b40756a to nyc-dev-plus-aosp
Change-Id: Ic1aa6fd6ab66ca8fb7cf434a3d0679a41288e4a7
2016-09-30 10:00:02 -07:00
Elliott Hughes b40756ac28 resolve merge conflicts of 50cb973 to stage-aosp-master
Change-Id: Idf0d02687cc47f64acfdd3da623c7a7a62043651
2016-09-30 09:08:23 -07:00
Elliott Hughes 4bf9bc1ac7 Improve "adb help" output.
The specific request was to document $ADB_VENDOR_KEYS, but since I'm here,
let's try to make the help output shorter but more useful...

Bug: http://b/18437888
Test: adb help
Change-Id: I77135d4e666f19524f880228d27d87ba881672b5
2016-09-28 15:29:19 -07:00
David Pursell 5cab7cc637 Merge "adb: fix host-side serial number parsing for IPv6." am: b1c4d90215 am: 94c652ed31
am: dde69001c2

Change-Id: I869720698bb91b0e968c51740b916ab58ea89d5a
2016-09-28 17:46:46 +00:00
David Pursell dde69001c2 Merge "adb: fix host-side serial number parsing for IPv6." am: b1c4d90215
am: 94c652ed31

Change-Id: I87e3bbc33077830ca95e06807cb9863f42b87bf4
2016-09-28 17:41:16 +00:00
David Pursell 94c652ed31 Merge "adb: fix host-side serial number parsing for IPv6."
am: b1c4d90215

Change-Id: I62454f520192df9b600280b59704e7c0fe55687f
2016-09-28 17:35:47 +00:00
Treehugger Robot b1c4d90215 Merge "adb: fix host-side serial number parsing for IPv6." 2016-09-28 17:30:29 +00:00
Josh Gao a539d4c04c Merge "adb: fix IOKit handle leaks on OS X." am: a2aff3f809 am: 279a1ea5b0
am: dbb34a87b4

Change-Id: I18ab725e1895f58519cab7f2bd29065058d70700
2016-09-27 20:52:26 +00:00
Josh Gao dbb34a87b4 Merge "adb: fix IOKit handle leaks on OS X." am: a2aff3f809
am: 279a1ea5b0

Change-Id: Ia45f5ae1943a0d5292da230e902751e127702be4
2016-09-27 20:45:55 +00:00
Josh Gao 279a1ea5b0 Merge "adb: fix IOKit handle leaks on OS X."
am: a2aff3f809

Change-Id: I24587b122c3d4d57eef137456c3628e4010d7b5c
2016-09-27 20:43:24 +00:00
Josh Gao a2aff3f809 Merge "adb: fix IOKit handle leaks on OS X." 2016-09-27 20:38:37 +00:00
Josh Gao b6a2f59515 adb: fix IOKit handle leaks on OS X.
Bug: https://code.google.com/p/android/issues/detail?id=219085
Test: Removed sleep in RunLoopThread, compared before/after this patch
Change-Id: Ia65bbedfb7d47bdb02bdfb69778784e5e855900b
2016-09-27 12:36:58 -07:00
Elliott Hughes 9daaf229d0 Merge "Switch adb to <android-base/properties.h>." am: d9a23b5733 am: 5dc7e6a79a
am: 8b7751d360

Change-Id: Ie02bbd139d522d930649ecb06da3f853d6995034
2016-09-26 22:25:21 +00:00
Elliott Hughes 8b7751d360 Merge "Switch adb to <android-base/properties.h>." am: d9a23b5733
am: 5dc7e6a79a

Change-Id: Ie2718d9f843b11feca003805569bb35acde62463
2016-09-26 22:22:48 +00:00
Elliott Hughes 5dc7e6a79a Merge "Switch adb to <android-base/properties.h>."
am: d9a23b5733

Change-Id: I09a1832143d9f54cd67128602c9e518a1b398b5c
2016-09-26 22:19:04 +00:00
Elliott Hughes ffdec18017 Switch adb to <android-base/properties.h>.
Bug: http://b/23102347
Test: manual
Change-Id: Iffa66258c01f84f41b9af99ab5e768a0a2669106
2016-09-26 13:14:14 -07:00
Tao Wu 0e0cf74c52 Merge "Ignore setsid error in some cases." am: 3562fd0fa8 am: 324acdce69
am: f7756b89e9

Change-Id: I7bc3c1f46fec39fb8fd2fe597633b067ad0a8bda
2016-09-22 22:53:08 +00:00
Josh Gao 6d317aca93 Merge "adb: kill adb_mutex_t, adb_cond_t." am: 7e4d1db957 am: 72c679d6d0
am: 71970fc473

Change-Id: I77f0221da27abb337ce7d8896cd6ad94c04548cf
2016-09-22 22:52:16 +00:00
Tao Wu f7756b89e9 Merge "Ignore setsid error in some cases." am: 3562fd0fa8
am: 324acdce69

Change-Id: I330be058b8c0d7b175845b30d59f091432d62f6c
2016-09-22 11:55:23 +00:00
Josh Gao 71970fc473 Merge "adb: kill adb_mutex_t, adb_cond_t." am: 7e4d1db957
am: 72c679d6d0

Change-Id: I3b726d03c8dc299191a68488e28fe83c3bd89a77
2016-09-22 11:54:05 +00:00
Tao Wu 324acdce69 Merge "Ignore setsid error in some cases."
am: 3562fd0fa8

Change-Id: I8ff768ce0e4ddd5e2810e40302bf597e2f39387b
2016-09-22 08:22:14 +00:00
Josh Gao 72c679d6d0 Merge "adb: kill adb_mutex_t, adb_cond_t."
am: 7e4d1db957

Change-Id: I3e10b6e3039e3aeb966f8ca27df69b61fa8aa0cc
2016-09-22 08:21:30 +00:00
Treehugger Robot 3562fd0fa8 Merge "Ignore setsid error in some cases." 2016-09-22 06:28:51 +00:00
Treehugger Robot 7e4d1db957 Merge "adb: kill adb_mutex_t, adb_cond_t." 2016-09-22 02:15:00 +00:00
Josh Gao 0cd3ae1c28 adb: kill adb_mutex_t, adb_cond_t.
Now that we have support for std::mutex and std::condition_variable on
Windows, remove our mutex compatibility layer in favor of the C++ one.

Bug: http://b/31653591
Test: mma && $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test && \
      python test_adb.py && python test_device.py
      (also on Windows)

Change-Id: I5b7ed9c45cc2a32edcf4e77b56dc28e441f15f34
2016-09-21 17:22:22 -07:00
Josh Gao 88e36027ed Merge "adb: parse tcp socket specs with base::ParseNetAddress." am: efee71c2de am: 67ed583564
am: 837f2cef9a

Change-Id: I4d7da8197397c2ab84f46733eeb3cd0eba82a01f
2016-09-21 20:38:59 +00:00
Josh Gao 837f2cef9a Merge "adb: parse tcp socket specs with base::ParseNetAddress." am: efee71c2de
am: 67ed583564

Change-Id: Ia820151b0c5fae600adb204421759b9cc5c92ad7
2016-09-21 20:31:28 +00:00
Josh Gao 67ed583564 Merge "adb: parse tcp socket specs with base::ParseNetAddress."
am: efee71c2de

Change-Id: I911b1bed18e1d1d55c585d78479a85d4d8ba2875
2016-09-21 20:28:57 +00:00
Josh Gao efee71c2de Merge "adb: parse tcp socket specs with base::ParseNetAddress." 2016-09-21 20:26:36 +00:00
David Pursell 73d55aaab2 adb: fix host-side serial number parsing for IPv6.
When the adb client sends a command to the adb server targeting a
particular device serial, it looks something like this:
  host-serial:<serial>:<command>

But if <serial> happens to be an IPv6 address (e.g. when `adb connect`
targets IPv6), the current parsing code doesn't handle the additional
colons properly. This CL fixes the host-serial parsing to handle this
case.

This only affects commands that explicitly name a device serial, e.g.:
  adb -s <IPv6> shell
  adb -s <IPv6> forward <port> <port>
Implicitly using a single attached device was unaffected by this bug.

Bug: http://b/30891386
Test: `adb -s [fe80::ba27:ebff:feb1:934%eth2]:5555 shell` works now,
      and new unittests pass.
Change-Id: Iffe784e61432ae94eb96ed3c8477900a3e807329
2016-09-21 13:00:32 -07:00
Tao Wu c8fab89f1b Ignore setsid error in some cases.
If the calling process has already been a leading process of session.
setsid just fail with EPERM, ignore such error.

Test: killall adb;exec 3>f;adb fork-server server --reply-fd 3 & cat f
Change-Id: I1aeac079f29e10aa63ed724b5a43663f25c25ad5
Signed-off-by: Tao Wu <lepton@google.com>
2016-09-20 18:15:22 -07:00
Josh Gao 11a172e5b7 Merge "base: rename unique_fd::clear() to unique_fd::reset()." am: 14d3a1ac9d am: 8c9ecb9c2c
am: bac29cb665

Change-Id: I078430bfdd43d3fa14a220debc7623f4931158e8
2016-09-21 01:12:57 +00:00
Josh Gao bac29cb665 Merge "base: rename unique_fd::clear() to unique_fd::reset()." am: 14d3a1ac9d
am: 8c9ecb9c2c

Change-Id: I9e4a3f5b303464fe7c3c162446c72157015ffec2
2016-09-21 01:10:23 +00:00
Josh Gao 8c9ecb9c2c Merge "base: rename unique_fd::clear() to unique_fd::reset()."
am: 14d3a1ac9d

Change-Id: Ic00aaca61c8e9eb68c30de00b825fc73d8b3cace
2016-09-21 01:07:18 +00:00
Josh Gao 14d3a1ac9d Merge "base: rename unique_fd::clear() to unique_fd::reset()." 2016-09-21 01:03:06 +00:00
Josh Gao 1099215e30 adb: parse tcp socket specs with base::ParseNetAddress.
libbase already has IPv6-aware address parsing, so use it instead of
adb's handrolled IPv4-only parsing.

Bug: http://b/31537253
Change-Id: I4e9ce56b55d7d02787c0fa67b724490bf49ce479
Test: mma && adb start-server && \
      adb -L 'tcp:[::ffff:127.0.0.1]:5037' devices && \
      adb -L 'tcp:localhost:5037' devices && \
      adb -L 'tcp:127.0.0.1:5037' devices && \
      adb -L 'tcp:5037' devices && \
      $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test
2016-09-20 13:55:43 -07:00
Tao Wu 502231b6be Merge "Fix bug: Doesn't respect ANDROID_ADB_SERVER_PORT" am: 4159568548 am: bcc419edad
am: 18b1a9901e

Change-Id: If85d3cf002bde9ee29b9aa4062e360646a1ebff0
2016-09-20 00:56:43 +00:00
Tao Wu 18b1a9901e Merge "Fix bug: Doesn't respect ANDROID_ADB_SERVER_PORT" am: 4159568548
am: bcc419edad

Change-Id: Ib9ea8fb0b2a571417a1bfd0c1e5a6fd75eb08ef4
2016-09-19 21:02:24 +00:00
Tao Wu bcc419edad Merge "Fix bug: Doesn't respect ANDROID_ADB_SERVER_PORT"
am: 4159568548

Change-Id: I8f2b4b1a5914642790e18e58d376ffcd37311d1f
2016-09-19 20:53:48 +00:00
Treehugger Robot 4159568548 Merge "Fix bug: Doesn't respect ANDROID_ADB_SERVER_PORT" 2016-09-19 20:35:11 +00:00
Josh Gao 5d1b1a8b91 base: rename unique_fd::clear() to unique_fd::reset().
unique_fd is modeled on unique_ptr, so make this consistent.

Test: m checkbuild
Change-Id: Ia6a77095dc18746fbb432e96bb8dccfc049c57f6
2016-09-19 11:24:58 -07:00
Tao Wu 135f4ab3dd Fix bug: Doesn't respect ANDROID_ADB_SERVER_PORT
BUG: 31549442
Test: export ANDROID_ADB_SERVER_PORT=12345;killall adb;adb devices

Change-Id: If2bfaf44c6567af16cae0d4def2f11be39c2d437
Signed-off-by: Tao Wu <lepton@google.com>
2016-09-16 17:13:48 -07:00
Pirama Arumuga Nainar 48b0a6b471 Merge "Use <condition_variable> and <mutex.h> from MinGW" am: a3d7b240f1 am: 331ec060ca
am: 11836956bc

Change-Id: I9317665b9cf3f415b3c3e64e95a5ee4f2e3c2798
2016-09-16 22:24:27 +00:00
Pirama Arumuga Nainar 11836956bc Merge "Use <condition_variable> and <mutex.h> from MinGW" am: a3d7b240f1
am: 331ec060ca

Change-Id: I8205259a82445aa6ff50509c58c58bb1429f3c49
2016-09-16 22:21:24 +00:00
Pirama Arumuga Nainar 331ec060ca Merge "Use <condition_variable> and <mutex.h> from MinGW"
am: a3d7b240f1

Change-Id: I319a164694fe67a008915249811dc39567184d08
2016-09-16 22:15:21 +00:00
Pirama Arumuga Nainar a3d7b240f1 Merge "Use <condition_variable> and <mutex.h> from MinGW" 2016-09-16 21:59:35 +00:00
Josh Gao 264b3465dd adb: let `adb push` follow symlinks. am: 94dc19ff57 am: 30ecda227c
am: 3e64efbced

Change-Id: Ifbedcf881b2724f6203059037b37032b7a2d3ddd
2016-09-15 02:32:35 +00:00
Josh Gao 3e64efbced adb: let `adb push` follow symlinks. am: 94dc19ff57
am: 30ecda227c

Change-Id: I10dfdd0265403628c2ef163771cdb576c90419c6
2016-09-15 02:29:35 +00:00
Josh Gao 30ecda227c adb: let `adb push` follow symlinks.
am: 94dc19ff57

Change-Id: I408ebb7b3091e67bd7025b3a6404f57c7f3af377
2016-09-15 02:27:33 +00:00