# Fix USB drivers for Vortex T10M Pro # Must run as Administrator # This removes the broken Zadig WinUSB drivers and lets the Google USB driver take over Write-Host "=== Fix USB Drivers for Vortex T10M Pro ===" -ForegroundColor Cyan Write-Host "" # Check admin $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if (-not $isAdmin) { Write-Host "NOT running as Administrator - will try anyway..." -ForegroundColor Yellow } # Step 1: Remove Zadig-installed OEM drivers for MediaTek devices Write-Host "Step 1: Removing Zadig-installed drivers for VID_0E8D..." -ForegroundColor Yellow # oem148.inf and oem31.inf are Zadig drivers for VID_0E8D:PID_201C (android.inf) # oem149.inf is Zadig driver for VID_0E8D:PID_2000 (mt65xx_preloader.inf) $zadigDrivers = @() # Parse pnputil output to find Zadig drivers $output = pnputil /enum-drivers 2>&1 | Out-String $blocks = $output -split "(?=Published Name:)" foreach ($block in $blocks) { if ($block -match "libwdi" -and $block -match "0E8D") { if ($block -match "Published Name:\s+(oem\d+\.inf)") { $zadigDrivers += $Matches[1] } } } Write-Host " Found Zadig drivers: $($zadigDrivers -join ', ')" -ForegroundColor Gray foreach ($drv in $zadigDrivers) { Write-Host " Removing $drv..." -ForegroundColor Red pnputil /delete-driver $drv /force 2>&1 } # Step 2: Also remove the device node so it gets re-detected Write-Host "" Write-Host "Step 2: Removing device nodes..." -ForegroundColor Yellow $devs = Get-PnpDevice | Where-Object { $_.InstanceId -like '*VID_0E8D*' } foreach ($dev in $devs) { Write-Host " Removing: $($dev.FriendlyName) [$($dev.InstanceId)]" -ForegroundColor Gray pnputil /remove-device "$($dev.InstanceId)" 2>&1 } # Also remove the VID_18D1 fastboot phantom device $devs2 = Get-PnpDevice | Where-Object { $_.InstanceId -like '*VID_18D1&PID_4EE0*' } foreach ($dev in $devs2) { Write-Host " Removing: $($dev.FriendlyName) [$($dev.InstanceId)]" -ForegroundColor Gray pnputil /remove-device "$($dev.InstanceId)" 2>&1 } # Step 3: Ensure Google USB driver is available Write-Host "" Write-Host "Step 3: Checking Google USB driver..." -ForegroundColor Yellow $googleDrivers = pnputil /enum-drivers 2>&1 | Out-String if ($googleDrivers -match "android_winusb\.inf.*Google") { Write-Host " Google USB Driver found!" -ForegroundColor Green } else { Write-Host " Google USB Driver not found in driver store" -ForegroundColor Yellow # Try to add it $paths = @( "C:\Users\PCOEM\platform-tools\usb_driver\android_winusb.inf", "$env:LOCALAPPDATA\Android\Sdk\extras\google\usb_driver\android_winusb.inf" ) foreach ($p in $paths) { if (Test-Path $p) { Write-Host " Adding driver from: $p" -ForegroundColor Yellow pnputil /add-driver $p /install 2>&1 break } } } # Step 4: Rescan Write-Host "" Write-Host "Step 4: Scanning for hardware changes..." -ForegroundColor Yellow pnputil /scan-devices 2>&1 Write-Host "" Write-Host "=== Done ===" -ForegroundColor Green Write-Host "Now unplug and replug the USB cable, then try:" -ForegroundColor Cyan Write-Host " fastboot devices" -ForegroundColor White Write-Host " adb devices" -ForegroundColor White