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
+5 -8
View File
@@ -64,7 +64,7 @@ namespace WPinternals
public UInt32 HashTableSize;
}
internal class ManifestIni
internal static class ManifestIni
{
internal static string BuildUpManifest(FullFlash fullFlash, Store store)
{
@@ -178,17 +178,14 @@ namespace WPinternals
throw new ArgumentException("Streams must be seekable");
}
if (((Part.StartSector * 0x200) % chunkSize) != 0)
if ((Part.StartSector * 0x200 % chunkSize) != 0)
{
throw new ArgumentException("Invalid StartSector alignment");
}
if (CheckSectorAlignment)
if (CheckSectorAlignment && (Part.Stream.Length % chunkSize) != 0)
{
if ((Part.Stream.Length % chunkSize) != 0)
{
throw new ArgumentException("Invalid Data length");
}
throw new ArgumentException("Invalid Data length");
}
}
}
@@ -247,7 +244,7 @@ namespace WPinternals
//Logging.Log("Generating image manifest...");
string manifest = ManifestIni.BuildUpManifest(ffimage, simage);//, partitions);
byte[] TextBytes = System.Text.Encoding.ASCII.GetBytes(manifest);
byte[] TextBytes = Encoding.ASCII.GetBytes(manifest);
image.ManifestLength = (UInt32)TextBytes.Length;