From a01c27eef8e9361df63a62c916619fb809bc647b Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Tue, 25 Jul 2017 10:52:08 -0700 Subject: [PATCH] Do not umount roofs even if it is R/W. Latest device has rootfs instead of "/system" mount point Bug: 37737296 Test: adb remount, reboot, and check log Change-Id: I315ecf71e85255fc55c3a80619920b456bad0956 --- init/reboot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/reboot.cpp b/init/reboot.cpp index e4779c7e2..17e3576a7 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -237,7 +237,8 @@ static bool FindPartitionsToUmount(std::vector* blockDevPartitions, std::string mount_dir(mentry->mnt_dir); // These are R/O partitions changed to R/W after adb remount. // Do not umount them as shutdown critical services may rely on them. - if (mount_dir != "/system" && mount_dir != "/vendor" && mount_dir != "/oem") { + if (mount_dir != "/" && mount_dir != "/system" && mount_dir != "/vendor" && + mount_dir != "/oem") { blockDevPartitions->emplace(blockDevPartitions->begin(), *mentry); } } else if (MountEntry::IsEmulatedDevice(*mentry)) {