Skip to content

Commit

Permalink
FsCrypt update: support fscrypt policies v1 and v2
Browse files Browse the repository at this point in the history
This patchset introduces support decryption for Android 11.

In this update we deprecate ext4crypt. To specify the
policy version to use, use TW_USE_FSCRYPT_POLICY := 1 or
TW_USE_FSCRYPT_POLICY := 2. By default policy version will
be set to 2 if this variable is omitted.

Change-Id: I62a29c1bef36c259ec4b11259f71be613d20a112
  • Loading branch information
bigbiff committed May 19, 2021
1 parent 9c1709b commit a957f07
Show file tree
Hide file tree
Showing 89 changed files with 6,044 additions and 9,382 deletions.
13 changes: 7 additions & 6 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ LOCAL_CLANG := true

LOCAL_C_INCLUDES += \
bionic \
system/vold \
system/extras \
system/core/adb \
system/core/libsparse \
Expand Down Expand Up @@ -287,10 +286,10 @@ ifeq ($(TW_INCLUDE_L_CRYPTO), true)
endif
ifeq ($(TW_INCLUDE_CRYPTO), true)
LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO -DUSE_FSCRYPT -Wno-macro-redefined
# LOCAL_SHARED_LIBRARIES += libcryptfsfde
LOCAL_SHARED_LIBRARIES += libgpt_twrp
LOCAL_C_INCLUDES += external/boringssl/src/include bootable/recovery/crypto/fscrypt \
bootable/recovery/crypto
LOCAL_SHARED_LIBRARIES += libcryptfsfde
LOCAL_SHARED_LIBRARIES += libgpt_twrp libstatssocket.recovery
LOCAL_C_INCLUDES += external/boringssl/src/include bootable/recovery/crypto
LOCAL_C_INCLUDES += $(commands_TWRP_local_path)/crypto/fscrypt
TW_INCLUDE_CRYPTO_FBE := true
LOCAL_CFLAGS += -DTW_INCLUDE_FBE
LOCAL_SHARED_LIBRARIES += libtwrpfscrypt [email protected] [email protected] \
Expand Down Expand Up @@ -375,6 +374,8 @@ ifeq ($(TW_EXCLUDE_NANO), true)
LOCAL_CFLAGS += -DTW_EXCLUDE_NANO
endif

LOCAL_C_INCLUDES += system/vold \

TWRP_REQUIRED_MODULES += \
relink_libraries \
relink_binaries \
Expand Down Expand Up @@ -638,7 +639,7 @@ ifneq ($(TW_OZIP_DECRYPT_KEY),)
endif

ifeq ($(TW_INCLUDE_CRYPTO), true)
# include $(commands_TWRP_local_path)/crypto/fde/Android.mk
include $(commands_TWRP_local_path)/crypto/fde/Android.mk
include $(commands_TWRP_local_path)/crypto/scrypt/Android.mk
ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
include $(commands_TWRP_local_path)/crypto/fscrypt/Android.mk
Expand Down
111 changes: 0 additions & 111 deletions crypto/ext4crypt/Android.mk

This file was deleted.

Loading

0 comments on commit a957f07

Please sign in to comment.