Android-Framework 默认横屏、dpi设置

发布时间:2023年12月17日

一、环境

高通865 Android 10

二、源码修改位置

1、修改dpi?

device/qcom/kona/kona.mk

@@ -116,7 +116,7 @@ TARGET_USES_RRO := true
 # system prop for Bluetooth SOC type
 PRODUCT_PROPERTY_OVERRIDES += \
     vendor.qcom.bluetooth.soc=hastings \
-	ro.sf.lcd_density=480
+	ro.sf.lcd_density=360

2、修改为默认横屏,即修改分辨率

hardware/qcom/display/composer/hwc_display.cpp
@@ -1089,11 +1089,11 @@ HWC2::Error HWCDisplay::GetDisplayAttribute(hwc2_config_t config, HWC2::Attribut
       break;
     case HWC2::Attribute::Width:
       // *out_value = INT32(variable_config.x_pixels);
-      *out_value = property_get_int32("ro.boot.virtdroid_width", 1080);
+      *out_value = property_get_int32("ro.boot.virtdroid_width", 1920);
       break;
     case HWC2::Attribute::Height:
       // *out_value = INT32(variable_config.y_pixels);
-      *out_value = property_get_int32("ro.boot.virtdroid_height", 1920);
+      *out_value = property_get_int32("ro.boot.virtdroid_height", 1080);
       break;
     case HWC2::Attribute::DpiX:
       *out_value = INT32(variable_config.x_dpi * 1000.0f);

vendor/qcom/proprietary/devicetree-4.19/qcom/project_visional.dtsi
@@ -224,8 +224,8 @@
 &display_timing {
         qcom,mdss-dsi-panel-framerate = <144>;
         /delete-property/ qcom,mdss-dsi-panel-width;
-        qcom,mdss-dsi-panel-width = <1080>;
-        qcom,mdss-dsi-panel-height = <1920>;
+        qcom,mdss-dsi-panel-width = <1920>;
+        qcom,mdss-dsi-panel-height = <1080>;
 };

文章来源:https://blog.csdn.net/banzhuantuqiang/article/details/134947817
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。