Commit graph

2815 commits

Author SHA1 Message Date
Treehugger Robot
ac46ab3c93 Merge "Load boot image props." 2020-10-16 19:23:08 +00:00
Jack Yu
b5e565d29b Merge "Create folder to store nfc snoop data" 2020-10-16 07:56:10 +00:00
Yifan Hong
a68ee762f7 Load boot image props.
This change does the following:

- Create /second_stage_resources empty dir at root.
- At runtime:
  - At first stage init:
    - mount tmpfs to /second_stage_resources.
    - Copy /system/etc/ramdisk/build.prop to
      /second_stage_resources/system/etc/ramdisk/build.prop
  - At second stage init:
    - Load prop from the above path
    - umount /second_stage_resources

Test: getprop -Z
Test: getprop
Bug: 169169031

Change-Id: I18b16aa5fd42fa44686c858982a17791b2d43489
2020-10-15 13:12:52 -07:00
Yifan Hong
f536731e5a Merge "Refactor: Move GSI AVB keys selection logic to common code." 2020-10-14 18:25:31 +00:00
Yifan Hong
d65e4851e2 Refactor: Move GSI AVB keys selection logic to common code.
Test: pass
Change-Id: I5ac139ad171432e903c400077f7855d4e4bcf041
2020-10-12 13:01:14 -07:00
Mohammad Islam
f99f09eeda Merge "Activate encryption for /data/app-staging folder" 2020-10-05 16:01:59 +00:00
Josh Gao
81c94cdce6 Start tombstoned early in post-fs-data.
Bug: http://b/169659307
Test: manual
Change-Id: Ie19de31e7e2b6cd43402cfd3a2e9274728e9e6b4
2020-10-01 14:25:36 -07:00
Mohammad Samiul Islam
0098201dc3 Activate encryption for /data/app-staging folder
Without enabling the encryption on this folder, we will not be able to
rename files from this folder to /data/app folder, since /data/app
folder is encrypted. Trying to rename files between unencrypted folder
to encrypted folder throws EXDEV error.

Turning on encryption for /data/app-staging has the following concerns:

1. Turning on the encryption will erase all of its content. But this is fine
since during OTA we fail all staged sessions anyway.
2. We need to create hardlinks from /data/app-staging to
/data/apex/active. This is also fine since we will be creating link from
encrypted folder (/data/app-staging) to non-encrypted folder and this
does not throw EXDEV error.

Bug: 163037460
Test: atest StagedInstallTest
Change-Id: Ie78f6df0c0e08de54a39c5e406957ad0a56b7727
2020-09-24 19:37:21 +01:00
Yifan Hong
4fd78ec4b3 Merge changes from topic "revert-1413808-modules_partition-UXSIXCGPHZ"
* changes:
  Revert "rootdir: Add modules directory"
  Revert "fastboot: add modules partition"
2020-09-16 22:45:54 +00:00
Yifan Hong
d50c7374cc Revert "rootdir: Add modules directory"
Revert submission 1413808-modules_partition

Reason for revert: modules partition no longer needed
Reverted Changes:
Iceafebd85:Add modules partition
I2fa96199a:rootdir: Add modules directory
Ie397b9ec6:Add modules partition.
I4200d0cf5:fastboot: add modules partition

Bug: 163543381

Change-Id: Ic9a94892c3403675eeac694d9ca0af5654f1a5c8
2020-09-15 20:07:03 +00:00
Hridya Valsaraju
72a0f10f51 Setup ueventd to support DMA-BUF heaps
Test: tested on cuttelfish with DMA-BUF heaps enabled.
Bug: 168333162
Change-Id: I2e7ed71d329edbb77319ca3cfbc4f0bf6be8fd98
2020-09-11 14:42:31 -07:00
Treehugger Robot
3bede4f44f Merge "Remove persist.sys.fuse == false code paths" 2020-09-11 15:00:27 +00:00
vichang
277c702dc3 Merge "Add a new public library libicu.so" 2020-09-11 10:19:37 +00:00
Zim
c46c2350e5 Remove persist.sys.fuse == false code paths
Since Android R, the FUSE prop is always on and FUSE-off is no longer
supported

Test: m
Bug: 160159282
Change-Id: I6db20fe8cbf8d260ba21fed5da289eacd4e53ef5
2020-09-11 11:06:29 +01:00
Yifan Hong
135508168a Merge changes from topic "modules_partition"
* changes:
  fastboot: add modules partition
  rootdir: Add modules directory
2020-09-11 00:25:24 +00:00
Treehugger Robot
bc2fbe9ce4 Merge "Create directories under /data/local/tests at boot" am: 480335dfd6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1416432

Change-Id: I3136907e6137b8045e884b9cbffbe096951b8010
2020-09-03 03:07:06 +00:00
Colin Cross
7201ef820f Create directories under /data/local/tests at boot
Create directories under /data/local/tests at boot for atest to use
to execute tests on the device.

Bug: 138450837
Test: atest binderVendorDoubleLoadTest memunreachable_unit_test memunreachable_binder_test
Change-Id: Ic8e5031ad8701a063be14b6db760feb78f3eb412
2020-09-01 11:17:37 -07:00
Xin Li
0a112d52f8 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Id18cb0e2d2f3e776a42b566c4a1af2e250890896
Change-Id: Iba7cab32ab3aa6f47952c840ff6dc8492e8d0704
2020-08-29 01:42:13 -07:00
Victor Chang
f1d18ccc8e Add a new public library libicu.so
Bug: 160350521
Test: atest CtsJniTestCases
Change-Id: I9693dc225d2ccbdd55b5e609250534e541aaeb75
2020-08-28 15:17:08 +01:00
Gavin Corkery
c0d11aa73a Merge "Store userspace reboot info in /metadata" 2020-08-26 21:47:19 +00:00
Yifan Hong
6373d11b21 rootdir: Add modules directory
... as the mount point for the modules partition. If
the partition does not exist, just leave the directory
empty.

Test: on CF check /proc/mounts
Bug: 163543381
Change-Id: I2fa96199a029179395a2d655937728f4275ba2b3
2020-08-25 18:02:23 -07:00
Gavin Corkery
8c92256df5 Store userspace reboot info in /metadata
Store pertinent information about userspace reboot events in the case
of failure. This information is any services which failed to stop
cleanly, the output of the default fstab and /proc/mounts, and
a list of mounts which failed to unmount. This information is only
stored as necessary (i.e. mount information will not be stored if
everything unmounted, even if some services failed to stop).

Added new /metadata/userspacereboot directory to persist this
information. Information older than 3 days will be deleted.

Test: adb reboot userspace with sigterm/sigkill timeouts set to
      very low values
Test: Manual test of storing all other information
Bug: 151820675
Change-Id: I6cfbfae92a7fc6f6c984475cad2c50c559924866
2020-08-21 17:32:34 +01:00
Marco Ballesio
fdc03350f4 init.rc: remove initializations to cg2_bpf path
https://r.android.com/c/1324649/5 moves the cgroup folder to its sysfs
path. Directory access rights are defined by kernel code and sepolicy,
so remove the initialization lines from init.rc.

Test: manually booted the device and verified access rights for
/sys/fs/cgroup
Bug: 154548692

Change-Id: I67284dc651ed529cae69e413b66c6e1292a2d970
2020-08-21 09:18:58 -07:00
Marco Ballesio
1c755e22c8 libprocessgroup: switch freezer to cgroup v2
remove cgroup v1 freezer entries from init.rc, add a new cgroup v2
controller and modify plists to properly interact with it.

Bug: 154548692
Test: manually verified the the cgroup v1 freezer controller isn't
created and a new controller for cgroup v2 is created under the correct
sysfs directory.

Change-Id: I1b811300ade486f88fdbd157255a7f37750cc54d
2020-08-20 15:11:41 -07:00
Marco Ballesio
76eca5b4c1 freezer: allow dynamic changes to freezer.state
create new profiles to allowing thawing and freezing back the freezer
cgroup

Bug: 151225245
Test: Manually verified that using the SetTaskProfiles method on the
profiles thaws and freezes back the freezer cgroup.

Change-Id: I7f3e193ebe79b49c1f6ac52b6138ff4ec26fc570
2020-08-19 13:18:28 -07:00
Jack Yu
6097da8b76 Create folder to store nfc snoop data
Bug: 153704838
Test: nfc snooop could be stored in this folder
Change-Id: I0cb8ea1844e6774d47d3804ed6ddb3b2206be8c8
2020-08-14 17:53:56 +08:00
Jaegeuk Kim
43dca3c8be add generic symlink to access userdata sysfs
This patch adds fixed location to access sysfs entries by introducing:
/dev/sys/fs/by-name/userdata -> /sys/fs/f2fs/dm-<num>
/dev/sys/block/by-name/userdata -> /sys/block/dm-<num>

Bug: 144277579
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I1b3768005fc8720694bace05292a1b1171d60e3c
2020-07-27 23:58:36 +00:00
Jaegeuk Kim
8d8edad443 rootdir/init.rc: enable iostat by default
Bug: 152162885
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: If95e30c7d3bfec621dfde9452a6eda5211c64a2b
Merged-In: If95e30c7d3bfec621dfde9452a6eda5211c64a2b
2020-07-25 00:20:47 +00:00
Yifan Hong
30b52007e5 Merge changes from topic "odm_dlkm" am: 3e31ec8392 am: 8c3a7ca939
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1363939

Change-Id: I8cdd4583c894d7fb5168fce1df789f2973a57357
2020-07-17 22:52:14 +00:00
Yifan Hong
e306bce927 rootdir: add odm_dlkm symlinks
Test: builds and boots
Bug: 156020364
Change-Id: I678b787cbf81ea6038936a4059e0bf5adfe3274f
2020-07-15 17:15:49 -07:00
Yifan Hong
a8e5779e18 Merge changes from topic "vendor_dlkm" am: 7ca7680ec5 am: 0c1a242060
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1350785

Change-Id: I7db376a03c329023a626c1130b7a55dc74ae9ae1
2020-07-14 19:47:16 +00:00
Yifan Hong
9374a9c6f7 rootdir: add vendor_dlkm symlinks
Test: builds and boots
Bug: 156020364
Change-Id: I99b0eeda0066d6c885aefe181f233a97507a61a9
2020-07-09 15:06:44 -07:00
Keun-young Park
bf73d615f2 Merge "Start statsd before starting zygote" into rvc-dev am: 163548736a
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11975342

Change-Id: I71ad1f73f19e0ddf7e856ecd981132498f538fea
2020-06-24 21:39:10 +00:00
Keun-young Park
163548736a Merge "Start statsd before starting zygote" into rvc-dev 2020-06-24 21:18:18 +00:00
Nikita Ioffe
a462044ac8 Explicitly call restorecon_recursive on /metadata/apex
On some devices we see a weird in which /metadata/apex will have a wrong
selinux label. This will effectively prevent such devices from getting
any apex updates. Since we haven't figured out a root cause for this
bug, it's safer to explicitly call restorecon on /metadata/apex to make
sure it's correct.

This change shouldn't affect a normal boot flow, since /metadata/apex
will already have a correct label and restorecon_recursive will be a
no-op.

Test: rm -Rf /metadata/apex && \
    mkdir /metadata/apex &&
    mkdir /metadata/apex/sessions
Bug: 149317789
Merged-In: I971ffe35c93bb79d9e71106c24515ec0ee70333a
Change-Id: I971ffe35c93bb79d9e71106c24515ec0ee70333a
(cherry picked from commit cf7b6bad55)
2020-06-24 16:30:03 +01:00
Keun young Park
6423ccd96b Start statsd before starting zygote
- zygote needs statsd for logging boot time event.
- statsd starting later leads into stats logging failure which
  is reported by all child processes of zygote later.
  This brings lots of noise in statsd error.

Bug: 159664734
Test: reboot and check if error log does not show up
  E statsd  : Found dropped events: 1 error -19 last atom tag 240 from uid 10169
Change-Id: Ie585febb50a9668671c8fda41a872595baae8385
2020-06-23 20:40:19 -07:00
Maciej Zenczykowski
ae53160792 Merge "add a new trigger for launching the bpfloader" into rvc-dev am: 227635182f
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11976442

Change-Id: Iff982438e428ca5782f93a010c5ffd5ca15217ab
2020-06-24 03:10:31 +00:00
Maciej Zenczykowski
227635182f Merge "add a new trigger for launching the bpfloader" into rvc-dev 2020-06-24 02:52:51 +00:00
Maciej Żenczykowski
c1ca9f75f9 add a new trigger for launching the bpfloader
Test: built and booted
Bug: 150040815
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Merged-In: If80758b3d7bf499d428880efa5ed555076bfc291
Change-Id: If80758b3d7bf499d428880efa5ed555076bfc291
2020-06-23 14:08:27 -07:00
Nikita Ioffe
d9469bdcd5 Merge "Explicitly call restorecon_recursive on /metadata/apex" into rvc-dev am: 6a8602a8c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11955299

Change-Id: Ibbf598ea7aac33a50fc5c7b1cab87317284e7de5
2020-06-22 21:52:04 +00:00
Nikita Ioffe
cf7b6bad55 Explicitly call restorecon_recursive on /metadata/apex
On some devices we see a weird in which /metadata/apex will have a wrong
selinux label. This will effectively prevent such devices from getting
any apex updates. Since we haven't figured out a root cause for this
bug, it's safer to explicitly call restorecon on /metadata/apex to make
sure it's correct.

This change shouldn't affect a normal boot flow, since /metadata/apex
will already have a correct label and restorecon_recursive will be a
no-op.

Test: rm -Rf /metadata/apex && \
    mkdir /metadata/apex &&
    mkdir /metadata/apex/sessions
Bug: 149317789
Change-Id: I971ffe35c93bb79d9e71106c24515ec0ee70333a
2020-06-22 16:56:38 +00:00
Maciej Żenczykowski
6c72c16e3d add a new trigger for launching the bpfloader
Test: built and booted
Bug: 150040815
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: If80758b3d7bf499d428880efa5ed555076bfc291
2020-06-22 01:11:39 -07:00
Tim Murray
e95e2ca22c Merge "Move zygote64 into the top-app stune group." into rvc-dev am: 4dc1d5f3de
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/11884893

Change-Id: I05d064f1c4f7241a5c9efc09ee6af33985a1f857
2020-06-18 19:37:18 +00:00
Tim Murray
e2318a2fce Move zygote64 into the top-app stune group.
Improve app startup performance before the new app is in the top-app
cpuset.

Test: boots, zygote64 in top-app stune group
Bug: 159201879

Change-Id: I3aad4b4b1d2f54db9e7ba86db8a655d8552bad0a
2020-06-18 10:43:01 -07:00
Treehugger Robot
620a7053c5 Merge "init.rc: chmod pagetypeinfo to 440 to be captured in BRs" am: a5032be8e0 am: f9537f222b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1335693

Change-Id: Id9735c5b6677e25f29ea817da30a3df84bee9fed
2020-06-16 08:50:38 +00:00
Martin Liu
0abd0d6aa5 init.rc: chmod pagetypeinfo to 440 to be captured in BRs
Bug: 158928824
Test: Try BR
Change-Id: I2fa42780b77d86a234ae8b53d7264fbfd6a7906c
2020-06-15 15:24:43 +00:00
Elliott Hughes
cec2d69a0b Merge "Remove zygote configuration for 32-bit primary, 64-bit secondary." 2020-06-10 23:52:34 +00:00
Elliott Hughes
409bca11de Remove zygote configuration for 32-bit primary, 64-bit secondary.
Bug: https://issuetracker.google.com/138812821
Test: treehugger
Change-Id: I67c59f1956cec7ea46ded6e0a772ac1226e2a7b3
Merged-In: I67c59f1956cec7ea46ded6e0a772ac1226e2a7b3
2020-06-10 22:52:52 +00:00
Elliott Hughes
326f8e27db Remove zygote configuration for 32-bit primary, 64-bit secondary.
Bug: https://issuetracker.google.com/138812821
Test: treehugger
Change-Id: I67c59f1956cec7ea46ded6e0a772ac1226e2a7b3
2020-06-10 00:24:48 +00:00
Rick Yiu
11d167b575 Fine tune blkio setting to improve boot time
Bug: 133200996
Test: boot time test
Change-Id: I5262c28596adb7e849b202b8a163c190818f271a
Merged-In: I5262c28596adb7e849b202b8a163c190818f271a
2020-06-09 04:34:40 +00:00