Make loader path mandatory only for non unlocked devices

This commit is contained in:
Gustave Monce
2020-03-29 10:49:30 +02:00
parent 1d6af81253
commit 019c47ad40
+6 -3
View File
@@ -698,9 +698,6 @@ namespace WPinternals
if ((FFUPath == null) || (FFUPath.Length == 0))
throw new ArgumentNullException("FFU path is missing");
if ((LoadersPath == null) || (LoadersPath.Length == 0))
throw new Exception("Error: Path for Loaders is mandatory.");
bool DumpPartitions = false;
string DumpFilePrefix = Environment.ExpandEnvironmentVariables("%ALLUSERSPROFILE%\\WPInternals\\") + DateTime.Now.ToString("yyyy-MM-dd hh.mm.ss") + " - ";
bool IsBootLoaderUnlocked = false;
@@ -728,6 +725,12 @@ namespace WPinternals
IsBootLoaderUnlocked = (SecurityStatus.AuthenticationStatus || SecurityStatus.RdcStatus || !SecurityStatus.SecureFfuEfuseStatus);
}
if (!IsBootLoaderUnlocked)
{
if ((LoadersPath == null) || (LoadersPath.Length == 0))
throw new Exception("Error: Path for Loaders is mandatory.");
}
FFU SupportedFFU = null;
if (App.PatchEngine.PatchDefinitions.Where(p => p.Name == "SecureBootHack-V1.1-EFIESP").First().TargetVersions.Any(v => v.Description == FFU.GetOSVersion()))
{