From 5d53bfce2dfc1a48143c69182fea76be81091c37 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Fri, 13 Dec 2019 16:16:19 +0100 Subject: [PATCH] Have /storage always point to sdcardfs by default. This is a partial revert of change Idf851b3a42910e0ce8fdd75daea1cce91dd1aa98, and brings us back to the state we shipped in Q. The default behavior for now is that we want native daemons to use the default sdcardfs view, as they did before. Zygote-spawned apps will then get the correct view assigned to them as they get spawned. Bug: 146189163 Test: atest AdoptableHostTest Change-Id: I2248f39e029138962a41a6ead944431414c901ad --- rootdir/init.rc | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index b89c45e0d..c2c9df382 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -421,6 +421,9 @@ on post-fs # Once everything is setup, no need to modify /. # The bind+remount combination allows this to work in containers. mount rootfs rootfs / remount bind ro nodev + # Mount default storage into root namespace + mount none /mnt/runtime/default /storage bind rec + mount none none /storage slave rec # Make sure /sys/kernel/debug (if present) is labeled properly # Note that tracefs may be mounted under debug, so we need to cross filesystems @@ -718,22 +721,6 @@ on post-fs-data chown root system /dev/fscklogs/log chmod 0770 /dev/fscklogs/log -# Switch between sdcardfs and FUSE depending on persist property -# TODO: Move this to ro property before launch because FDE devices -# interact with persistent properties differently during boot -on zygote-start && property:persist.sys.fuse=true - # Mount default storage into root namespace - mount none /mnt/user/0 /storage bind rec - mount none none /storage slave rec -on zygote-start && property:persist.sys.fuse=false - # Mount default storage into root namespace - mount none /mnt/runtime/default /storage bind rec - mount none none /storage slave rec -on zygote-start && property:persist.sys.fuse="" - # Mount default storage into root namespace - mount none /mnt/runtime/default /storage bind rec - mount none none /storage slave rec - # It is recommended to put unnecessary data/ initialization from post-fs-data # to start-zygote in device's init.rc to unblock zygote start. on zygote-start && property:ro.crypto.state=unencrypted