diff options
Diffstat (limited to 'crypto/cryptsettings')
-rw-r--r-- | crypto/cryptsettings/Android.mk | 17 | ||||
-rw-r--r-- | crypto/cryptsettings/cryptsettings.c | 55 |
2 files changed, 0 insertions, 72 deletions
diff --git a/crypto/cryptsettings/Android.mk b/crypto/cryptsettings/Android.mk deleted file mode 100644 index 3a5704891..000000000 --- a/crypto/cryptsettings/Android.mk +++ /dev/null @@ -1,17 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -ifeq ($(TW_INCLUDE_CRYPTO), true) -LOCAL_SRC_FILES:= \ - cryptsettings.c -LOCAL_CFLAGS:= -g -c -W -LOCAL_MODULE:=cryptsettings -LOCAL_MODULE_TAGS:= eng -LOCAL_SHARED_LIBRARIES += libc libcutils -ifeq ($(TW_INCLUDE_JB_CRYPTO), true) -LOCAL_CFLAGS += -DTW_INCLUDE_JB_CRYPTO -LOCAL_STATIC_LIBRARIES += libfs_mgrtwrp -endif -LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES -LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities -include $(BUILD_EXECUTABLE) -endif diff --git a/crypto/cryptsettings/cryptsettings.c b/crypto/cryptsettings/cryptsettings.c deleted file mode 100644 index 4fa2b9354..000000000 --- a/crypto/cryptsettings/cryptsettings.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <sys/types.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <sys/stat.h> -#include <fcntl.h> -#ifdef TW_INCLUDE_JB_CRYPTO -#include "../crypto/fs_mgr/include/fs_mgr.h" -#endif - -#include "cutils/properties.h" - -#ifndef PROPERTY_VALUE_MAX -#define PROPERTY_VALUE_MAX 255 -#endif -#ifndef FSTAB_PREFIX -#define FSTAB_PREFIX "/fstab." -#endif - -int main(void) -{ - char prop[PROPERTY_VALUE_MAX]; - char key_loc[PROPERTY_VALUE_MAX]; - char blk_dev[PROPERTY_VALUE_MAX]; - char fstab_filename[PROPERTY_VALUE_MAX + sizeof(FSTAB_PREFIX)]; - - printf("This tool will gather the build flags needed for decryption support for TWRP.\n"); - printf("This tool comes with no warranties whatsoever.\n"); - printf("http://teamw.in\n\n"); - property_get("ro.crypto.state", prop, "encrypted"); - if (strcmp(prop, "encrypted") != 0) - printf("Your device is not encrypted, continuing anyway.\n\nTW_INCLUDE_CRYPTO := true\n"); - property_get("ro.crypto.fs_type", prop, "ERROR"); - printf("TW_CRYPTO_FS_TYPE := \"%s\"\n", prop); - property_get("ro.crypto.fs_real_blkdev", prop, "ERROR"); - printf("TW_CRYPTO_REAL_BLKDEV := \"%s\"\n", prop); - property_get("ro.crypto.fs_mnt_point", prop, "ERROR"); - printf("TW_CRYPTO_MNT_POINT := \"%s\"\n", prop); - property_get("ro.crypto.fs_options", prop, "ERROR"); - printf("TW_CRYPTO_FS_OPTIONS := \"%s\"\n", prop); - property_get("ro.crypto.fs_flags", prop, "ERROR"); - printf("TW_CRYPTO_FS_FLAGS := \"%s\"\n", prop); - property_get("ro.crypto.keyfile.userdata", prop, "footer"); - printf("TW_CRYPTO_KEY_LOC := \"%s\"\n", prop); -#ifdef TW_INCLUDE_JB_CRYPTO - printf("\n*** NEW FOR JELLY BEAN:\n"); - strcpy(fstab_filename, FSTAB_PREFIX); - property_get("ro.hardware", fstab_filename + sizeof(FSTAB_PREFIX) - 1, ""); - fs_mgr_get_crypt_info(fstab_filename, key_loc, blk_dev, sizeof(key_loc)); - printf("fstab file location: '%s'\n\nTW_INCLUDE_JB_CRYPTO := true\n", fstab_filename); -#endif - - return 0; -} |