bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
| 3 | include $(CLEAR_VARS) |
| 4 | |
| 5 | LOCAL_MODULE := libtwrpfscrypt |
| 6 | LOCAL_MODULE_TAGS := optional |
| 7 | LOCAL_CFLAGS := -Wno-unused-variable -Wno-sign-compare -Wno-unused-parameter -Wno-comment -Wno-missing-field-initializers \ |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 8 | -DHAVE_LIBKEYUTILS -std=gnu++2a -Wno-macro-redefined -Wno-unused-function -fpic |
| 9 | LOCAL_SRC_FILES := FsCrypt.cpp Decrypt.cpp ScryptParameters.cpp fscrypt_policy.cpp Utils.cpp HashPassword.cpp \ |
| 10 | KeyUtil.cpp Keymaster.cpp KeyStorage.cpp MetadataCrypt.cpp KeyBuffer.cpp \ |
| 11 | Process.cpp EncryptInplace.cpp Weaver1.cpp cryptfs.cpp Checkpoint.cpp CryptoType.cpp VoldUtil.cpp |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 12 | LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libbase libcrypto libcutils \ |
| 13 | libkeymaster_messages libhardware libprotobuf-cpp-lite libfscrypt android.hardware.confirmationui@1.0 \ |
| 14 | android.hardware.keymaster@3.0 libkeystore_binder libhidlbase libutils libbinder android.hardware.gatekeeper@1.0 \ |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 15 | libfs_mgr android.hardware.keymaster@4.0 android.hardware.keymaster@4.1 libkeymaster4support libkeymaster4_1support \ |
| 16 | libf2fs_sparseblock libkeystore_parcelables libkeystore_aidl android.hardware.weaver@1.0 libkeyutils liblog libhwbinder \ |
| 17 | libchrome android.hardware.boot@1.0 libbootloader_message |
| 18 | LOCAL_STATIC_LIBRARIES := libscrypt_static libvold_binder libc++fs |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 19 | LOCAL_C_INCLUDES := system/extras/ext4_utils \ |
| 20 | system/extras/ext4_utils/include/ext4_utils \ |
| 21 | external/scrypt/lib/crypto \ |
| 22 | system/security/keystore/include \ |
| 23 | hardware/libhardware/include/hardware \ |
| 24 | system/security/softkeymaster/include/keymaster \ |
| 25 | system/keymaster/include \ |
| 26 | system/extras/libfscrypt/include \ |
| 27 | system/core/fs_mgr/libfs_avb/include/ \ |
| 28 | system/core/fs_mgr/include_fstab/ \ |
| 29 | system/core/fs_mgr/include/ \ |
| 30 | system/core/fs_mgr/libdm/include/ \ |
| 31 | system/core/fs_mgr/liblp/include/ \ |
| 32 | system/gsid/include/ \ |
| 33 | system/core/init/ \ |
| 34 | system/vold/model \ |
| 35 | system/vold/ \ |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 36 | system/extras/f2fs_utils/ \ |
| 37 | bootable/recovery/bootloader_message/include |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 38 | |
bigbiff | 2e344ab | 2021-05-07 10:41:55 -0400 | [diff] [blame] | 39 | ifeq ($(TW_USE_FSCRYPT_POLICY), 1) |
| 40 | LOCAL_CFLAGS += -DUSE_FSCRYPT_POLICY_V1 |
| 41 | else |
| 42 | LOCAL_CFLAGS += -DUSE_FSCRYPT_POLICY_V2 |
| 43 | endif |
| 44 | |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 45 | ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),) |
| 46 | LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX |
| 47 | LOCAL_C_INCLUDES += external/boringssl/src/include |
| 48 | endif |
| 49 | |
| 50 | LOCAL_REQUIRED_MODULES := keystore_auth keystore |
| 51 | LOCAL_CLANG := true |
| 52 | include $(BUILD_SHARED_LIBRARY) |
| 53 | |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 54 | include $(CLEAR_VARS) |
| 55 | LOCAL_MODULE := fscryptpolicyget |
| 56 | LOCAL_MODULE_TAGS := optional |
| 57 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 58 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin |
| 59 | LOCAL_C_INCLUDES += system/extras/libfscrypt/include |
| 60 | LOCAL_SRC_FILES := fscryptpolicyget.cpp |
| 61 | LOCAL_SHARED_LIBRARIES := libtwrpfscrypt |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 62 | |
bigbiff | a957f07 | 2021-03-07 18:20:29 -0500 | [diff] [blame] | 63 | include $(BUILD_EXECUTABLE) |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 64 | |
| 65 | include $(CLEAR_VARS) |
| 66 | LOCAL_MODULE := twrpfbe |
| 67 | LOCAL_MODULE_TAGS := optional |
| 68 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
bigbiff | ad58e1b | 2020-07-06 20:24:34 -0400 | [diff] [blame] | 69 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 70 | LOCAL_SRC_FILES := main.cpp |
| 71 | LOCAL_SHARED_LIBRARIES := libtwrpfscrypt |
| 72 | |
| 73 | include $(BUILD_EXECUTABLE) |
| 74 | |
| 75 | include $(CLEAR_VARS) |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 76 | LOCAL_MODULE := keystore_auth |
| 77 | LOCAL_MODULE_TAGS := optional |
| 78 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
bigbiff | ad58e1b | 2020-07-06 20:24:34 -0400 | [diff] [blame] | 79 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 80 | LOCAL_SRC_FILES := keystore_auth.cpp |
| 81 | LOCAL_SHARED_LIBRARIES := libc libkeystore_binder libutils libbinder liblog |
| 82 | LOCAL_CFLAGS += -DUSE_SECURITY_NAMESPACE |
| 83 | LOCAL_SHARED_LIBRARIES += libkeystore_aidl |
bigbiff | 7ba7500 | 2020-04-11 20:47:09 -0400 | [diff] [blame] | 84 | |
| 85 | include $(BUILD_EXECUTABLE) |
| 86 | |
| 87 | endif |