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 | e131bec | 2017-12-15 23:48:02 -0600 | [diff] [blame] | 31 | LOCAL_ADDITIONAL_DEPENDENCIES := keystore_auth |
Ethan Yonker | fefe591 | 2017-09-30 22:22:13 -0500 | [diff] [blame] | 32 | else |
| 33 | LOCAL_SRC_FILES += Keymaster.cpp KeyStorage.cpp |
| 34 | endif |
Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 35 | |
| 36 | include $(BUILD_SHARED_LIBRARY) |
| 37 | |
| 38 | |
| 39 | |
| 40 | include $(CLEAR_VARS) |
| 41 | LOCAL_MODULE := twrpfbe |
| 42 | LOCAL_MODULE_TAGS := optional |
| 43 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 44 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 45 | LOCAL_SRC_FILES := main.cpp |
| 46 | LOCAL_SHARED_LIBRARIES := libe4crypt |
| 47 | #LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 48 | |
| 49 | include $(BUILD_EXECUTABLE) |
| 50 | |
Ethan Yonker | 79f88bd | 2016-12-09 14:52:12 -0600 | [diff] [blame] | 51 | include $(CLEAR_VARS) |
| 52 | LOCAL_MODULE := e4policyget |
| 53 | LOCAL_MODULE_TAGS := optional |
| 54 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 55 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 56 | LOCAL_SRC_FILES := e4policyget.cpp |
| 57 | LOCAL_SHARED_LIBRARIES := libe4crypt |
| 58 | LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 59 | |
| 60 | include $(BUILD_EXECUTABLE) |
| 61 | |
Ethan Yonker | e131bec | 2017-12-15 23:48:02 -0600 | [diff] [blame] | 62 | include $(CLEAR_VARS) |
| 63 | LOCAL_MODULE := keystore_auth |
| 64 | LOCAL_MODULE_TAGS := optional |
| 65 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 66 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 67 | LOCAL_SRC_FILES := keystore_auth.cpp |
| 68 | LOCAL_SHARED_LIBRARIES := libc libkeystore_binder libutils libbinder liblog |
| 69 | LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64 |
| 70 | |
| 71 | include $(BUILD_EXECUTABLE) |
| 72 | |
Ethan Yonker | bd7492d | 2016-12-07 13:55:01 -0600 | [diff] [blame] | 73 | endif |