summaryrefslogtreecommitdiffstats
path: root/crypto/cryptfs
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-11-25 22:00:52 +0100
committerDees Troy <dees_troy@teamw.in>2014-12-04 17:30:16 +0100
commit253368a0726120efa57664cdd1d088af099a3d81 (patch)
tree56cf3b08cdf70d016a2411fba977f7cd143bc265 /crypto/cryptfs
parentbootable recovery: we upgraded to 5.0.1 (diff)
downloadandroid_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.tar
android_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.tar.gz
android_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.tar.bz2
android_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.tar.lz
android_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.tar.xz
android_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.tar.zst
android_bootable_recovery-253368a0726120efa57664cdd1d088af099a3d81.zip
Diffstat (limited to 'crypto/cryptfs')
-rw-r--r--crypto/cryptfs/Android.mk54
-rw-r--r--crypto/cryptfs/cryptfs.c74
2 files changed, 0 insertions, 128 deletions
diff --git a/crypto/cryptfs/Android.mk b/crypto/cryptfs/Android.mk
deleted file mode 100644
index f0388c228..000000000
--- a/crypto/cryptfs/Android.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-ifeq ($(TW_INCLUDE_CRYPTO), true)
-LOCAL_SRC_FILES:= \
- cryptfs.c
-
-LOCAL_CFLAGS:= -g -c -W -I../fs_mgr/include
-LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO
-LOCAL_CFLAGS += -DCRYPTO_FS_TYPE=\"$(TW_CRYPTO_FS_TYPE)\"
-LOCAL_CFLAGS += -DCRYPTO_REAL_BLKDEV=\"$(TW_CRYPTO_REAL_BLKDEV)\"
-LOCAL_CFLAGS += -DCRYPTO_MNT_POINT=\"$(TW_CRYPTO_MNT_POINT)\"
-LOCAL_CFLAGS += -DCRYPTO_FS_OPTIONS=\"$(TW_CRYPTO_FS_OPTIONS)\"
-LOCAL_CFLAGS += -DCRYPTO_FS_FLAGS=\"$(TW_CRYPTO_FS_FLAGS)\"
-LOCAL_CFLAGS += -DCRYPTO_KEY_LOC=\"$(TW_CRYPTO_KEY_LOC)\"
-ifdef TW_CRYPTO_SD_REAL_BLKDEV
- LOCAL_CFLAGS += -DCRYPTO_SD_REAL_BLKDEV=\"$(TW_CRYPTO_SD_REAL_BLKDEV)\"
- LOCAL_CFLAGS += -DCRYPTO_SD_FS_TYPE=\"$(TW_CRYPTO_SD_FS_TYPE)\"
-endif
-ifneq ($(TW_INTERNAL_STORAGE_PATH),)
- LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_PATH=$(TW_INTERNAL_STORAGE_PATH)
-endif
-ifneq ($(TW_INTERNAL_STORAGE_MOUNT_POINT),)
- LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_MOUNT_POINT=$(TW_INTERNAL_STORAGE_MOUNT_POINT)
-endif
-ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
- LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
-endif
-ifneq ($(TW_EXTERNAL_STORAGE_MOUNT_POINT),)
- LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_MOUNT_POINT=$(TW_EXTERNAL_STORAGE_MOUNT_POINT)
-endif
-
-LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include
-LOCAL_MODULE:=cryptfs
-LOCAL_MODULE_TAGS:= eng
-LOCAL_SHARED_LIBRARIES += libc libcutils
-LOCAL_SHARED_LIBRARIES += libcrypto
-
-
-#LOCAL_LDFLAGS += -L$(TARGET_OUT_SHARED_LIBRARIES) -lsec_km -lsec_ecryptfs -ldl
-LOCAL_LDFLAGS += -ldl
-
-LOCAL_STATIC_LIBRARIES += libmtdutils
-LOCAL_STATIC_LIBRARIES += libminzip libunz
-LOCAL_STATIC_LIBRARIES += libpixelflinger_static libpng libmincrypttwrp
-LOCAL_SHARED_LIBRARIES += libz libc libstlport libcutils libstdc++ libext4_utils
-LOCAL_STATIC_LIBRARIES += libcrypt_samsung
-
-
-LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
-#LOCAL_STATIC_LIBRARIES += libfs_mgrtwrp
-LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
-LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
-include $(BUILD_EXECUTABLE)
-endif
diff --git a/crypto/cryptfs/cryptfs.c b/crypto/cryptfs/cryptfs.c
deleted file mode 100644
index 59e7added..000000000
--- a/crypto/cryptfs/cryptfs.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2013 a3955269 all rights reversed, no rights reserved.
- */
-
-#define TW_INCLUDE_CRYPTO_SAMSUNG
-#include "../ics/cryptfs.c"
-
-int dm_remove_device(const char *name)
-{
- int r;
- r = delete_crypto_blk_dev(name);
- if(!r)
- printf("crypto block device '%s' deleted.\n", name);
- else
- printf("deleting crypto block device '%s' failed. [%d - %s]\n", name, r, strerror(errno));
- return r;
-}
-
-int ecryptfs_test(const char *pw)
-{
- char pwbuf[256];
- int r;
-
- strcpy(pwbuf, pw);
- // 0: building options without file encryption filtering.
- // 1: building options with media files filtering.
- // 2: building options with all new files filtering.
- r = mount_ecryptfs_drive(pwbuf, "/emmc", "/emmc", 0);
- printf("mount_ecryptfs_drive: %d\n", r);
- r = mount("/dev/block/mmcblk1", "/emmc", "vfat", MS_RDONLY, "");
- printf("mount: %d\n", r);
-
- r = umount("/emmc");///dev/block/mmcblk1");
- printf("umount: %d\n", r);
-
- //r = unmount_ecryptfs_drive("/emmc");
- //printf("unmount_ecryptfs_drive: %d\n", r);
-
- return r;
-}
-
-int main(int argc, char* argv[])
-{
- if(argc < 2)
- {
- printf("no args!\n");
- return 1;
- }
-
- property_set("ro.crypto.state", "encrypted");
-
- property_set("ro.crypto.fs_type", CRYPTO_FS_TYPE);
- property_set("ro.crypto.fs_real_blkdev", CRYPTO_REAL_BLKDEV);
- property_set("ro.crypto.fs_mnt_point", CRYPTO_MNT_POINT);
- property_set("ro.crypto.fs_options", CRYPTO_FS_OPTIONS);
- property_set("ro.crypto.fs_flags", CRYPTO_FS_FLAGS);
- property_set("ro.crypto.keyfile.userdata", CRYPTO_KEY_LOC);
-
-#ifdef CRYPTO_SD_FS_TYPE
- property_set("ro.crypto.sd_fs_type", CRYPTO_SD_FS_TYPE);
- property_set("ro.crypto.sd_fs_real_blkdev", CRYPTO_SD_REAL_BLKDEV);
- property_set("ro.crypto.sd_fs_mnt_point", EXPAND(TW_INTERNAL_STORAGE_PATH));
-#endif
-
- property_set("rw.km_fips_status", "ready");
-
- delete_crypto_blk_dev("userdata");
- delete_crypto_blk_dev("sdcard");
- delete_crypto_blk_dev("emmc");
-
- cryptfs_check_passwd(argv[1]);
-
- return 0;
-};