Commit graph

57478 commits

Author SHA1 Message Date
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
a893592e56 Merge "adb: add option to disable kill-server." am: edd7771583
Change-Id: I61ea760903d3e1b5335e2aa550346378c07f2c58
2020-04-07 21:07:25 +00:00
Josh Gao
edd7771583 Merge "adb: add option to disable kill-server." 2020-04-07 20:36:47 +00:00
Elliott Hughes
838f9e14f4 Merge "Add missing static for macOS inline." am: a0c191867f
Change-Id: I29bd44fc0b71754d6478a137016741a97efb72b9
2020-04-07 19:54:22 +00:00
Elliott Hughes
a0c191867f Merge "Add missing static for macOS inline." 2020-04-07 19:43:29 +00:00
Nikita Ioffe
6cdf64a2ef Merge "Manually unmount /data_mirror mounts in the right order" am: 9cd3c84dc1
Change-Id: Ifa4598ef52a1127c2344c0d5a157af673bc8911d
2020-04-07 17:47:14 +00:00
Nikita Ioffe
9cd3c84dc1 Merge "Manually unmount /data_mirror mounts in the right order" 2020-04-07 17:34:52 +00:00
Nikita Ioffe
bf66f433d6 Manually unmount /data_mirror mounts in the right order
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152823078
Change-Id: I57ff9182807630d8cbcf3ca6374fdd6dc6379da5
2020-04-07 15:43:10 +00:00
Nikita Ioffe
2b45a4ef85 Merge "get_mounted_entry_for_userdata: Realpath block devices from fstabs" am: 74429fc121
Change-Id: I9795f62d3534c46072622e48f32c263be147617b
2020-04-07 12:16:00 +00:00
Nikita Ioffe
74429fc121 Merge "get_mounted_entry_for_userdata: Realpath block devices from fstabs" 2020-04-07 12:01:29 +00:00
Josh Gao
36e15dd5c3 Merge "Revert "Reland "adb: daemon: Assign valid fd to usb_handle ep0 file descriptor""" am: 20f079ec66
Change-Id: I5ef0f12580ab3b10c9eed83604d3c49827b6d77c
2020-04-07 11:19:20 +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
Treehugger Robot
be1fdfc322 Merge "Rename vts-core to vts" am: edf8335c72
Change-Id: Ia7bcb53b6551ae5e0bc2ccfd5bd48420052869df
2020-04-07 05:30:15 +00:00
Treehugger Robot
edf8335c72 Merge "Rename vts-core to vts" 2020-04-07 05:11:55 +00:00
Paul Crowley
743e98c0c9 Merge "Abolish DmTargetDefaultKey::IsLegacy" am: 1b1ec8f36a
Change-Id: I456e7e88b4a62731f40dbfc9b58d3c0e85a30589
2020-04-07 03:48:07 +00:00
Paul Crowley
1b1ec8f36a Merge "Abolish DmTargetDefaultKey::IsLegacy" 2020-04-07 03:23:57 +00:00
Dan Shi
ab8acaedae Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL moves all tests in vts-core to vts.
It won't change test logic or behavior.

Change-Id: I24779951257ce37fc18929f214d3cf5f76c23a19
Merged-In: I24779951257ce37fc18929f214d3cf5f76c23a19
2020-04-07 02:48:48 +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
Nikita Ioffe
7aa37f1f21 get_mounted_entry_for_userdata: Realpath block devices from fstabs
Use realpath as a canonical representation of block devices. This makes
it easier to reason about block devices. This also fixes a bug, in which
fs_mgr_get_mounted_entry_for_userdata didn't properly work on devices
that don't support metadata encryption.

Test: atest CtsFsMgrTestCases
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 153363818
Change-Id: I139c2be46336a632bbaee86667019c075d7de814
2020-04-07 00:39:19 +01:00
Dan Shi
841aaa90d3 Merge "Remove vts10 tests from vts suite" am: 45efd5a27b
Change-Id: I231f37622fb87f15297ee1e072319113bacfaffa
2020-04-06 21:42:13 +00: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
Dan Shi
45efd5a27b Merge "Remove vts10 tests from vts suite" 2020-04-06 21:24:46 +00: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
Paul Crowley
539b98fb58 Abolish DmTargetDefaultKey::IsLegacy
To make it easier to support disk formats created using old versions
of dm-default-key with new kernels, stop checking the kernel module
version; instead, the caller decides whether to use the old or new
options format.

Bug: 150761030
Test: crosshatch and cuttlefish boot normally; cuttlefish
    fails with "default-key: Not enough arguments" as expected when
    option is set to 1
Change-Id: I810bb7e085b9b8648858de1a02165162d1fd163e
2020-04-05 19:51:14 -07:00
Tianjie Xu
cf14d38562 Merge "Allow parsing zip entries larger than 4GiB" am: 148f7af18a
Change-Id: I49368fc835c7a4d01771bf3d3b2d480b423d3038
2020-04-04 20:22:41 +00:00
Tianjie Xu
148f7af18a Merge "Allow parsing zip entries larger than 4GiB" 2020-04-04 20:00:20 +00:00
Tom Cherry
bfaa6a2607 Merge "liblog: include all structures in README.protocol.md" am: 3fc16fed7e
Change-Id: If815c0c3524f85530b7b5e2acb92c9f724ede9ce
2020-04-03 23:59:27 +00:00
Yifan Hong
5a5ed7eb1a Merge "libsnapshot: Add VTS10 VtsLibsnapshotTest" am: 0dba184ac0
Change-Id: Ie08eca0eb50b1158bce0f7ac05ca62cb23965bbf
2020-04-03 23:59:14 +00:00
Tom Cherry
3fc16fed7e Merge "liblog: include all structures in README.protocol.md" 2020-04-03 23:52:26 +00:00
Yifan Hong
0dba184ac0 Merge "libsnapshot: Add VTS10 VtsLibsnapshotTest" 2020-04-03 23:37:05 +00:00
Tom Cherry
97deb299df liblog: include all structures in README.protocol.md
We are stating that these structures will be stable, so include them
in the documentation directly.

Bug: 152466437
Test: n/a
Change-Id: I52a05f61163aa35b99869d722284ff3f98d7f010
2020-04-03 14:34:58 -07:00
Tianjie
85c5d23100 Allow parsing zip entries larger than 4GiB
This cl supports the parsing and extraction of the zip entry who
has a large size than UINT32_MAX. Also add a few checks in the
entry writers to make sure callers have enough space for extraction.

As many users of the library assume the entry size to be 32 bits long,
we keep the 32 bit ZipEntry. We also keep the functions that expect
the 32 bit ZipEntry in the public header file. These 32 bit wrappers
could be removed later once all users recognize the 64 bit ZipEntry.

Bug: 150900468
Test: unit tests pass
Change-Id: Ia6760638ccf51e97dbef6bd55dff352f1e7ce816
2020-04-03 12:46:20 -07:00
Josh Gao
1264028fc7 Merge "adb: add implementation of mempcpy for deficient platforms." am: d956dd78d0
Change-Id: I0a75898349052c4d1a99e3ef856893bbfd419c20
2020-04-03 19:28:15 +00:00
Josh Gao
d956dd78d0 Merge "adb: add implementation of mempcpy for deficient platforms." 2020-04-03 19:11:48 +00:00
Yifan Hong
405da5a9a6 libsnapshot: Add VTS10 VtsLibsnapshotTest
Add VTS10 variant of vts_libsnapshot_test so that
it can be added to vts-kernel test.

Bug: 142513589

Test: vts10-tradefed run vts-kernel -m VtsLibnsapshotTest
Change-Id: I4e2516b94d84acb16f595aab87dd3c0cadad6166
2020-04-03 12:04:32 -07:00
Josh Gao
0aafa0f714 adb: add implementation of mempcpy for deficient platforms.
Test: none
Change-Id: Ic2f4e1c85c9f02e804d849c6cb60b22e15e981d6
2020-04-03 10:13:53 -07:00
Tom Cherry
c336c565a9 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" am: 79f3d26b25
Change-Id: I8db461e5165c6f81e63e0289a263c90fa7238ef1
2020-04-03 14:49:35 +00:00
Tom Cherry
79f3d26b25 Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" 2020-04-03 14:36:58 +00:00
Josh Gao
ec44d35fde adb: implement LZ4 compression.
Add support for LZ4 compression, which compresses and decompresses far
more quickly than brotli, at the cost of worse compression ratio.

`adb sync -d system` speeds (in MB/s) on aosp_blueline-eng:

           none    brotli    lz4
USB 3.0     120       110    190
USB 2.0      38        75     63

Bug: https://issuetracker.google.com/150827486
Test: python3 -m unittest test_device.FileOperationsTest{Uncompressed,Brotli,LZ4}
Change-Id: Ibef6ac15a76b4e5dcd02d7fb9433cbb1c02b8382
2020-04-02 17:11:07 -07:00
Josh Gao
2165717875 adb: fix use of wrong union variant.
Also, prepare to add more compression flags.

Bug: https://issuetracker.google.com/150827486
Test: none
Change-Id: I5044e5d5944aff5c18241fd7439baa48e2e09980
2020-04-02 17:11:07 -07:00
Josh Gao
4da40a9a5b adb: fix front_size, front_data.
Bug: https://issuetracker.google.com/150827486
Test: adb_test
Change-Id: I3d2c73a20a703d793efb56e592cf33149815f89b
2020-04-02 17:11:07 -07:00
Josh Gao
49ba558aa8 adb: add interfaces for Encoder/Decoder.
More groundwork to support more compression algorithms.

Bug: https://issuetracker.google.com/150827486
Test: python3 -m unittest test_device.FileOperationsTest{Uncompressed,Brotli}
Change-Id: I638493083b83e3f6c6854b631471e9d6b50bd79f
2020-04-02 17:11:07 -07:00
Bill Peckham
300333e210 Merge "Ignore functionfs mounts." am: 362a41a4f6
Change-Id: I11933d177368f9255c11a9f3cd5dfb2a541b0a9d
2020-04-02 23:07:53 +00:00
Bill Peckham
362a41a4f6 Merge "Ignore functionfs mounts." 2020-04-02 22:46:28 +00:00
David Anderson
e64cc297b6 Merge "fs_mgr: Allow commas in boot device paths." am: f9459a45eb
Change-Id: Id16a67880e85e5dea4ca1c889614911730cc3b8e
2020-04-02 21:27:16 +00:00
David Anderson
f9459a45eb Merge "fs_mgr: Allow commas in boot device paths." 2020-04-02 21:11:44 +00:00
Nikita Ioffe
41b977a1fa Merge "Improve logging in bootstat." am: 2884943687
Change-Id: Ie6d6012afd1df347303f4054eee1229d98a80be8
2020-04-02 18:37:37 +00:00