Minor init.rc tweaks
I don't think the owner/group of the directories we mount APKs in
matters much, but we should at least be consistent. We don't really
use the system user, microdroid_manager runs as root, so let's use
that.
We don't need the explicit restorecon since init's mkdir does one
automatically. (And does it before we start microdroid_manager,
avoiding a race condition - admittedly a very unlikely one.)
Bug: 308759880
Test: Started a VM with & without extra APKs
Change-Id: I3266ce626405e933fd82c8cd4dd064e0a9a223b9
diff --git a/microdroid/init.rc b/microdroid/init.rc
index c257cdb..f5f3f15 100644
--- a/microdroid/init.rc
+++ b/microdroid/init.rc
@@ -31,7 +31,7 @@
exec_start init_debug_policy
on init
- mkdir /mnt/apk 0755 system system
+ mkdir /mnt/apk 0755 root root
mkdir /mnt/extra-apk 0755 root root
# Allow the payload access to the console (default is 0600)
@@ -40,9 +40,6 @@
# Microdroid_manager starts apkdmverity/zipfuse/apexd
start microdroid_manager
- # restorecon so microdroid_manager can create subdirectories
- restorecon /mnt/extra-apk
-
# Wait for apexd to finish activating APEXes before starting more processes.
# Microdroid starts apexd in VM mode in which apexd doesn't wait for init after setting
# apexd.status to activated, but immediately transitions to ready. Therefore, it's not safe to