summaryrefslogtreecommitdiffstats
path: root/toolbox/Android.mk
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-01-11 05:26:51 +0100
committerDees Troy <dees_troy@teamw.in>2016-01-15 01:27:45 +0100
commit6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b (patch)
tree6d971c658a3ca67fae74178fae46a250ad2ad604 /toolbox/Android.mk
parentImprove sdcard partitioning process (diff)
downloadandroid_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.tar
android_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.tar.gz
android_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.tar.bz2
android_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.tar.lz
android_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.tar.xz
android_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.tar.zst
android_bootable_recovery-6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b.zip
Diffstat (limited to 'toolbox/Android.mk')
-rw-r--r--toolbox/Android.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index d54bfa440..4698cd250 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -1,3 +1,4 @@
+TWRP_TOOLBOX_PATH := $(call my-dir)
LOCAL_PATH := system/core/toolbox
include $(CLEAR_VARS)
@@ -212,6 +213,19 @@ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23))
LOCAL_WHOLE_STATIC_LIBRARIES := $(patsubst %,libtoolbox_%,$(BSD_TOOLS))
endif
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
+ # Rule to make getprop and setprop in M trees where toybox normally
+ # provides these tools. Toybox does not allow for easy dynamic
+ # configuration, so we would have to include the entire toybox binary
+ # which takes up more space than is necessary so long as we are still
+ # including busybox.
+ LOCAL_SRC_FILES += \
+ ../../../$(TWRP_TOOLBOX_PATH)/dynarray.c \
+ ../../../$(TWRP_TOOLBOX_PATH)/getprop.c \
+ ../../../$(TWRP_TOOLBOX_PATH)/setprop.c
+ OUR_TOOLS += getprop setprop
+endif
+
LOCAL_MODULE := toolbox_recovery
LOCAL_MODULE_STEM := toolbox
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin