Make /data/media case insensitive
Use chattr to apply +F to /data/media
This will fail on devices who do not support casefolding on userdata.
Bug: 138322712
Test: /data/media is set to +F.
Change-Id: Ib341c23a0992ee97b23113b3a72f33a61e583b04
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 5f4b8c3..2ee32bd 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -676,10 +676,6 @@
mkdir /data/user/0 0700 system system encryption=None
mount none /data/data /data/user/0 bind rec
- # Special-case /data/media/obb per b/64566063
- mkdir /data/media 0770 media_rw media_rw encryption=None
- mkdir /data/media/obb 0770 media_rw media_rw encryption=Attempt
-
# A tmpfs directory, which will contain all apps CE DE data directory that
# bind mount from the original source.
chown root root /data_mirror
@@ -717,6 +713,11 @@
wait_for_prop apexd.status ready
perform_apex_config
+ # Special-case /data/media/obb per b/64566063
+ mkdir /data/media 0770 media_rw media_rw encryption=None
+ exec - media_rw media_rw -- /system/bin/chattr +F /data/media
+ mkdir /data/media/obb 0770 media_rw media_rw encryption=Attempt
+
exec_start derive_sdk
init_user0