Adb-setup-1.3 Apr 2026
# Remove from PATH $currentPath = [Environment]::GetEnvironmentVariable("Path", "Machine") $newPath = ($currentPath -split ';' 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"
Add-ToSystemPath
function Uninstall-Adb Write-Host "Removing ADB installation..." -ForegroundColor Cyan if (Test-Path $TargetDir) Remove-Item -Recurse -Force $TargetDir Write-Host "Removed $TargetDir" adb-setup-1.3
function Install-Adb Write-Host "Installing ADB and fastboot to $TargetDir" -ForegroundColor Cyan if (-not (Test-Path $TargetDir)) New-Item -ItemType Directory -Path $TargetDir -Force "Machine") $newPath = ($currentPath -split '
$ADBSourceDir = Split-Path -Parent $MyInvocation.MyCommand.Definition $TargetDir = "$env:ProgramFiles\ADB" $DriverDir = "$ADBSourceDir\usb_driver" $PathEntry = "$TargetDir" if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) Write-Host "Please run as Administrator." -ForegroundColor Red exit 1 adb-setup-1.3