soong: Conditionally spoof ro.product.first_api_level to 32 [1/2]

Devices that shipped on API 33 or higher need to set
ro.product.first_api_level to 32 in order to pass integrity.

Set SPOOF_FIRST_API_LEVEL_32 := true in BoardConfig*.mk to enable.

Signed-off-by: AnierinB <anierin@evolution-x.org>
This commit is contained in:
AnierinB
2024-07-19 18:09:00 +00:00
committed by Joey
parent e0a87580e4
commit e5c777927f
2 changed files with 24 additions and 0 deletions

View File

@@ -108,3 +108,20 @@ cc_library_headers {
name: "prebuilt_kernel_headers",
defaults: ["prebuilt_kernel_header_defaults"],
}
soong_config_module_type {
name: "spoof_first_api_level_32",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
bool_variables: ["spoof_first_api_level_32"],
properties: ["cppflags"]
}
spoof_first_api_level_32 {
name: "spoof_first_api_level_32_defaults",
soong_config_variables: {
spoof_first_api_level_32: {
cppflags: ["-DSPOOF_FIRST_API_LEVEL_32"],
},
},
}

View File

@@ -29,6 +29,13 @@ endef
$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v))))
SOONG_CONFIG_NAMESPACES += lineageGlobalVars
SOONG_CONFIG_lineageGlobalVars += \
spoof_first_api_level_32
# Soong bool variables
SOONG_CONFIG_lineageGlobalVars_spoof_first_api_level_32 := $(SPOOF_FIRST_API_LEVEL_32)
# Camera
ifneq ($(TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED),)
$(error TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED is deprecated, please migrate to soong_config_set,camera,override_format_from_reserved)