From 6057c30431d587005c7a62cd95c8ab4055641342 Mon Sep 17 00:00:00 2001 From: Brendan Szymanski Date: Tue, 14 Jul 2026 11:47:44 -0400 Subject: [PATCH] Switch PRODUCT_AAPT_PREF_CONFIG to xhdpi to fix display sizing The root cause of the oversized/clipped UI is TvFrameworkOverlay's config_maxUiWidth=1280 in the values-tvdpi resource bucket. With PRODUCT_AAPT_PREF_CONFIG=tvdpi, the device resolves this bucket and the 1280px cap is enforced, limiting the logical display to 1280x720 (which SurfaceFlinger then upscales to 1920x1080). The Raspberry Pi 5 ATV build (KonstaKANG) uses PRODUCT_AAPT_PREF_CONFIG=xhdpi and has no display sizing issues, because values-xhdpi has config_maxUiWidth=1920 (no effective cap on 1080p displays). Also adds a values-xhdpi/config.xml overlay with config_maxUiWidth=0 as defense-in-depth, matching the existing values-tvdpi override. Copyright (C) 2026 Brendan Szymanski --- lineage_tart.mk | 6 ++++- .../res/values-xhdpi/config.xml | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml diff --git a/lineage_tart.mk b/lineage_tart.mk index f41885d..dffedac 100644 --- a/lineage_tart.mk +++ b/lineage_tart.mk @@ -9,7 +9,11 @@ # Inherit device configuration $(call inherit-product, device/rockchip/tart/aosp_tart.mk) -PRODUCT_AAPT_PREF_CONFIG := tvdpi +# Use xhdpi instead of tvdpi to avoid TvFrameworkOverlay's config_maxUiWidth=1280 +# in the values-tvdpi bucket, which caps a 1920x1080 display to 1280x720. +# The RPi5 ATV build uses the same approach (PRODUCT_AAPT_PREF_CONFIG := xhdpi) +# and resolves config_maxUiWidth=1920 (no effective cap on 1080p). +PRODUCT_AAPT_PREF_CONFIG := xhdpi PRODUCT_CHARACTERISTICS := tv # LineageOS ATV base diff --git a/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml b/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml new file mode 100644 index 0000000..73b9322 --- /dev/null +++ b/overlay/AndroidTvOpiOverlay/res/values-xhdpi/config.xml @@ -0,0 +1,24 @@ + + + + + + 0 +