Skip to content

Commit

Permalink
Fixed attempting to install APK even it's disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AndnixSH committed May 8, 2023
1 parent 7725d3c commit a45b671
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions APKToolGUI/Forms/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1001,18 +1001,21 @@ await Task.Factory.StartNew(() =>
}

string device = selAdbDeviceLbl.Text;
if (!String.IsNullOrEmpty(device) && Settings.Default.Sign_InstallApkAfterSign)
if (Settings.Default.Sign_InstallApkAfterSign)
{
ToStatus(Language.InstallingApk, Resources.waiting);
ToLog(ApktoolEventType.Infomation, "=====[ " + Language.InstallingApk + " ]=====");
if (!String.IsNullOrEmpty(device))
{
ToStatus(Language.InstallingApk, Resources.waiting);
ToLog(ApktoolEventType.Infomation, "=====[ " + Language.InstallingApk + " ]=====");

if (adb.Install(device, outputFile) == 0)
ToLog(ApktoolEventType.None, Language.InstallApkSuccessful);
if (adb.Install(device, outputFile) == 0)
ToLog(ApktoolEventType.None, Language.InstallApkSuccessful);
else
ToLog(ApktoolEventType.Error, Language.InstallApkFailed);
}
else
ToLog(ApktoolEventType.Error, Language.InstallApkFailed); ;
ToLog(ApktoolEventType.Error, String.Format(Language.DeviceNotSelected, outputFile));
}
else
ToLog(ApktoolEventType.Error, String.Format(Language.DeviceNotSelected, outputFile));
}
else
ToLog(ApktoolEventType.Error, Language.ErrorSigning);
Expand Down

0 comments on commit a45b671

Please sign in to comment.