From 190646d50ccf012bbda9e48fe0c32f004de1fea4 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sat, 11 Aug 2018 16:31:46 +0800 Subject: [PATCH] Fix incorrect magisk metadata in ramdisk --- native/jni/magiskboot/ramdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/jni/magiskboot/ramdisk.c b/native/jni/magiskboot/ramdisk.c index 73df409b4..10c6b7db0 100644 --- a/native/jni/magiskboot/ramdisk.c +++ b/native/jni/magiskboot/ramdisk.c @@ -240,7 +240,7 @@ int cpio_commands(int argc, char *argv[]) { e->filename = strdup(".backup/.magisk"); e->mode = S_IFREG; e->data = xmalloc(50); - snprintf(e->data, 50, "KEEPVERITY=%s\nKEEPFORCEENCRYPT=%s\n", cmdv[3], cmdv[4]); + snprintf(e->data, 50, "KEEPVERITY=%s\nKEEPFORCEENCRYPT=%s\n", cmdv[2], cmdv[3]); e->filesize = strlen(e->data) + 1; vec_push_back(&back, e);