Add an option to one click flash current booted TWRP ramdisk

Change-Id: I12303696698a5feaa43401bcac9e30d5b3b99a0c
This commit is contained in:
nebrassy
2021-05-20 13:03:30 +02:00
committed by bigbiff
parent cfa875c4d4
commit ac29e691d8
11 changed files with 223 additions and 54 deletions
+18
View File
@@ -239,6 +239,7 @@ GUIAction::GUIAction(xml_node<>* node)
ADD_ACTION(installapp);
ADD_ACTION(uninstalltwrpsystemapp);
ADD_ACTION(repackimage);
ADD_ACTION(reflashtwrp);
ADD_ACTION(fixabrecoverybootloop);
ADD_ACTION(applycustomtwrpfolder);
#ifndef TW_EXCLUDE_NANO
@@ -2159,6 +2160,23 @@ exit:
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;