mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-06-13 19:06:41 +10:00
Nokia Flash Model -> Nokia UEFI Model
This commit is contained in:
@@ -24,7 +24,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace WPinternals
|
namespace WPinternals
|
||||||
{
|
{
|
||||||
internal class LumiaBootManagerAppModel : NokiaFlashModel
|
internal class LumiaBootManagerAppModel : NokiaUEFIModel
|
||||||
{
|
{
|
||||||
internal readonly LumiaBootManagerPhoneInfo BootManagerInfo = new();
|
internal readonly LumiaBootManagerPhoneInfo BootManagerInfo = new();
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ namespace WPinternals
|
|||||||
SkipSignatureCheck = 8
|
SkipSignatureCheck = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class LumiaFlashAppModel : NokiaFlashModel
|
internal class LumiaFlashAppModel : NokiaUEFIModel
|
||||||
{
|
{
|
||||||
internal readonly LumiaFlashAppPhoneInfo FlashAppInfo = new();
|
internal readonly LumiaFlashAppPhoneInfo FlashAppInfo = new();
|
||||||
private UefiSecurityStatusResponse _SecurityStatus = null;
|
private UefiSecurityStatusResponse _SecurityStatus = null;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace WPinternals
|
namespace WPinternals
|
||||||
{
|
{
|
||||||
internal class LumiaPhoneInfoAppModel : NokiaFlashModel
|
internal class LumiaPhoneInfoAppModel : NokiaUEFIModel
|
||||||
{
|
{
|
||||||
internal readonly LumiaPhoneInfoAppPhoneInfo PhoneInfoAppInfo = new();
|
internal readonly LumiaPhoneInfoAppPhoneInfo PhoneInfoAppInfo = new();
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -24,7 +24,7 @@ namespace WPinternals
|
|||||||
{
|
{
|
||||||
internal delegate void InterfaceChangedHandler(PhoneInterfaces NewInterface, string DevicePath);
|
internal delegate void InterfaceChangedHandler(PhoneInterfaces NewInterface, string DevicePath);
|
||||||
|
|
||||||
internal class NokiaFlashModel : NokiaPhoneModel
|
internal class NokiaUEFIModel : NokiaPhoneModel
|
||||||
{
|
{
|
||||||
private string _devicePath;
|
private string _devicePath;
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ namespace WPinternals
|
|||||||
/* NOKXCE */
|
/* NOKXCE */
|
||||||
private const string EchoSignature = $"{CommonExtendedMessageSignature}E";
|
private const string EchoSignature = $"{CommonExtendedMessageSignature}E";
|
||||||
|
|
||||||
public NokiaFlashModel(string DevicePath) : base(DevicePath)
|
public NokiaUEFIModel(string DevicePath) : base(DevicePath)
|
||||||
{
|
{
|
||||||
_devicePath = DevicePath;
|
_devicePath = DevicePath;
|
||||||
}
|
}
|
||||||
@@ -2344,7 +2344,7 @@ namespace WPinternals
|
|||||||
LogFile.BeginAction("FixBoot");
|
LogFile.BeginAction("FixBoot");
|
||||||
|
|
||||||
LogFile.Log("Command: Fix boot after unlocking bootloader", LogType.FileAndConsole);
|
LogFile.Log("Command: Fix boot after unlocking bootloader", LogType.FileAndConsole);
|
||||||
NokiaFlashModel FlashModel = (NokiaFlashModel)Notifier.CurrentModel;
|
NokiaUEFIModel FlashModel = (NokiaUEFIModel)Notifier.CurrentModel;
|
||||||
|
|
||||||
if (SetWorkingStatus == null)
|
if (SetWorkingStatus == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ namespace WPinternals
|
|||||||
FlashAppType type = FlashAppType.FlashApp;
|
FlashAppType type = FlashAppType.FlashApp;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NokiaFlashModel tmpModel = new NokiaFlashModel(e.DevicePath);
|
NokiaUEFIModel tmpModel = new NokiaUEFIModel(e.DevicePath);
|
||||||
type = tmpModel.GetFlashAppType();
|
type = tmpModel.GetFlashAppType();
|
||||||
tmpModel.Dispose();
|
tmpModel.Dispose();
|
||||||
LogFile.Log("Flash App Type: " + type.ToString(), LogType.FileOnly);
|
LogFile.Log("Flash App Type: " + type.ToString(), LogType.FileOnly);
|
||||||
@@ -255,7 +255,7 @@ namespace WPinternals
|
|||||||
case FlashAppType.BootManager:
|
case FlashAppType.BootManager:
|
||||||
{
|
{
|
||||||
CurrentModel = new LumiaBootManagerAppModel(e.DevicePath);
|
CurrentModel = new LumiaBootManagerAppModel(e.DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
@@ -268,9 +268,9 @@ namespace WPinternals
|
|||||||
case FlashAppType.FlashApp:
|
case FlashAppType.FlashApp:
|
||||||
{
|
{
|
||||||
CurrentModel = new LumiaFlashAppModel(e.DevicePath);
|
CurrentModel = new LumiaFlashAppModel(e.DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
((NokiaFlashModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
@@ -282,9 +282,9 @@ namespace WPinternals
|
|||||||
case FlashAppType.PhoneInfoApp:
|
case FlashAppType.PhoneInfoApp:
|
||||||
{
|
{
|
||||||
CurrentModel = new LumiaPhoneInfoAppModel(e.DevicePath);
|
CurrentModel = new LumiaPhoneInfoAppModel(e.DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
((NokiaFlashModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
@@ -442,7 +442,7 @@ namespace WPinternals
|
|||||||
case PhoneInterfaces.Lumia_Bootloader:
|
case PhoneInterfaces.Lumia_Bootloader:
|
||||||
{
|
{
|
||||||
CurrentModel = new LumiaBootManagerAppModel(DevicePath);
|
CurrentModel = new LumiaBootManagerAppModel(DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
@@ -455,9 +455,9 @@ namespace WPinternals
|
|||||||
case PhoneInterfaces.Lumia_Flash:
|
case PhoneInterfaces.Lumia_Flash:
|
||||||
{
|
{
|
||||||
CurrentModel = new LumiaFlashAppModel(DevicePath);
|
CurrentModel = new LumiaFlashAppModel(DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
((NokiaFlashModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
@@ -469,9 +469,9 @@ namespace WPinternals
|
|||||||
case PhoneInterfaces.Lumia_PhoneInfo:
|
case PhoneInterfaces.Lumia_PhoneInfo:
|
||||||
{
|
{
|
||||||
CurrentModel = new LumiaPhoneInfoAppModel(DevicePath);
|
CurrentModel = new LumiaPhoneInfoAppModel(DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
((NokiaFlashModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
@@ -485,9 +485,9 @@ namespace WPinternals
|
|||||||
LogFile.Log("Flash App Type could not be determined, assuming FlashApp", LogType.FileOnly);
|
LogFile.Log("Flash App Type could not be determined, assuming FlashApp", LogType.FileOnly);
|
||||||
|
|
||||||
CurrentModel = new LumiaFlashAppModel(DevicePath);
|
CurrentModel = new LumiaFlashAppModel(DevicePath);
|
||||||
((NokiaFlashModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
((NokiaFlashModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ namespace WPinternals
|
|||||||
{
|
{
|
||||||
if (TargetMode == PhoneInterfaces.Lumia_Bootloader)
|
if (TargetMode == PhoneInterfaces.Lumia_Bootloader)
|
||||||
{
|
{
|
||||||
((NokiaFlashModel)PhoneNotifier.CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)PhoneNotifier.CurrentModel).DisableRebootTimeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
ModeSwitchSuccessWrapper();
|
ModeSwitchSuccessWrapper();
|
||||||
|
|||||||
Reference in New Issue
Block a user