Commit graph

3640 commits

Author SHA1 Message Date
Josh Gao
1efd363be5 Merge "adbconnection: silence logspam." am: ff08a51a72 am: b9a10d4538
Change-Id: I591c8d81a67d6412132e4569d9ca0e4583708f95
2020-04-18 03:22:46 +00:00
Josh Gao
ff08a51a72 Merge "adbconnection: silence logspam." 2020-04-18 02:47:11 +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
Treehugger Robot
891bb8d9d1 Merge "adbconnection: delete unnecessary darwin workaround." am: 04e9d07490 am: 7bdf442375
Change-Id: Id497d2c061d183e5fae9700ce0cd12db978e4cfd
2020-04-18 00:23:30 +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
d81a805a4c adbconnection: silence logspam.
Userdebug devices enable JDWP for every process, so if adbd is turned
off manually, we get an error message for every single process on the
system.

Bug: http://b/154319466
Test: manual
Change-Id: Ia702974d371e35497573c31e22cfb2b572334590
2020-04-17 16:35:01 -07:00
Josh Gao
4a1da79208 adbconnection: delete unnecessary darwin workaround.
This shouldn't be compiling for the mac.

Test: none
Change-Id: I9aea1861365c0da041c665e14e3e86cb802ad697
2020-04-17 14:46:41 -07: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
f41ce8be8f Merge "macOS build fix: no SOCK_CLOEXEC on darwin." am: 8fbb0d8de0 am: c933da92d6
Change-Id: Ib8a36ab117a290695e511d31a50758210882e67b
2020-04-15 23:47:14 +00:00
Treehugger Robot
8fbb0d8de0 Merge "macOS build fix: no SOCK_CLOEXEC on darwin." 2020-04-15 23:38:53 +00: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
Treehugger Robot
63f2be8f56 Merge "macOS build fix: no off64_t on darwin." 2020-04-15 22:24:03 +00:00
Elliott Hughes
cbe30fb952 macOS build fix: no SOCK_CLOEXEC on darwin.
We can't use the sysdeps.h copy of this code, so for now add yet
another copy & paste. We should come up with something better in
libbase, but let's get the macOS build fixed first.

Test: builds on mac
Change-Id: Ifb059990d7091f3d91b54e684f4ee14afe69c28b
2020-04-15 21:28:01 +00:00
Elliott Hughes
31484c4d88 Merge "[incfs] Stream the hash tree for incremental installation" into rvc-dev-plus-aosp 2020-04-15 20:47:41 +00:00
Treehugger Robot
09fa233ae1 Merge "Remove host_supported from libadb_pairing_server." am: 0b708cba86 am: 61bd06d0fa
Change-Id: I8bca9c8176e9bf1bb05e22850033d69d2ca097d3
2020-04-15 18:11:49 +00:00
Treehugger Robot
513bae7660 Merge "macOS build fix: don't build libadbconnection." am: 8b4ed5f6b6 am: 072e1d3ad4
Change-Id: I224a97c89bbc0f6e8db2ef7cd9eb709b3ee362ef
2020-04-15 17:26:08 +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
Joshua Duong
5e32d2f8de Remove host_supported from libadb_pairing_server.
To fix mac build error. Shouldn't be building this for the host.

Bug: N/A

Test: mma in system/core/adb on mac.
Change-Id: I8b86d265ef9b91eeaf7a4e5d6623a5399403ecaf
2020-04-15 06:53:38 +00:00
Elliott Hughes
729f58e0b7 macOS build fix: don't build libadbconnection.
Test: builds on mac
Change-Id: I91e3bf6b06f31edf542f8f8d6529787b0bf3a6ed
2020-04-14 16:33:16 -07: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
1b68baa26c adb: fix use of wrong union variant. am: 2165717875 am: 906ae0d9b0
Change-Id: I5433d281c9e4414e670b60b1547e3280d566a0b3
2020-04-07 22:10:24 +00:00
Josh Gao
5c4fbedebd adb: fix front_size, front_data. am: 4da40a9a5b am: 3a69cc704b
Change-Id: If3422b868a2a8ae9000188603426e336e7193176
2020-04-07 22:10:22 +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
906ae0d9b0 adb: fix use of wrong union variant. am: 2165717875
Change-Id: I113892ca335419cb0eea8557e554497ed219aad3
2020-04-07 21:40:13 +00:00
Josh Gao
3a69cc704b adb: fix front_size, front_data. am: 4da40a9a5b
Change-Id: Ia54083330d8e8bde1f86821d9900644d73329bed
2020-04-07 21:40:12 +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
Josh Gao
edd7771583 Merge "adb: add option to disable kill-server." 2020-04-07 20:36:47 +00:00
Elliott Hughes
8bb8c06357 Merge "Add missing static for macOS inline." am: a0c191867f am: 838f9e14f4
Change-Id: Ia2e1fefb98067b7220ac266a577d5544c11d7cb1
2020-04-07 20:04:54 +00:00
Elliott Hughes
a0c191867f Merge "Add missing static for macOS inline." 2020-04-07 19:43:29 +00:00
Josh Gao
6cc08dbf6a Merge "Revert "Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor""" into rvc-dev am: 60375b7cc6
Change-Id: I60c273c8ffd3404f4cd165932887ec9b81d9c2c8
2020-04-07 11:19:32 +00:00
Josh Gao
20f079ec66 Merge "Revert "Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor""" 2020-04-07 11:08:00 +00:00
Josh Gao
9026a44bb3 Revert "Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor""
This reverts commit bfe3dac36d.

This seems to be correlated with an increase in the rate of devices
going offline. Revert it to see if failure rates improve.

Bug: http://b/150863651
Test: treehugger
Change-Id: Ia6163fd9e31d2bf812628e028249662594ac2024
2020-04-06 16:49:01 -07:00
Josh Gao
b3b43be658 Revert "Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor""
This reverts commit d9684d5943.

This seems to be correlated with an increase in the rate of devices
going offline. Revert it to see if failure rates improve.

Bug: http://b/150863651
Test: treehugger
Change-Id: Ia6163fd9e31d2bf812628e028249662594ac2024
2020-04-06 16:48:35 -07:00
Josh Gao
ba6d1da8ea adb: add option to disable kill-server.
In the post-apocalypse, it's increasingly common for people to use ssh
port forwarding to use an adb client with a remote adb server. This
results in `adb kill-server` being catastrophic, because the client has
no way of restarting the server on the other end. Android Studio in
particular has an unforunate habit of trying to manage adb's life cycle
such that starting or exiting Studio will result in a kill-server.

Add the ADB_REJECT_KILL_SERVER environment variable which ignores
kill-server, to make this scenario a bit better.

Bug: http://b/152251952
Test: ADB_REJECT_KILL_SERVER=1 adb start-server; adb kill-server
Change-Id: I5533a6dcbdb9220526a6fcf9ca31d9fcef1cec17
2020-04-06 14:33:14 -07:00
Elliott Hughes
681338dfb6 Add missing static for macOS inline.
Also switch to #pragma once and s/__inline__/inline/g for consistency.

There are a handful of inlines that are missing static, which seems like
a bug, but I've left those for now.

Bug: http://b/153328340
Test: treehugger
Change-Id: I2353215c0a8a6154ce8b39ecde022b282f5c0cb9
2020-04-06 09:17:08 -07:00
Jooyung Han
92bd33a286 Merge "Add min_sdk_version:R to updatable apexes" into rvc-dev am: a05e2b1a92
Change-Id: Ie396cf616dec766279bdcba26456be94fcc33bfa
2020-04-05 00:32:30 +00:00
Jooyung Han
a05e2b1a92 Merge "Add min_sdk_version:R to updatable apexes" into rvc-dev 2020-04-05 00:14:36 +00:00
Josh Gao
d527ae40dc Merge "adb: add implementation of mempcpy for deficient platforms." into rvc-dev 2020-04-04 06:45:09 +00:00
Josh Gao
0bd7d43f8b Merge "adb: add implementation of mempcpy for deficient platforms." am: d956dd78d0 am: 1264028fc7
Change-Id: Ia66bca6d22a6f573b48b319c1e00cf23f404f818
2020-04-03 19:50:28 +00:00
Josh Gao
fbf30e4155 adb: add implementation of mempcpy for deficient platforms.
Bug: http://b/150827486
Test: none
Change-Id: Ic2f4e1c85c9f02e804d849c6cb60b22e15e981d6
(cherry picked from commit 0aafa0f714)
2020-04-03 12:18:29 -07:00