Skip to content

Commit 5c3d206

Browse files
committed
Support excluding zip from TWRP builds
Use 'TW_EXCLUDE_ZIP := true' to activate the exclusion It will be excluded by default if 'TW_OEM_BUILD := true' is set Change-Id: I970343e3342a6bfa6c5a5684a8934f1ffa2af78b
1 parent eb439c0 commit 5c3d206

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Android.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ ifeq ($(TW_OEM_BUILD),true)
147147
TW_EXCLUDE_TZDATA := true
148148
TW_EXCLUDE_NANO := true
149149
TW_EXCLUDE_BASH := true
150+
TW_EXCLUDE_ZIP := true
150151
endif
151152

152153
ifeq ($(AB_OTA_UPDATER),true)
@@ -570,8 +571,10 @@ TWRP_REQUIRED_MODULES += \
570571
endif
571572

572573
ifneq ($(wildcard external/zip/Android.mk),)
574+
ifneq ($(TW_EXCLUDE_ZIP), true)
573575
TWRP_REQUIRED_MODULES += zip
574576
endif
577+
endif
575578
ifneq ($(wildcard external/unzip/Android.mk),)
576579
TWRP_REQUIRED_MODULES += unzip
577580
endif

prebuilt/Android.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ LOCAL_POST_INSTALL_CMD += $(hide) if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/system/bi
2424
rm $(TARGET_RECOVERY_ROOT_OUT)/system/bin/fgrep; fi; ln -s $(TARGET_RECOVERY_ROOT_OUT)/system/bin/grep $(TARGET_RECOVERY_ROOT_OUT)/system/bin/fgrep;
2525

2626
ifneq ($(wildcard external/zip/Android.mk),)
27+
ifneq ($(TW_EXCLUDE_ZIP), true)
2728
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip
2829
endif
30+
endif
2931
ifneq ($(wildcard external/unzip/Android.mk),)
3032
RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/unzip
3133
endif
@@ -575,4 +577,3 @@ ifneq ($(TW_EXCLUDE_BASH), true)
575577
ln -sf /system/bin/bash $(TARGET_RECOVERY_ROOT_OUT)/sbin/bash;
576578
include $(BUILD_PHONY_PACKAGE)
577579
endif
578-

0 commit comments

Comments
 (0)