mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-06-21 14:41:03 +10:00
Fix: device being null
This commit is contained in:
@@ -32,15 +32,7 @@ namespace WPinternals.Models.Lumia
|
|||||||
|
|
||||||
public NokiaPhoneModel(string DevicePath)
|
public NokiaPhoneModel(string DevicePath)
|
||||||
{
|
{
|
||||||
// Mass Storage device is not WinUSB
|
Device = new USBDevice(DevicePath);
|
||||||
try
|
|
||||||
{
|
|
||||||
Device = new USBDevice(DevicePath);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogFile.LogException(ex, LogType.FileOnly);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetDevice()
|
public void ResetDevice()
|
||||||
@@ -93,7 +85,7 @@ namespace WPinternals.Models.Lumia
|
|||||||
|
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
Device?.Dispose();
|
Device.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean unmanaged resources here.
|
// Clean unmanaged resources here.
|
||||||
|
|||||||
@@ -28,8 +28,9 @@ using WPinternals.Models.Lumia;
|
|||||||
|
|
||||||
namespace WPinternals
|
namespace WPinternals
|
||||||
{
|
{
|
||||||
internal class MassStorage : NokiaPhoneModel
|
internal class MassStorage : IDisposable
|
||||||
{
|
{
|
||||||
|
protected bool Disposed = false;
|
||||||
internal string Drive = null;
|
internal string Drive = null;
|
||||||
internal string PhysicalDrive = null;
|
internal string PhysicalDrive = null;
|
||||||
internal string VolumeLabel = null;
|
internal string VolumeLabel = null;
|
||||||
@@ -39,7 +40,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
private string Serial;
|
private string Serial;
|
||||||
|
|
||||||
internal MassStorage(string DevicePath) : base(DevicePath)
|
internal MassStorage(string DevicePath)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -131,7 +132,27 @@ namespace WPinternals
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
/// <summary>
|
||||||
|
/// Disposes the UsbDevice including all unmanaged WinUSB handles. This function
|
||||||
|
/// should be called when the UsbDevice object is no longer in use, otherwise
|
||||||
|
/// unmanaged handles will remain open until the garbage collector finalizes the
|
||||||
|
/// object.
|
||||||
|
/// </summary>
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
Dispose(true);
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finalizer for the UsbDevice. Disposes all unmanaged handles.
|
||||||
|
/// </summary>
|
||||||
|
~MassStorage()
|
||||||
|
{
|
||||||
|
Dispose(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (Disposed)
|
if (Disposed)
|
||||||
{
|
{
|
||||||
@@ -141,8 +162,6 @@ namespace WPinternals
|
|||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
CloseVolume();
|
CloseVolume();
|
||||||
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ namespace WPinternals
|
|||||||
private readonly MassStorage CurrentModel;
|
private readonly MassStorage CurrentModel;
|
||||||
private readonly Action<PhoneInterfaces?> RequestModeSwitch;
|
private readonly Action<PhoneInterfaces?> RequestModeSwitch;
|
||||||
|
|
||||||
internal NokiaModeMassStorageViewModel(NokiaPhoneModel CurrentModel, Action<PhoneInterfaces?> RequestModeSwitch)
|
internal NokiaModeMassStorageViewModel(MassStorage CurrentModel, Action<PhoneInterfaces?> RequestModeSwitch)
|
||||||
: base()
|
: base()
|
||||||
{
|
{
|
||||||
this.CurrentModel = (MassStorage)CurrentModel;
|
this.CurrentModel = CurrentModel;
|
||||||
this.RequestModeSwitch = RequestModeSwitch;
|
this.RequestModeSwitch = RequestModeSwitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ namespace WPinternals
|
|||||||
private USBNotifier SimpleIONotifier;
|
private USBNotifier SimpleIONotifier;
|
||||||
private USBNotifier UFPNotifier;
|
private USBNotifier UFPNotifier;
|
||||||
|
|
||||||
|
public string? CurrentDevicePath = null;
|
||||||
public PhoneInterfaces? CurrentInterface = null;
|
public PhoneInterfaces? CurrentInterface = null;
|
||||||
private PhoneInterfaces? LastInterface = null;
|
private PhoneInterfaces? LastInterface = null;
|
||||||
public IDisposable CurrentModel = null;
|
public IDisposable CurrentModel = null;
|
||||||
@@ -191,6 +192,11 @@ namespace WPinternals
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (e.DevicePath == CurrentDevicePath)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (e.DevicePath.Contains("VID_0421&", StringComparison.OrdinalIgnoreCase) ||
|
if (e.DevicePath.Contains("VID_0421&", StringComparison.OrdinalIgnoreCase) ||
|
||||||
e.DevicePath.Contains("VID_045E&", StringComparison.OrdinalIgnoreCase))
|
e.DevicePath.Contains("VID_045E&", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
@@ -199,6 +205,7 @@ namespace WPinternals
|
|||||||
CurrentModel = new UnifiedFlashingPlatformModel(e.DevicePath);
|
CurrentModel = new UnifiedFlashingPlatformModel(e.DevicePath);
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.UFP;
|
CurrentInterface = PhoneInterfaces.UFP;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -210,6 +217,7 @@ namespace WPinternals
|
|||||||
CurrentModel = new SimpleIOModel(e.DevicePath);
|
CurrentModel = new SimpleIOModel(e.DevicePath);
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.SimpleIO;
|
CurrentInterface = PhoneInterfaces.SimpleIO;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -221,6 +229,7 @@ namespace WPinternals
|
|||||||
e.DevicePath.Contains("&PID_0A01&MI_04", StringComparison.OrdinalIgnoreCase)) // for Spec B (650)
|
e.DevicePath.Contains("&PID_0A01&MI_04", StringComparison.OrdinalIgnoreCase)) // for Spec B (650)
|
||||||
{
|
{
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Label;
|
CurrentInterface = PhoneInterfaces.Lumia_Label;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
CurrentModel = new NokiaCareSuiteModel(e.DevicePath);
|
CurrentModel = new NokiaCareSuiteModel(e.DevicePath);
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
@@ -257,6 +266,7 @@ namespace WPinternals
|
|||||||
// So we assume we need to talk to this old interface.
|
// So we assume we need to talk to this old interface.
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Normal;
|
CurrentInterface = PhoneInterfaces.Lumia_Normal;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
CurrentModel = new NokiaCareSuiteModel(DevicePath);
|
CurrentModel = new NokiaCareSuiteModel(DevicePath);
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
@@ -272,6 +282,7 @@ namespace WPinternals
|
|||||||
NewInterfaceWaitHandle.Set();
|
NewInterfaceWaitHandle.Set();
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Normal;
|
CurrentInterface = PhoneInterfaces.Lumia_Normal;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
CurrentModel = new NokiaCareSuiteModel(e.DevicePath);
|
CurrentModel = new NokiaCareSuiteModel(e.DevicePath);
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
@@ -286,11 +297,10 @@ namespace WPinternals
|
|||||||
e.DevicePath.Contains("&PID_05EE", StringComparison.OrdinalIgnoreCase)) // VID_0421&PID_05EE is for early RX100
|
e.DevicePath.Contains("&PID_05EE", StringComparison.OrdinalIgnoreCase)) // VID_0421&PID_05EE is for early RX100
|
||||||
{
|
{
|
||||||
FlashAppType type = FlashAppType.FlashApp;
|
FlashAppType type = FlashAppType.FlashApp;
|
||||||
|
NokiaUEFIModel tmpModel = new(e.DevicePath);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NokiaUEFIModel tmpModel = new(e.DevicePath);
|
|
||||||
type = tmpModel.GetFlashAppType();
|
type = tmpModel.GetFlashAppType();
|
||||||
tmpModel.Dispose();
|
|
||||||
LogFile.Log("Flash App Type: " + type.ToString(), LogType.FileOnly);
|
LogFile.Log("Flash App Type: " + type.ToString(), LogType.FileOnly);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -302,6 +312,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
LogFile.Log("Flash App Type could not be determined, assuming " + type.ToString(), LogType.FileOnly);
|
LogFile.Log("Flash App Type could not be determined, assuming " + type.ToString(), LogType.FileOnly);
|
||||||
}
|
}
|
||||||
|
tmpModel.Dispose();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@@ -311,6 +322,7 @@ namespace WPinternals
|
|||||||
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -325,6 +337,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -339,6 +352,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -379,6 +393,7 @@ namespace WPinternals
|
|||||||
if (NewModel.Drive != null) // When logical drive is already known, we use this model. Or else we wait for the logical drive to arrive.
|
if (NewModel.Drive != null) // When logical drive is already known, we use this model. Or else we wait for the logical drive to arrive.
|
||||||
{
|
{
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_MassStorage;
|
CurrentInterface = PhoneInterfaces.Lumia_MassStorage;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
CurrentModel = NewModel;
|
CurrentModel = NewModel;
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + e.DevicePath, LogType.FileOnly);
|
||||||
@@ -405,6 +420,7 @@ namespace WPinternals
|
|||||||
if ((DeviceInfo.BusName == "QHSUSB_DLOAD") || (DeviceInfo.BusName == "QHSUSB__BULK") || ((DeviceInfo.BusName?.Length == 0) && (LastInterface != PhoneInterfaces.Qualcomm_Download))) // TODO: Separate for Sahara!
|
if ((DeviceInfo.BusName == "QHSUSB_DLOAD") || (DeviceInfo.BusName == "QHSUSB__BULK") || ((DeviceInfo.BusName?.Length == 0) && (LastInterface != PhoneInterfaces.Qualcomm_Download))) // TODO: Separate for Sahara!
|
||||||
{
|
{
|
||||||
CurrentInterface = PhoneInterfaces.Qualcomm_Download;
|
CurrentInterface = PhoneInterfaces.Qualcomm_Download;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
CurrentModel = new QualcommSerial(e.DevicePath);
|
CurrentModel = new QualcommSerial(e.DevicePath);
|
||||||
NewDeviceArrived(new ArrivalEventArgs((PhoneInterfaces)CurrentInterface, CurrentModel));
|
NewDeviceArrived(new ArrivalEventArgs((PhoneInterfaces)CurrentInterface, CurrentModel));
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
@@ -422,6 +438,7 @@ namespace WPinternals
|
|||||||
else if ((DeviceInfo.BusName == "QHSUSB_ARMPRG") || ((DeviceInfo.BusName?.Length == 0) && (LastInterface == PhoneInterfaces.Qualcomm_Download)))
|
else if ((DeviceInfo.BusName == "QHSUSB_ARMPRG") || ((DeviceInfo.BusName?.Length == 0) && (LastInterface == PhoneInterfaces.Qualcomm_Download)))
|
||||||
{
|
{
|
||||||
CurrentInterface = PhoneInterfaces.Qualcomm_Flash;
|
CurrentInterface = PhoneInterfaces.Qualcomm_Flash;
|
||||||
|
CurrentDevicePath = e.DevicePath;
|
||||||
CurrentModel = new QualcommSerial(e.DevicePath);
|
CurrentModel = new QualcommSerial(e.DevicePath);
|
||||||
NewDeviceArrived(new ArrivalEventArgs((PhoneInterfaces)CurrentInterface, CurrentModel));
|
NewDeviceArrived(new ArrivalEventArgs((PhoneInterfaces)CurrentInterface, CurrentModel));
|
||||||
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + ((USBNotifier)sender).Guid.ToString(), LogType.FileOnly);
|
||||||
@@ -473,6 +490,7 @@ namespace WPinternals
|
|||||||
LogFile.LogException(Ex);
|
LogFile.LogException(Ex);
|
||||||
CurrentModel = null;
|
CurrentModel = null;
|
||||||
CurrentInterface = null;
|
CurrentInterface = null;
|
||||||
|
CurrentDevicePath = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -481,6 +499,7 @@ namespace WPinternals
|
|||||||
LastInterface = CurrentInterface;
|
LastInterface = CurrentInterface;
|
||||||
|
|
||||||
CurrentInterface = null;
|
CurrentInterface = null;
|
||||||
|
CurrentDevicePath = null;
|
||||||
if (CurrentModel != null)
|
if (CurrentModel != null)
|
||||||
{
|
{
|
||||||
CurrentModel.Dispose();
|
CurrentModel.Dispose();
|
||||||
@@ -498,6 +517,7 @@ namespace WPinternals
|
|||||||
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
((NokiaUEFIModel)CurrentModel).InterfaceChanged += InterfaceChanged;
|
||||||
|
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
CurrentInterface = PhoneInterfaces.Lumia_Bootloader;
|
||||||
|
CurrentDevicePath = DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -512,6 +532,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
||||||
|
CurrentDevicePath = DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -526,6 +547,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
CurrentInterface = PhoneInterfaces.Lumia_PhoneInfo;
|
||||||
|
CurrentDevicePath = DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -542,6 +564,7 @@ namespace WPinternals
|
|||||||
|
|
||||||
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
((NokiaUEFIModel)CurrentModel).DisableRebootTimeOut();
|
||||||
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
CurrentInterface = PhoneInterfaces.Lumia_Flash;
|
||||||
|
CurrentDevicePath = DevicePath;
|
||||||
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
LogFile.Log("Found device on interface: " + LumiaFlashInterfaceGuid.ToString(), LogType.FileOnly);
|
||||||
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
LogFile.Log("Device path: " + DevicePath, LogType.FileOnly);
|
||||||
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
LogFile.Log("Connected device: Lumia", LogType.FileAndConsole);
|
||||||
@@ -583,6 +606,7 @@ namespace WPinternals
|
|||||||
}
|
}
|
||||||
|
|
||||||
CurrentInterface = null;
|
CurrentInterface = null;
|
||||||
|
CurrentDevicePath = null;
|
||||||
if (CurrentModel != null)
|
if (CurrentModel != null)
|
||||||
{
|
{
|
||||||
CurrentModel.Dispose();
|
CurrentModel.Dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user