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
+3 -3
View File
@@ -62,7 +62,7 @@ namespace DiscUtils.Fat
"buffer is too small - cluster would overflow buffer");
}
uint firstSector = (uint)((cluster - 2) * _sectorsPerCluster + _firstDataSector);
uint firstSector = (uint)(((cluster - 2) * _sectorsPerCluster) + _firstDataSector);
_stream.Position = firstSector * _bytesPerSector;
StreamUtilities.ReadExact(_stream, buffer, offset, _clusterSize);
@@ -76,7 +76,7 @@ namespace DiscUtils.Fat
"buffer is too small - cluster would overflow buffer");
}
uint firstSector = (uint)((cluster - 2) * _sectorsPerCluster + _firstDataSector);
uint firstSector = (uint)(((cluster - 2) * _sectorsPerCluster) + _firstDataSector);
_stream.Position = firstSector * _bytesPerSector;
@@ -85,7 +85,7 @@ namespace DiscUtils.Fat
internal void WipeCluster(uint cluster)
{
uint firstSector = (uint)((cluster - 2) * _sectorsPerCluster + _firstDataSector);
uint firstSector = (uint)(((cluster - 2) * _sectorsPerCluster) + _firstDataSector);
_stream.Position = firstSector * _bytesPerSector;