Commit graph

3375 commits

Author SHA1 Message Date
Treehugger Robot
9b147f7347 Merge "Remove ART APEX from the bootstrap apexes" am: dfab416188 am: 7472ac1537
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1563459

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I23524bc7a2b30598cf096b1b52bf2606ecf03eca
2021-01-30 04:37:55 +00:00
Jiyong Park
b99c12ef10 Remove ART APEX from the bootstrap apexes
Test: forrest
Bug: 169779935
Change-Id: I65e2a2089fa12674f3abbbe2f154eeec984dd5df
2021-01-29 12:08:31 +09:00
Tianjie Xu
33e1b08f0e Merge "Set hashtree algorithm for verity partitions" am: b9c7459fba am: 161e4a8e24
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1553475

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5ca90dacea5c14500cb95522369de3064efb9fbc
2021-01-28 04:09:51 +00:00
Tianjie Xu
b9c7459fba Merge "Set hashtree algorithm for verity partitions" 2021-01-28 03:03:21 +00:00
Treehugger Robot
c0aeaaba14 Merge "ueventd: deprecate paths without /etc/" am: 587f5e922c am: 5850f8efd6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1526382

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7ebecc9c845cac20dc5af3aee66abab067fd9fb6
2021-01-27 01:13:54 +00:00
Treehugger Robot
e4dd4f554a Merge "Make second stage init visible to microdroid" am: e8cc75f059 am: 405bb6ed44
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1557543

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2a996964a1694bdf21119ae72b0312e232386e17
2021-01-27 01:13:21 +00:00
Treehugger Robot
587f5e922c Merge "ueventd: deprecate paths without /etc/" 2021-01-26 23:53:54 +00:00
Treehugger Robot
e8cc75f059 Merge "Make second stage init visible to microdroid" 2021-01-26 23:47:46 +00:00
Tom Cherry
71dd7064cc ueventd: deprecate paths without /etc/
ueventd.rc scripts belong in the /etc/ directory of their given
partition, not the root of the partition.  This can cause problems,
especially since Android.bp cannot write to the root directly, forcing
vendors to use Android.mk for these files.  Note that
/system/etc/ueventd.rc moved long ago.

Test: Tree-hugger
Change-Id: I2dcaafc3c3f687f76ab6bc38af979c8b43346db0
2021-01-26 12:26:09 -08:00
Treehugger Robot
6b8a836733 Merge "Revert "first_stage_mount: Create snapshot devices before launching first_stage_console"" am: f2d359cbaa am: 72cca38225
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1558926

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6770e5889b05388c5d44ced44b509d50a5b6eaa0
2021-01-26 18:41:52 +00:00
Yiwei Zhang
4c467e3c15 Revert "first_stage_mount: Create snapshot devices before launching first_stage_console"
This reverts commit 9583e92257.

Reason for revert: <fail to flash a device>
Bug: 178433260

Change-Id: I0e9ab3eff38ddf9ad420cf1479eca16f6f29d1b5
2021-01-26 06:00:46 +00:00
David Anderson
3526a48e87 Merge changes I82b7d77b,I6b77690c am: ad7d1d13a4 am: 85d6c1cff5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1526995

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3865a6659fdc430e9573e9fe5e8a522520b76438
2021-01-25 21:56:04 +00:00
Elliot Berman
9583e92257 first_stage_mount: Create snapshot devices before launching first_stage_console
During device bringup, dynamic partitions may not be properly
configured by some sort of build or load misconfiguration. Diagnosing
such issues can be difficult without being able to see which partitions
are available and what they contain.

Aditionally, making logical partitions available to first stage console
permits early mounting of vendor partition and allows primitive
validation of vendor scripts without requiring full Android
environment. For instance, vendor_dlkm partition and modules can be
probed needing to have a full Android bootup.

Creation of logical partitions is done only when first_stage_console is
requested in order to have minimal impact on normal boot. Thus, only a
small refactor is required to split CreateLogicalPartitions out of
MountPartitions.

Bug: 174685384
Bug: 173732805
Change-Id: I82b7d77b9dc75af59b5e18b574e3eb99c8aff9e2
Signed-off-by: Elliot Berman <eberman@quicinc.com>
2021-01-25 09:53:36 -08:00
Elliot Berman
a619f22e37 first_stage_mount: Move CreateLogicalPartitions to DoFirstStageMount
In preparation for later commit:
   first_stage_mount: Create snapshot devices before launching
first_stage_console

Bug: 173732805
Bug: 174685384
Change-Id: I6b77690c7cf68f6235c99bf4ff897b0ee41c4d0e
Signed-off-by: Elliot Berman <eberman@quicinc.com>
2021-01-25 09:53:35 -08:00
Jiyong Park
903537884f Make second stage init visible to microdroid
microdroid is the base image for on-device VMs. We will use Android
components (init, adbd, servicemanager, ...) on the VM as much as
possible.

Bug: 177630284
Test: m microdroid
Change-Id: I36890644baaaf8f441698411dd869ddb220734fb
2021-01-25 19:12:17 +09:00
Woody Lin
568cd24f41 Merge "Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL" am: 81bf17ce0f am: 1d24da452d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I24d7311db98edd38ae5b58c5943c1f5851b64594
2021-01-23 01:27:57 +00:00
Woody Lin
ef9d460ea8 Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL
For user who would like to retain the crash symptom and avoid device
from power cycle for live debugging, set
init.svc_debug.no_fatal.<svc_name> to "true" to skip FATAL reboot.

Bug: 177593855
Change-Id: I0bdb6191e5963c08e1ea301a60060acf916dd49b
2021-01-22 15:01:36 +08:00
Tianjie
327237d13a Set hashtree algorithm for verity partitions
This is used in cts tests to verify that algorithms in blocklist aren't
used to build the hashtree. The system properties are required to perform
the check on unrooted devices.

Bug: 175236047
Test: flash, getprop; atest CtsNativeVerifiedBootTestCases

Change-Id: I2dcfdb06f85dbe92cde45e836dd68e7bd835020f
2021-01-20 19:02:34 -08:00
Treehugger Robot
1e1836140c Merge "Make ro.product.cpu.abilist* to be fetched dynamically" am: 8e3826b8b1 am: e45bdf9293
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1538764

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I682ffbdbf13c875a6fabad658cf03edca0009c84
2021-01-14 18:49:55 +00:00
Treehugger Robot
8e3826b8b1 Merge "Make ro.product.cpu.abilist* to be fetched dynamically" 2021-01-14 18:34:21 +00:00
Treehugger Robot
54be11cf54 Merge "Let init mount/unmount debugfs for non-user builds" am: 8376d87e2d am: 2bd8b0a33a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1542228

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1c78fb1c001db0cba52db0135b449c73b56dc5ee
2021-01-13 05:32:50 +00:00
Treehugger Robot
8376d87e2d Merge "Let init mount/unmount debugfs for non-user builds" 2021-01-13 04:24:22 +00:00
SzuWei Lin
977b7d21bc Merge "Deprecate /factory" am: bedae3910c am: 232c427b52
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1547514

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id1355101b19f7bedabba3ff58d93ac20273e6666
2021-01-13 01:59:57 +00:00
SzuWei Lin
bedae3910c Merge "Deprecate /factory" 2021-01-13 01:11:43 +00:00
Hridya Valsaraju
fb921a1c4e Let init mount/unmount debugfs for non-user builds
This change will help non-user builds with keeping debugfs
disabled during run time. Instead, debugfs will be mounted by init
to enable boot time initializations to set up vendor debug data
collection and unmounted after boot. It will be also be mounted by
dumpstate for bug report generation and unmounted after.

This change is only intended to help vendors (who depend on debugfs to
collect debug information from userdebug/eng builds) keep debugfs
disabled during runtime. Platform code must not depend on debugfs at all.

Test: manual
Bug: 176936478
Change-Id: I2e89d5b9540e3de094976563682d4b8c5c125876
2021-01-12 14:41:53 -08:00
David Anderson
efe26e5380 Merge changes from topic "snapuserd-selinux" am: 270c98f190 am: 956696c7d8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1546849

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2ecbf88e6ecaf4ef62cc2c171519fbf461c4ab4a
2021-01-12 22:08:49 +00:00
SzuWei Lin
478868826f Deprecate /factory
After Treblized, AOSP do not handle /factory folder. Also, AOSP
does not mount any partition to /factory. /factory has no possibility
to have any content. For factory purpose, it can be implemented in
vendor.

Bug: 177280838
Test: na
Change-Id: I0a2537336c2ef1efbad3e4f9e876aeaa607bc737
2021-01-12 12:18:39 +08:00
David Anderson
491e4da372 init: Add an selinux transition for snapuserd.
With compressed VAB updates, it is not possible to mount /system without
first running snapuserd, which is the userspace component to the dm-user
kernel module. This poses a problem because as soon as selinux
enforcement is enabled, snapuserd (running in a kernel context) does not
have access to read and decompress the underlying system partition.

To account for this, we split SelinuxInitialize into multiple steps:

First, sepolicy is read into an in-memory string.

Second, the device-mapper tables for all snapshots are rebuilt. This
flushes any pending reads and creates new dm-user devices. The original
kernel-privileged snapuserd is then killed.

Third, sepolicy is loaded from the in-memory string.

Fourth, we re-launch snapuserd and connect it to the newly created
dm-user devices. As part of this step we restorecon device-mapper
devices and /dev/block/by-name/super, since the new snapuserd is in a
limited context.

Finally, we set enforcing mode.

This sequence ensures that snapuserd has appropriate privileges with a
minimal number of permissive audits.

Bug: 173476209
Test: full OTA with VABC applies and boots
Change-Id: Ie4e0f5166b01c31a6f337afc26fc58b96217604e
2021-01-08 16:39:51 -08:00
SzuWei Lin
0061d4da01 Make ro.product.cpu.abilist* to be fetched dynamically
Basically, ro.product.cpu.abilist* are defined by
ro.vendor.cpu.abilist*. And they can be overried by
ro.odm.cpu.abilist* and ro.product.cpu.abilist*.
ro.system.cpu.abilist* are for fallback if others are no defined.

Bug: 176520383
Test: check the result by flashing aosp_arm64-userdebug on
Test: aosp_blueline-user and aosp_blueline-user hacked by
Test: 64-bits-only
Change-Id: I01ae01af099a4ec8fe3d4525edecc233a477ff60
2021-01-08 15:02:42 +08:00
Nicolas Geoffray
69fab4410c Merge "Add boot animation progress system property." am: 5266e041ef am: 6d2e6e246c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1530810

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib39e27f457e40ca98b79250a3a51626147b2ea68
2021-01-07 10:02:53 +00:00
Nicolas Geoffray
5266e041ef Merge "Add boot animation progress system property." 2021-01-07 09:23:35 +00:00
Jiyong Park
8b40485f58 Merge "init: Sort the list of flattened APEX folders to avoid variations" am: 0f2c5417c3 am: 570fe2083c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1538222

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I90ee4644f921d6bde03dbaef3f3e86fc080affaa
2020-12-31 04:34:56 +00:00
Adrian DC
9449583bc3 init: Sort the list of flattened APEX folders to avoid variations
* In 'ActivateFlattenedApexesFrom', the 'readdir' detects
   the APEX folders in a random way that depends on filesystems,
   built packages and order of the build chain

 * In normal cases, this is not an issue, however when building
   with Go configurations, we have a case where the package
   'com.android.tethering.inprocess' is built along the
   'com.android.tethering' overriden binary, and depending on
   the 'readdir' output, the mounts break the Tethering service

Change-Id: I8ac4a0284d8d885f732c71e846933869cf16a0bd
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2020-12-30 22:41:33 +01:00
Bernie Innocenti
d2a4c1f841 Merge "Add explicit Result::ok() checks where needed" am: bc053268cf am: 0b0c5424a8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1229625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I66dafc280da0421afccadcd6c1c24e74dc306bf2
2020-12-21 19:20:02 +00:00
Bernie Innocenti
062ef5356d Add explicit Result::ok() checks where needed
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Exempt-From-Owner-Approval: mechanical mass refactoring
Change-Id: I8d40b1e3cb5d2f76baf77b8a190df4366909f7b6
2020-12-20 17:06:17 +00:00
Treehugger Robot
2d50616415 Merge "init: don't generate tombstones for expected test failures" am: 0b8d2fef69 am: 2a90da3ea8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1529980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I96debd5144ce163cdab07a7018208858e17658f4
2020-12-15 19:02:55 +00:00
Nicolas Geoffray
e106f0aaeb Add boot animation progress system property.
Test: m
Bug: 175686819
Change-Id: Ic2757054b908e2c7ff51e256e8683616df74fb33
2020-12-15 18:34:47 +00:00
Treehugger Robot
0b8d2fef69 Merge "init: don't generate tombstones for expected test failures" 2020-12-15 18:22:09 +00:00
Nikita Ioffe
3f473c9dfb Merge "Log start of the test to logcat" am: 356b184468 am: e7f989d826
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1526419

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If31b80253977f61e0cee5edf5ca9cdff4e73aa71
2020-12-15 16:15:59 +00:00
Tom Cherry
94b1c57d93 init: don't generate tombstones for expected test failures
The firmware_handler.HandleAbort and subcontext.RecoverAfterAbort
tests intentionally abort in the child process to ensure that
ueventd/init can recover if their child processes die.  This generates
a tombstone which causes confusion.  This change resets SIGABRT to
SIG_DFL right before the abort(), so that the child processes will
exit normally without generating a tombstone or writing a crash to
logcat.

Bug: 169771958
Bug: 175383788
Test: run the above tests and verify no stack traces are printed to
      logcat and no tombstones are generated.
Change-Id: Ica09548d1c7a766bf5d9ff2e26c9fd558e85c7c1
2020-12-15 06:38:55 -08:00
Nikita Ioffe
356b184468 Merge "Log start of the test to logcat" 2020-12-15 12:21:46 +00:00
Treehugger Robot
82f688e397 Merge "Add new owners to various sub-projects." am: e107d445f6 am: 25e7a66ad5
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1526395

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie4793f6147ac1930d379203e1ed23ce45d4bc624
2020-12-11 23:29:15 +00:00
Elliott Hughes
21de4e727e Add new owners to various sub-projects.
Test: treehugger
Change-Id: Ia2a99c0499633ccc5d23c37a1ec93867c876d637
2020-12-11 12:45:45 -08:00
Nikita Ioffe
9e4b111a33 Log start of the test to logcat
This makes it easier to associate logs written during the test with the
test case that was running.

Test: atest CtsInitTestCases
Change-Id: I832f1c9ba8358341c934fdd91a65f5739bc98e37
2020-12-11 18:00:45 +00:00
Tom Cherry
e2d6d3e8f2 Merge "init: remove DumpShutdownDebugInformation()" am: 6ece3c44fe am: afcc16e4e9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1523598

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie865819e057b04761999a408bfb9e0a542f75384
2020-12-10 19:41:31 +00:00
Tom Cherry
6ece3c44fe Merge "init: remove DumpShutdownDebugInformation()" 2020-12-10 18:55:52 +00:00
Tom Cherry
959ea63b30 init: remove DumpShutdownDebugInformation()
This hasn't helped investigating the issue, and the issue itself isn't
a problem anymore, so we remove these logs.

Bug: 155203339
Test: reboot
Change-Id: I20e51d8fcad5572906a8d556bec8a8dee4522834
2020-12-10 07:34:29 -08:00
Yifan Hong
6c9f509cdb Merge changes from topic "readonly_generic_ramdisk" am: 696882455b am: 3401909e7c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1519823

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I696a169b18eb038958dafa45f63cd9a5528456c0
2020-12-09 20:42:04 +00:00
Elliott Hughes
93f97df267 Merge "Use freecon() with getcon()/getfilecon()." am: 2acdc9de33 am: ebcf0925fc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1521162

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaae3f3c53604eb9fc24a83b49516b75c29490372
2020-12-09 20:40:06 +00:00
Yifan Hong
696882455b Merge changes from topic "readonly_generic_ramdisk"
* changes:
  Add /metadata to ramdisk.
  Also create dirs under /first_stage_ramdisk for GKI.
  Refactor the list of empty dirs in ramdisk in its own list.
  Revert "Move e2fsck into /first_stage_ramdisk."
2020-12-09 19:46:17 +00:00