From c0cd37be9dd66d5fe7448389a71ee21f60e876e1 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Fri, 29 Jun 2018 10:31:07 +0800 Subject: [PATCH] Do not unmount /mnt/product/* when vold starts Bug: 110808288 Test: Boot a device and checks /mnt/product/foo mounted in early mount isn't unmounted. Change-Id: Ide411cd78565505bc72ed57e79f3d31b6392b27c --- VolumeManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VolumeManager.cpp b/VolumeManager.cpp index 98f12e8..1a8c79d 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp @@ -754,7 +754,8 @@ int VolumeManager::unmountAll() { while ((mentry = getmntent(fp)) != NULL) { auto test = std::string(mentry->mnt_dir); if ((android::base::StartsWith(test, "/mnt/") && - !android::base::StartsWith(test, "/mnt/vendor")) || + !android::base::StartsWith(test, "/mnt/vendor") && + !android::base::StartsWith(test, "/mnt/product")) || android::base::StartsWith(test, "/storage/")) { toUnmount.push_front(test); }