Add an option to one click flash current booted TWRP ramdisk
Change-Id: I12303696698a5feaa43401bcac9e30d5b3b99a0c
diff --git a/gui/action.cpp b/gui/action.cpp
index 494665c..dbe4ae7 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -237,6 +237,7 @@
ADD_ACTION(installapp);
ADD_ACTION(uninstalltwrpsystemapp);
ADD_ACTION(repackimage);
+ ADD_ACTION(reflashtwrp);
ADD_ACTION(fixabrecoverybootloop);
ADD_ACTION(applycustomtwrpfolder);
#ifndef TW_EXCLUDE_NANO
@@ -2192,6 +2193,23 @@
return 0;
}
+int GUIAction::reflashtwrp(std::string arg __unused)
+{
+ int op_status = 1;
+ twrpRepacker repacker;
+
+ operation_start("Repack Image");
+ if (!simulate)
+ {
+ if (!repacker.Flash_Current_Twrp())
+ goto exit;
+ } else
+ simulate_progress_bar();
+ op_status = 0;
+exit:
+ operation_end(op_status);
+ return 0;
+}
int GUIAction::fixabrecoverybootloop(std::string arg __unused)
{
int op_status = 1;