当前位置: 代码迷 >> 综合 >> [RK3288][Android5.1] 调试笔记 --- 修复HDMI缩放重启不保存问题
  详细解决方案

[RK3288][Android5.1] 调试笔记 --- 修复HDMI缩放重启不保存问题

热度:84   发布时间:2023-10-09 13:48:45.0

Platform: RK3288
OS: Android 5.1.1
Kernel: v3.10.0

问题:

设置-HDMI-屏幕缩放,设置之后生效,重启不保存;

路径:/system/displayd/ScreenScaleManager.cpp

index 3d6aff8..e3baf4c 100755
--- a/ScreenScaleManager.cpp
+++ b/ScreenScaleManager.cpp
@@ -38,7 +38,7 @@ ScreenScaleManager::ScreenScaleManager() {memset(property, 0, PROPERTY_VALUE_MAX);sprintf(property, "overscan %d,%d,%d,%d", overscan_left, overscan_top, overscan_right, overscan_bottom);
-//             write(fd, property, strlen(property));
+               write(fd, property, strlen(property));close(fd);property_set(PROPETY_OVERSCAN_MAIN, property);}
@@ -57,7 +57,7 @@ ScreenScaleManager::ScreenScaleManager() {overscan_bottom = DEFALUT_SCREEN_SCALE;memset(property, 0, PROPERTY_VALUE_MAX);sprintf(property, "overscan %d,%d,%d,%d", overscan_left, overscan_top, overscan_right, overscan_bottom);
-//             write(fd, property strlen(property));
+               write(fd, property, strlen(property));close(fd);property_set(PROPETY_OVERSCAN_AUX, property);}
调试的时候可以通过adb确定主副屏;
如果 HDMI 是主屏:setprop persist.sys.overscan.main "overscan 100,100,100,100"
如果 HDMI 是副屏:setprop persist.sys.overscan.aux "overscan 100,100,100,100"
获取主屏缩放的属性: getprop persist.sys.overscan.main
获取副屏缩放的属性:getprop persist.sys.overscan.aux
  相关解决方案