Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
| 3 | include $(CLEAR_VARS) |
| 4 | |
| 5 | LOCAL_MODULE := libe4crypt |
| 6 | LOCAL_MODULE_TAGS := eng optional |
| 7 | LOCAL_CFLAGS := |
Ethan Yonker | fefe591 | 2017-09-30 22:22:13 -0500 | [diff] [blame] | 8 | LOCAL_SRC_FILES := Decrypt.cpp Ext4Crypt.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp ext4_crypt.cpp |
Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 9 | LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libsoftkeymaster libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite |
| 10 | LOCAL_STATIC_LIBRARIES := libscrypt_static |
Ethan Yonker | 95e8007 | 2017-08-24 21:45:50 -0500 | [diff] [blame] | 11 | LOCAL_C_INCLUDES := system/extras/ext4_utils system/extras/ext4_utils/include/ext4_utils external/scrypt/lib/crypto system/security/keystore hardware/libhardware/include/hardware system/security/softkeymaster/include/keymaster system/keymaster/include |
Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 12 | |
| 13 | ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),) |
| 14 | LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX |
| 15 | LOCAL_C_INCLUDES += external/boringssl/src/include |
| 16 | endif |
Ethan Yonker | fefe591 | 2017-09-30 22:22:13 -0500 | [diff] [blame] | 17 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0) |
Ethan Yonker | 31344a3 | 2017-11-29 12:13:41 -0600 | [diff] [blame] | 18 | LOCAL_CFLAGS += -DUSE_KEYSTORAGE_3 -DHAVE_GATEKEEPER1 |
Ethan Yonker | fefe591 | 2017-09-30 22:22:13 -0500 | [diff] [blame] | 19 | LOCAL_SRC_FILES += Keymaster3.cpp KeyStorage3.cpp |
Ethan Yonker | 31344a3 | 2017-11-29 12:13:41 -0600 | [diff] [blame] | 20 | LOCAL_SHARED_LIBRARIES += android.hardware.keymaster@3.0 libkeystore_binder libhidlbase libutils libbinder |
Ethan Yonker | fefe591 | 2017-09-30 22:22:13 -0500 | [diff] [blame] | 21 | LOCAL_SHARED_LIBRARIES += android.hardware.gatekeeper@1.0 |
Ethan Yonker | 31344a3 | 2017-11-29 12:13:41 -0600 | [diff] [blame] | 22 | ifneq ($(wildcard hardware/interfaces/weaver/Android.bp),) |
| 23 | LOCAL_CFLAGS += -DHAVE_SYNTH_PWD_SUPPORT |
| 24 | LOCAL_SRC_FILES += Weaver1.cpp |
| 25 | LOCAL_SHARED_LIBRARIES += android.hardware.weaver@1.0 |
| 26 | endif |
| 27 | ifneq ($(wildcard system/core/libkeyutils/Android.bp),) |
| 28 | LOCAL_CFLAGS += -DHAVE_LIBKEYUTILS |
| 29 | LOCAL_SHARED_LIBRARIES += libkeyutils |
| 30 | endif |
Ethan Yonker | fefe591 | 2017-09-30 22:22:13 -0500 | [diff] [blame] | 31 | else |
| 32 | LOCAL_SRC_FILES += Keymaster.cpp KeyStorage.cpp |
| 33 | endif |
Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 34 | |
| 35 | include $(BUILD_SHARED_LIBRARY) |
| 36 | |
| 37 | |
| 38 | |
| 39 | include $(CLEAR_VARS) |
| 40 | LOCAL_MODULE := twrpfbe |
| 41 | LOCAL_MODULE_TAGS := optional |
| 42 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 43 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 44 | LOCAL_SRC_FILES := main.cpp |
| 45 | LOCAL_SHARED_LIBRARIES := libe4crypt |
| 46 | #LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 47 | |
| 48 | include $(BUILD_EXECUTABLE) |
| 49 | |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 50 | include $(CLEAR_VARS) |
| 51 | LOCAL_MODULE := e4policyget |
| 52 | LOCAL_MODULE_TAGS := optional |
| 53 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 54 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 55 | LOCAL_SRC_FILES := e4policyget.cpp |
| 56 | LOCAL_SHARED_LIBRARIES := libe4crypt |
| 57 | LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 58 | |
| 59 | include $(BUILD_EXECUTABLE) |
| 60 | |
Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 61 | endif |