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
+20 -23
View File
@@ -434,36 +434,33 @@ namespace WPinternals
foreach (string PartitionName in ProvisioningPartitions)
{
if (GPT.Partitions.Any(p => p.Name == PartitionName))
if (GPT.Partitions.Any(p => p.Name == PartitionName) && Result)
{
if (Result)
try
{
try
Entry = Archive.CreateEntry(PartitionName + ".bin", CompressionLevel.Optimal);
EntryStream = Entry.Open();
i++;
Busy.Message = "Create backup of partition " + PartitionName + " (" + i.ToString() + "/" + PartitionCount.ToString() + ")";
if (PartitionName == "UEFI_BS_NV" && GPT.Partitions.Any(p => p.Name == "BACKUP_BS_NV"))
{
Entry = Archive.CreateEntry(PartitionName + ".bin", CompressionLevel.Optimal);
EntryStream = Entry.Open();
i++;
Busy.Message = "Create backup of partition " + PartitionName + " (" + i.ToString() + "/" + PartitionCount.ToString() + ")";
if (PartitionName == "UEFI_BS_NV" && GPT.Partitions.Any(p => p.Name == "BACKUP_BS_NV"))
{
Phone.BackupPartition("BACKUP_BS_NV", EntryStream, Updater);
}
else
{
Phone.BackupPartition(PartitionName, EntryStream, Updater);
}
Phone.BackupPartition("BACKUP_BS_NV", EntryStream, Updater);
}
catch (Exception Ex)
else
{
LogFile.LogException(Ex);
Result = false;
}
finally
{
EntryStream?.Close();
EntryStream = null;
Phone.BackupPartition(PartitionName, EntryStream, Updater);
}
}
catch (Exception Ex)
{
LogFile.LogException(Ex);
Result = false;
}
finally
{
EntryStream?.Close();
EntryStream = null;
}
}
}
}