Keep /sdcard working for shell process when isolated storage is enabled.
Relax permissions of /mnt/user/<user-id> so that shell can access
/mnt/user/<user-id>/primary.
Bug: 111890351
Test: manual
Change-Id: I38e87f581b1177ea04cab851c78ffb2f756e4b0e
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 7380692..19691e2 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -386,7 +386,7 @@
// Create /mnt/user/0/package/<package-name>
userid_t user_id = multiuser_get_user_id(uid);
StringAppendF(&pkg_sandbox_dir, "/%d", user_id);
- if (fs_prepare_dir(pkg_sandbox_dir.c_str(), 0700, AID_ROOT, AID_ROOT) != 0) {
+ if (fs_prepare_dir(pkg_sandbox_dir.c_str(), 0751, AID_ROOT, AID_ROOT) != 0) {
*error_msg = CREATE_ERROR("fs_prepare_dir failed on %s", pkg_sandbox_dir.c_str());
return false;
}