Adb-setup-1.3
Add-ToSystemPath
# Optional: Install Google USB driver if (Test-Path $DriverDir) Write-Host "Found USB driver folder. Installing driver (may prompt)..." -ForegroundColor Cyan & "$DriverDir\dpinst.exe" /silent 2>$null if ($LASTEXITCODE -eq 0) Write-Host "Driver installed." -ForegroundColor Green else Write-Warning "Driver install skipped or failed." adb-setup-1.3
function Install-Adb Write-Host "Installing ADB and fastboot to $TargetDir" -ForegroundColor Cyan if (-not (Test-Path $TargetDir)) Out-Null Add-ToSystemPath # Optional: Install Google USB driver if
function Uninstall-Adb Where-Object $_ -ne $PathEntry ) -join ';' [Environment]::SetEnvironmentVariable("Path", $newPath, "Machine") Write-Host "Removed from PATH." if ($Uninstall) Uninstall-Adb else Install-Adb if (-not $Silent) Write-Host "`nDone. You may need to restart your terminal." -ForegroundColor Yellow Read-Host "Press Enter to exit" adb-setup-1.3