blob: b32f3841a691493df903762241047eaf37172177 [file] [log] [blame]
Ethan Yonkerbd7492d2016-12-07 13:55:01 -06001LOCAL_PATH := $(call my-dir)
2ifeq ($(TW_INCLUDE_CRYPTO), true)
3include $(CLEAR_VARS)
4
5LOCAL_MODULE := libe4crypt
6LOCAL_MODULE_TAGS := eng optional
7LOCAL_CFLAGS :=
Ethan Yonkerfefe5912017-09-30 22:22:13 -05008LOCAL_SRC_FILES := Decrypt.cpp Ext4Crypt.cpp ScryptParameters.cpp Utils.cpp HashPassword.cpp ext4_crypt.cpp
Ethan Yonkerbd7492d2016-12-07 13:55:01 -06009LOCAL_SHARED_LIBRARIES := libselinux libc libc++ libext4_utils libsoftkeymaster libbase libcrypto libcutils libkeymaster_messages libhardware libprotobuf-cpp-lite
10LOCAL_STATIC_LIBRARIES := libscrypt_static
Ethan Yonker95e80072017-08-24 21:45:50 -050011LOCAL_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 Yonkerbd7492d2016-12-07 13:55:01 -060012
13ifneq ($(wildcard hardware/libhardware/include/hardware/keymaster0.h),)
14 LOCAL_CFLAGS += -DTW_CRYPTO_HAVE_KEYMASTERX
15 LOCAL_C_INCLUDES += external/boringssl/src/include
16endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -050017ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
18 LOCAL_CFLAGS += -DUSE_KEYSTORAGE_3 -DHAVE_LIBKEYUTILS -DHAVE_SYNTH_PWD_SUPPORT -DHAVE_GATEKEEPER1
19 LOCAL_SRC_FILES += Keymaster3.cpp KeyStorage3.cpp
20 LOCAL_SHARED_LIBRARIES += android.hardware.keymaster@3.0 libkeystore_binder libhidlbase libutils libkeyutils libbinder
21 LOCAL_SHARED_LIBRARIES += android.hardware.gatekeeper@1.0
22 LOCAL_SRC_FILES += Weaver1.cpp
23 LOCAL_SHARED_LIBRARIES += android.hardware.weaver@1.0
24else
25 LOCAL_SRC_FILES += Keymaster.cpp KeyStorage.cpp
26endif
Ethan Yonkerbd7492d2016-12-07 13:55:01 -060027
28include $(BUILD_SHARED_LIBRARY)
29
30
31
32include $(CLEAR_VARS)
33LOCAL_MODULE := twrpfbe
34LOCAL_MODULE_TAGS := optional
35LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
36LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
37LOCAL_SRC_FILES := main.cpp
38LOCAL_SHARED_LIBRARIES := libe4crypt
39#LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
40
41include $(BUILD_EXECUTABLE)
42
Ethan Yonker79f88bd2016-12-09 14:52:12 -060043include $(CLEAR_VARS)
44LOCAL_MODULE := e4policyget
45LOCAL_MODULE_TAGS := optional
46LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
47LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
48LOCAL_SRC_FILES := e4policyget.cpp
49LOCAL_SHARED_LIBRARIES := libe4crypt
50LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
51
52include $(BUILD_EXECUTABLE)
53
Ethan Yonkerbd7492d2016-12-07 13:55:01 -060054endif