summaryrefslogtreecommitdiffstats
path: root/bootloader_message/bootloader_message.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader_message/bootloader_message.cpp')
-rw-r--r--bootloader_message/bootloader_message.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp
index eb99bdb42..362d9cbe2 100644
--- a/bootloader_message/bootloader_message.cpp
+++ b/bootloader_message/bootloader_message.cpp
@@ -284,6 +284,17 @@ get_args(int *argc, char ***argv) {
(*argv)[0] = strdup(arg);
for (*argc = 1; *argc < MAX_ARGS; ++*argc) {
if ((arg = strtok(NULL, "\n")) == NULL) break;
+
+// if the device does not have an own recovery key combo we just want to open TWRP after
+// walking through the factory reset screen - without actually doing a factory reset
+#ifdef IGNORE_MISC_WIPE_DATA
+ if (!strcmp(arg, "--wipe_data")) {
+ (*argv)[*argc] = "";
+ *argc = *argc -1;
+ printf("Bootloader arg \"%s\" ignored because TWRP was compiled with TW_IGNORE_MISC_WIPE_DATA\n", arg);
+ continue;
+ }
+#endif
(*argv)[*argc] = strdup(arg);
}
printf("Got arguments from boot message\n");