Commit graph

2162 commits

Author SHA1 Message Date
Josh Gao
8baf1198ee adb: fix test_sighup.
am: 470622f064

Change-Id: I342cbd04804e3d8d92d04ab088c6980d67bbc8e8
2016-10-24 21:18:58 +00:00
Josh Gao
a06580956e adb: fix race condition in test_non_interactive_sigint.
am: e76b9f3dde

Change-Id: Ib2b6c1118cb48c337c12efbd223c87fee76837f2
2016-10-24 21:18:51 +00:00
Josh Gao
470622f064 adb: fix test_sighup.
Bug: http://b/32336914
Test: python test_device.py
Change-Id: I34ba5757b5e650d79327dc6779064acd850ce28e
2016-10-24 13:34:20 -07:00
Josh Gao
e76b9f3dde adb: fix race condition in test_non_interactive_sigint.
Fix race condition in the test_non_interactive_sigint test by
looping for a while.

Bug: http://b/32336914
Test: python test_device.py
Change-Id: Ie65a762ad6f04815231add5444762c4c0ffd31cb
2016-10-24 13:34:17 -07:00
Elliott Hughes
f58d06a918 Merge "Move "adb shell" over to getopt(3), and allow -tt on old devices."
am: 620469a4ac

Change-Id: I4849d18fcd2afe0c1e5d3b2bdf3a3a755e557e91
2016-10-22 18:11:44 +00:00
Elliott Hughes
cabfa1177f Move "adb shell" over to getopt(3), and allow -tt on old devices.
From the bug:

  Say we run a new adb against an old device (like KitKat). Even with a new
  client ADB, in this configuration, "adb shell" will create a remove tty
  unconditionally. So if the user runs "adb shell -t -t", we shouldn't fail
  with a message about the remote device not supporting -tT options --- the
  user asked to create a tty unconditionally, and since we're going to create
  a tty unconditionally, we should just succeed. (That it's going to succeed
  due to protocol inadequacy instead of succeeding on purpose is irrelevant.)

  That adb fails in this case makes scripts more complicated, since they can't
  just pass "-t -t" unconditionally if they want a tty and to work on all
  device versions, even if the script requires a new-ish adb locally.

Bug: http://b/32216152
Bug: http://b/32219151
Test: test_device.py
Change-Id: I8ab7c8dfa212209a7ab43c1f0832eeac26d2e42f
2016-10-21 14:22:40 -07:00
Ting-Yuan Huang
e02e11835d Merge "adb: fix undefined behavior"
am: 1edd61ce5d

Change-Id: I35cbda2fa031dc8627aaaffb5e50be98ddb20430
2016-10-20 04:38:12 +00:00
Ting-Yuan Huang
ef57d54f80 adb: fix undefined behavior
system/core/adb/shell_service_protocol_test.cpp:94:14: warning: Null
passed to a callee that requires a non-null 1st parameter
            !memcmp(data, protocol->data(), data_length));

C99 requires memcmp() to take non-null pointers.

Bug: none
Test: clang-tidy doesn't complain
Change-Id: I77b8d9373fa257a070ffc7fd318231c2c9ea84c3
2016-10-19 19:39:44 -07:00
Mark Salyzyn
8648bddf24 adb: use __android_log_is_debuggable()
am: 97787a00e6

Change-Id: I326735c9b0e6163ab5b2215a6bed44ea710409d2
2016-10-18 16:46:15 +00:00
Mark Salyzyn
97787a00e6 adb: use __android_log_is_debuggable()
Test: compile and months of adb functionality use
Bug: 27566046
Bug: 31456426
Change-Id: I6568eea0eda8dc67dec2ba34cd4c3f56fb0ff0e9
2016-10-14 11:12:24 -07:00
Elliott Hughes
19340be9fe Merge "Rely on the platform -std default." am: 955648a915 am: 4594f50635
am: f1dffe0501

Change-Id: Ibbffb45d50ad038d55a4d435a250b59b64547227
2016-10-14 02:56:09 +00:00
Elliott Hughes
f1dffe0501 Merge "Rely on the platform -std default." am: 955648a915
am: 4594f50635

Change-Id: I459e76bcada6d849eccca73a470a910e335482bf
2016-10-14 02:47:44 +00:00
Elliott Hughes
4594f50635 Merge "Rely on the platform -std default."
am: 955648a915

Change-Id: Ic4e9a7fbc7d13cc18ebb84801bf2f2f9a1d04470
2016-10-14 02:45:03 +00:00
Treehugger Robot
955648a915 Merge "Rely on the platform -std default." 2016-10-14 02:28:38 +00:00
Tao Wu
4b9774fe97 Merge "Fallback to IPv6 when IPv4 is not available in adb" am: c32d7fd66f am: 5b7c6772b0
am: 27c6c4cf04

Change-Id: I2ceb40b4589dfc2721197065ae5a85e9dc83b907
2016-10-14 01:51:54 +00:00
Elliott Hughes
a4398c1abe Merge "Move off std::sto* function which abort on failure." 2016-10-14 01:51:10 +00:00
Tao Wu
27c6c4cf04 Merge "Fallback to IPv6 when IPv4 is not available in adb" am: c32d7fd66f
am: 5b7c6772b0

Change-Id: I63e945622d47ab1cbcbdd82d00cfdf3d51c95564
2016-10-14 01:46:26 +00:00
Tao Wu
5b7c6772b0 Merge "Fallback to IPv6 when IPv4 is not available in adb"
am: c32d7fd66f

Change-Id: I21efa80874bfffb88cc63098e0a402a3e8d1c122
2016-10-14 01:43:55 +00:00
Elliott Hughes
da46b392f1 Move off std::sto* function which abort on failure.
Bug: http://b/31403370
Test: builds, boots, libbase tests pass
Change-Id: I89cd7ca3d8f1c8a1bad0ddf3043439449d19a293
2016-10-13 15:34:05 -07:00
Tao Wu
7b700763f5 Fallback to IPv6 when IPv4 is not available in adb
Test: manual - make sure it works in both IPv4/IPv6 env.
BUG: 31537253
Change-Id: Ica492bff34a8c0441516a213d0e8b78fcdfd3282
Signed-off-by: Tao Wu <lepton@google.com>
2016-10-13 08:54:43 -07:00
Elliott Hughes
fc485e4488 Merge "Start retiring socket_loopback_client." am: 58f7f61266 am: cd0e8cfd33
am: aa509a3e9d

Change-Id: Iea3a25f193b9249ba93d49514b2a409d693121e1
2016-10-13 15:00:24 +00:00
Elliott Hughes
aa509a3e9d Merge "Start retiring socket_loopback_client." am: 58f7f61266
am: cd0e8cfd33

Change-Id: Ibd76fcb2aa9abb35a11f3b1e3f771a168f6d96de
2016-10-13 14:50:50 +00:00
Elliott Hughes
cd0e8cfd33 Merge "Start retiring socket_loopback_client."
am: 58f7f61266

Change-Id: I2b3d6ae5e90fb99163eb639e185b93cd55ff724a
2016-10-13 14:43:05 +00:00
Elliott Hughes
58f7f61266 Merge "Start retiring socket_loopback_client." 2016-10-13 14:38:48 +00:00
Lingfeng Yang
7bdbbfb0ef Merge "Fix adb flakiness on reboot" am: f7a1c476ff am: d0dead710b
am: e93241e377

Change-Id: Icd024ed6896a1989f67beb512a399cd0979b2cf1
2016-10-12 00:49:27 +00:00
Lingfeng Yang
e93241e377 Merge "Fix adb flakiness on reboot" am: f7a1c476ff
am: d0dead710b

Change-Id: I7b966be541d89b2f13a9c39218627884e001cc21
2016-10-12 00:44:48 +00:00
Lingfeng Yang
d0dead710b Merge "Fix adb flakiness on reboot"
am: f7a1c476ff

Change-Id: If74046384b04c8bae587c3194c85e1a1865e3cbb
2016-10-12 00:36:30 +00:00
Lingfeng Yang
1197952e71 Fix adb flakiness on reboot
bug: 31950237

There are two lists of active ADB transports (devices),
and with the emulator, they can go out of sync.

This CL more conservatively checks if there are no
transports in either list before commiting to
register a new transport for the emulator.

(cherry picked from commit edaedfd5da)

Change-Id: Id1201dc59c70825881dad80925c2e5bcc13dbd5e
2016-10-11 23:19:51 +00:00
Elliott Hughes
139b372fab Start retiring socket_loopback_client.
Bug: http://b/31537253
Test: can still talk to adb
Change-Id: Icfd7f00d35cf963befc139e81904790b4b8b67c0
2016-10-11 13:45:03 -07:00
Josh Gao
f369babcb8 Merge "Remove useless arguments from is_adb_interface." am: bd6c6eb0e4 am: db50d1d6ef
am: 0a629b4bdd

Change-Id: I54e47bf9d8e056255335e809b9733e2597b3e532
2016-10-11 17:51:40 +00:00
Josh Gao
0a629b4bdd Merge "Remove useless arguments from is_adb_interface." am: bd6c6eb0e4
am: db50d1d6ef

Change-Id: I4a21f8296643bbe185ac79df8888eec07c88ca78
2016-10-11 17:42:47 +00:00
Josh Gao
db50d1d6ef Merge "Remove useless arguments from is_adb_interface."
am: bd6c6eb0e4

Change-Id: I1390870da63506df411dbd94f2b19d147d90009c
2016-10-11 17:36:09 +00:00
Mark Salyzyn
144abd8cb2 Merge "liblog: adb: move security interfaces to private" am: 09dac589f1 am: 586c6985cf
am: 4b5456eacc

Change-Id: Id78628d7e7abfa16f1ada16f894f9616a2dc469b
2016-10-10 23:34:54 +00:00
Mark Salyzyn
4b5456eacc Merge "liblog: adb: move security interfaces to private" am: 09dac589f1
am: 586c6985cf

Change-Id: I8c54bdc1a3582be1fc7c4a9be83b555624fcb0a3
2016-10-10 23:29:55 +00:00
Treehugger Robot
bd6c6eb0e4 Merge "Remove useless arguments from is_adb_interface." 2016-10-10 22:50:13 +00:00
Mark Salyzyn
586c6985cf Merge "liblog: adb: move security interfaces to private"
am: 09dac589f1

Change-Id: I05ad9cee5ffe00e842120aa960d6652517b94a16
2016-10-10 22:04:39 +00:00
Elliott Hughes
36e0d390a2 Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
2016-10-10 14:31:12 -07:00
Josh Gao
30186df0f0 Remove useless arguments from is_adb_interface.
Test: mma
Change-Id: I8b7b411d7d5ec9d401b61ed8f817b98c61114d4f
2016-10-10 13:44:00 -07:00
Mark Salyzyn
6debf985aa liblog: adb: move security interfaces to private
Test: Compile & adb functioning
Bug: 19235719
Bug: 26552300
Bug: 31289077
Bug: 31456426
Change-Id: I7ad8963bcca3d8b5c37b547c11d163b652d35556
2016-10-10 15:15:45 +00:00
Josh Gao
f883e2f65c Merge "adb: rationalize types." am: 8caf4e7443 am: e335bea277
am: 010818f313

Change-Id: I1edebee150c7b36cfa3ca58626eaebf5e9ce647f
2016-10-07 20:48:19 +00:00
Josh Gao
010818f313 Merge "adb: rationalize types." am: 8caf4e7443
am: e335bea277

Change-Id: I045ccbebbc1005a501768da3222a211e49821895
2016-10-07 20:44:43 +00:00
Josh Gao
e335bea277 Merge "adb: rationalize types."
am: 8caf4e7443

Change-Id: I2e363c31a22b57964688f170c6f96cd8764959e0
2016-10-07 20:41:16 +00:00
Josh Gao
06d61d4d96 adb: rationalize types.
Use fixed length types for structs going over the wire, constify
arguments where possible, use char* instead of unsigned char* for
apacket data, and assorted other refactoring.

Bug: http://b/29273531
Test: python test_device.py with every combination of old/new adb and adbd
Change-Id: I0b6f818a32be5386985aa4519f542003cf427f9d
2016-10-06 14:50:02 -07:00
Josh Gao
e1afd17d75 Merge "adb: split up adb_auth.cpp." am: 4a8b178c97 am: 4546c8ac3d
am: 58a5e5a50b

Change-Id: Ibb499732491fc584be2b1e61f95bb9375fad16ec
2016-10-06 19:54:06 +00:00
Josh Gao
58a5e5a50b Merge "adb: split up adb_auth.cpp." am: 4a8b178c97
am: 4546c8ac3d

Change-Id: Idb9ed3e21524893943ecd176d9abe6a1e3b5493b
2016-10-06 19:50:37 +00:00
Josh Gao
4546c8ac3d Merge "adb: split up adb_auth.cpp."
am: 4a8b178c97

Change-Id: I846a06ca04aad456c6659dd6db4c8d0666fc6707
2016-10-06 19:47:11 +00:00
Treehugger Robot
4a8b178c97 Merge "adb: split up adb_auth.cpp." 2016-10-06 19:37:31 +00:00
Josh Gao
3bd2879d8e adb: split up adb_auth.cpp.
All of the functions in adb_auth.cpp were used in only one of
adb/adbd. Split up them up into adb_auth_host.cpp and adbd_auth.cpp
respectively.

Bug: http://b/29273531
Test: built and flashed bullhead, adb still works
Change-Id: Ib610c5157522634cc273511175152f1306cc52a7
2016-10-06 12:36:26 -07:00
Tao Bao
4fa6e4855b Merge "adb: Remove the obsolete include path to ext4_utils." am: 9f828a5383 am: a00020317e
am: 9766909149

Change-Id: I1059d176220327d6f1ecb5c56dde2bebf31c371f
2016-10-06 06:29:57 +00:00
Tao Bao
9766909149 Merge "adb: Remove the obsolete include path to ext4_utils." am: 9f828a5383
am: a00020317e

Change-Id: I474494405de42c794af3160898a867e766c558b1
2016-10-06 06:26:25 +00:00