Commit graph

3371 commits

Author SHA1 Message Date
Woody Lin
106eb02fe6 Merge "Add init.svc_debug.no_fatal.<svc_name> to skip SVC_CRITICAL" am: 81bf17ce0f am: 1d24da452d am: 568cd24f41
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1554980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7244d08c7956d28b664e17057b9f587d38ef7498
2021-01-23 01:43:11 +00: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
Treehugger Robot
0033d173ec Merge "Make ro.product.cpu.abilist* to be fetched dynamically" am: 8e3826b8b1 am: e45bdf9293 am: 1e1836140c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1538764

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iccc60c4977bec77e30c2bc0868b484fe27ad02eb
2021-01-15 13:59:18 +00: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
c7a6f9d544 Merge "Let init mount/unmount debugfs for non-user builds" am: 8376d87e2d am: 2bd8b0a33a am: 54be11cf54
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1542228

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iad2c594e104d94f792ec1cbb34627397be42cff9
2021-01-13 05:52:23 +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
db8d87c646 Merge "Deprecate /factory" am: bedae3910c am: 232c427b52 am: 977b7d21bc
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1547514

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I199e2acf90c7166e66e8f27084e1007076e08411
2021-01-13 02:18:26 +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
9051b026d3 Merge changes from topic "snapuserd-selinux" am: 270c98f190 am: 956696c7d8 am: efe26e5380
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1546849

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic8d0f4386a9d3d9d9bcee8dbe788f244014b11fd
2021-01-12 22:24:51 +00: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
a782a5c8d6 Merge "Add boot animation progress system property." am: 5266e041ef am: 6d2e6e246c am: 69fab4410c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1530810

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifde01593e054ae005cb58d7d4d58380da4103629
2021-01-07 10:18:08 +00: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
8957b3267e Merge "init: Sort the list of flattened APEX folders to avoid variations" am: 0f2c5417c3 am: 570fe2083c am: 8b40485f58
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1538222

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie86d99f0e8ff660a3b2fcce76c19590e4f12318c
2020-12-31 05:08:15 +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
5e5916375f Merge "Add explicit Result::ok() checks where needed" am: bc053268cf am: 0b0c5424a8 am: d2a4c1f841
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1229625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c670a3776c37b7d60e89469e13ec32c3172fee2
2020-12-22 07:02:53 +00: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
e84a8425b4 Merge "init: don't generate tombstones for expected test failures" am: 0b8d2fef69 am: 2a90da3ea8 am: 2d50616415
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1529980

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I038d020bf27c45c1ab74a98f8f2e8c4817bde3df
2020-12-15 19:11:19 +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
4511691572 Merge "Log start of the test to logcat" am: 356b184468 am: e7f989d826 am: 3f473c9dfb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1526419

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0dc82c58cef51b6145af52dc5d1fc16be571e0dc
2020-12-15 16:30:20 +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
3496966eed Merge "Add reboot_test" 2020-12-15 12:34:00 +00: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
Nikita Ioffe
660ffde3dc Add reboot_test
This test spawns several services backed by /system/bin/yes executable,
and then stops them either while SIGTERM or SIGKILL.

Ideally we want to unit test more of reboot logic, but that requires a
bigger refactoring.

Test: atest CtsInitTestCases
Bug: 170315126
Bug: 174335499
Change-Id: Ife48b1636c6ca2d0aac73f4eb6f4737343a88e7a
2020-12-11 16:37:10 +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
Elliott Hughes
2acdc9de33 Merge "Use freecon() with getcon()/getfilecon()." 2020-12-09 19:03:16 +00:00
Tom Cherry
26ff6deb67 Merge "ueventd: add no_fnm_pathname option" am: 6cf3695502 am: a95f900d69
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1518705

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7e6ecd974922ef6a5b26cd722860d59d8032b62f
2020-12-09 16:19:06 +00:00
Tom Cherry
1597ec0ac5 Merge "ueventd: add the import option from the init parser" am: 0608e36fb9 am: 877e2374a7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1520220

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5983dc88d2dc8f4225b168969e25f9f969f71c55
2020-12-09 16:18:55 +00:00
Tom Cherry
6cf3695502 Merge "ueventd: add no_fnm_pathname option" 2020-12-09 15:50:16 +00:00