I'm looking for an explanation of the following AOSP build properties, what valid values are and how they affect the build and any related properties. I am aware of the system property ro.sf.lcd_density
but I can't find any official documentation anywhere about these:
PRODUCT_AAPT_CONFIG
PRODUCT_AAPT_PREF_CONFIG
PRODUCT_AAPT_PREBUILT_DPI
This is my experience, and probably should not be the accepted answer as I'm not certain I have the whole story.
PRODUCT_AAPT_PREF_CONFIG: The "preferred" resources qualifier. This should be one of the entries in PRODUCT_AAPT_CONFIG.
PRODUCT_AAPT_CONFIG: an ordered list of the resources qualifier. This acts as a fallback in case the preferred resource qualifier does not exist.
PRODUCT_LOCALES: A list of locales that will be included. For whatever reason locales are a special case of resource qualifier.
In my case, I used this:
PRODUCT_AAPT_CONFIG := large xlarge mdpi tvdpi hdpi
PRODUCT_AAPT_PREF_CONFIG := hdpi
PRODUCT_LOCALES := en_US en_GB en_IE de_DE pl_PL pt_BR es_US
Our device is TVDPI, but since there are generally no TVDPI specific resources, I picked the next size up as preferred (HDPI). I included "large xlarge mdpi tvdpi hdpi" to allow for a fallback in case there was no HDPI resources.