Commit graph

67374 commits

Author SHA1 Message Date
Yifan Hong
a3f8373043 Add /metadata to ramdisk.
Now that GKI may not be writeable, also create /metadata at build time
to avoid error log at boot time.

Note that this also creates /first_stage_ramdisk/metadata in GKI.

[    1.891172] init: [libfs_mgr]check_fs():
mount(/dev/block/by-name/metadata,/metadata,ext4)=-1: No such
file or directory

Bug: 173425293
Test: boots

Change-Id: I62d23c382ed1ad165c1d6598b3df41bd92206733
2020-12-08 12:42:55 -08:00
Yifan Hong
55326187ab Also create dirs under /first_stage_ramdisk for GKI.
If the device uses GKI and generic ramdisk, also create
empty directories under /first_stage_ramdisk so that they
won't have to be created at runtime. This allows generic
ramdisk to be not writable.

Test: boots
Bug: 173425293
Change-Id: If987cb1d4af9f9ee94a43a4523f9e1465b01b16a
2020-12-08 12:42:55 -08:00
Yifan Hong
63be35649a Refactor the list of empty dirs in ramdisk in its own list.
Test: build and manual inspect
Bug: 173425293
Change-Id: I7805640af314b60801cc831f1d1f25820f0fb63b
2020-12-08 12:42:55 -08:00
Yifan Hong
addbafdb0b Revert "Move e2fsck into /first_stage_ramdisk."
This reverts commit 3337e782e6.

Reason for revert: e2fsck is moved into vendor ramdisk and installed
to / or /first_stage_ramdisk depending on the device, so there is no
need to move it.

Bug: 173425293
Change-Id: I1eb431e6b2a1e0ba7d0da0278d076b6682a0156d
Test: boots
2020-12-08 12:42:55 -08:00
Treehugger Robot
c6544c9246 Merge "ueventd: Add support for updating permissions on bind" am: bca7bfcc54
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1511048

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35eb904d1129938662b7bbaa32e7c02a4addfb7e
2020-12-08 19:38:35 +00:00
Treehugger Robot
bca7bfcc54 Merge "ueventd: Add support for updating permissions on bind" 2020-12-08 18:53:44 +00:00
Tom Cherry
47031c8c88 ueventd: add no_fnm_pathname option
If a `*` appears within (but not at the end) of a /dev or /sys path in
a ueventd.rc file, then that path is matched with fnmatch() using the
FNM_PATHNAME, which means `*` will not match `/`.  That is not always
the intended behavior and this change creates the no_fnm_pathname
option, which will not use the FNM_PATHNAME flag and will have `*`
match `/`.

Bug: 172880724
Test: these unit tests
Change-Id: I85b813d89237dbf3af47564e5cbf6806df5d412f
2020-12-07 14:58:19 -08:00
Elliott Hughes
dcf81848cb Remove thread_store_set()/thread_store_get().
C++ thread_local is less code to write, and performs better. All known
users have been moved over already.

Test: treehugger
Change-Id: Idaa2a58bf23342dae08dd6b9003d8f532839b351
2020-12-07 10:54:53 -08:00
Treehugger Robot
f512b499b8 Merge "Make libcutils' thread local stuff more clearly deprecated." am: 77692aeea2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1515640

Change-Id: I2eaec4711ffb72d9ab34bbe0c2c69eec8ad9a4cc
2020-12-07 18:12:31 +00:00
Treehugger Robot
77692aeea2 Merge "Make libcutils' thread local stuff more clearly deprecated." 2020-12-07 17:58:30 +00:00
Martijn Coenen
b7ab0c71a1 Merge "Split fsverity_init in two phases." am: cd91f86618
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1513212

Change-Id: I6a5d18d3023de35754f33097b4e3373d06ffa3ef
2020-12-07 14:10:20 +00:00
Martijn Coenen
cd91f86618 Merge "Split fsverity_init in two phases." 2020-12-07 13:55:48 +00:00
Treehugger Robot
f92fe9ae13 Merge "Adding 'postinstall' root dir unconditionally." am: f38f0fdd2d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1517503

Change-Id: If1f345217ea0fd7c105c7b0a8232c9a8055028f4
2020-12-05 01:55:39 +00:00
Treehugger Robot
f38f0fdd2d Merge "Adding 'postinstall' root dir unconditionally." 2020-12-05 01:15:47 +00:00
Huang Jianan
e1b25cd9ee Add erofs to supported fs type
Since erofs image has been supported, we should add erofs to supported
fs type so that it can be mounted in recovery mode.

Bug:174816929
Test: mount erofs image in recovery on cuttlefish
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Change-Id: I4199ff87acfc179a2b83d98b1675fc898144878b
2020-12-04 13:39:34 +00:00
Bowgo Tsai
2e228936f4 Adding 'postinstall' root dir unconditionally.
It is required to pass update_engine_unittests in GSI
compliance test. And it's clean to just add this mount
dir unconditionally.

Bug: 172696594
Test: `m init.environ.rc` and checks that $OUT/root/postinstall exists
Change-Id: Ib340a78af442ea66c45cecb373a9eb3c428f8dda
2020-12-04 17:07:26 +08:00
Treehugger Robot
da7bb0e81e Merge "Fix visibility rules for apex/statsd" am: 0a9aff2315
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1516918

Change-Id: I674a5fc3eb959bcc80d211be50da2577ccc4d627
2020-12-04 07:29:33 +00:00
Treehugger Robot
0a9aff2315 Merge "Fix visibility rules for apex/statsd" 2020-12-04 07:25:42 +00:00
Baligh Uddin
1b5888ee02 Fix visibility rules for apex/statsd
The //frameworks/base/apex/statsd path is being migrated to
//packages/modules/StatsD/apex.
BUG: 167962588
TEST: TH

Change-Id: Ifa64bd8268f1515597b11376cdf08828983e0c60
2020-12-04 06:07:38 +00:00
Jonglin Lee
5deedd42ef Merge "Revert "libprocessgroup: uid/pid hierarchy for cgroup v2"" am: ac216acad5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1516550

Change-Id: I518f8c2d4f9e6b62bd6797a8419bd90be0ee1773
2020-12-04 05:09:02 +00:00
Daniel Rosenberg
5be39f6b81 Merge changes Ia3aa8b3b,I6e8b80a8,I28552889 am: 2e67e77752
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1510244

Change-Id: I4f8df82e6d7419a43d666132199705056221d5dd
2020-12-04 05:08:43 +00:00
Jonglin Lee
ac216acad5 Merge "Revert "libprocessgroup: uid/pid hierarchy for cgroup v2"" 2020-12-04 04:47:39 +00:00
Daniel Rosenberg
2e67e77752 Merge changes Ia3aa8b3b,I6e8b80a8,I28552889
* changes:
  libsnapshot: Support cluster_ops in make_cow_from_ab_ota
  libsnapshot: Add silent option to inspect_cow
  libsnapshot: Group CowOperations into clusters
2020-12-04 03:47:57 +00:00
Treehugger Robot
9d879b847f Merge "Add product_available to product available modules" am: a9e6057dad
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1496003

Change-Id: I2643b1b482397a31971cc992e3ae450fb19d9797
2020-12-04 03:34:29 +00:00
Treehugger Robot
d79ac4b1c9 Merge "Revert "libsnapshot: Don't package snapuserd.rc in /vendor/etc."" am: 78edd704ab
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1517277

Change-Id: I2690eabe51667f5b12531cea165bad1c30e831df
2020-12-04 03:18:06 +00:00
Jonglin Lee
4bbabe4ca4 Revert "libprocessgroup: uid/pid hierarchy for cgroup v2"
Revert "sepolicy: rules for uid/pid cgroups v2 hierarchy"

Revert submission 1511692-cgroup v2 uid/pid hierarchy

Reason for revert: Causing intermittent cgroup kernel panics
Reverted Changes:
I80c2a069b:sepolicy: rules for uid/pid cgroups v2 hierarchy
I73f3e767d:libprocessgroup: uid/pid hierarchy for cgroup v2

Bug: 174776875
Change-Id: I2af586d63bb0312407b90b52909330cde4b7b074
Test: Locally reverted and booted 100 times without kernel panic
2020-12-04 03:12:59 +00:00
Treehugger Robot
a9e6057dad Merge "Add product_available to product available modules" 2020-12-04 02:54:47 +00:00
Treehugger Robot
78edd704ab Merge "Revert "libsnapshot: Don't package snapuserd.rc in /vendor/etc."" 2020-12-04 02:08:06 +00:00
Kiyoung Kim
7184a231cd Merge "Use bootstrap linkerconfig from early init" am: 2f3e936f72
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1512740

Change-Id: I2c43dd431947c080d26957bec876902180868a23
2020-12-04 01:36:50 +00:00
Kiyoung Kim
2f3e936f72 Merge "Use bootstrap linkerconfig from early init" 2020-12-04 01:00:33 +00:00
Justin Yun
feef4d390f Add product_available to product available modules
vendor_available modules were available to product modules.
However, not all vendor_available modules are required to be
available to product modules. Some modules want to be available only
to product modules but not vendor modules.

To cover the requirement, we separate product_available from
vendor_available.
vendor_available will not provide product available module.

Rename libcutils/include_vndk to libcutils/include_outside_system as
it provides the headers to the modules outside the system partition
including /product.

Bug: 150902910
Test: build
Change-Id: I791b5a6a1dc99442065debfce6fa0f54a335fcea
2020-12-04 09:59:20 +09:00
Marco Ballesio
d62cc3a9f5 Merge "libprocessgroup: move freezer to uid/pid hierarchy" am: 382d70e770
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1515714

Change-Id: I5a93ce298175832b920e708fe7aa848a0c5fb79c
2020-12-03 23:32:10 +00:00
Suren Baghdasaryan
f3ea309045 Merge "libprocessgroup: Change per-API level task profiles to override the diffs" am: 42fcd76e6c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1516917

Change-Id: I3534552b33f76126342268af0fa2c5ee9a293c67
2020-12-03 23:31:27 +00:00
Marco Ballesio
382d70e770 Merge "libprocessgroup: move freezer to uid/pid hierarchy" 2020-12-03 22:52:19 +00:00
Suren Baghdasaryan
42fcd76e6c Merge "libprocessgroup: Change per-API level task profiles to override the diffs" 2020-12-03 22:50:57 +00:00
Yifan Hong
f76e65f286 Revert "libsnapshot: Don't package snapuserd.rc in /vendor/etc."
This reverts commit 68ba6695bd.

Bug: 174587489
Test: build and manual inspect

Reason for revert: revert workaround. Fix is in I71227d807244b.

Change-Id: I71b1c0f933eeba9dd8d8fbef3a682657f005cc3b
2020-12-03 22:29:41 +00:00
Marco Ballesio
1414a0d4d8 libprocessgroup: move freezer to uid/pid hierarchy
Migrate the freezer controller as an attribute for the uid/pid hierarchy

Bug: 168907513
Test: manually verified that the freezer behavior was as expected after
applying the enablers in ActivityManager

Signed-off-by: Marco Ballesio <balejs@google.com>
Change-Id: Ica2c4bfd20190fb2f2dc0a530eb47e1a8427c522
2020-12-03 22:00:33 +00:00
Wei Wang
398dad25da Merge changes I13c9660a,I41745e7b,I0e6722b8 am: 673b6d47bc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1514907

Change-Id: Ib548fe1bb611a9ffb17dda634010b3f553e9af0e
2020-12-03 20:13:48 +00:00
Suren Baghdasaryan
756a60459c libprocessgroup: Change per-API level task profiles to override the diffs
Current per-API level task profiles replace the latest task profiles
rather than overriding the diffs. This poses an issue when a new
feature is added which is applicable to older devices as well we
have to change all per-API level profiles. Change the per-API task
profile support to load the latest task profiles first and then override
with per-API task profiles, similar to how vendor task profiles override
system task profiles. This minimizes the changes we need to do to the
per-API level task profiles going forward and is more consistent with
how vendor task profiles work.

Bug: 170507876
Test: boot with per-API task profiles
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I08cc4b374cede7363cf96a30ac96971d49bb7847
2020-12-03 19:39:31 +00:00
Wei Wang
673b6d47bc Merge changes I13c9660a,I41745e7b,I0e6722b8
* changes:
  init.rc: correct the obsolete comment
  Add system-background cpu group
  init.rc: create camera-deamon stune cgroup
2020-12-03 18:57:25 +00:00
David Anderson
831c717cdf Merge "libsnapshot: Don't package snapuserd.rc in /vendor/etc." am: b27b678195
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1515001

Change-Id: If6f689b1a6a6e308dcab99d0cd8b962fff436614
2020-12-03 06:11:05 +00:00
David Anderson
b27b678195 Merge "libsnapshot: Don't package snapuserd.rc in /vendor/etc." 2020-12-03 05:35:28 +00:00
Daniel Rosenberg
8603df2668 libsnapshot: Support cluster_ops in make_cow_from_ab_ota
Allows make_cow_from_ab_ota to specify cluster sizes with the
-cluster_ops flag.

Bug: 172026020
Test: make_cow_from_ab_ota -cluster_ops [n] [source] [dest folder]
Change-Id: Ia3aa8b3bb602944a9d4e9954be37afb262caf060
2020-12-02 21:31:23 -08:00
Daniel Rosenberg
d97386c3ad libsnapshot: Add silent option to inspect_cow
This adds the -s option to not print out Cow information, providing a
simple benchmark for reading and iterating through a cow file one time.

Bug: 172026020
Test: inspect cow -s [file]
Change-Id: I6e8b80a80c71155364b8467acd556d00f1dd2a42
2020-12-02 21:31:22 -08:00
Daniel Rosenberg
c62fdd91c0 libsnapshot: Group CowOperations into clusters
This introduces clusters of CowOperations to the Cow Format, improving
reader performance by allowing many operations to be read at once.

When the header's cluster_ops is a nonzero value, operations will be
clumped into packs of that number, where the last op is a special
CowClusterOp, which points to the start of the next cluster. Each
cluster is immediately followed by it's data, with the footer following
at the end of the file.

cluster_ops must not be 1, as we must include a CowClusterOp in each
group.

Change-Id: I2855288958d56569d4078f377ef0b8c01ca5c6e7
Bug: 172026020
Test: cow_api_test
2020-12-02 21:31:22 -08:00
Xin Li
ed5d1a981c Merge "Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855" into stage-aosp-master 2020-12-03 03:18:52 +00:00
Akilesh Kailash
c294f82184 Merge changes I1dc28606,I4d77c435 am: dd58ffd1a6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1511894

Change-Id: I47142bb516ec474c78d9324ef049a232b31426a4
2020-12-02 22:55:53 +00:00
Treehugger Robot
14b0ed2837 Merge "Add visibility for statsd in prep for migration." am: e248d1fa02
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1512675

Change-Id: Ic9791a70dd1d62d8d59fe0404348abf846d81a3b
2020-12-02 22:40:19 +00:00
Akilesh Kailash
dd58ffd1a6 Merge changes I1dc28606,I4d77c435
* changes:
  libsnapshot:VABC: Allow batch merge
  libsnaphot: Refactor cow_snapuserd test
2020-12-02 22:36:38 +00:00
Treehugger Robot
e248d1fa02 Merge "Add visibility for statsd in prep for migration." 2020-12-02 21:47:17 +00:00