Merge "Create and support isolation for /data/storage_area" into main am: 6f7e39526c

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2966591

Change-Id: I3a3a2bee455e7ffb6e727cbbcabfe9bc8d27f601
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Ellen Arteca 2024-04-26 21:21:05 +00:00 committed by Automerger Merge Worker
commit 5204d8a7c4

View file

@ -961,6 +961,10 @@ on post-fs-data
mkdir /data/vendor_ce 0551 root root encryption=None
mkdir /data/vendor_de 0551 root root encryption=None
# Similar to the top-level CE and DE directories, /data/storage_area must
# itself be unencrypted, since it contains encrypted directories.
mkdir /data/storage_area 0551 root root encryption=None
# Set the casefold flag on /data/media. For upgrades, a restorecon can be
# needed first to relabel the directory from media_rw_data_file.
restorecon /data/media
@ -974,8 +978,12 @@ on post-fs-data
mkdir /data_mirror/data_de 0700 root root
mkdir /data_mirror/misc_ce 0700 root root
mkdir /data_mirror/misc_de 0700 root root
mkdir /data_mirror/storage_area 0700 root root
# Create CE and DE data directory for default volume
# Not needed for storage_area directory, since this is
# not supported for non-default volumes and the path
# does not include the volume ID
mkdir /data_mirror/data_ce/null 0700 root root
mkdir /data_mirror/data_de/null 0700 root root
mkdir /data_mirror/misc_ce/null 0700 root root
@ -990,6 +998,9 @@ on post-fs-data
mount none /data/misc_ce /data_mirror/misc_ce/null bind rec
mount none /data/misc_de /data_mirror/misc_de/null bind rec
# Also bind mount for the storage area directory (minus the volume ID)
mount none /data/storage_area /data_mirror/storage_area bind rec
# Create mirror directory for jit profiles
mkdir /data_mirror/cur_profiles 0700 root root
mount none /data/misc/profiles/cur /data_mirror/cur_profiles bind rec
@ -1330,6 +1341,8 @@ on userspace-reboot-fs-remount
umount /data_mirror/data_ce/null/0
umount /data_mirror/data_ce/null
umount /data_mirror/data_de/null
umount /data_mirror/storage_area/0
umount /data_mirror/storage_area
umount /data_mirror/cur_profiles
umount /data_mirror/ref_profiles
umount /data_mirror