From b98b4f7b96bda331a5b661a5dc9b295dc48a4bd3 Mon Sep 17 00:00:00 2001 From: Mohd Faraz Date: Sun, 10 May 2020 04:18:30 +0530 Subject: [PATCH] partitionmanager: magisk update sytnax as per new binaries Change-Id: I51994b991472cf103de067b9856ff3df1bf35a90 Signed-off-by: Mohd Faraz (cherry picked from commit 5738e760646d67791e938954a8873da41209d58c) --- gui/action.cpp | 4 ++-- partitionmanager.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/action.cpp b/gui/action.cpp index b7d9119e..585e3c3a 100755 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -2158,7 +2158,7 @@ int GUIAction::fixabrecoverybootloop(std::string arg __unused) goto exit; DataManager::SetProgress(.25); gui_msg("fixing_recovery_loop_patch=Patching kernel..."); - std::string command = "cd " REPACK_ORIG_DIR " && /sbin/magiskboot --hexpatch kernel 77616E745F696E697472616D667300 736B69705F696E697472616D667300"; + std::string command = "cd " REPACK_ORIG_DIR " && /sbin/magiskboot hexpatch kernel 77616E745F696E697472616D667300 736B69705F696E697472616D667300"; if (TWFunc::Exec_Cmd(command) != 0) { gui_msg(Msg(msg::kError, "fix_recovery_loop_patch_error=Error patching kernel.")); goto exit; @@ -2174,7 +2174,7 @@ int GUIAction::fixabrecoverybootloop(std::string arg __unused) } DataManager::SetProgress(.5); gui_msg(Msg("repacking_image=Repacking {1}...")(part->Display_Name)); - command = "cd " REPACK_ORIG_DIR " && /sbin/magiskboot --repack " REPACK_ORIG_DIR "boot.img"; + command = "cd " REPACK_ORIG_DIR " && /sbin/magiskboot repack " REPACK_ORIG_DIR "boot.img"; if (TWFunc::Exec_Cmd(command) != 0) { gui_msg(Msg(msg::kError, "repack_error=Error repacking image.")); goto exit; diff --git a/partitionmanager.cpp b/partitionmanager.cpp index b6918f3b..23e59533 100755 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -3126,7 +3126,7 @@ bool TWPartitionManager::Prepare_Repack(const std::string& Source_Path, const st if (TWFunc::copy_file(Source_Path, destination, 0644)) return false; } - std::string command = "cd " + Temp_Folder_Destination + " && /sbin/magiskboot --unpack -h '" + Source_Path +"'"; + std::string command = "cd " + Temp_Folder_Destination + " && /sbin/magiskboot unpack -h '" + Source_Path +"'"; if (TWFunc::Exec_Cmd(command) != 0) { LOGINFO("Error unpacking %s!\n", Source_Path.c_str()); gui_msg(Msg(msg::kError, "unpack_error=Error unpacking image.")); @@ -3178,7 +3178,7 @@ bool TWPartitionManager::Repack_Images(const std::string& Target_Image, const st LOGERR("Disabling verity is not implemented yet\n"); if (Repack_Options.Disable_Force_Encrypt) LOGERR("Disabling force encrypt is not implemented yet\n"); - std::string command = "cd " + path + " && /sbin/magiskboot --repack " + path + "boot.img"; + std::string command = "cd " + path + " && /sbin/magiskboot repack " + path + "boot.img"; if (TWFunc::Exec_Cmd(command) != 0) { gui_msg(Msg(msg::kError, "repack_error=Error repacking image.")); return false; @@ -3207,7 +3207,7 @@ bool TWPartitionManager::Repack_Images(const std::string& Target_Image, const st return false; } path = REPACK_ORIG_DIR; - command = "cd " + path + " && /sbin/magiskboot --repack " + path + "boot.img"; + command = "cd " + path + " && /sbin/magiskboot repack " + path + "boot.img"; if (TWFunc::Exec_Cmd(command) != 0) { gui_msg(Msg(msg::kError, "repack_error=Error repacking image.")); return false;