diff --git a/APKToolGUI/Forms/FormMain.cs b/APKToolGUI/Forms/FormMain.cs index 5fee1f0..df85fab 100644 --- a/APKToolGUI/Forms/FormMain.cs +++ b/APKToolGUI/Forms/FormMain.cs @@ -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);