summaryrefslogtreecommitdiffstats
path: root/crypto/fde/main.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2018-10-17 15:39:28 +0200
committerEthan Yonker <dees_troy@teamw.in>2019-03-20 21:33:48 +0100
commit98661c1a298cb01c93ae31973a42d152077beae6 (patch)
tree6d3b9e93bd1827017dea8eae4e89c923ce139ec2 /crypto/fde/main.cpp
parentgpt: Add -Wno-format-security (diff)
downloadandroid_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.tar
android_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.tar.gz
android_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.tar.bz2
android_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.tar.lz
android_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.tar.xz
android_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.tar.zst
android_bootable_recovery-98661c1a298cb01c93ae31973a42d152077beae6.zip
Diffstat (limited to '')
-rw-r--r--crypto/fde/main.cpp (renamed from crypto/lollipop/main.c)21
1 files changed, 18 insertions, 3 deletions
diff --git a/crypto/lollipop/main.c b/crypto/fde/main.cpp
index 232afb959..7051a6d7b 100644
--- a/crypto/lollipop/main.c
+++ b/crypto/fde/main.cpp
@@ -24,9 +24,24 @@
#include "cutils/properties.h"
#include "crypto_scrypt.h"
-int main() {
- set_partition_data("/dev/block/platform/sdhci-tegra.3/by-name/UDA", "/dev/block/platform/sdhci-tegra.3/by-name/MD1", "f2fs");
+void usage() {
+ printf(" Usage:\n");
+ printf(" twrpdec /path/to/userdata /path/to/metadata filesystem password\n");
+ printf("\n");
+ printf(" The metadata path is the path to the footer. If no metadata\n");
+ printf(" partition is present then use footer for this argument.\n");
+ printf("\n");
+ printf(" Example:\n");
+ printf(" twrpdec /dev/block/bootdevice/by-name/userdata footer ext4 0000\n");
+}
+
+int main(int argc, char **argv) {
+ if (argc != 5) {
+ usage();
+ return -1;
+ }
+ set_partition_data(argv[1], argv[2], argv[3]);
//int ret = cryptfs_check_passwd("30303030");
- int ret = cryptfs_check_passwd("0000");
+ int ret = cryptfs_check_passwd(argv[4]);
return 0;
}