Commit graph

406 commits

Author SHA1 Message Date
Treehugger Robot
46cfe7dbeb Merge "Passing additional flags to incremental installation." am: f947d50395 am: 7a98a642fd am: 4e901d430f am: 0014af6d31
Change-Id: Ib3035276ad4d51cb093c0f393d79fc7184e4cc05
2020-05-15 06:51:42 +00: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
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
Josh Gao
126bef3961 Merge changes Id8d9fa6c,I47d3ad50,I7cebbf75,Id10e320a am: a227c19ef2 am: 5954016965 am: da4b7221ff am: f2420d95a2
Change-Id: Ia6ae2cf865a70b621658797adae8b8d868aa508e
2020-05-12 06:36:29 +00: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
8b02753be5 Merge changes I24e70952,I652560ad am: 8987016b1e am: e555230b01 am: 63b1e8650c am: c91d52cec6
Change-Id: I9d0592aa5127ebab23768984d07632a982545067
2020-05-12 03:18:37 +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
Joshua Duong
6929cb621e Merge "[adb client] Fix mdns discovery service registry." am: 2814928567 am: 6afe9cffb7 am: fbc55bf9e2 am: ffc5105411
Change-Id: Iff42f4c5cdc24f17e3003098b2aa0f639f889199
2020-05-06 22:44:42 +00: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
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
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
Joshua Duong
31112bfd20 Merge "[adb] Disable _adb._tcp. service auto-connect by default." am: 3eea62432d am: 6974e7b043 am: 7833075fb5 am: 2ff356e07d
Change-Id: I0847e47396ecb05efff6bc9f870cf646446e40b6
2020-04-24 06:41:13 +00:00
Joshua Duong
7833075fb5 Merge "[adb] Disable _adb._tcp. service auto-connect by default." am: 3eea62432d am: 6974e7b043
Change-Id: I6f5fc03d22e516eaf48bcb1e289f6773fa75b384
2020-04-24 06:12:48 +00:00
Joshua Duong
3eea62432d Merge "[adb] Disable _adb._tcp. service auto-connect by default." 2020-04-24 05:38:22 +00:00
Treehugger Robot
7c8d577ef4 Merge "Using ABB for install-multi." am: abc40c7c5d am: 3a9114c337 am: fb3cce57b0 am: 51e059a452
Change-Id: Id28daebe7df1fe0f12278d3d8b14fdcf5750419a
2020-04-24 02:16:47 +00:00
Treehugger Robot
fb3cce57b0 Merge "Using ABB for install-multi." am: abc40c7c5d am: 3a9114c337
Change-Id: I27df5ad5f916bc75ead36cb439aa9370ce9431ca
2020-04-24 01:36:57 +00:00
Treehugger Robot
abc40c7c5d Merge "Using ABB for install-multi." 2020-04-24 01:15:49 +00:00
Joshua Duong
2eedc2303b [adb] Disable _adb._tcp. service auto-connect by default.
Added ADB_MDNS_AUTO_CONNECT envionment variable to control which
services to allow auto-connect. By default, only _adb-tls-connect
services can auto-connect, since these services only auto-connect once
paired. _adb services will try to auto-connect to every service found.

Bug: 152636135

Test: ADB_TRACE=1 adb server nodaemon | grep whitelist
Test: ADB_TRACE=1 ADB_MDNS_AUTO_CONNECT=adb adb server nodaemon | grep whitelist
Test: ADB_TRACE=1 ADB_MDNS_AUTO_CONNECT=adb,adb-tls-connect adb server nodaemon | grep whitelist
Test: ADB_TRACE=1 ADB_MDNS_AUTO_CONNECT=adb-tls-connect adb server nodaemon | grep whitelist
Test: ADB_TRACE=1 ADB_MDNS_AUTO_CONNECT=0 adb server nodaemon | grep whitelist
Test: ADB_TRACE=1 ADB_MDNS_AUTO_CONNECT=1 adb server nodaemon | grep whitelist

Change-Id: Ie562ea24fea3d6d96e67b376a0523b09e2778eb7
2020-04-23 16:55:52 -07:00
Alex Buynytskyy
a59e9b4e70 Using ABB for install-multi.
ABB uses single shared CMD for all operations which improves
reliability.

Bug: b/153486595
Test: atest adb_test adbd_test fastdeploy_test
Change-Id: I1e3da63882c980811ed2e9f5556732b24a041ce5
2020-04-23 16:30:49 -07:00
Josh Gao
d18e757323 Merge changes I5fd3b25d,I6c039b32,I014d7ad2 am: a675727a81 am: 8b0a69f9ad am: 34ce77427f am: 93ccca30f3
Change-Id: I333f00ffd3f6ab5cc09ee4e5caeb71e903fe3cb1
2020-04-23 22:52:21 +00:00
Josh Gao
34ce77427f Merge changes I5fd3b25d,I6c039b32,I014d7ad2 am: a675727a81 am: 8b0a69f9ad
Change-Id: Iae88f73fb69cf3f19d8090a07ef2563966cd8fc8
2020-04-23 22:20:07 +00:00
Josh Gao
8a9277a243 adb: split transport_local.cpp into client/daemon.
Improve coverage some more.

Test: ./coverage/gen_coverage.sh && ./coverage/report.sh
Change-Id: I014d7ad25b2793d5d836ce5e526d657d46687ea4
2020-04-22 23:15:02 -07:00
Joshua Duong
2e1034fae9 Merge changes from topic "adb-mdns-cmdline" am: 8cab9b6b24 am: d9c0176f1f am: f751d65fdd am: 4489e314e1
Change-Id: I6d6060ffc774cc1c58ea60ce510bd0d8805929c5
2020-04-22 21:16:47 +00:00
Joshua Duong
f751d65fdd Merge changes from topic "adb-mdns-cmdline" am: 8cab9b6b24 am: d9c0176f1f
Change-Id: Ic290b50817b53ba09f24c5aaae9e92605afcedcc
2020-04-22 20:36:12 +00:00
Joshua Duong
13c639e0bb [adb client] Add "mdns services" command.
This command list all discovered mdns services, so we
can connect via service name later on.

Bug: 152521166

Test: 'adb mdns services'
Test: test_adb.py
Change-Id: I23d42a7933e67a65bd0c9924afd6abe5915c0a11
2020-04-22 08:43:15 -07:00
Joshua Duong
504d393176 [adb client] Add "adb mdns check" command.
This command will check if the mdns daemon is available on the host
machine.

Bug: 152510294

Test: pkill -9 mdnsd; adb mdns check; mdnsd; adb mdns check;
Test: test_adb.py
Change-Id: If644678a339763817a8a7adcbdc545626d161aba
2020-04-22 08:43:15 -07:00
Greg Kaiser
89fe376d13 [adb data server] Initialize variable
servingComplete_ was left uninitialized and only set to 'true'
in the code.  We initialize it to the 'false' state to avoid
uninitialized references in SkipToRequest().

Bug: 150865433
Test: TreeHugger
Change-Id: Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6
Merged-In: Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6
2020-04-20 11:06:13 -07:00
Treehugger Robot
a2b5f84243 Merge "adb: change mdns tls service names (RFC 6763)." am: 22cc277bfe am: ecc11836ec am: 34f5c7bc83 am: cf91add808
Change-Id: I5b9789f4971b3c6e6bc4559360acc29eb3218175
2020-04-18 03:22:41 +00:00
Treehugger Robot
34f5c7bc83 Merge "adb: change mdns tls service names (RFC 6763)." am: 22cc277bfe am: ecc11836ec
Change-Id: Ie54edd228f5263b5a64439057c19059d5dd8fae1
2020-04-18 02:24:40 +00:00
Treehugger Robot
22cc277bfe Merge "adb: change mdns tls service names (RFC 6763)." 2020-04-18 01:37:41 +00:00
Joshua Duong
81f2db4d6a adb: change mdns tls service names (RFC 6763).
Even though mdnsresponder seems to allow us to use _adb_secure_connect
and _adb_secure_pairing as service names, these names violate the syntax
outlined in RFC6763, and may not be compatible with other dns-sd
implementations.

Also address some comments from a previous CL.

Bug: 154268895

Test: atest adbd_test
Change-Id: Ia872e976fc4276587b500a827a41d46d9dc755dd
2020-04-17 16:38:34 -07:00
Josh Gao
81467290e2 Merge "adb: fix feature sets on devices that don't have them." am: 10f8f5e363 am: da03311c3f am: 5ede605c6b am: 7944b51c71
Change-Id: I58aaeadb16351d450cc8dd41c0ebdf82a1cb4de0
2020-04-17 05:36:48 +00:00
Josh Gao
5ede605c6b Merge "adb: fix feature sets on devices that don't have them." am: 10f8f5e363 am: da03311c3f
Change-Id: I34f948bae331d20d49bd861a3976f30a1b46ff10
2020-04-17 05:12:08 +00:00
Josh Gao
fb4616b200 adb: fix feature sets on devices that don't have them.
Previously, we weren't distinguishing between nonexistent devices and
devices that don't support features, resulting in lots of stuff being
broken for pre-N devices.

Bug: http://b/154272158
Test: adb shell on a JB emulator
Change-Id: I0058b2a60678e1ad0503f5abac30157be976c9c4
2020-04-16 19:39:05 -07:00
Treehugger Robot
03f371e32e Merge "macOS build fix: no off64_t on darwin." am: 63f2be8f56 am: a1c8b995fb
Change-Id: I8b3c80e110c4978e7d94cddd26d60d1371961ac7
2020-04-15 22:45:50 +00:00
Alex Buynytskyy
203006b72a [incfs] Stream the hash tree for incremental installation
Instead of sending the whole tree upfront use the same
streaming interface for it as for the data blocks

This improves installation speed by almost 200ms,
650-800ms -> 500-600ms

Bug: 153696423
Test: manual, adb install in various configurations

Change-Id: Ia83de2af54ca0b1969397514ea5d761719af9055
(cherry picked from commit e2e850f325)
Merged-In: Ia83de2af54ca0b1969397514ea5d761719af9055
2020-04-15 17:07:07 +00:00
Elliott Hughes
7d9a7a3b6e macOS build fix: no off64_t on darwin.
Darwin has always had a 64-bit off_t, and never added an off64_t.

Test: builds on mac
Change-Id: I4b244dda94c67da76c9e0f47b333c2734f5a94af
2020-04-14 15:34:01 -07:00
Alex Buynytskyy
82c1c9711d [incfs] Stream the hash tree for incremental installation
Instead of sending the whole tree upfront use the same
streaming interface for it as for the data blocks

This improves installation speed by almost 200ms,
650-800ms -> 500-600ms

Bug: 153696423
Test: manual, adb install in various configurations

Change-Id: Ia83de2af54ca0b1969397514ea5d761719af9055
Merged-In: Ia83de2af54ca0b1969397514ea5d761719af9055
2020-04-13 13:00:01 -07:00
Josh Gao
196c93242f Merge "[adb] Don't copy features set on each get()" am: 8489bfb4d7 am: 257c5ef607
Change-Id: If36be78966aacacb001ef0666d86bbbb0fcbfed1
2020-04-10 19:23:30 +00:00
Yurii Zubrytskyi
6fc26dff7c [adb] Don't copy features set on each get()
The features are already cached in a static and don't change.
Let's return the cached set instead of copying it every time.

Bug: 150183149
Test: manual
Change-Id: Ifdca852cc3b32e09e50ea4771f7878987c46cce8
2020-04-09 22:26:48 -07:00
Josh Gao
b3ae997474 Merge changes from topic "adbd_lz4" am: 89cce05891 am: a047e4dbf4
Change-Id: If5e8c2607efa41a9e827abd9a2fe3d5533238e8e
2020-04-07 22:10:27 +00:00
Josh Gao
441808a139 adb: implement LZ4 compression. am: ec44d35fde am: e8d1281a48
Change-Id: I77c83a4725c4523db2015f7ab891621ab8828a77
2020-04-07 22:10:25 +00:00
Josh Gao
b58e9916fb adb: add interfaces for Encoder/Decoder. am: 49ba558aa8 am: 0864b99961
Change-Id: I64298a19fb7a36fca0f987164b58aea3f526b93c
2020-04-07 22:10:18 +00:00
Josh Gao
e8d1281a48 adb: implement LZ4 compression. am: ec44d35fde
Change-Id: Ie0ab6283ea843884a56bf0f0453036ae9f2e788c
2020-04-07 21:40:15 +00:00
Josh Gao
0864b99961 adb: add interfaces for Encoder/Decoder. am: 49ba558aa8
Change-Id: If61913830dc03c54867a7bab3baadad780935aaa
2020-04-07 21:40:10 +00:00
Josh Gao
89cce05891 Merge changes from topic "adbd_lz4"
* changes:
  adb: add dry-run option to push/sync.
  adb: implement LZ4 compression.
  adb: fix use of wrong union variant.
  adb: fix front_size, front_data.
  adb: add interfaces for Encoder/Decoder.
2020-04-07 21:30:30 +00:00
Josh Gao
06369affd4 Merge "adb: add option to disable kill-server." am: edd7771583 am: a893592e56
Change-Id: I322447e7c6a02607144635d8632ca7641c1ea353
2020-04-07 21:22:08 +00:00