From 4a47c74b7526ed5da00bbcdb45929c91058f020a Mon Sep 17 00:00:00 2001 From: Roman Kiryanov Date: Tue, 9 Mar 2021 17:05:26 -0800 Subject: [PATCH] Populate `ro.boot.qemu` for the emulator device Bug: 182291166 Test: presubmit Signed-off-by: Roman Kiryanov Change-Id: Ied78f42363c1f6580fe6e5660b14c257960aed98 --- init/property_service.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init/property_service.cpp b/init/property_service.cpp index ad448c82e..382f43030 100644 --- a/init/property_service.cpp +++ b/init/property_service.cpp @@ -1169,8 +1169,11 @@ static void ProcessKernelCmdline() { ImportKernelCmdline([&](const std::string& key, const std::string& value) { if (StartsWith(key, ANDROIDBOOT_PREFIX)) { InitPropertySet("ro.boot." + key.substr(ANDROIDBOOT_PREFIX.size()), value); - } else if (StartsWith(key, "qemu."sv) || (key == "qemu")) { + } else if (StartsWith(key, "qemu."sv)) { InitPropertySet("ro.kernel." + key, value); + } else if (key == "qemu") { + InitPropertySet("ro.kernel." + key, value); // emulator specific, deprecated + InitPropertySet("ro.boot." + key, value); } }); }