Commit graph

3177 commits

Author SHA1 Message Date
Florian Mayer
877d1f6694 Make tombstones 664.
They are still restricted by SELinux, and apps still cannot open them
because they don't have `open` SELinux permission.

Bug: 312740614
Change-Id: I83b7e6ed39f5af64f161af3b3e8e33af0d125b20
2024-02-23 15:31:30 -08:00
Dennis Shen
61d9e2ab8d init.rc: create /metadata/aconfig, /metadata/aconfig/flags and
/metadta/aconfig/boot dirs

Create aconfig dirs on /metadata to store aconfig storage related files.

Under /metadata/aconfig we will store the following pb files:

1, aconfig_storage_location.pb, store the location of the storage files for
each container.

2, aconfig_flag_persistent_overrides.pb, store the local flag value overrides.

Under /metadata/aconfig/flags we will store flag value and info files
for each container, this include:

1, <container_name>.val flag value file
2, <container_name>.info flag info file

Under /metadata/aconfig/boot we will store read only flag value files
copied from /metadata/aconfig/flags at boot. These read only files are
used to serve flag read queries.

Bug: 312444587
Test: m
Change-Id: I8ae06e56fc9b9e8c0b06f86e3deb4219d7f49660
2024-02-13 20:47:13 +00:00
Bart Van Assche
0cf102b703 Restore I/O priority support
CL aosp/2929791 removed I/O priority support to prepare for a clean
revert of the CL that migrates the blkio controller from the v1 to the
v2 cgroup hierarchy. Since there was no other reason to revert the I/O
priority CL, restore I/O priority support.

Bug: 186902601
Change-Id: I1a4053140ab55973878bfeacfb546da3c601a895
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2024-02-01 10:52:13 -08:00
Treehugger Robot
761db93167 Merge changes from topic "b314861914" into main
* changes:
  Revert "Migrate the blkio controller to the v2 cgroup hierarchy"
  Revert "task_profiles.json: Set io.prio.class"
2024-01-26 15:38:44 +00:00
Youngtae Cha
6392be617b Merge "A new folder to store OTA telephony config update" into main 2024-01-26 15:37:46 +00:00
Randall Huang
d0ce4ca33c Revert "Migrate the blkio controller to the v2 cgroup hierarchy"
This reverts commit f99ca8aeb1.

Reason for revert: b/2768906

Change-Id: I9ce259a2c96e9f8dd8c7598204c35922b56f7a0a
2024-01-26 03:54:47 +00:00
Kangping Dong
236c7060cd [Thread] create dir /dev/socket/ot-daemon
ot-daemon may use multiple unix sockets so create a dir for it.

Bug: 320451788
Test: verified that ot-daemon can create socket
/dev/socket/ot-daemon/thread-wpan.sock

Change-Id: I43ccb11ed664cf0d59fc02e2efc721ed7284e2a0
2024-01-22 01:22:36 +08:00
Yu-Ting Tseng
80b2bf16c9 Merge "Add AID_UPROBESTATS and set up its config dir." into main 2024-01-20 03:59:30 +00:00
youngtaecha
63da53fdde A new folder to store OTA telephony config update
Bug: 320002105
Test: Build, checked /data/misc/telephonyconfig is system radio

Change-Id: Id8efee15594f372fa6aaf3fe9b9081a3cefe327b
2024-01-13 14:58:58 +00:00
Kangping Dong
680c4a332f Revert "init.rc: create /data/misc/threadnetwork folder"
This reverts commit 40e1666fb9.

Reason for revert: this directory is for the Thread stack which is
in the Tethering mainline module. Per mainline guideline, the data
should be saved in a APEX specific directory (i.e.
/data/misc/apexdata/com.android.tethering). It's safe to remove this
directory directly given this is a new feature targeting Android V

Bug: 309932508
Test: manually verified that Thread settings file can be written to
      /data/misc/apexdata/com.android.tethering/threadnetwork
Change-Id: I3a7e24b4cdc1c99ca36a22414507538279dd31cd
2024-01-03 23:02:58 +08:00
Peter Collingbourne
cee7fcd001 Mount /tmp as tmpfs.
/tmp is a volatile temporary storage location for the shell user.
As with /data/local/tmp, it is owned by shell:shell and is chmod 771.

Bug: 311263616
Change-Id: Ice0229d937989b097971d9db434d5589ac2da99a
2023-12-15 16:46:46 -08:00
Treehugger Robot
56f7436a3e Merge "Allow to set scudo allocation buffer size" into main 2023-12-01 02:52:38 +00:00
Yu-Ting Tseng
38cb94d32a Add AID_UPROBESTATS and set up its config dir.
Test: m, flash and reboot
Bug: 296108553
Change-Id: Ied5e688db8e93874ad66610c4d98c39d892d268b
2023-11-29 10:56:37 -08:00
Daniel Norman
97807f53ef Merge "Assigns system user/group to /dev/hidraw* devices." into main 2023-11-21 02:10:09 +00:00
Bart Van Assche
f99ca8aeb1 Migrate the blkio controller to the v2 cgroup hierarchy
There are multiple use cases in Android for which background writes need
to be controlled via the cgroup mechanism. The cgroup mechanism can only
control background writes if both the blkio and memcg controllers are
mounted in the v2 cgroup hierarchy. Hence this patch that migrates the
blkio controller from the v1 to the v2 cgroup hierarchy.

The changes compared to the previous version of this CL are as follows:
- The JoinCgroup actions for the "io" controller have been left out
  since these caused processes to be migrated to the v2 root cgroup.
- The BfqWeight / CfqGroupIdle / CfqWeight settings have been included
  in this CL instead of applying these settings as a separate CL.

Change-Id: I67e06ce3462bb1c1345dba78f8d3d655b6519c74
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-11-17 11:37:24 -08:00
Florian Mayer
0f64c8e23e Allow to set scudo allocation buffer size
This is used for fullmte builds, which are optimized for bug detection.

Bug: 309446692
Change-Id: I004635ebb7e1161e63012935271851c806cb8574
2023-11-16 21:16:44 +00:00
Daniel Norman
e4f981dce0 Assigns system user/group to /dev/hidraw* devices.
This allows system_server to access these devices.

Note: This also matches existing ueventd rules used by any
device which followed the Sensor HAL's dynamic sensor README.

Bug: 303522222
Test: ls -l /dev/hidraw0
Change-Id: I0830aca77422d6cab64af05dba1554667737760c
2023-11-15 03:04:07 +00:00
Shin-Yu Wang
3b16967f0f Revert "Reapply "Migrate the blkio controller to the v2 cgroup hierarchy""
This reverts commit d71f9e5fbb.

Reason for revert: p0 failed test (b/308687042)

Change-Id: I3d8cb899d79634bb1c80f7d05af5c1311358c25c
2023-11-01 06:26:31 +00:00
Bart Van Assche
d71f9e5fbb Reapply "Migrate the blkio controller to the v2 cgroup hierarchy"
This reverts commit c7a6fe684c.
Repply the blkio controller migration because it was not responsible
for the test failures that led to the revert. See also the following bugs:
* https://b.corp.google.com/issues/260143932
  (v2/android-virtual-infra/test_mapping/presubmit-avd test failure)
* https://b.corp.google.com/issues/264620181
  (CtsInitTestCases.RebootTest#StopServicesSIGKILL failure)

The only change compared with the previous version is that the io
controller has been declared optional. This is necessary because some
devices have a kernel that does not support the io controller.

Bug: 213617178
Test: Cuttlefish and various phones
Change-Id: I490740e1c9ee4f7bb5bb7afba721a083f952c8f2
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2023-10-30 16:55:14 -07:00
Elliott Hughes
5cc875126a Merge "s/master/main/" into main am: b533f531df
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2772867

Change-Id: Ide151a5572106cb6e071ecdb70d97968d2a4a8a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 16:41:39 +00:00
Elliott Hughes
b533f531df Merge "s/master/main/" into main 2023-10-05 16:09:46 +00:00
Kiyoung Kim
bf65cd213e Merge "Remove libbinder_rpc_unstable from system required libs" into main am: 7cf712ab3b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762986

Change-Id: I73895850a5c23318f309895a0e91802e7231a270
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-05 04:27:36 +00:00
Kiyoung Kim
7cf712ab3b Merge "Remove libbinder_rpc_unstable from system required libs" into main 2023-10-05 03:54:36 +00:00
Elliott Hughes
716ff7b55a s/master/main/
Test: treehugger
Change-Id: Iabb23436d92686b934f2f2609217714b64ae75de
2023-10-04 23:31:09 +00:00
Treehugger Robot
b5ce7aa444 Merge "disable sync_on_suspend when flag is set" into main am: cfec879ad6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2762661

Change-Id: I44e9af64a4562ede087007cfb19e070ad0ed3a6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-28 00:52:03 +00:00
Steve Muckle
5ebc657386 disable sync_on_suspend when flag is set
Bug: 285395636
Test: suspend/resume testing
Change-Id: I2d97d8366b864ab3e72d7ae38a0f4906dc74ec6f
2023-09-27 16:36:26 +00:00
Kiyoung Kim
566f1371e4 Remove libbinder_rpc_unstable from system required libs
libbinder_rpc_unstable is in the list of system required libs, but the
library is already located in the system/{LIB}, and this creates link to
the self namespace. Remove libbinder_rpc_unstable from system required
libs as it doesn't make sense to have require and provide same library
in a single image.

Bug: 298333253
Test: Cuttlefish build and boot succeded
Change-Id: Idb40e1dbc1053d4882093c188a36b2cc8d86e918
2023-09-27 10:26:41 +09:00
Thiébaud Weksteen
9229827386 Merge "Skip /metadata/sepolicy creation" into main am: 911d309224
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2761545

Change-Id: I7acfa6f5cb28f051ca5fae7d641d216fe5254fcf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-25 08:12:00 +00:00
Thiébaud Weksteen
a6b5f94687 Skip /metadata/sepolicy creation
Bug: 297794885
Test: presubmit
Change-Id: I93f94f319d0f86e1cad6f2a4912b5df3aae09cec
2023-09-25 16:07:47 +10:00
Hongguang Chen
426e8bf306 Merge "Only restart media.tuner when it's running" into main am: f3dd1c9389
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2745819

Change-Id: Iace55a4feec3aed0935c737db612b0e3925c2933
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 06:54:20 +00:00
Hongguang Chen
32f6920404 Only restart media.tuner when it's running
Fix: 287520719
Test: Kill system_server on TV device w/o tuner. media.tuner is not restarted.
Change-Id: I13006f16746a12c33960feca1288aa17ef2ed9c9
2023-09-08 04:19:34 +00:00
Xin Li
4484eb1bfd Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I849958d9e9de3be48e32f57acc7b3526e184482c
Change-Id: Ic765b54aa981b6370b5dff6b4cf046bbe9fbdbaf
2023-08-25 13:54:47 -07:00
Treehugger Robot
a2bac909ce Merge "Run boringssl tests according to ro.zygote" into main 2023-08-22 12:55:07 +00:00
Wei Li
55aed3f908 Merge "Track root directory symlinks created by LOCAL_POST_INSTALL_CMD in ALL_ROOTDIR_SYMLINKS and add them to ALL_DEFAULT_INSTALLED_MODULES, so they can be included in product SBOMs properly." into main 2023-08-11 18:38:12 +00:00
Wei Li
d8a270698d Track root directory symlinks created by LOCAL_POST_INSTALL_CMD in
ALL_ROOTDIR_SYMLINKS and add them to ALL_DEFAULT_INSTALLED_MODULES,
so they can be included in product SBOMs properly.

Bug: 272358980
Test: CIs and build/soong/tests/sbom_test.sh
Change-Id: I73dfb34156d681786c013912e59a0d0c0c48ecc7
2023-08-10 18:18:36 -07:00
Po-yao Chang
6fe9367f7b Run boringssl tests according to ro.zygote
If ro.zygote is zygote64, don't bother running 32-bit test.
Otherwise abilist{32,64} decides what tests to run.

Bug: 291874369
Test: make gsi_arm64-user; Check /system/etc/init/hw
Change-Id: Id10b2242606d6400acc29c3174f713581d6cce2e
2023-08-10 17:12:47 +08:00
Jooyung Han
5c4217cf6e Read .rc files from bootstrap apexes
To start an early_hal service from a bootstrap vendor apex, init now
reads .rc files from bootstrap apexes as well.

In this change, perform_apex_config command is re-purposed to support
bootstrap mode. Now we have some similarity between two apexd calls:

- for bootstrap apexes (in the bootstrap mount namespace):

  exec_start apexd-bootstrap
  perform_apex_config --bootstrap

- for normal apexes (in the default mount namespace):

  restart apexd
  ...
  wait_for_prop apexd.status activated
  perform_apex_config

Note that some tasks in perform_apex_config are not needed in the
bootstrap.  For example, we don't need to create apexdata directories
for bootstrap apexes.

Bug: 290148081
Test: VendorApexHostTestCases
Change-Id: I8f683a4dcd7cd9a2466a4b1b417d84c025c37761
2023-08-10 15:40:06 +09:00
Jooyung Han
566c65239f Use /bootstrap-apex for bootstrap APEXes
This new directory is bind-mounted to /apex in the bootstrap mount
namespace so that apexd-bootstrap mounts bootstrap APEXes there via
/apex.

The directory is shared between two mount namespaces, hence visible
in the default mount namespace.

Bug: 290148078
Test: VendorApexHostTestCases
Change-Id: I841480e41be8def5a4c6a4aa874c4e21465a71d3
2023-08-09 17:27:39 +09:00
Jooyung Han
840691be71 Revert "Use /bootstrap-apex for bootstrap APEXes"
Revert submission 2666915-share-bootstrap

Reason for revert: b/293949266 vold_prepare_subdirs fails to create apexdata directories.

Reverted changes: /q/submissionid:2666915-share-bootstrap

Change-Id: I3e97e8511755844de4b54f51ff20afc154bd8e74
2023-08-01 09:06:47 +00:00
Jooyung Han
201801ce8e Use /bootstrap-apex for bootstrap APEXes
This new directory is bind-mounted to /apex in the bootstrap mount
namespace so that apexd-bootstrap mounts bootstrap APEXes there via
/apex.

The directory is detached from /apex in the default mount namespace but
still visible in case bootstrap APEXes are needed.

However, there are (mostly, virtual) devices which don't need two mount
namespaces. Those devices don't need to make /bootstrap-apex directory
at all.

Bug: 290148078
Test: atest VendorApexHostTestCases
Test: atest MicrodroidTests
Change-Id: I541cec71d9970b14971d46e01e4808b23590dbed
2023-07-31 18:16:46 +09:00
Lee George Thomas
2493d50328 Create /data/misc/bootanim folder in init.rc.
This folder is used to host bootanim data files.

Bug: 210757252
Test: /data/misc/bootanim is correctly created.
Change-Id: I9c9949316d073ad7ebac503f097c5fee6c0b2a22
2023-07-25 15:07:17 -07:00
Jakob Vukalovic
e377432924 ueventd: Fix creation of VFIO dev nodes
VFIO nodes, both the container (`vfio`) node and group (numbered)
nodes, should be located in `/dev/vfio`. This change prevents
ueventd from flattening that structure.

Test: Bind a device to VFIO driver to create a VFIO group
Change-Id: I635e9febe6bb52718df263e735479f361eacad4c
2023-07-19 10:03:10 +01:00
Eric Biggers
42164ff920 Merge changes from topic "fsverity-init-cleanup" into main
* changes:
  init.rc: stop using fsverity_init --lock
  init: remove unfinished fsverity signature support for APEX sepolicy
2023-07-17 20:10:28 +00:00
David Anderson
f489314dec Merge changes from topic "lpdump-snapshots" into main
* changes:
  Remove local_include_dirs from fs_mgr_defaults.
  Allow processes in the "system" group to read /metadata/ota.
2023-07-17 16:55:14 +00:00
David Anderson
a71faae86f Allow processes in the "system" group to read /metadata/ota.
lpdumpd runs as "system", not "root". Adjust the DAC permissions of
/metadata/ota so it can call SnapshotManager::Dump.

Bug: 291083311
Test: lpdump
Change-Id: I97fd7eb2055cf6d31fd42f1021e2f99edbdb838a
2023-07-14 09:01:05 -07:00
Eric Biggers
6e8e8ac71f init.rc: start update_verifier instead of update_verifier_nonencrypted
The "update_verifier_nonencrypted" service is being replaced with simply
"update_verifier", so update init.rc accordingly.

Bug: 208476087
Test: presubmit
Change-Id: I58f3fb25167ff7d3679c72e5e9c012f02fa5b516
2023-07-11 00:05:35 +00:00
Eric Biggers
fac2b18fff init.rc: merge the zygote-start actions
The three actions for "zygote-start" are identical except for their
property triggers.  This seems to have been left over from when Android
supported both File Based Encryption (FBE) and Full Disk Encryption
(FDE), causing there to be four possible encryption states:

- ro.crypto.state=unsupported (No encryption configured)
- ro.crypto.state=encrypted && ro.crypto.type=file (FBE enabled)
- ro.crypto.state=unencrypted (FDE supported but disabled)
- ro.crypto.state=encrypted && ro.crypto.type=block (FDE enabled)

It seems that the reason the zygote-start action was duplicated three
times was to exclude the "FDE enabled" case, which could only be done by
explicitly listing the other three cases.

However, now that FDE is no longer supported, only the first two cases
are possible.  Therefore, zygote-start can just be the whole trigger.

Bug: 208476087
Test: presubmit
Change-Id: Icd6e4b0d2fb3f9f20595c0af4e2e35350564da8d
2023-07-10 23:33:13 +00:00
Eric Biggers
79a67391bd init.rc: stop using fsverity_init --lock
Remove the code that "locked" the .fs-verity keyring at a certain point
in the boot.  It probably was thought that this achieved some useful
security property, which is a bit questionable.  Regardless, Android no
longer uses fsverity builtin signatures.  The only code that is still
being kept around is enough to access existing files on old kernels, and
for this "locking" the keyring is definitely not essential.

Bug: 290064770
Test: presubmit and booting Cuttlefish
Change-Id: Ide5729aeac5772658b2a3f0abe835988b8842b02
2023-07-06 18:39:22 +00:00
Daeho Jeong
d6d8c1f81c init.rc: set f2fs seq_file_ra_mul to 128
Based on experiments, we fount out 128 (128 x global readahead window
size = 16mb) is the optimal multiple to boost up read speeds for the
sequentially accessed files with POSIX_FADV_SEQUENTIAL.

Bug: 195311558
Test: check the /sys/fs/f2fs/<userdata partition>/seq_file_ra_mul value
Change-Id: I7563ad6e47b9ab76ae7fe36978d0e5970a7490e8
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2023-06-28 14:35:30 -07:00
Eric Biggers
01774360d3 Merge "Remove write permission from file mode of top-level user dirs" am: 46477f1d82 am: c7f7743f4f am: 8f2e5f1ea1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2620458

Change-Id: I756e5f08b99e3b50099cadfdd4ffa67b096f7bcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 20:01:03 +00:00