summaryrefslogtreecommitdiffstats
path: root/crypto/vold_decrypt/Android.mk
diff options
context:
space:
mode:
authornkk71 <nkk71x@gmail.com>2017-11-06 16:27:21 +0100
committerDees Troy <dees_troy@teamw.in>2017-11-28 23:05:54 +0100
commit7d1222a5fe2c2dfa393e0d37cb58605734b9af7f (patch)
tree654075439f74c31051af4b3fa130afad243d8be1 /crypto/vold_decrypt/Android.mk
parentFBE for Pixel 2 (diff)
downloadandroid_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.tar
android_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.tar.gz
android_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.tar.bz2
android_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.tar.lz
android_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.tar.xz
android_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.tar.zst
android_bootable_recovery-7d1222a5fe2c2dfa393e0d37cb58605734b9af7f.zip
Diffstat (limited to 'crypto/vold_decrypt/Android.mk')
-rw-r--r--crypto/vold_decrypt/Android.mk26
1 files changed, 19 insertions, 7 deletions
diff --git a/crypto/vold_decrypt/Android.mk b/crypto/vold_decrypt/Android.mk
index e371c24e7..ddfad0327 100644
--- a/crypto/vold_decrypt/Android.mk
+++ b/crypto/vold_decrypt/Android.mk
@@ -16,7 +16,6 @@ LOCAL_PATH := $(call my-dir)
ifeq ($(TW_INCLUDE_CRYPTO), true)
ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),)
- ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),false)
# Parse TW_CRYPTO_USE_SYSTEM_VOLD
@@ -54,6 +53,17 @@ ifeq ($(TW_INCLUDE_CRYPTO), true)
cp -f "$(LOCAL_PATH)/$(item)" "$(TARGET_ROOT_OUT)"/; \
fi; \
)
+
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
+ # Truncate service_name to max 16 characters
+ LOCAL_POST_INSTALL_CMD += \
+ $(foreach item, $(rc_files), \
+ if [ -f "$(TARGET_ROOT_OUT)/$(item)" ]; then \
+ sed -i 's/\([ \t]*service[ \t]*\)\(.\{16\}\).*\([ \t].*\)/\1\2\3/' "$(TARGET_ROOT_OUT)/$(item)"; \
+ fi; \
+ )
+ endif
+
include $(BUILD_PREBUILT)
@@ -66,7 +76,14 @@ ifeq ($(TW_INCLUDE_CRYPTO), true)
endif
ifneq ($(services),)
- LOCAL_CFLAGS += -DTW_CRYPTO_SYSTEM_VOLD_SERVICES='"$(services)"'
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
+ # Truncate service_name to max 12 characters due to the 4 character prefix
+ truncated_services := $(foreach item,$(services),$(shell echo -n "$(item)" | sed 's/\(.\{12\}\).*/\1/'))
+ LOCAL_CFLAGS += -DTW_CRYPTO_SYSTEM_VOLD_SERVICES='"$(truncated_services)"'
+ LOCAL_CFLAGS += -D_USING_SHORT_SERVICE_NAMES
+ else
+ LOCAL_CFLAGS += -DTW_CRYPTO_SYSTEM_VOLD_SERVICES='"$(services)"'
+ endif
endif
ifeq ($(TW_CRYPTO_SYSTEM_VOLD_DEBUG),true)
@@ -74,14 +91,9 @@ ifeq ($(TW_INCLUDE_CRYPTO), true)
LOCAL_CFLAGS += -DTW_CRYPTO_SYSTEM_VOLD_DEBUG
endif
- ifeq ($(TW_CRYPTO_SYSTEM_VOLD_DISABLE_TIMEOUT),true)
- LOCAL_CFLAGS += -DTW_CRYPTO_SYSTEM_VOLD_DISABLE_TIMEOUT
- endif
-
LOCAL_SRC_FILES = vold_decrypt.cpp
LOCAL_SHARED_LIBRARIES := libcutils
include $(BUILD_STATIC_LIBRARY)
endif
- endif
endif