From 4eca40d7d8ff6968ed68a24686093cfb6f5f6373 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Tue, 11 Nov 2014 14:52:28 -0600 Subject: Add lollipop decrypt support Kang in cryptfs.c and cryptfs.h from vold. Use TW_INCLUDE_L_CRYPTO := true to enable. Ramdisk must contain the normal fstab file in the root in the usual format of: fstab.{ro.hardware} For examble for Nexus 5: fstab.hammerhead Or on many Qualcomm devices: fstab.qcom Tested against Android 5.0 lollipop on Nexus 7 2012 grouper. Not sure if or how this will work when we are dealing with a device with a hardware keystore. Long term we need to add a GUI element to allow entering a pattern. For now you can decrypt a pattern unlock by converting the dots to numbers in the following format: 123 456 789 So an upper-case L would translate to 14789 as a password entered on the keyboard. Change-Id: I02c29e1f1c2eb29bf002c9fe0fc118357300b5b3 --- partitionmanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'partitionmanager.cpp') diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 96266a3e8..d2c91be7a 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -51,6 +51,8 @@ extern "C" { #ifdef TW_INCLUDE_CRYPTO #ifdef TW_INCLUDE_JB_CRYPTO #include "crypto/jb/cryptfs.h" + #elif defined(TW_INCLUDE_L_CRYPTO) + #include "crypto/lollipop/cryptfs.h" #else #include "crypto/ics/cryptfs.h" #endif @@ -1334,7 +1336,7 @@ int TWPartitionManager::Decrypt_Device(string Password) { size_t result; property_set("ro.crypto.state", "encrypted"); -#ifdef TW_INCLUDE_JB_CRYPTO +#if defined(TW_INCLUDE_JB_CRYPTO) || defined(TW_INCLUDE_L_CRYPTO) // No extra flags needed #else property_set("ro.crypto.fs_type", CRYPTO_FS_TYPE); -- cgit v1.2.3