internal static async Task RewriteMBRGPT() { FFU FFU = new FFU(@"E:\Device Backups\Alpha\9200_1230.0025.9200.9825\RX100_9825.ffu"); string GPTPath = @"E:\Device Backups\Alpha\9200_1230.0025.9200.9825\CorrectGPT.bin"; PhoneNotifierViewModel Notifier = new PhoneNotifierViewModel(); Notifier.Start(); await SwitchModeViewModel.SwitchTo(Notifier, PhoneInterfaces.Lumia_MassStorage); MassStorage MassStorage = (MassStorage)Notifier.CurrentModel; byte[] MBR = FFU.GetSectors(0, 1); LogFile.Log("Writing MBR to the device.", LogType.ConsoleOnly); MassStorage.WriteSectors(0, MBR); LogFile.Log("Writing GPT to the device.", LogType.ConsoleOnly); MassStorage.WriteSectors(1, GPTPath); }
internal static async Task RewriteGPT(string GPTPath) { PhoneNotifierViewModel Notifier = new PhoneNotifierViewModel(); Notifier.Start(); await SwitchModeViewModel.SwitchTo(Notifier, PhoneInterfaces.Lumia_MassStorage); MassStorage MassStorage = (MassStorage)Notifier.CurrentModel; LogFile.Log("Writing GPT to the device.", LogType.ConsoleOnly); MassStorage.WriteSectors(1, GPTPath); }