tzdata: add to TWRP build automatically

Fixes "__bionic_open_tzdata" errors in recovery log

Use "TW_EXCLUDE_TZDATA := true" flag to exclude from build
if needed for space reasons. Will automatically be excluded
is "TW_OEM_BUILD := true" flag is present

Change-Id: I2f4a0f3a354a32c2f4f9733b3e88beedc4773020
This commit is contained in:
Captain Throwback
2021-01-30 12:26:25 -05:00
committed by bigbiff
parent b206c132c6
commit 6443cefc69
2 changed files with 22 additions and 0 deletions

View File

@@ -137,6 +137,7 @@ ifeq ($(TW_OEM_BUILD),true)
BOARD_HAS_NO_REAL_SDCARD := true
TW_USE_TOOLBOX := true
TW_EXCLUDE_MTP := true
TW_EXCLUDE_TZDATA := true
endif
ifeq ($(AB_OTA_UPDATER),true)
@@ -407,6 +408,11 @@ TWRP_REQUIRED_MODULES += \
me.twrp.twrpapp.apk \
privapp-permissions-twrpapp.xml
ifneq ($(TW_EXCLUDE_TZDATA), true)
TWRP_REQUIRED_MODULES += \
tzdata_twrp
endif
ifneq ($(TW_INCLUDE_CRYPTO),)
TWRP_REQUIRED_MODULES += \
hwservicemanager \

View File

@@ -504,3 +504,19 @@ ifneq (,$(filter $(TW_INCLUDE_REPACKTOOLS) $(TW_INCLUDE_RESETPROP) $(TW_INCLUDE_
$(error magiskboot prebuilts not present; exiting)
endif
endif
# Include tzdata in TWRP to fix "__bionic_open_tzdata" log spam
# Dummy file to apply post-install patch
ifneq ($(TW_EXCLUDE_TZDATA), true)
include $(CLEAR_VARS)
LOCAL_MODULE := tzdata_twrp
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/system/bin
LOCAL_REQUIRED_MODULES := tzdata
LOCAL_POST_INSTALL_CMD += \
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system/usr/share/zoneinfo; \
cp -f $(TARGET_OUT)/usr/share/zoneinfo/tzdata $(TARGET_RECOVERY_ROOT_OUT)/system/usr/share/zoneinfo/;
include $(BUILD_PHONY_PACKAGE)
endif