mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-06-16 12:20:12 +10:00
Code update
- WPinternals is now a .NET Core 3.0 application - Implemented new unlock process for Spec A devices - Updated logic for unlocking Spec B devices - Implemented MMOS support for Spec B devices - Implemented battery status in Flash Mode - Implemented Fuse configuration information in Flash Mode - Implemented Reboot from mass storage for Spec A and some Spec B devices - Implemented shutdown from flash mode (preliminary) - Fixed label mode support for Spec B
This commit is contained in:
@@ -35,6 +35,8 @@ namespace WPinternals
|
||||
internal IntPtr hDrive = (IntPtr)(-1);
|
||||
private bool OpenWithWriteAccess;
|
||||
|
||||
private QualcommSerial Serial;
|
||||
|
||||
internal MassStorage(string DevicePath): base(DevicePath)
|
||||
{
|
||||
try
|
||||
@@ -71,6 +73,37 @@ namespace WPinternals
|
||||
catch { }
|
||||
}
|
||||
|
||||
internal void AttachQualcommSerial(string DevicePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
Serial = new QualcommSerial(DevicePath);
|
||||
Serial.EncodeCommands = false;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
internal bool DoesDeviceSupportReboot()
|
||||
{
|
||||
return Serial != null;
|
||||
}
|
||||
|
||||
internal void Reboot()
|
||||
{
|
||||
if (Serial == null)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
// This will succeed on new models
|
||||
Serial.SendData(new byte[] { 0x7, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x0 });
|
||||
|
||||
// This will succeed on old models
|
||||
Serial.SendData(new byte[] { 0x7E, 0xA, 0x0, 0x0, 0xB6, 0xB5, 0x7E });
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (Disposed)
|
||||
|
||||
Reference in New Issue
Block a user