This commit is contained in:
Gustave Monce
2024-10-21 08:56:11 +02:00
parent 6be24faee0
commit bc77e8b589
3 changed files with 9 additions and 2 deletions
@@ -779,6 +779,14 @@ namespace WPinternals.Models.UEFIApps.Flash
ExecuteRawMethod(Request); ExecuteRawMethod(Request);
} }
// Erases MODEM_FS1 and MODEM_FS2, and restores MODEM_FSG to MODEM_FS1
internal void DoFactoryReset()
{
byte[] Request = new byte[4];
ByteOperations.WriteAsciiString(Request, 0, FactoryResetSignature);
ExecuteRawMethod(Request);
}
internal void EndAsyncFlash() internal void EndAsyncFlash()
{ {
byte[] Request = new byte[7]; byte[] Request = new byte[7];
@@ -261,7 +261,6 @@ namespace WPinternals
await StorePaths(); await StorePaths();
bool AlreadyUnlocked = false; bool AlreadyUnlocked = false;
LumiaFlashAppModel FlashModel = (LumiaFlashAppModel)PhoneNotifier.CurrentModel;
MachineState OriginalState = State; MachineState OriginalState = State;
State = MachineState.LumiaGetGPT; // Stop handling arrival notifications in this screen State = MachineState.LumiaGetGPT; // Stop handling arrival notifications in this screen
@@ -60,7 +60,7 @@ namespace WPinternals
if (ModernFlashApp) if (ModernFlashApp)
{ {
FlashModel.SwitchToFlashAppContext(); FlashModel.SwitchToBootManagerContext();
} }
else else
{ {