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
diff --git a/Android.mk b/Android.mk
index 2b7d7db..fc13afc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -84,7 +84,7 @@
# 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 @@
#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 @@
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