Merge changes from topic "fuse_fix_shell"
* changes:
Vold mkdirs should use lower filesystem.
Use the default sdcardfs view for the Android/ bind-mount.
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 8b9c29c..143f53c 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -809,8 +809,9 @@
int VolumeManager::mkdirs(const std::string& path) {
// Only offer to create directories for paths managed by vold
if (StartsWith(path, "/storage/")) {
+ std::string lower_path = "/mnt/runtime/default/" + path.substr(9);
// fs_mkdirs() does symlink checking and relative path enforcement
- return fs_mkdirs(path.c_str(), 0700);
+ return fs_mkdirs(lower_path.c_str(), 0700);
} else {
LOG(ERROR) << "Failed to find mounted volume for " << path;
return -EINVAL;
diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index 130e747..aef7b77 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -75,7 +75,7 @@
// TODO(b/134706060) we don't actually want to mount the "write" view by
// default, since it gives write access to all OBB dirs.
std::string androidSource(
- StringPrintf("/mnt/runtime/write/%s/%d/Android", label.c_str(), userId));
+ StringPrintf("/mnt/runtime/default/%s/%d/Android", label.c_str(), userId));
std::string androidTarget(
StringPrintf("/mnt/user/%d/%s/%d/Android", userId, label.c_str(), userId));