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 --- Android.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 2b7d7db26..fc13afc21 100644 --- a/Android.mk +++ b/Android.mk @@ -84,7 +84,7 @@ LOCAL_CFLAGS += -Wno-unused-parameter # libm \ # libc -LOCAL_C_INCLUDES += bionic external/stlport/stlport +LOCAL_C_INCLUDES += bionic external/stlport/stlport external/openssl/include LOCAL_STATIC_LIBRARIES := LOCAL_SHARED_LIBRARIES := @@ -281,6 +281,11 @@ ifeq ($(TW_INCLUDE_JB_CRYPTO), true) #LOCAL_SRC_FILES += crypto/jb/cryptfs.c #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include endif +ifeq ($(TW_INCLUDE_L_CRYPTO), true) + LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO + LOCAL_CFLAGS += -DTW_INCLUDE_L_CRYPTO + LOCAL_SHARED_LIBRARIES += libcryptfslollipop +endif ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true) LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID endif @@ -527,6 +532,9 @@ ifeq ($(TW_INCLUDE_JB_CRYPTO), true) include $(commands_recovery_local_path)/crypto/scrypt/Android.mk include $(commands_recovery_local_path)/crypto/crypttools/Android.mk endif +ifeq ($(TW_INCLUDE_L_CRYPTO), true) + include $(commands_recovery_local_path)/crypto/lollipop/Android.mk +endif ifeq ($(TWHAVE_SELINUX), true) include $(commands_recovery_local_path)/minzip/Android.mk else -- cgit v1.2.3