Skip to content

System DPI

This chapter describes how to modify the screen density (DPI) of the Android system to adapt to displays of different resolutions.

Default DPI and Configuration Files

The DPI configuration files and default values for each board are listed below:

Model SoC SDK Default DPI Configuration File
K1 / K1B RK3568 rk-android13.0 200 device/rockchip/rk356x/rk3568_t/rk3568_t.mk
K1 MINI RK3568 rk-android13.0 / rk-android14.0 200 device/rockchip/rk356x/rk3568_t/rk3568_t.mk
K2B / K2C H618 h618-android12.0 200 device/softwinner/apollo/apollo_p2.mk
K3 RK3562 rk-android13.0 200 device/rockchip/rk3562/rk3562_t/rk3562_t.mk
K3B RK3562 rk-android13.0 / rk-android14.0 200 device/rockchip/rk3562/rk3562_t/rk3562_t.mk
K5 / K5C A133 a133-android10.0 160 android/device/softwinner/ceres-c3/ceres_c3.mk
K7 / K7C / K7S_F RK3576 rk3576-android14.0 200 device/rockchip/rk3576/rk3576_u/rk3576_u.mk
K8 RK3588 rk-android13.0 200 device/rockchip/rk3588/rk3588_t/rk3588_t.mk
K8D RK3588S2 rk-android13.0 / rk-android14.0 280 device/rockchip/rk3588/rk3588s_t/rk3588s_t.mk
K9 T527 t527-android13.0 160 device/softwinner/saturn/t527-demo/device-common.mk
K10B A733 a733-android13.0 160 device/softwinner/jupiter/a733-demo-aiot/device-common.mk
K11C RK3566 rk-android13.0 / rk-android14.0 200 device/rockchip/rk356x/rk3566_t/rk3566_t.mk
TX66 RK3566 rk-android13.0 200 device/rockchip/rk356x/rk3566_t/rk3566_t.mk

Modifying the Source Code

Modify the ro.sf.lcd_density property value in the corresponding configuration file. Taking K1 (RK3568) as an example:

--- a/device/rockchip/rk356x/rk3568_t/rk3568_t.mk
+++ b/device/rockchip/rk356x/rk3568_t/rk3568_t.mk
@@ -40,7 +40,7 @@
 ## add Rockchip properties
 #
-PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=200
+PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=120
 PRODUCT_PROPERTY_OVERRIDES += ro.wifi.sleep.power.down=true
 PRODUCT_PROPERTY_OVERRIDES += persist.wifi.sleep.delay.ms=0

For other boards, modify the corresponding configuration file listed in the table above. After modification, recompile and flash the firmware.

Temporary Modification via Command Line

You can also change the DPI temporarily via command line (the change takes effect immediately but resets to the default value after reboot):

wm density <density>

To make the change permanent, you need to modify the corresponding configuration file and recompile and flash the firmware.