Commit Graph

3827 Commits

Author SHA1 Message Date
android-build-team Robot 56fa8079a1 Make change and version bump to r_aml_300802300 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I007eb3724220351cd44183c1d4455b795c34220f
2020-06-22 03:15:28 +00:00
android-build-team Robot ff388b339d Make change and version bump to r_aml_300802200 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I19f83a4b7dc4be37734945e9c1ee2bf0a676ae9a
2020-06-20 03:20:06 +00:00
Treehugger Robot 8f5ed79e34 Merge "Explicitly show the destination filename for a bugreport." am: ca876d8037 am: 3ff439fe77
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1343880

Change-Id: I3ae6bb2b38c4d3df65c78e5cdb2bb6436f05638a
2020-06-19 21:15:26 +00:00
android-build-team Robot 86c26e68fd Make change and version bump to r_aml_300802100 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I59280498d251551e09708a21ec060d9640bb64e9
2020-06-19 07:16:03 +00:00
Elliott Hughes d4171773a5 Explicitly show the destination filename for a bugreport.
It's in the progress output, but typically gets truncated.

Bug: https://issuetracker.google.com/131112559
Test: adb bugreport
Change-Id: I35ba4f39941aea68f2412e7b64feaac4da2f82e3
2020-06-18 11:05:38 -07:00
android-build-team Robot 6204414809 Make change and version bump to r_aml_300802000 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I74a98a83b018b40df0711373ab9b5b7103d68836
2020-06-18 07:15:57 +00:00
android-build-team Robot 1687e42a75 Make change and version bump to r_aml_300801900 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I6304f8f10109fbdb5ecedb9e829b3d6334a761ad
2020-06-17 19:56:28 +00:00
android-build-team Robot 2a613052e0 Make change and version bump to r_aml_300801800 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I67412c29ed3bd211cd34196b5685d8750c37de6c
2020-06-17 07:17:09 +00:00
Joshua Duong a60f2d8c50 Merge "[adb] Check for null in mdns connect info." am: cf88259783 am: 4f1c40957a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1340738

Change-Id: I15b95626a658646b98ff628e3c05d56d7a29a930
2020-06-17 01:48:21 +00:00
Joshua Duong 282385f823 [adb] Check for null in mdns connect info.
Adb client does not use these values, so just ignore it.

Bug: b/158824677

Test: 'adb -H 127.0.0.1 -P 5037 devices' does not crash.
Change-Id: I4dada6e5e1714157bbf1af370510dfa7bfbd6b17
2020-06-16 16:40:46 -07:00
android-build-team Robot 157a105d46 Make change and version bump to r_aml_300801700 for mainline module file: adb/apex/apex_manifest.json
Change-Id: Ia721a85c7321b1316ef186221edd2f9f49c552f9
2020-06-16 07:15:04 +00:00
android-build-team Robot ec54be6082 Make change and version bump to r_aml_300801600 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I85ad9bdcb8d2bb3a24e1664b9ba3280b1a540cb9
2020-06-15 07:15:15 +00:00
android-build-team Robot 42f32a6bd1 Make change and version bump to r_aml_300801500 for mainline module file: adb/apex/apex_manifest.json
Change-Id: Ic2c480c0922ac22ab9d2ef8420555d7722d6f2ab
2020-06-14 07:20:18 +00:00
Josh Gao b2d6d25eeb Merge "adb: avoid crash when authenticating without vendor keys." am: 046cc11982 am: dada5fd17e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1331888

Change-Id: I917a3a1d8f51fa883565c4ec69fb43fd2699edc6
2020-06-12 21:58:31 +00:00
android-build-team Robot f46bbc5609 Make change and version bump to r_aml_300801400 for mainline module file: adb/apex/apex_manifest.json
Change-Id: If42da0d917943a6f207d293e846f7fd6e94f1481
2020-06-12 07:20:00 +00:00
Josh Gao 30b0bbd4a2 adb: avoid crash when authenticating without vendor keys.
Bug: http://b/158232136
Test: manual
Change-Id: Ic8211335494a6acb703af5b82f52856223f538bb
2020-06-11 21:31:09 -07:00
android-build-team Robot 3bb237b409 Make change and version bump to r_aml_300801300 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I62b89c36bf58a535f519b32e62340be5a8aa1f1a
2020-06-11 07:14:55 +00:00
android-build-team Robot ee029c3028 Make change and version bump to r_aml_300801200 for mainline module file: adb/apex/apex_manifest.json
Change-Id: Iec096d5b01866095a23dcecd7fce8a581e0fedad
2020-06-10 07:15:19 +00:00
TreeHugger Robot ab7a967d1c Merge "adbd: remove ifdefs guarding root/secure." into rvc-dev 2020-06-09 21:42:05 +00:00
Josh Gao 4ff61ec921 Merge "adbd: remove ifdefs guarding root/secure." am: 536f220f55 am: 3ea63f1637
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1324037

Change-Id: Ie1d6eb5c7a1aea093ec3a3a816ec9c613f2e93c5
2020-06-09 20:31:38 +00:00
Josh Gao b6b70c23c9 adbd: remove ifdefs guarding root/secure.
The same adbd module prebuilt will get used for both user and userdebug
builds in the post-APEX world, so we can't guard functionality with
product variable ifdefs anymore.

The code that was previously compiled out runs before we drop root, so
the increased attack surface essentially consists of an attacker having
control over system properties, and that likely implies that we're
doomed already (either they have filesystem control, or they have code
execution in init).

Bug: http://b/158156979
Test: treehugger
Change-Id: Ia70d3140189e5212beb813ff719355e30ca5fa04
(cherry picked from commit d076857c4f)
2020-06-09 13:05:47 -07:00
Josh Gao 536f220f55 Merge "adbd: remove ifdefs guarding root/secure." 2020-06-09 20:05:29 +00:00
android-build-team Robot 51dc7597bb Make change and version bump to r_aml_300801100 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I1ce79b75b9069fd0aa5a337aa7d86159936e3a99
2020-06-09 07:15:41 +00:00
Josh Gao d076857c4f adbd: remove ifdefs guarding root/secure.
The same adbd module prebuilt will get used for both user and userdebug
builds in the post-APEX world, so we can't guard functionality with
product variable ifdefs anymore.

The code that was previously compiled out runs before we drop root, so
the increased attack surface essentially consists of an attacker having
control over system properties, and that likely implies that we're
doomed already (either they have filesystem control, or they have code
execution in init).

Bug: http://b/158156979
Test: treehugger
Change-Id: Ia70d3140189e5212beb813ff719355e30ca5fa04
2020-06-08 17:57:33 -07:00
Josh Gao 5af3d723a7 Merge "Move libadbd_auth, libadbd_fs to adbd_system_binaries." am: b99f194d05 am: c10af3984c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322057

Change-Id: I71d4dcd2a5036591a941969489049045ccb21cff
2020-06-08 21:31:28 +00:00
Josh Gao 0217d52d01 Move libadbd_auth, libadbd_fs to adbd_system_binaries.
The required block inside the definition of "adbd" does nothing: we get
the libraries it contains via direct dependency when building from
source, and not at all when using a prebuilt. Move them to a phony
rule that's explicitly listed in PRODUCT_PACKAGES.

Bug: http://b/157709367
Test: treehugger
Change-Id: I97c0889558482cfbe18ae91b39b6889d3fee877c
(cherry picked from commit e572f2fc44)
2020-06-08 21:24:26 +00:00
Josh Gao b99f194d05 Merge "Move libadbd_auth, libadbd_fs to adbd_system_binaries." 2020-06-08 21:00:19 +00:00
android-build-team Robot 4b1e2ec8fb Make change and version bump to r_aml_300801000 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I4a8b369adf64c0ad9c7b8c1657c3ddd0d211c43e
2020-06-08 07:15:27 +00:00
android-build-team Robot 124e98a392 Make change and version bump to r_aml_300800800 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I597fd46b14de4a3c56e88a982aa3f7b63ae3ffb3
2020-06-07 07:16:04 +00:00
android-build-team Robot b92540d372 Make change and version bump to r_aml_300800500 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I7a1c00023f8f74601938400a19756b27214c578d
2020-06-05 16:29:33 +00:00
android-build-team Robot dfe888fd97 Make change and version bump to r_aml_300800400 for mainline module file: adb/apex/apex_manifest.json
Change-Id: I116f19c2a51422319f63eaf558b1254977aecb5d
2020-06-05 07:30:08 +00:00
android-build-team Robot f7fbd135ad Make change and version bump to r_aml_300800200 for mainline module file: adb/apex/apex_manifest.json
Change-Id: Ieaeb532bba164be995f2b6d34478ccfb771b859f
2020-06-04 21:51:12 +00:00
Josh Gao a311f7866f check_ms_os_desc: fix buffer overflow.
Bug: http://b/155505587
Test: check_ms_os_desc
Change-Id: Ie99715ab62571d24460c3a1fb859d22951f30cb8
Merged-In: Ie99715ab62571d24460c3a1fb859d22951f30cb8
2020-06-03 15:32:06 -07:00
Treehugger Robot 7b50bbc0b8 Merge "adb: treat non-successful inc-server runs as failures" am: ff502379b7 am: f24a7e1f62
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322109

Change-Id: Icdb9228e8fe5c6dcc123b4caff8a80822da3152c
2020-06-03 21:59:40 +00:00
Yurii Zubrytskyi 924915bacd adb: treat non-successful inc-server runs as failures
This way if an unknown device returns anything but a clear
success report from an incremental installation adb would retry
non-incrementally

Bug: 158006039
Test: manual install on R and Q
Change-Id: I9950273bd60ba75fe12a3706d2ccbee136987d13
2020-06-02 23:38:51 -07:00
Josh Gao b8f17f0f96 Merge "adb: implement zstd compression for file sync." am: 450e83eb8f am: 0b3202f826
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1319091

Change-Id: I4011703fe6eb090f67aed20f7f79aaa29281cadc
2020-06-03 02:18:54 +00:00
Josh Gao 450e83eb8f Merge "adb: implement zstd compression for file sync." 2020-06-03 01:56:31 +00:00
Treehugger Robot a686f1d778 Merge "check_ms_os_desc: fix buffer overflow." am: f7fed04ace am: f476677b4e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322275

Change-Id: I7e20cca3789e25f8dc1c14880117b2c5f6c1736a
2020-06-03 01:51:12 +00:00
Treehugger Robot f7fed04ace Merge "check_ms_os_desc: fix buffer overflow." 2020-06-03 01:09:48 +00:00
Alex Buynytskyy 999eda1302 Merge "Signature checks." am: 0aa0581404 am: 3fc21d4802
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1321890

Change-Id: Ifb105e95a0b495320e0ed69483d63b1ca3081721
2020-06-03 00:56:50 +00:00
Alex Buynytskyy 7405a92e35 Signature checks.
- signature size validation,
- no-signature files support (e.g. .dm).

Bug: 157077910 150803885
Fixes: 157077910
Test: atest adb_test adbd_test

Change-Id: I03a4f32a87568bd6f447f66c8aab666fb0b27199
2020-06-02 23:12:58 +00:00
Josh Gao a2929d5751 check_ms_os_desc: fix buffer overflow.
Bug: http://b/155505587
Test: check_ms_os_desc
Change-Id: Ie99715ab62571d24460c3a1fb859d22951f30cb8
2020-06-02 15:24:47 -07:00
Treehugger Robot f8edf1fc16 Merge "adb: don't use parameterized in test_adb.py." am: 648266ab1c am: 1d73552164
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322179

Change-Id: Ic531714dd7526f0aa627c5d60e90fd3052911439
2020-06-02 22:01:22 +00:00
Josh Gao 3f2f3bacf9 adb: don't use parameterized in test_adb.py.
The test bots don't have this module installed.

Test: treehugger
Change-Id: I849a075b784eac296608e45bec7b2fce38f56ac4
2020-06-02 13:14:45 -07:00
Josh Gao e572f2fc44 Move libadbd_auth, libadbd_fs to adbd_system_binaries.
The required block inside the definition of "adbd" does nothing: we get
the libraries it contains via direct dependency when building from
source, and not at all when using a prebuilt. Move them to a phony
rule that's explicitly listed in PRODUCT_PACKAGES.

Bug: http://b/157709367
Test: treehugger
Change-Id: I97c0889558482cfbe18ae91b39b6889d3fee877c
2020-06-01 18:59:21 -07:00
Josh Gao 317d3e176f adb: implement zstd compression for file sync.
Bug: http://b/150827486
Test: test_device.py
Change-Id: I9fac4c760d9dbdce0b3b883db975cfa9b27a9e80
2020-05-28 13:00:01 -07:00
TreeHugger Robot d4c8a20d4b Merge changes I1118f2e2,I6c039b32 into rvc-dev
* changes:
  adb: only submit USB writes on the worker thread.
  adbd: don't use libc++_static.
2020-05-27 05:15:55 +00:00
Josh Gao 6da375fdc9 adb: only submit USB writes on the worker thread.
After USB disconnection, io_submit will block until the endpoint comes
back up. We handle this in the worker thread by sending it a signal to
break it out of io_submit when we notice that USB has gone down, but
opportunistic writes from the main thread can get stuck in this scenario
as well. Submitting the writes only on the worker thread doesn't have a
measurable impact on performance, so avert this scenario by only
submitting writes from the worker thread.

Bug: http://b/157078255
Test: test_device.py
Change-Id: I1118f2e2a70d13f15592eb996e7084033ed5cb9d
(cherry picked from commit 962551000b)
2020-05-21 14:55:46 -07:00
Josh Gao 2081cf31b3 adbd: don't use libc++_static.
We have dependencies that use libc++_shared, which results in ODR
violation manifesting as host adbd crashing on launch in libc++ locale
initialization.

Bug: http://b/151056300
Test: adbd on host
Change-Id: I6c039b325308fb8c36dfe5c1d090ff4ebe9e3433
(cherry picked from commit d5d5ba1644)
2020-05-21 14:55:38 -07:00
Treehugger Robot 965a67c5d7 Merge "adb: only submit USB writes on the worker thread." am: 4ea509e25d am: 9640c76e05
Change-Id: Ia5c7627a16512d14542fe4335bbe82fa59b571ca
2020-05-21 00:09:53 +00:00
Treehugger Robot 4ea509e25d Merge "adb: only submit USB writes on the worker thread." 2020-05-20 23:34:37 +00:00
Josh Gao 00e66f971d Merge "adb: fix flakiness in PTY shell protocol." am: b27365510d am: 9e3e8c40e2
Change-Id: I0f7abb9f0b2cc7a4c18129ac62ce5235c10d36fe
2020-05-20 21:38:22 +00:00
Josh Gao 962551000b adb: only submit USB writes on the worker thread.
After USB disconnection, io_submit will block until the endpoint comes
back up. We handle this in the worker thread by sending it a signal to
break it out of io_submit when we notice that USB has gone down, but
opportunistic writes from the main thread can get stuck in this scenario
as well. Submitting the writes only on the worker thread doesn't have a
measurable impact on performance, so avert this scenario by only
submitting writes from the worker thread.

Bug: http://b/157078255
Test: test_device.py
Change-Id: I1118f2e2a70d13f15592eb996e7084033ed5cb9d
2020-05-20 21:03:18 +00:00
Josh Gao b27365510d Merge "adb: fix flakiness in PTY shell protocol." 2020-05-20 21:01:23 +00:00
Treehugger Robot efa13fc083 Merge "adb: fix abb test." am: fc4e54ecb0 am: 6016dd02a4
Change-Id: I4a90821d987596381e0bb4a64c47eecce082b5e3
2020-05-20 16:54:58 +00:00
Josh Gao be41ae5666 adb: fix flakiness in PTY shell protocol.
When a subprocess closes its PTY slave, the master fd will report
POLLHUP when polled. This leads to us prematurely tearing everything
down, without reading out output that's been written to the PTY.

Resolve this by waiting until the fd no longer reports POLLIN.

Bug: http://b/156551485
Bug: http://b/156552734
Test: `adb shell 'X=0; while /data/nativetest64/adbd_test/adbd_test --gtest_filter="ShellServiceTest.*Pty*" >/dev/null 2>&1; do X=$((X+1)); echo $X; done'` for 1000 iterations (failed within 20, previously)
Test: test_device.py
Change-Id: Ie591e0cafb532cd6cebdf6f356dc967565b5a2d9
2020-05-19 20:54:40 -07:00
Josh Gao 8f83498cbd adb: fix abb test.
Don't hardcode cmd's output.

Bug: http://b/157092201
Test: python3 -m unittest test_device.AbbTest
Change-Id: I7145e8d2a31b1c1b459c1e55af3670b95e653eee
2020-05-19 20:12:52 -07:00
Treehugger Robot a0cd4dce62 Merge "Optimizing install-multi-package to use ABB." am: bd05d33ce7 am: 947a960f19
Change-Id: Ic956b36a17bd6d3318e5478d3842532816c29f51
2020-05-19 07:15:16 +00:00
Treehugger Robot 93ea2758f4 Merge "Incremental install mode for install-multi." am: 3eb41352c5 am: 22e35247eb
Change-Id: I73c2a84541873fa5a9ddf2952d34a79942485cc7
2020-05-19 06:31:15 +00:00
Alex Buynytskyy a64d4f81a4 Optimizing install-multi-package to use ABB.
Bug: 150803885
Test: atest adb_test adbd_test
Test: adb install-multi-package Picsart_9.30.5.apk Pinterest_6.54.0.apk
Change-Id: I2fcd093e61afdd16d481194e1d5f8f66acf6a66c
2020-05-19 04:29:34 +00:00
Alex Buynytskyy c06d01e2d9 Incremental install mode for install-multi.
Bug: 150803885
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I242104267273bac21ab41390d3e77a434ffa565d
2020-05-19 04:29:27 +00:00
Alex Buynytskyy 61f4ab89a2 Optimizing install-multi-package to use ABB.
Bug: 150803885
Test: atest adb_test adbd_test
Test: adb install-multi-package Picsart_9.30.5.apk Pinterest_6.54.0.apk
Change-Id: I2fcd093e61afdd16d481194e1d5f8f66acf6a66c
Merged-In: I2fcd093e61afdd16d481194e1d5f8f66acf6a66c
2020-05-19 04:26:42 +00:00
Alex Buynytskyy f1e187be01 Incremental install mode for install-multi.
Bug: 150803885
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I242104267273bac21ab41390d3e77a434ffa565d
Merged-In: I242104267273bac21ab41390d3e77a434ffa565d
2020-05-18 21:26:10 -07:00
Joshua Duong d66bba1b69 Merge changes from topic "adb-mdns" am: 7ce4a267f5 am: 1b0de1b97d
Change-Id: I5f937b6f8d85fa5fa00828af93eb22d87ac61f45
2020-05-19 01:01:31 +00:00
Joshua Duong 7ce4a267f5 Merge changes from topic "adb-mdns"
* changes:
  adb pair: allow passing password as command-line argument.
  Change adb auto-connect to use mdns instance name.
  'adb pair' by mdns instance name.
  'adb connect' by mDNS service name.
  Add mDNS service instance name parser.
2020-05-19 00:30:06 +00:00
Treehugger Robot b239ff084b Merge "adb: don't cache failure to get features." am: 7cd7b68f5d am: 705539c80e
Change-Id: I0aa97cc813e3a989fce7722fb119bdcbf316c1b1
2020-05-18 21:40:31 +00:00
Joshua Duong dcba5c9257 adb pair: allow passing password as command-line argument.
Bug: 155194845

Test: adb pair <host>
Test: adb pair <host> <pairing code>
Change-Id: I9813b5812a98524109a4c90cb089eab652da06fa
2020-05-18 14:24:10 -07:00
Joshua Duong 04d207d315 Change adb auto-connect to use mdns instance name.
This change will fix reconnects when the ip address and port changes for
the same mdns instance name.

Bug: 152886765

Test: 'adb pair <mdns_instance>' and wait for auto-connect.
'adb devices' | grep <mdns_instance
On device, toggle wireless debugging off/on. Client should be able to
reconnect with the different port.

Change-Id: I9ad486534019ee70fb54c9f26ce028951eca8566
2020-05-18 14:23:01 -07:00
Joshua Duong beac509301 'adb pair' by mdns instance name.
Bug: 152886765

Test: Turn on wireless debugging > "Pair with Pairing Code". On client,
> adb pair <mdns_instance>

Change-Id: I8f15c3ea17f3ac02205064f64aca0167bf5d2ad5
2020-05-18 14:23:01 -07:00
Joshua Duong 7ebc595736 'adb connect' by mDNS service name.
Bug: 152886765

Test: $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test
Test: test_adb.py

Change-Id: I7e93ceca7cdf913060bbc5afe824593a9922c6d9
2020-05-18 14:22:52 -07:00
Josh Gao ec5aa591e8 adb: don't cache failure to get features.
When we're waiting for the device to show up (e.g. `adb logcat` with the
device not connected), we can transition from the feature set being
unavailable to being available.

Test: `adb logcat` with device disconnected
Change-Id: I5c93a725605c886cba2c66daa25b484c90a170ec
2020-05-15 16:22:31 -07:00
Treehugger Robot 4e901d430f Merge "Passing additional flags to incremental installation." am: f947d50395 am: 7a98a642fd
Change-Id: Icc37b29af0f9a84c740ec115d3fc4334725fc19d
2020-05-15 06:27:16 +00:00
Alex Buynytskyy 74e9e3c27a Passing additional flags to incremental installation.
Bug: 150803885
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: Ifa9b9e570259d35eb0121817bbb791044c6efcfd
Merged-In: Ifa9b9e570259d35eb0121817bbb791044c6efcfd
2020-05-14 21:00:10 +00:00
Alex Buynytskyy 04aa5bedcc Passing additional flags to incremental installation.
Bug: 150803885
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: Ifa9b9e570259d35eb0121817bbb791044c6efcfd
2020-05-14 13:58:47 -07:00
Treehugger Robot 1c4902d3bf Merge "Make some fdevent member functions pure virtual." am: b6a6023bda am: dce1b6ebfa
Change-Id: I84a95074c03d28a487571168b7ad144eb9e65221
2020-05-13 04:09:51 +00:00
Treehugger Robot b6a6023bda Merge "Make some fdevent member functions pure virtual." 2020-05-13 03:31:03 +00:00
Treehugger Robot dfbc5d3853 Merge "Add a few more trivial socket_spec.h tests." am: 53053dd1b1 am: 81c0b12c50
Change-Id: I9e87e70c8421f3cda7d432bd53f28893d28612ee
2020-05-13 01:27:55 +00:00
Elliott Hughes e65e002102 Add a few more trivial socket_spec.h tests.
Also remove some dead code. The "missing port" case in
parse_tcp_socket_spec hasn't been meaningful since we put the default
port back.

Test: treehugger
Change-Id: I40958f0f1c2dd7f0315142c2c0363a70fe6f80fe
2020-05-12 16:38:11 -07:00
Elliott Hughes 631fe1e6df Make some fdevent member functions pure virtual.
...because that makes our coverage numbers look better. But since there
are only two concrete classes anyway, we weren't gaining much from the
default implementation and it's arguably more intention-revealing now.

Test: treehugger
Change-Id: I7a8a3195023048b1a84277358b857222692d96ee
2020-05-12 16:18:52 -07:00
Josh Gao da4b7221ff Merge changes Id8d9fa6c,I47d3ad50,I7cebbf75,Id10e320a am: a227c19ef2 am: 5954016965
Change-Id: If054be91a10b4bd9d3b736f3446d73289526b42d
2020-05-12 05:56:03 +00:00
Josh Gao a227c19ef2 Merge changes Id8d9fa6c,I47d3ad50,I7cebbf75,Id10e320a
* changes:
  adbd: avoid compiling more code in the daemon.
  adb: don't run all of the tests again over TCP in coverage.
  adbd: respect ADB_TRACE on host adbd.
  adb: mark kMaxProcessNameLength as constexpr.
2020-05-12 05:32:48 +00:00
Treehugger Robot 63b1e8650c Merge changes I24e70952,I652560ad am: 8987016b1e am: e555230b01
Change-Id: Id33adfef41b8efe35f2492b85eac4ff5e24acb69
2020-05-12 02:54:41 +00:00
Treehugger Robot 8987016b1e Merge changes I24e70952,I652560ad
* changes:
  adb: use transport-id to make coverage script faster.
  adb: add `adb transport-id` command.
2020-05-12 02:22:27 +00:00
Treehugger Robot ff065c3de1 Merge "Remove unneeded optimize_for lite" am: 1d77251d76 am: 15a669542e
Change-Id: If518a31d9063868179cb1138f960e7a2ccb5a998
2020-05-12 00:19:26 +00:00
Treehugger Robot 1d77251d76 Merge "Remove unneeded optimize_for lite" 2020-05-11 23:49:29 +00:00
Chen Zhu 466c534eee Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev am: 8950624662
Change-Id: I21b780a48aa8e8c77d76556403b1570b3b612c08
2020-05-09 03:01:07 +00:00
Chen Zhu 8950624662 Merge "Add test config for adbd_test and apply MainlineTestModuleController to it" into rvc-dev 2020-05-09 02:48:48 +00:00
Chen Zhu 5daea5a6a2 Add test config for adbd_test and apply MainlineTestModuleController to it
to only run the tests when com.google.android.adbd is

installed on device.

Bug: 154845935
Test: m mts && mts-tradefed run mts-adbd
Change-Id: I2f203d25288580a07391703e2b28df54479a69f0
2020-05-08 16:47:07 -07:00
Joshua Duong 7be8519cdb Add mDNS service instance name parser.
This will be used for parsing user-provided names to 'adb connect' and
'adb pair' in order to check for matches in the mdns service registry.

Bug: 152886765

Test: $ANDROID_HOST_OUT/nativetest64/adb_test/adb_test
--gtest_filter=mdns_utils*

Change-Id: Ifd74b4394212853c1c193a2ea64937f6a6a0ff24
2020-05-07 10:25:15 -07:00
Joshua Duong fbc55bf9e2 Merge "[adb client] Fix mdns discovery service registry." am: 2814928567 am: 6afe9cffb7
Change-Id: Ic9c04823096847b205e16fe8c9007fa5b5989f24
2020-05-06 22:14:47 +00:00
Joshua Duong 2814928567 Merge "[adb client] Fix mdns discovery service registry." 2020-05-06 21:39:59 +00:00
Alex Buynytskyy 13e98eaf72 Using ABB for install-multi.
ABB uses single shared CMD for all operations which improves
reliability.

Bug: b/153486595
Fixes: 153486595
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I1e3da63882c980811ed2e9f5556732b24a041ce5
Merged-In: I1e3da63882c980811ed2e9f5556732b24a041ce5
2020-05-06 14:10:56 -07:00
Josh Gao a11d27f920 adb: use transport-id to make coverage script faster.
Test: ./coverage/gen_coverage.sh
Change-Id: I24e70952946ad91d51acf9bda386826e4e73a0d2
2020-05-05 14:44:01 -07:00
Josh Gao 3441f232ab adb: add `adb transport-id` command.
Make it possible to safely script waiting for a device to go away after
root/unroot.

Test: manual
Change-Id: I652560ad1d88a5c6a1e8ea5787c3cf165c82aa63
2020-05-05 14:43:53 -07:00
Joshua Duong 077ac11106 [adb client] Fix mdns discovery service registry.
We were getting stale service ip addresses because we weren't
destroying the sdref correctly.

Also, we were leaking the ResolvedServices when removing it from the
ServiceRegistry. Converted them to smart pointers to fix that.

Bug: 153343580

Test: test_adb.py
Change-Id: Ib7c1dbf54937d4ac6d9885cb5f7289bef616d12e
2020-05-05 00:21:12 -07:00
Luca Stefani 9a3d868d3e Remove unneeded optimize_for lite
* It's already specified in the java_library definition

Test: m deployagent_lib, no warnings
Change-Id: I58fa9af71b8f817da55cfc040fbcbd80fd6425cf
2020-05-01 16:11:22 +02:00
Josh Gao 9f3064f26f adbd: avoid compiling more code in the daemon.
Strip out more code that has no meaning on device, to "improve"
coverage.

Test: test_device.py over TCP
Change-Id: Id8d9fa6cc6c6c30773f67303bcc89e6d60824700
2020-04-27 14:38:28 -07:00
Josh Gao a786f0a857 adb: don't run all of the tests again over TCP in coverage.
They take forever, and we're only really interested in the transport
related code, so test that more directly.

Test: ./coverage/gen_coverage.sh
Change-Id: I47d3ad50db0f1020fe4b3da5cdfe455190d022b5
2020-04-27 14:38:28 -07:00
Josh Gao ad18395b65 adbd: respect ADB_TRACE on host adbd.
Test: ADB_TRACE=1 adbd
Change-Id: I7cebbf7596add865fab95f5d6c746c0b8a16997a
2020-04-27 14:38:28 -07:00
Josh Gao 34cd60f075 adb: mark kMaxProcessNameLength as constexpr.
Otherwise, the build fails with -O0.

Test: mma with -O0 in adb_defaults
Change-Id: Id10e320afc183eda5b46555b3b50dd8ffd84a700
2020-04-27 14:38:28 -07:00