blob: 0fa36c8a3bd0ee269980684e8e15041629447ac6 [file] [log] [blame]
bigbiff7ba75002020-04-11 20:47:09 -04001LOCAL_PATH := $(call my-dir)
2ifeq ($(TW_INCLUDE_CRYPTO), true)
3include $(CLEAR_VARS)
4
5LOCAL_MODULE := libtwrpfscrypt
6LOCAL_MODULE_TAGS := optional
7LOCAL_CFLAGS := -Wno-unused-variable -Wno-sign-compare -Wno-unused-parameter -Wno-comment -Wno-missing-field-initializers \
8 -DHAVE_LIBKEYUTILS -std=gnu++2a -Wno-macro-redefined -Wno-unused-function
9LOCAL_SRC_FILES := Decrypt.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp \
10 FsCrypt.cpp KeyUtil.cpp Keymaster.cpp KeyStorage.cpp MetadataCrypt.cpp KeyBuffer.cpp \
11 Process.cpp EncryptInplace.cpp Weaver1.cpp fscrypt_policy.cpp
12LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libbase libcrypto libcutils \
13libkeymaster_messages libhardware libprotobuf-cpp-lite libfscrypt android.hardware.confirmationui@1.0 \
14android.hardware.keymaster@3.0 libkeystore_binder libhidlbase libutils libbinder android.hardware.gatekeeper@1.0 \
15libfs_mgr android.hardware.keymaster@4.0 libkeymaster4support libf2fs_sparseblock libkeystore_parcelables \
16libkeystore_aidl android.hardware.weaver@1.0 libkeyutils liblog libhwbinder libchrome
17LOCAL_STATIC_LIBRARIES := libscrypt_static
18LOCAL_C_INCLUDES := system/extras/ext4_utils \
19 system/extras/ext4_utils/include/ext4_utils \
20 external/scrypt/lib/crypto \
21 system/security/keystore/include \
22 hardware/libhardware/include/hardware \
23 system/security/softkeymaster/include/keymaster \
24 system/keymaster/include \
25 system/extras/libfscrypt/include \
26 system/core/fs_mgr/libfs_avb/include/ \
27 system/core/fs_mgr/include_fstab/ \
28 system/core/fs_mgr/include/ \
29 system/core/fs_mgr/libdm/include/ \
30 system/core/fs_mgr/liblp/include/ \
31 system/gsid/include/ \
32 system/core/init/ \
33 system/vold/model \
34 system/vold/ \
35 system/extras/f2fs_utils/
36
37ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
38 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
39 LOCAL_C_INCLUDES += external/boringssl/src/include
40endif
41
42LOCAL_REQUIRED_MODULES := keystore_auth keystore
43LOCAL_CLANG := true
44include $(BUILD_SHARED_LIBRARY)
45
46
47
48include $(CLEAR_VARS)
49LOCAL_MODULE := twrpfbe
50LOCAL_MODULE_TAGS := optional
51LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -040052LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
bigbiff7ba75002020-04-11 20:47:09 -040053LOCAL_SRC_FILES := main.cpp
54LOCAL_SHARED_LIBRARIES := libtwrpfscrypt
55
56include $(BUILD_EXECUTABLE)
57
58include $(CLEAR_VARS)
59LOCAL_MODULE := fscryptpolicyget
60LOCAL_MODULE_TAGS := optional
61LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -040062LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
bigbiff7ba75002020-04-11 20:47:09 -040063LOCAL_SRC_FILES := fscryptpolicyget.cpp
64LOCAL_SHARED_LIBRARIES := libtwrpfscrypt
bigbiff7ba75002020-04-11 20:47:09 -040065
66include $(BUILD_EXECUTABLE)
67
68include $(CLEAR_VARS)
69LOCAL_MODULE := keystore_auth
70LOCAL_MODULE_TAGS := optional
71LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -040072LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
bigbiff7ba75002020-04-11 20:47:09 -040073LOCAL_SRC_FILES := keystore_auth.cpp
74LOCAL_SHARED_LIBRARIES := libc libkeystore_binder libutils libbinder liblog
75LOCAL_CFLAGS += -DUSE_SECURITY_NAMESPACE
76LOCAL_SHARED_LIBRARIES += libkeystore_aidl
bigbiff7ba75002020-04-11 20:47:09 -040077
78include $(BUILD_EXECUTABLE)
79
80endif