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
+7 -7
View File
@@ -51,23 +51,23 @@ namespace WPinternals
{
foreach (ManagementObject drive in partition.GetRelated("Win32_DiskDrive"))
{
if ((drive["PNPDeviceID"].ToString().Contains("VEN_QUALCOMM&PROD_MMC_STORAGE", StringComparison.CurrentCulture)) ||
(drive["PNPDeviceID"].ToString().Contains("VEN_MSFT&PROD_PHONE_MMC_STOR", StringComparison.CurrentCulture)))
if (drive["PNPDeviceID"].ToString().Contains("VEN_QUALCOMM&PROD_MMC_STORAGE", StringComparison.CurrentCulture) ||
drive["PNPDeviceID"].ToString().Contains("VEN_MSFT&PROD_PHONE_MMC_STOR", StringComparison.CurrentCulture))
{
Label = (logical["VolumeName"] == null ? "" : logical["VolumeName"].ToString());
if ((Drive == null) || (string.Compare(Label, "MainOS", true) == 0)) // Always prefer the MainOS drive-mapping
Label = logical["VolumeName"] == null ? "" : logical["VolumeName"].ToString();
if ((Drive == null) || string.Equals(Label, "MainOS", StringComparison.CurrentCultureIgnoreCase)) // Always prefer the MainOS drive-mapping
{
Drive = logical["Name"].ToString();
PhysicalDrive = drive["DeviceID"].ToString();
VolumeLabel = Label;
}
if (string.Compare(Label, "MainOS", true) == 0)
if (string.Equals(Label, "MainOS", StringComparison.CurrentCultureIgnoreCase))
{
break;
}
}
}
if (string.Compare(Label, "MainOS", true) == 0)
if (string.Equals(Label, "MainOS", StringComparison.CurrentCultureIgnoreCase))
{
break;
}
@@ -188,7 +188,7 @@ namespace WPinternals
internal bool IsVolumeOpen()
{
return (int)(hVolume) != -1;
return (int)hVolume != -1;
}
internal void CloseVolume()