Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab54410f authored by Keun-young Park's avatar Keun-young Park Committed by android-build-merger
Browse files

Merge "Do not umount /vendor, /system, and /oem even if they are R/W." am:...

Merge "Do not umount /vendor, /system, and /oem even if they are R/W." am: 11649e89 am: c9f601a1
am: 10b74ed2

Change-Id: Ie0339f41eb166e156ab61133e6a2c19e4bbd28a2
parents 9679967d 10b74ed2
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -234,7 +234,12 @@ static bool FindPartitionsToUmount(std::vector<MountEntry>* blockDevPartitions,
            LOG(INFO) << "mount entry " << mentry->mnt_fsname << ":" << mentry->mnt_dir << " opts "
            LOG(INFO) << "mount entry " << mentry->mnt_fsname << ":" << mentry->mnt_dir << " opts "
                      << mentry->mnt_opts << " type " << mentry->mnt_type;
                      << mentry->mnt_opts << " type " << mentry->mnt_type;
        } else if (MountEntry::IsBlockDevice(*mentry) && hasmntopt(mentry, "rw")) {
        } else if (MountEntry::IsBlockDevice(*mentry) && hasmntopt(mentry, "rw")) {
            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") {
                blockDevPartitions->emplace(blockDevPartitions->begin(), *mentry);
                blockDevPartitions->emplace(blockDevPartitions->begin(), *mentry);
            }
        } else if (MountEntry::IsEmulatedDevice(*mentry)) {
        } else if (MountEntry::IsEmulatedDevice(*mentry)) {
            emulatedPartitions->emplace(emulatedPartitions->begin(), *mentry);
            emulatedPartitions->emplace(emulatedPartitions->begin(), *mentry);
        }
        }