From 98661c1a298cb01c93ae31973a42d152077beae6 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 17 Oct 2018 08:39:28 -0500 Subject: Update FDE decrypt to pie from CAF cryptfs.cpp based on CAF tag LA.UM.7.3.r1-05900-sdm845.0 Used CAF because AOSP no longer contains code for qcom's hardware crypto. Change-Id: I921cbe9bed70989f91449e23b5ac3ec1037b7b97 --- partition.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'partition.cpp') diff --git a/partition.cpp b/partition.cpp index 8e30c3318..b96b969be 100644 --- a/partition.cpp +++ b/partition.cpp @@ -44,6 +44,14 @@ #include "set_metadata.h" #include "gui/gui.hpp" #include "adbbu/libtwadbbu.hpp" +#ifdef TW_INCLUDE_CRYPTO + #include "crypto/fde/cryptfs.h" + #ifdef TW_INCLUDE_FBE + #include "crypto/ext4crypt/Decrypt.h" + #endif +#else + #define CRYPT_FOOTER_OFFSET 0x4000 +#endif extern "C" { #include "mtdutils/mtdutils.h" #include "mtdutils/mounts.h" @@ -51,15 +59,8 @@ extern "C" { // #include "make_ext4fs.h" TODO need ifdef for android8 #include #endif - #ifdef TW_INCLUDE_CRYPTO - #include "crypto/lollipop/cryptfs.h" #include "gpt/gpt.h" - #ifdef TW_INCLUDE_FBE - #include "crypto/ext4crypt/Decrypt.h" - #endif -#else - #define CRYPT_FOOTER_OFFSET 0x4000 #endif } #include -- cgit v1.2.3