mirror of
https://github.com/MobileTooling/UnifiedFlashingPlatform.git
synced 2026-07-27 12:48:47 -07:00
24 lines
673 B
C#
24 lines
673 B
C#
using MadWizard.WinUSBNet;
|
|||
|
|
using System;
|
||
|
|
|
||
|
|
namespace UFPTool
|
||
|
|
{
|
||
|
|
internal static class ListDevice
|
||
|
|
{
|
||
|
|
internal static void Execute(string[] args)
|
||
|
|
{
|
||
|
|
USBDeviceInfo[] details = USBDevice.GetDevices("{9E3BD5F7-9690-4FCC-8810-3E2650CD6ECC}");
|
||
|
|
|
||
|
|
for (int i = 0; i < details.Length; i++)
|
||
|
|
{
|
||
|
|
Console.WriteLine($"[Device {i}]");
|
||
|
|
Console.WriteLine($"Device Path: {details[i].DevicePath}");
|
||
|
|
Console.WriteLine($"Can Flash: True");
|
||
|
|
Console.WriteLine();
|
||
|
|
}
|
||
|
|
|
||
|
|
Console.WriteLine($"Found {details.Length:d} device(s) in total.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|