diff --git a/system/core/init/property_service.cpp b/system/core/init/property_service.cpp index 2d67bf5d772..23a1b0f4726 100644 --- a/system/core/init/property_service.cpp +++ b/system/core/init/property_service.cpp @@ -1234,6 +1234,14 @@ 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 (key == "lcd") { + std::size_t found = value.find_first_of(","); + InitPropertySet("ro.boot.panel", value.substr(0, found)); + if (found != std::string::npos) { + auto dpi = std::atoi(value.substr(found + 1).c_str()); + if (dpi >= 80 && dpi <= 640) + InitPropertySet("ro.sf.lcd_density", android::base::StringPrintf("%d", dpi)); + } } }); }