diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index c3ad2dc..8445cd8 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -193,8 +193,8 @@
     // sandboxId will be in either the format shared:<shared-user-id> or <package-name>
     // and <shared-user-id> name has same requirements as <package-name>.
     std::size_t nameStartIndex = 0;
-    if (sandboxId.find("shared:") == 0) {
-        nameStartIndex = 7; // len("shared:")
+    if (android::base::StartsWith(sandboxId, "shared:")) {
+        nameStartIndex = 7;  // len("shared:")
     }
     return checkArgumentPackageName(sandboxId.substr(nameStartIndex));
 }
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 2a8e8b7..594fcde 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -358,7 +358,24 @@
                 return -errno;
             }
         }
-        return mountSandboxesForPrimaryVol(source, userId, packageNames, isPrimaryEmulated);
+        if (mountSandboxesForPrimaryVol(source, userId, packageNames, isPrimaryEmulated) != 0) {
+            return -errno;
+        }
+        // Keep /sdcard working for shell process
+        std::string primarySource(mPrimary->getPath());
+        if (isPrimaryEmulated) {
+            StringAppendF(&primarySource, "/%d", userId);
+        }
+        std::string target(StringPrintf("/mnt/user/%d/primary", userId));
+        if (TEMP_FAILURE_RETRY(unlink(target.c_str()))) {
+            if (errno != ENOENT) {
+                PLOG(WARNING) << "Failed to unlink " << target;
+            }
+        }
+        if (TEMP_FAILURE_RETRY(symlink(primarySource.c_str(), target.c_str()))) {
+            PLOG(WARNING) << "Failed to link " << primarySource << " at " << target;
+            return -errno;
+        }
     } else {
         std::string source(mPrimary->getPath());
         if (mPrimary->getType() == android::vold::VolumeBase::Type::kEmulated) {
@@ -403,10 +420,14 @@
         return -errno;
     }
 
-    std::string segment = StringPrintf("%d/package/", userId);
-    std::string mntTargetRoot = prepareSubDirs("/mnt/user", segment.c_str(),
-            0700, AID_ROOT, AID_ROOT);
-    if (mntTargetRoot.empty()) {
+    std::string mntTargetRoot = StringPrintf("/mnt/user/%d", userId);
+    if (fs_prepare_dir(mntTargetRoot.c_str(), 0751, AID_ROOT, AID_ROOT) != 0) {
+        PLOG(ERROR) << "fs_prepare_dir failed on " << mntTargetRoot;
+        return -errno;
+    }
+    mntTargetRoot.append("/package");
+    if (fs_prepare_dir(mntTargetRoot.c_str(), 0700, AID_ROOT, AID_ROOT) != 0) {
+        PLOG(ERROR) << "fs_prepare_dir failed on " << mntTargetRoot;
         return -errno;
     }
 
diff --git a/cryptfs.cpp b/cryptfs.cpp
index 16c589e..c4274ed 100644
--- a/cryptfs.cpp
+++ b/cryptfs.cpp
@@ -322,10 +322,6 @@
 
 constexpr CryptoType supported_crypto_types[] = {
     default_crypto_type,
-    CryptoType()
-        .set_property_name("Speck128/128-XTS")
-        .set_crypto_name("speck128-xts-plain64")
-        .set_keysize(32),
     // Add new CryptoTypes here.  Order is not important.
 };
 
