Merge "Do not umount /vendor, /system, and /oem even if they are R/W." am: 11649e8925
am: c9f601a178
Change-Id: Ia5f3096e339ed8d088482c5c11ed5e5b906e9205
This commit is contained in:
commit
10b74ed2a6
1 changed files with 6 additions and 1 deletions
|
|
@ -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")) {
|
||||||
blockDevPartitions->emplace(blockDevPartitions->begin(), *mentry);
|
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);
|
||||||
|
}
|
||||||
} else if (MountEntry::IsEmulatedDevice(*mentry)) {
|
} else if (MountEntry::IsEmulatedDevice(*mentry)) {
|
||||||
emulatedPartitions->emplace(emulatedPartitions->begin(), *mentry);
|
emulatedPartitions->emplace(emulatedPartitions->begin(), *mentry);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue