Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
aecc714
add bluetooth to standard key mapping
thestinger Aug 18, 2022
0205a71
add cortex-a76 to ARMv8.2 list
thestinger Oct 12, 2021
719651e
use -fwrapv when signed overflow checking is off
thestinger Sep 14, 2016
2e5a105
don't compress APEXes
muhomorr Mar 7, 2023
f048fa1
always use UTC as the time zone for build dates
thestinger May 13, 2020
e41f3a8
envsetup.sh: source product-specific script from lunch/choosecombo
muhomorr Aug 29, 2023
f561004
support setting per-product PLATFORM_SECURITY_PATCH variable
muhomorr Aug 29, 2023
4eb9130
support setting per-product BUILD_ID variable
muhomorr Aug 29, 2023
b742625
add GrapheneOS build environment setup
muhomorr Sep 13, 2023
131833e
disable BOARD_USES_SYSTEM_OTHER_ODEX for mainline
thestinger Mar 16, 2020
0969189
always use dex preopt
thestinger Sep 6, 2019
6131d9b
disable ART JIT
thestinger Aug 28, 2016
0662832
always use speed mode ahead-of-time compilation
thestinger Sep 8, 2016
01ac8f7
use "speed-profile" compiler filter for boot-after-ota dexopt
muhomorr Oct 13, 2023
793e974
add TARGET_HAS_ARM_MTE to soong variables
muhomorr Oct 25, 2023
2a3f7f2
product: Enable gestural navigation overlay to match default nav mode
thestinger Oct 25, 2021
8560682
disable memory tagging for surfaceflinger
muhomorr Dec 12, 2023
e9c6586
don't exclude Gallery from Private Space preinstalls
muhomorr Oct 17, 2024
3598891
rename messaging to Messaging
thestinger Jan 17, 2025
3cf0cb4
add NetworkLocation
muhomorr Nov 22, 2024
1d8f3a4
use sdk_phone64_x86_64 as the default target
thestinger Nov 1, 2023
c219b7f
add target for adevtool state collection build
muhomorr Jul 13, 2025
23ff0c9
remove references to unavailable Pixel overlays
muhomorr Oct 20, 2025
4669896
add dev-build-only variant of gmscompat_lib key
muhomorr Oct 20, 2025
cfbefb5
add gmscompat_lib key to sign_target_files_apks key mapping
muhomorr Oct 23, 2025
f1b50e2
extend adevtool-state-collection-inputs target
muhomorr Nov 12, 2025
eead271
don't build Windows variants of host tools by default
muhomorr Nov 12, 2025
1330048
Revert "Update the otatools-package enabled scope"
muhomorr Nov 12, 2025
2f21d5e
Revert "Move otatools-package from make to soong"
muhomorr Nov 12, 2025
300f0ac
add factory images scripts to otatools.zip
thestinger Sep 16, 2020
665e42d
add GrapheneOS scripts to otatools.zip
thestinger Oct 15, 2021
b24bd38
add fastboot to otatools
muhomorr Aug 8, 2024
ae913ed
add GrapheneOS Speech Services app
soupslurpr Jan 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5289,6 +5289,67 @@ INTERNAL_ALLIMAGES_FILES := \
$(INTERNAL_SYSTEM_DLKMIMAGE_FILES) \
$(INTERNAL_PVMFWIMAGE_FILES) \

FULLER_ALLIMAGES_FILES := $(INTERNAL_ALLIMAGES_FILES) \
$(filter \
$(TARGET_DEBUG_RAMDISK_OUT)/% \
$(TARGET_RAMDISK_OUT)/% \
$(TARGET_RECOVERY_OUT)/% \
$(TARGET_VENDOR_KERNEL_RAMDISK_OUT)/% \
$(TARGET_VENDOR_RAMDISK_OUT)/% \
,$(ALL_DEFAULT_INSTALLED_MODULES))

define write-allimages-file-list
$(file >$(PRODUCT_OUT)/allimages-file-list.txt,$(sort $(FULLER_ALLIMAGES_FILES)))
endef

.PHONY: allimages-file-list
allimages-file-list: $(call write-allimages-file-list)

ALL_SYSCONFIG_FILES := $(filter \
$(TARGET_OUT)/etc/classpaths/systemserverclasspath.pb \
$(TARGET_OUT)/etc/sysconfig/% \
$(TARGET_OUT_SYSTEM_EXT)/etc/sysconfig/% \
$(TARGET_OUT_PRODUCT)/etc/sysconfig/% \
$(TARGET_OUT_VENDOR)/etc/sysconfig/% \
$(TARGET_OUT_ODM)/etc/sysconfig/% \
$(TARGET_OUT)/etc/permissions/% \
$(TARGET_OUT_SYSTEM_EXT)/etc/permissions/% \
$(TARGET_OUT_PRODUCT)/etc/permissions/% \
$(TARGET_OUT_VENDOR)/etc/permissions/% \
$(TARGET_OUT_ODM)/etc/permissions/% \
$(TARGET_OUT)/etc/default-permissions/% \
$(TARGET_OUT_SYSTEM_EXT)/etc/default-permissions/% \
$(TARGET_OUT_PRODUCT)/etc/default-permissions/% \
$(TARGET_OUT_VENDOR)/etc/default-permissions/% \
$(TARGET_OUT_ODM)/etc/default-permissions/% \
,$(INTERNAL_ALLIMAGES_FILES))

.PHONY: sysconfigs
sysconfigs: $(ALL_SYSCONFIG_FILES)

ALL_VINTF_FILES := $(filter \
$(TARGET_OUT)/etc/vintf/% \
$(TARGET_OUT_SYSTEM_EXT)/etc/vintf/% \
$(TARGET_OUT_PRODUCT)/etc/vintf/% \
$(TARGET_OUT_VENDOR)/etc/vintf/% \
$(TARGET_OUT_ODM)/etc/vintf/% \
,$(INTERNAL_ALLIMAGES_FILES))

.PHONY: vintfs
vintfs: $(ALL_VINTF_FILES)

adevtool-state-collection-inputs: \
allimages-file-list \
build-props \
$(INSTALLED_RECOVERY_BUILD_PROP_TARGET) \
module-info \
selinux_policy \
sepolicy.recovery \
sysconfigs \
vintfs \

.PHONY: adevtool-state-collection-inputs

# -----------------------------------------------------------------
# Run apex_sepolicy_tests for all installed APEXes

Expand Down Expand Up @@ -5812,6 +5873,7 @@ INTERNAL_OTATOOLS_MODULES := \
delta_generator \
e2fsck \
e2fsdroid \
fastboot \
fc_sort \
fec \
fsck.erofs \
Expand Down Expand Up @@ -5886,6 +5948,78 @@ INTERNAL_OTATOOLS_FILES := \
.PHONY: otatools
otatools: $(INTERNAL_OTATOOLS_FILES)

# For each module, recursively resolve its host shared library dependencies. Then we have a full
# list of modules whose installed files need to be packed.
INTERNAL_OTATOOLS_MODULES_WITH_DEPS := \
$(sort $(INTERNAL_OTATOOLS_MODULES) \
$(foreach m,$(INTERNAL_OTATOOLS_MODULES),$(call get-all-shared-libs-deps,$(m))))

INTERNAL_OTATOOLS_PACKAGE_FILES := \
$(filter $(HOST_OUT)/%,$(call module-installed-files,$(INTERNAL_OTATOOLS_MODULES_WITH_DEPS)))

INTERNAL_OTATOOLS_PACKAGE_FILES += \
$(sort $(shell find build/make/target/product/security -type f -name "*.x509.pem" -o \
-name "*.pk8"))

ifneq (,$(wildcard packages/modules))
INTERNAL_OTATOOLS_PACKAGE_FILES += \
$(sort $(shell find packages/modules -type f -name "*.x509.pem" -o -name "*.pk8" -o -name \
"key.pem"))
endif

ifneq (,$(wildcard device))
INTERNAL_OTATOOLS_PACKAGE_FILES += \
$(sort $(shell find device $(wildcard vendor) -type f -name "*.pk8" -o -name "verifiedboot*" -o \
-name "*.pem" -o -name "oem*.prop" -o -name "*.avbpubkey"))
endif
ifneq (,$(wildcard external/avb))
INTERNAL_OTATOOLS_PACKAGE_FILES += \
$(sort $(shell find external/avb/test/data -type f -name "testkey_*.pem" -o \
-name "atx_metadata.bin"))
endif

# Factory images
INTERNAL_OTATOOLS_PACKAGE_FILES += \
device/common/clear-factory-images-variables.sh \
device/common/generate-factory-images-common.sh

# GrapheneOS scripts
INTERNAL_OTATOOLS_PACKAGE_FILES += \
script/common.sh \
script/decrypt-keys \
script/encrypt-keys \
script/generate-metadata \
script/generate-release.sh \
script/generate-delta.sh

INTERNAL_OTATOOLS_RELEASETOOLS := \
$(shell find build/make/tools/releasetools -name "*.pyc" -prune -o \
\( -type f -o -type l \) -print | sort)

BUILT_OTATOOLS_PACKAGE := $(PRODUCT_OUT)/otatools.zip
$(BUILT_OTATOOLS_PACKAGE): PRIVATE_ZIP_ROOT := $(call intermediates-dir-for,PACKAGING,otatools)/otatools
$(BUILT_OTATOOLS_PACKAGE): PRIVATE_OTATOOLS_PACKAGE_FILES := $(INTERNAL_OTATOOLS_PACKAGE_FILES)
$(BUILT_OTATOOLS_PACKAGE): PRIVATE_OTATOOLS_RELEASETOOLS := $(INTERNAL_OTATOOLS_RELEASETOOLS)
$(BUILT_OTATOOLS_PACKAGE): $(INTERNAL_OTATOOLS_PACKAGE_FILES) $(INTERNAL_OTATOOLS_RELEASETOOLS)
$(BUILT_OTATOOLS_PACKAGE): $(SOONG_ZIP) $(ZIP2ZIP)
@echo "Package OTA tools: $@"
rm -rf $@ $(PRIVATE_ZIP_ROOT)
mkdir -p $(dir $@)
$(call copy-files-with-structure,$(PRIVATE_OTATOOLS_PACKAGE_FILES),$(HOST_OUT)/,$(PRIVATE_ZIP_ROOT))
$(call copy-files-with-structure,$(PRIVATE_OTATOOLS_RELEASETOOLS),build/make/tools/,$(PRIVATE_ZIP_ROOT))
cp $(SOONG_ZIP) $(ZIP2ZIP) $(MERGE_ZIPS) $(PRIVATE_ZIP_ROOT)/bin/
$(SOONG_ZIP) -o $@ -C $(PRIVATE_ZIP_ROOT) -D $(PRIVATE_ZIP_ROOT)

$(call declare-1p-container,$(BUILT_OTATOOLS_PACKAGE),build)
$(call declare-container-license-deps,$(INTERNAL_OTATOOLS_PACKAGE_FILES) $(INTERNAL_OTATOOLS_RELEASETOOLS),$(BUILT_OTATOOLS_PACKAGE):)

.PHONY: otatools-package
otatools-package: $(BUILT_OTATOOLS_PACKAGE)

$(call dist-for-goals, otatools-package, \
$(BUILT_OTATOOLS_PACKAGE) \
)

endif # build_otatools_package

# -----------------------------------------------------------------
Expand Down
6 changes: 0 additions & 6 deletions core/android_soong_config_vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,6 @@ ifneq ($(filter StorageManager, $(PRODUCT_PACKAGES)),)
$(call soong_config_set_bool,ci_tests,uses_storage_manager_tests,true)
endif

ifneq ($(BUILD_OS),darwin)
ifneq ($(TARGET_SKIP_OTATOOLS_PACKAGE),true)
$(call soong_config_set_bool,otatools,use_otatools_package,true)
endif
endif

# Variables for qcom bluetooth modules.
$(call soong_config_set,qcom_bluetooth,TARGET_BLUETOOTH_UART_DEVICE,$(TARGET_BLUETOOTH_UART_DEVICE))
$(call soong_config_set_bool,qcom_bluetooth,BOARD_HAVE_QCOM_FM,$(if $(filter true,$(BOARD_HAVE_QCOM_FM)),true,false))
Expand Down
5 changes: 1 addition & 4 deletions core/board_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,7 @@ _board_true_false_vars := $(_build_broken_var_list)
_board_strip_readonly_list += $(_build_broken_var_list) \
BUILD_BROKEN_NINJA_USES_ENV_VARS

# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)
WITH_DEXPREOPT ?= true
endif
WITH_DEXPREOPT := true

# ###############################################################
# Broken build defaults
Expand Down
5 changes: 5 additions & 0 deletions core/build_id.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ifneq ($(ALLOW_BUILD_ID_MK_INCLUSION), 1)
# do not allow including this file from unexpected places, since that would break per-product
# BUILD_ID. See core/version_util.mk
$(error ALLOW_BUILD_ID_MK_INCLUSION is not set)
endif
#
# Copyright (C) 2008 The Android Open Source Project
#
Expand Down
2 changes: 1 addition & 1 deletion core/combo/TARGET_linux-arm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76
KNOWN_ARMv8_CORES += kryo kryo385 exynos-m1 exynos-m2

KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 kryo385
KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 cortex-a76 kryo385

ifeq (,$(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT := generic
Expand Down
6 changes: 6 additions & 0 deletions core/config_sanitizers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -575,3 +575,9 @@ ifneq ($(findstring fsanitize,$(my_cflags)),)
endif
endif
endif

ifeq ($(filter signed-integer-overflow integer undefined,$(my_sanitize)),)
ifeq ($(filter -ftrapv,$(my_cflags)),)
my_cflags += -fwrapv
endif
endif
11 changes: 4 additions & 7 deletions core/dex_preopt_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else
endif

# The default value for LOCAL_DEX_PREOPT
DEX_PREOPT_DEFAULT ?= $(ENABLE_PREOPT)
DEX_PREOPT_DEFAULT := true

# Whether to fail immediately if verify_uses_libraries check fails, or to keep
# going and restrict dexpreopt to not compile any code for the failed module.
Expand Down Expand Up @@ -56,12 +56,9 @@ SYSTEM_OTHER_ODEX_FILTER ?= \
# Global switch to control if updatable boot jars are included in dexpreopt.
DEX_PREOPT_WITH_UPDATABLE_BCP := true

# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)
# Add mini-debug-info to the boot classpath unless explicitly asked not to.
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
PRODUCT_DEX_PREOPT_BOOT_FLAGS += --generate-mini-debug-info
endif
# Add mini-debug-info to the boot classpath unless explicitly asked not to.
ifneq (false,$(WITH_DEXPREOPT_DEBUG_INFO))
PRODUCT_DEX_PREOPT_BOOT_FLAGS += --generate-mini-debug-info
endif

# Get value of a property. It is first searched from PRODUCT_VENDOR_PROPERTIES
Expand Down
7 changes: 3 additions & 4 deletions core/envsetup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ CORRECT_BUILD_ENV_SEQUENCE_NUMBER := 13
# ---------------------------------------------------------------
# The product defaults to generic on hardware
ifeq ($(TARGET_PRODUCT),)
TARGET_PRODUCT := aosp_arm64
TARGET_PRODUCT := sdk_phone64_x86_64
endif


Expand Down Expand Up @@ -144,8 +144,7 @@ BUILD_OS := $(HOST_OS)

# We can do the cross-build only on Linux
ifeq ($(HOST_OS),linux)
# Windows has been the default host_cross OS
ifeq (,$(filter-out windows,$(HOST_CROSS_OS)))
ifeq ($(HOST_CROSS_OS),windows)
# We can only create static host binaries for Linux, so if static host
# binaries are requested, turn off Windows cross-builds.
ifeq ($(BUILD_HOST_static),)
Expand All @@ -158,7 +157,7 @@ ifeq ($(HOST_OS),linux)
ifeq (,$(HOST_CROSS_ARCH))
$(error HOST_CROSS_ARCH missing.)
endif
else
else ifneq ($(HOST_CROSS_OS),)
$(error Unsupported HOST_CROSS_OS $(HOST_CROSS_OS))
endif
else ifeq ($(HOST_OS),darwin)
Expand Down
11 changes: 1 addition & 10 deletions core/layoutlib_data.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,13 @@ $(call dist-for-goals,layoutlib,$(LAYOUTLIB_BUILD_PROP)/layoutlib-build.prop:lay
LAYOUTLIB_RES := $(call intermediates-dir-for,PACKAGING,layoutlib-res,HOST,COMMON)
LAYOUTLIB_RES_FILES := $(shell find frameworks/base/core/res/res -type f -not -path 'frameworks/base/core/res/res/values-m[nc]c*' | sort)
EMULATED_OVERLAYS_FILES := $(shell find frameworks/base/packages/overlays/*/res/ | sort)
LAYOUTLIB_SUPPORTED_DEVICES := raviole/oriole raviole/raven bluejay/bluejay pantah/panther pantah/cheetah lynx/lynx felix/felix shusky/shiba shusky/husky akita/akita caimito/tokay caimito/caiman caimito/komodo comet/comet tangorpro/tangorpro
LAYOUTLIB_DEVICE_OVERLAYS_FILES := $(addsuffix /overlay/frameworks/base/core/res/res/values/*, $(addprefix device/google/, $(LAYOUTLIB_SUPPORTED_DEVICES)))
LAYOUTLIB_DEVICE_OVERLAYS_FILES := $(shell find $(LAYOUTLIB_DEVICE_OVERLAYS_FILES) | sort)
LAYOUTLIB_DEVICE_OVERLAYS_FILES :=
$(LAYOUTLIB_RES)/layoutlib-res.zip: $(SOONG_ZIP) $(HOST_OUT_EXECUTABLES)/aapt2 $(LAYOUTLIB_RES_FILES) $(EMULATED_OVERLAYS_FILES) $(LAYOUTLIB_DEVICE_OVERLAYS_FILES) frameworks/layoutlib/overlay_codenames.txt
rm -rf $@
echo $(LAYOUTLIB_RES_FILES) > $(LAYOUTLIB_RES)/filelist_res.txt
$(SOONG_ZIP) -C frameworks/base/core/res -l $(LAYOUTLIB_RES)/filelist_res.txt -o $(LAYOUTLIB_RES)/temp_res.zip
echo $(EMULATED_OVERLAYS_FILES) > $(LAYOUTLIB_RES)/filelist_emulated_overlays.txt
$(SOONG_ZIP) -C frameworks/base/packages -l $(LAYOUTLIB_RES)/filelist_emulated_overlays.txt -o $(LAYOUTLIB_RES)/temp_emulated_overlays.zip
for line in $$(cut -f 1 frameworks/layoutlib/overlay_codenames.txt); \
do splitLine=($${line//:/ }) \
origin_dir=device/google/*/$${splitLine[0]}/overlay/frameworks/base/core/res/res/values; \
target_dir=$(LAYOUTLIB_RES)/overlays/$${splitLine[1]}/res/; \
mkdir -p $$target_dir; \
cp -r $$origin_dir $$target_dir; \
done
$(SOONG_ZIP) -C $(LAYOUTLIB_RES) -D $(LAYOUTLIB_RES)/overlays/ -o $(LAYOUTLIB_RES)/temp_device_overlays.zip
rm -rf $(LAYOUTLIB_RES)/data && unzip -q -d $(LAYOUTLIB_RES)/data $(LAYOUTLIB_RES)/temp_res.zip
unzip -q -d $(LAYOUTLIB_RES)/data $(LAYOUTLIB_RES)/temp_emulated_overlays.zip
Expand Down
6 changes: 5 additions & 1 deletion core/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $(KATI_obsolete_var FILE_NAME_TAG,https://android.googlesource.com/platform/buil
.KATI_RESTAT: $(BUILD_NUMBER_FILE)
.KATI_RESTAT: $(BUILD_HOSTNAME_FILE)

DATE_FROM_FILE := date -d @$(BUILD_DATETIME_FROM_FILE)
DATE_FROM_FILE := date -ud @$(BUILD_DATETIME_FROM_FILE)
.KATI_READONLY := DATE_FROM_FILE


Expand Down Expand Up @@ -1486,6 +1486,10 @@ else ifeq ($(TARGET_BUILD_UNBUNDLED),$(TARGET_BUILD_UNBUNDLED_IMAGE))
# can include java-related targets that would cause building framework java
# sources in a droidcore full build.

$(call dist-for-goals, droidcore, \
$(BUILT_OTATOOLS_PACKAGE) \
)

# We dist the following targets for droidcore-unbundled (and droidcore since
# droidcore depends on droidcore-unbundled). The droidcore-unbundled target
# is a subset of droidcore. It can be used used for an unbundled build to
Expand Down
2 changes: 2 additions & 0 deletions core/soong_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ $(call add_json_str, DeviceArchVariant, $(TARGET_ARCH_VARIANT))
$(call add_json_str, DeviceCpuVariant, $(TARGET_CPU_VARIANT))
$(call add_json_list, DeviceAbi, $(TARGET_CPU_ABI) $(TARGET_CPU_ABI2))

$(call add_json_bool, Device_has_arm_mte, $(TARGET_HAS_ARM_MTE))

$(call add_json_str, DeviceSecondaryArch, $(TARGET_2ND_ARCH))
$(call add_json_str, DeviceSecondaryArchVariant, $(TARGET_2ND_ARCH_VARIANT))
$(call add_json_str, DeviceSecondaryCpuVariant, $(TARGET_2ND_CPU_VARIANT))
Expand Down
3 changes: 3 additions & 0 deletions core/sysprop.mk
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ ALL_INSTALLED_BUILD_PROP_FILES := \
$(INSTALLED_SYSTEM_EXT_BUILD_PROP_TARGET) \
$(INSTALLED_RAMDISK_BUILD_PROP_TARGET)

.PHONY: build-props
build-props: $(ALL_INSTALLED_BUILD_PROP_FILES)

# $1 installed file path, e.g. out/target/product/vsoc_x86_64/system/build.prop
define is-build-prop
$(if $(findstring $1,$(ALL_INSTALLED_BUILD_PROP_FILES)),Y)
Expand Down
19 changes: 15 additions & 4 deletions core/version_util.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@
# the build.prop target also wants INTERNAL_BUILD_ID_MAKEFILE to be set
# if the file exists.
#
INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)
ifdef INTERNAL_BUILD_ID_MAKEFILE
include $(INTERNAL_BUILD_ID_MAKEFILE)
BUILD_ID := $(BUILD_ID_$(TARGET_PRODUCT))

ifeq ($(BUILD_ID),)
INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)
ifdef INTERNAL_BUILD_ID_MAKEFILE
ALLOW_BUILD_ID_MK_INCLUSION := 1
include $(INTERNAL_BUILD_ID_MAKEFILE)
ALLOW_BUILD_ID_MK_INCLUSION := 0
endif
endif

ifdef TARGET_PLATFORM_VERSION
Expand All @@ -55,6 +61,11 @@ ifdef PLATFORM_SECURITY_PATCH
$(error Do not set PLATFORM_SECURITY_PATCH directly. Use RELEASE_PLATFORM_SECURITY_PATCH. value: $(PLATFORM_SECURITY_PATCH))
endif
PLATFORM_SECURITY_PATCH := $(RELEASE_PLATFORM_SECURITY_PATCH)

ifneq ($(PLATFORM_SECURITY_PATCH_$(TARGET_PRODUCT)),)
PLATFORM_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH_$(TARGET_PRODUCT))
endif

.KATI_READONLY := PLATFORM_SECURITY_PATCH

ifdef PLATFORM_SDK_VERSION
Expand Down Expand Up @@ -234,7 +245,7 @@ ifndef BUILD_DATETIME
BUILD_DATETIME := $(shell date +%s)
endif

DATE := date -d @$(BUILD_DATETIME)
DATE := date -ud @$(BUILD_DATETIME)
.KATI_READONLY := DATE

# Everything should be using BUILD_DATETIME_FROM_FILE instead.
Expand Down
Loading