Implement Qualcomm Sahara VIP and fix a few bugs

* Qualcomm Sahara VIP
* Project Cleanup
* Allow unlocking an already unlocked phone
This commit is contained in:
Gustave Monce
2021-08-11 14:33:49 +02:00
parent 9f4c92f437
commit c5fcb1ec8d
72 changed files with 987 additions and 861 deletions
+2 -5
View File
@@ -36,12 +36,9 @@ namespace WPinternals
private void HandleHyperlinkClick(object sender, RoutedEventArgs args)
{
if (args.Source is Hyperlink link)
if (args.Source is Hyperlink link && link.NavigateUri.ToString() == "UnlockBoot")
{
if (link.NavigateUri.ToString() == "UnlockBoot")
{
((BackupTargetSelectionViewModel)DataContext).SwitchToUnlockBoot();
}
((BackupTargetSelectionViewModel)DataContext).SwitchToUnlockBoot();
}
}
+5 -8
View File
@@ -66,7 +66,7 @@ namespace WPinternals
obj = VisualTreeHelper.GetParent(obj);
}
PhoneNotifier = ((MainViewModel)(((MainWindow)obj).DataContext)).PhoneNotifier;
PhoneNotifier = ((MainViewModel)((MainWindow)obj).DataContext).PhoneNotifier;
PhoneNotifier.NewDeviceArrived += PhoneNotifier_NewDeviceArrived;
}
@@ -117,14 +117,11 @@ namespace WPinternals
{
App.InterruptBoot = (bool)e.NewValue;
if ((bool)e.NewValue)
if ((bool)e.NewValue && PhoneNotifier.CurrentInterface == PhoneInterfaces.Lumia_Bootloader)
{
if (PhoneNotifier.CurrentInterface == PhoneInterfaces.Lumia_Bootloader)
{
App.InterruptBoot = false;
LogFile.Log("Found Lumia BootMgr and user forced to interrupt the boot process. Force to Flash-mode.");
Task.Run(() => SwitchModeViewModel.SwitchTo(PhoneNotifier, PhoneInterfaces.Lumia_Flash));
}
App.InterruptBoot = false;
LogFile.Log("Found Lumia BootMgr and user forced to interrupt the boot process. Force to Flash-mode.");
Task.Run(() => SwitchModeViewModel.SwitchTo(PhoneNotifier, PhoneInterfaces.Lumia_Flash));
}
}
@@ -36,12 +36,9 @@ namespace WPinternals
private void HandleHyperlinkClick(object sender, RoutedEventArgs args)
{
if (args.Source is Hyperlink link)
if (args.Source is Hyperlink link && link.NavigateUri.ToString() == "UnlockBoot")
{
if (link.NavigateUri.ToString() == "UnlockBoot")
{
((LumiaUndoRootTargetSelectionViewModel)DataContext).SwitchToUnlockBoot();
}
((LumiaUndoRootTargetSelectionViewModel)DataContext).SwitchToUnlockBoot();
}
}
+1 -1
View File
@@ -32,7 +32,7 @@ namespace WPinternals
{
InitializeComponent();
Visibility = System.Windows.Visibility.Collapsed;
Visibility = Visibility.Collapsed;
}
protected override void OnSourceInitialized(EventArgs e)
+2 -2
View File
@@ -37,7 +37,7 @@ namespace WPinternals
protected override async void OnSourceInitialized(EventArgs e)
{
Visibility = System.Windows.Visibility.Hidden;
Visibility = Visibility.Hidden;
bool NeedLicenseAgrement = false;
if (Registry.CurrentUser.OpenSubKey("Software\\WPInternals") == null)
@@ -45,7 +45,7 @@ namespace WPinternals
Registry.CurrentUser.OpenSubKey("Software", true).CreateSubKey("WPInternals");
}
if ((Registration.IsPrerelease) && (Registry.CurrentUser.OpenSubKey("Software\\WPInternals").GetValue("NdaAccepted") == null))
if (Registration.IsPrerelease && (Registry.CurrentUser.OpenSubKey("Software\\WPInternals").GetValue("NdaAccepted") == null))
{
NeedLicenseAgrement = true;
}