Commit graph

69382 commits

Author SHA1 Message Date
David Anderson
cedb057e2b Merge changes Ibffdd9c9,Ief5a16d1
* changes:
  libsnapshot: Add a test case for unexpected snapshots during data resets.
  libfiemap: Add some dependency injection.
2021-05-06 17:57:46 +00:00
David Anderson
53dfaceac4 Merge "Add cow_api_test to presubmit." 2021-05-06 17:36:27 +00:00
Treehugger Robot
5a9467feec Merge "Link libcrypto in host unit tests for libavb" am: b212a33c58
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1695786

Change-Id: I87f2c42807530a89abde205c038ee60077c503f4
2021-05-06 15:08:11 +00:00
Treehugger Robot
b212a33c58 Merge "Link libcrypto in host unit tests for libavb" 2021-05-06 14:49:35 +00:00
Treehugger Robot
e21050474a Merge "Revert "init: adding fallback paths for debug ramdisk"" am: 0d712ad3a2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1697285

Change-Id: Ia3b01afbda44bc2295fdc6a8dcaf6d2ed9583701
2021-05-06 07:22:40 +00:00
Treehugger Robot
0d712ad3a2 Merge "Revert "init: adding fallback paths for debug ramdisk"" 2021-05-06 07:05:41 +00:00
Yo Chiang
ee88c37a4b Merge "Rename system/cote/cpio/ -> system/core/mkbootfs/" am: d7115b8463
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1697187

Change-Id: I39d06aa87987fe53f42c656063a42dec537c46c5
2021-05-06 06:58:51 +00:00
Yo Chiang
d7115b8463 Merge "Rename system/cote/cpio/ -> system/core/mkbootfs/" 2021-05-06 06:43:37 +00:00
David Anderson
1e5400b429 Merge "OverlayFS support for fstab" am: 7cdbd8e64d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1691625

Change-Id: I2e6aa9637f16d876b002baf57fe2d3c8292c197b
2021-05-06 01:53:37 +00:00
David Anderson
7cdbd8e64d Merge "OverlayFS support for fstab" 2021-05-06 01:28:52 +00:00
David Anderson
e3ea5e4ac5 Merge "Ensure vts_libsnapshot_test will pass after being interrupted." am: a06eac491c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696575

Change-Id: I9491557f837c24f2acd739a2b143656a26927288
2021-05-05 22:38:38 +00:00
David Anderson
cbf8420b2a Add cow_api_test to presubmit.
These are unit tests for important VAB functionality. They are very
quick to run and should be included in presubmit testing.

Bug: N/A
Test: th green
Change-Id: I02e24c76df365e9fb2d68f904e930dce60b9bdaf
2021-05-05 15:29:35 -07:00
David Anderson
a06eac491c Merge "Ensure vts_libsnapshot_test will pass after being interrupted." 2021-05-05 22:22:33 +00:00
David Ng
d926aded73 OverlayFS support for fstab
Add overlayfs (lowerdir) mount entry support to fstab.

  overlay  <final dir>  overlay lowerdir=/1:/2

E.g.
  overlay /vendor overlay lowerdir=/odm/vnd_ovl1/1:/odm/vnd_ovl2

Test: Ensure mounting with fstab overlayfs entry
Change-Id: Ib025e203f8ac1836ab62dfa96fb14e8e108f82fb
2021-05-05 09:30:18 -07:00
Martin Stjernholm
8c9bbd58c5 Merge "Require libjdwp from the ART APEX." am: 7b5e682da1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690795

Change-Id: Ic5b27337868077e32998efffe236ec6767fe73f3
2021-05-05 14:45:22 +00:00
Martin Stjernholm
7b5e682da1 Merge "Require libjdwp from the ART APEX." 2021-05-05 14:30:50 +00:00
Mohammad Islam
0fe1b07269 Merge "Add execute permission to /data/apex/decompressed directory" am: a2de531f2c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1689085

Change-Id: I38febfd7f80383b9cf42e3927b83eb20bc744f70
2021-05-05 12:40:02 +00:00
Mohammad Islam
a2de531f2c Merge "Add execute permission to /data/apex/decompressed directory" 2021-05-05 12:31:43 +00:00
Yi-Yo Chiang
3987c0663a Rename system/cote/cpio/ -> system/core/mkbootfs/
Test: Presubmit
Change-Id: I1a55ce97817ebb3d7a7e97cb7a41ba61cbe878e3
2021-05-05 19:03:36 +08:00
Bowgo Tsai
26c1b74998 Revert "init: adding fallback paths for debug ramdisk"
This reverts commit 6cb4311f4d.

Reason for revert: no need to keep the compatibility now

Bug: 186485355
Change-Id: Iffdf3abebc17f32e36f3b3fe2b4f9c2592da9653
Test: TreeHugger
2021-05-05 10:31:29 +00:00
David Anderson
1de6c16ad7 Ensure vts_libsnapshot_test will pass after being interrupted.
We try to clean up previous test runs, but this can crash since we
haven't opened fake-super yet. Refactor the harness so we always open
fake-super if it exists. If it does, we'll delete and recreate it after
cleanup. If it doesn't, we'll create it immediately.

It's still possible that cleanup can fail: If interrupted during a merge,
libsnapshot does not allow cleanup until the merge completes. The test
harness doesn't bother handling this case yet.

Bug: 187151854
Test: vts_libsnapshot_test, ctrl+c, run again
Change-Id: I58a7094336a391cff493a31e4f80d8c8b1b166f8
2021-05-04 22:21:08 -07:00
David Anderson
b383eb7f99 Merge "init: Add tests and document the new fnmatch behavior in ExternalFirmwareHandler." am: 6939583deb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1677040

Change-Id: I5a916c4d61bb0412cb661d5990fedf69490c98df
2021-05-05 00:37:31 +00:00
David Anderson
6939583deb Merge "init: Add tests and document the new fnmatch behavior in ExternalFirmwareHandler." 2021-05-05 00:21:34 +00:00
Steven Moreland
b31a05bb47 Merge "libutils: LightRefBase: incStrongRequireStrong" am: 1c65d40154
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696268

Change-Id: I95b4c3241f60be46d959c4d0477b9fd81a6fd286
2021-05-05 00:08:54 +00:00
Steven Moreland
1c65d40154 Merge "libutils: LightRefBase: incStrongRequireStrong" 2021-05-04 23:52:12 +00:00
Christopher Ferris
f1204ae11a Merge "Re-add backtrace note about unreadable elf." am: 24b15570b1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1677039

Change-Id: I474af94e5ae8e18b05afd1f65fa435438b90c49d
2021-05-04 21:59:09 +00:00
Christopher Ferris
24b15570b1 Merge "Re-add backtrace note about unreadable elf." 2021-05-04 21:44:53 +00:00
Steven Moreland
c2dc7cd31c libutils: LightRefBase: incStrongRequireStrong
Allow LightRefBase to be used with
ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION, mainly for
libhwui.

Bug: N/A
Test: libutils_test
Change-Id: I251c874a80f0a069572bc51da45f8f8e74ba6f5b
2021-05-04 21:42:26 +00:00
Eric Biggers
7a07e8c1ad Merge "init: make reboot_on_failure not apply to manually stopped services" am: 890fd0c239
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1684056

Change-Id: I5a89eea733b7c7fbbb4f73a766eb01feea36e0cb
2021-05-04 21:21:03 +00:00
Eric Biggers
890fd0c239 Merge "init: make reboot_on_failure not apply to manually stopped services" 2021-05-04 21:06:12 +00:00
Treehugger Robot
4ed4ac6ea4 Merge "Add a small testcase for snapshot writer." am: f737614ce9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1696066

Change-Id: I5e15b76ffe92f930bfbb373f72a2741c1c07138d
2021-05-04 20:02:12 +00:00
Treehugger Robot
f737614ce9 Merge "Add a small testcase for snapshot writer." 2021-05-04 19:37:19 +00:00
Kelvin Zhang
ab42259321 Add a small testcase for snapshot writer.
update_engine heavily relies on snapshot writer, add a testcase

Test: th
Change-Id: I4e3cf47dcff92ec4df0b3b84a0a8c7cb7866e7e7
2021-05-04 13:51:34 -04:00
Andrew Scull
ef2864edd5 Link libcrypto in host unit tests for libavb
libavb is moving to use boringssl for crypto operations in user space
rather than using its own implementation. Link with libcrypto to
resolved the new dependencies.

Test: atest --host --host-unit-test-only --test-mapping system/core/fs_mgr/libfs_avb
Bug: 185329132
Change-Id: I412f4ef677aa6e29c5b67ffe5e3e8377640a2847
2021-05-04 15:18:58 +00:00
Tri Vo
1eed4fbf64 Merge "trusty: Helper library for metrics" am: e23e85bee5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1629434

Change-Id: Ie2a265b9ad6b18902a395d12eb2bd9e4d2310b11
2021-05-04 14:31:27 +00:00
Tri Vo
e23e85bee5 Merge "trusty: Helper library for metrics" 2021-05-04 14:17:05 +00:00
Akilesh Kailash
aa5be17a2a Merge changes from topic "snapuserd-enable-read-ahead" am: 362b2b7537
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690661

Change-Id: Iccce1cbfcd7e99e40a5be8ff8a4ecbc64ba24cb0
2021-05-04 04:47:11 +00:00
Eric Biggers
1c51525f66 init: make reboot_on_failure not apply to manually stopped services
Add a new service flag SVC_STOPPING which tracks whether a service is
being manually stopped by init, and make the "reboot_on_failure" service
setting not apply when SVC_STOPPING is set.

This is needed for devices that use FDE, because otherwise the device
reboots during the following init script fragment:

    on property:vold.decrypt=trigger_shutdown_framework
        class_reset late_start
        class_reset main
        class_reset_post_data core
        class_reset_post_data hal

... because that stops all services, including apexd which has been
marked with reboot_on_failure since
https://android-review.googlesource.com/c/platform/system/apex/+/1325212.
So init was killing apexd, then rebooting the device because apexd
"failed" due to having been killed.  Making reboot_on_failure not apply
when init stops a service itself fixes the problem.

This is one of a set of changes that is needed to get FDE working again
so that devices that launched with FDE can be upgraded to Android 12.

Bug: 186165644
Test: Tested FDE on Cuttlefish
Change-Id: I599f7ba107e6c126e8f31d0ae659f0ae672a25e4
2021-05-03 21:38:50 -07:00
Akilesh Kailash
362b2b7537 Merge changes from topic "snapuserd-enable-read-ahead"
* changes:
  libsnapshot: snapuserd: Enable read-ahead functionality
  libsnapshot: Bump up the kCowVersionManifest version
2021-05-04 04:28:29 +00:00
Akilesh Kailash
b2e125cb1a libsnapshot: snapuserd: Enable read-ahead functionality
This enables read-ahead functionality by having
scratch space in the COW

Bug: 183863613
Test: OTA tests with new COW format

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I7988687c81d0ea239e71695818199db4653ddb80
2021-05-04 02:41:35 +00:00
Akilesh Kailash
c67686ecb9 libsnapshot: Bump up the kCowVersionManifest version
kCowVersionManifest will be 2. This should now
be in sync with kCowVersionMajor.

Bug: 183863613
Test: OTA with new COW format (by enabling scratch space option)
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ia6c31e399de723ee83459b59d6b076b48f5c88d5
2021-05-04 02:41:23 +00:00
Akilesh Kailash
fcc5b53c7e Merge changes from topic "snapuserd-read-ahead" am: eebf447fef
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1656316

Change-Id: I9d623ff7206acc32bec19974672a9f7204f32e16
2021-05-04 01:16:25 +00:00
Akilesh Kailash
eebf447fef Merge changes from topic "snapuserd-read-ahead"
* changes:
  libsnapshot:snapuserd:Add unit test for read-ahead code path.
  libsnapshot: Flush data to scratch space only for overlapping regions
  libsnapshot:snapuserd: read-ahead COW copy ops
  libsnapshot: Retrieve COW version from update engine manifest
  libsnapshot:snapuserd: Add 2MB scratch space in COW file
  libsnapshot:snapuserd: mmap + msync header after merge
2021-05-04 00:55:28 +00:00
Tri Vo
a8919a2e82 trusty: Helper library for metrics
Bug: 182489121
Test: libtrusty_metrics_test
Change-Id: I7fc45ea3319185a8ac55889e56bd484d4774e928
2021-05-03 17:15:30 -07:00
Christopher Ferris
fe751c5a61 Re-add backtrace note about unreadable elf.
When moving to the proto-ized tombstones, the note about unreadable
elf files in a backtrace got lost. This re-adds it and adds a test
to verify that the note properly shows up.

Bug: 185428454

Test: Ran unit tests.
Change-Id: I1150cc737772e1b79fd73ec5c782caadc4629421
2021-05-03 15:21:11 -07:00
Treehugger Robot
14f3b1b0d2 Merge "Make mkbootfs self-contained" am: 4f8a56f15d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690535

Change-Id: If2264860a48b2c5e240808eccace000a30689952
2021-05-03 17:18:57 +00:00
Treehugger Robot
4f8a56f15d Merge "Make mkbootfs self-contained" 2021-05-03 16:58:55 +00:00
Yi-Yo Chiang
288f9eec0f Make mkbootfs self-contained
Now that mkbootfs is in prebuilt build tools, make it have no dynamic
dependency so that the binary is portable.

Bug: 184490452
Test: Presubmit
Change-Id: Ida4ee9af3c51ba9d163cf9c1e7b7098fd24e0de1
2021-05-02 19:36:23 +08:00
Treehugger Robot
a6528dee6e Merge "filesystem_config: Add a aid/uid for UWB subsystem" am: 2de90ca526
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1690654

Change-Id: I250b410112c97ad4f2e1023b85a6a5c8f6a5c0c5
2021-04-30 19:22:48 +00:00
Treehugger Robot
2de90ca526 Merge "filesystem_config: Add a aid/uid for UWB subsystem" 2021-04-30 19:04:57 +00:00