summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk3
-rw-r--r--gui/Android.mk2
-rw-r--r--prebuilt/Android.mk3
3 files changed, 8 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 8456e840b..a73311e69 100644
--- a/Android.mk
+++ b/Android.mk
@@ -478,6 +478,9 @@ include $(CLEAR_VARS)
# Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead
BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links)
exclude := tune2fs mke2fs mkdosfs mkfs.vfat gzip gunzip
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
+ exclude += sh
+endif
# Having /sbin/modprobe present on 32 bit devices with can cause a massive
# performance problem if the kernel has CONFIG_MODULES=y
diff --git a/gui/Android.mk b/gui/Android.mk
index 3f97ca7eb..b514e5be1 100644
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -173,8 +173,10 @@ $(TWRP_RES_GEN):
cp -fr $(TWRP_THEME_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH)
mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/
ifneq ($(TW_USE_TOOLBOX), true)
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
ln -sf $(TWRP_SH_TARGET) $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh
endif
+endif
ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip
ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 169f87f89..a81781bf7 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -17,6 +17,9 @@ RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image
RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/bu
ifneq ($(TW_USE_TOOLBOX), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
+ RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh
+ endif
else
RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so