From 6bb26b5f14258c9fa0ed2b31d8cc0f25e0b24e1b Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Sun, 10 Jan 2016 22:26:51 -0600 Subject: Add toybox getprop and setprop for M trees Change-Id: I5827b3545f3f0118bd0d9407f812bd62fd26d97c --- toolbox/Android.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'toolbox/Android.mk') 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 -- cgit v1.2.3