diff --git a/fs_mgr/fs_mgr_fstab.cpp b/fs_mgr/fs_mgr_fstab.cpp index a836d3be7..b218f21b2 100644 --- a/fs_mgr/fs_mgr_fstab.cpp +++ b/fs_mgr/fs_mgr_fstab.cpp @@ -829,6 +829,20 @@ std::set GetBootDevices() { return std::set(boot_devices.begin(), boot_devices.end()); } + std::string cmdline; + if (android::base::ReadFileToString("/proc/cmdline", &cmdline)) { + std::set boot_devices; + const std::string cmdline_key = "androidboot.boot_device"; + for (const auto& [key, value] : fs_mgr_parse_boot_config(cmdline)) { + if (key == cmdline_key) { + boot_devices.emplace(value); + } + } + if (!boot_devices.empty()) { + return boot_devices; + } + } + // Fallback to extract boot devices from fstab. Fstab fstab; if (!ReadDefaultFstab(&fstab)) {