From 6b06fc51efd345add6daf029c922ce8d10bd5224 Mon Sep 17 00:00:00 2001 From: Zim Date: Fri, 31 Jan 2020 16:11:48 +0000 Subject: [PATCH] Create /mnt/pass_through/ in zygote if not created Similar to /mnt/user, there is a very rare chance that the FUSE daemon is started before vold mounts the volume, in that rare case, we should still create the /mnt/pass_through/ dir in zygote before bind mounting into /storage Test: manual Bug: 135341433 Change-Id: Ibb0ee2657b3030ecec8fcef8e447f1fd4548457e --- core/jni/com_android_internal_os_Zygote.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 1ea7d61443561..92941b8cb22b8 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -820,6 +820,7 @@ static void MountEmulatedStorage(uid_t uid, jint mount_mode, if (isFuse) { if (mount_mode == MOUNT_EXTERNAL_PASS_THROUGH) { const std::string pass_through_source = StringPrintf("/mnt/pass_through/%d", user_id); + PrepareDir(pass_through_source, 0710, AID_ROOT, AID_MEDIA_RW, fail_fn); BindMount(pass_through_source, "/storage", fail_fn); } else if (mount_mode == MOUNT_EXTERNAL_INSTALLER) { const std::string installer_source = StringPrintf("/mnt/installer/%d", user_id);