Back to Device Detection
ADB Installation Guide
Complete step-by-step instructions for Windows & Mac
📋 Table of Contents
What is ADB?
ADB (Android Debug Bridge) is a command-line tool that allows you to communicate with Android devices. It's essential for:
- Getting detailed device information (IMEI, Android version, battery status)
- Installing/uninstalling apps
- Debugging applications
- Accessing device shell
- Transferring files
🪟 Windows Installation
Method 1: Platform Tools (Recommended)
Step 1: Download
- Go to: Android Platform Tools
- Click "Download SDK Platform-Tools for Windows"
- Accept terms and download (10-15 MB)
Step 2: Extract Files
- Locate downloaded ZIP file (usually in Downloads)
- Right-click → "Extract All..."
- Choose destination:
C:\platform-tools - Click "Extract"
Step 3: Add to PATH
- Press Windows + S (search)
- Type: "environment variables"
- Click "Edit the system environment variables"
- Click "Environment Variables" button
- In "System variables", find and select "Path"
- Click "Edit" → "New"
- Type:
C:\platform-tools - Click OK on all windows
Step 4: Verify Installation
# Open Command Prompt (Windows + R, type "cmd")
adb version
✅ Expected: You should see "Android Debug Bridge version 1.0.41..."
Method 2: Chocolatey (Alternative)
If you have Chocolatey installed:
choco install adb
adb version
🍎 Mac Installation
Method 1: Homebrew (Easiest)
Step 1: Install Homebrew (if needed)
Check if Homebrew is installed:
brew --version
If not installed, run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 2: Install ADB
brew install android-platform-tools
Step 3: Verify Installation
adb version
✅ Expected: "Android Debug Bridge version 1.0.41..."
Method 2: Manual Installation
Download & Extract
cd ~/Downloads
unzip platform-tools-latest-darwin.zip
sudo mv platform-tools /usr/local/
Add to PATH
echo 'export PATH=$PATH:/usr/local/platform-tools' >> ~/.zshrc
source ~/.zshrc
adb version
📱 Enable USB Debugging on Android
Step 1: Enable Developer Options
- Open Settings on your Android device
- Scroll to "About phone" (or "About device")
- Find "Build number"
- Tap "Build number" 7 times rapidly
- Enter PIN/password if prompted
- You'll see: "You are now a developer!"
Step 2: Enable USB Debugging
- Go back to Settings
- Find and tap "Developer options"
- Toggle ON: "Developer options"
- Scroll down and find "USB debugging"
- Toggle ON: "USB debugging"
- Tap OK on the warning dialog
Step 3: Connect & Authorize
- Connect your device to computer via USB cable
- Unlock your device
- On device, you'll see: "Allow USB debugging?"
- ✅ Check "Always allow from this computer"
- Tap "OK" or "Allow"
Step 4: Verify Connection
adb devices
✅ Expected output: Your device serial number followed by "device"
🔧 Common ADB Commands
Basic Device Information
# Check connected devices
adb devices
# Get device model
adb shell getprop ro.product.model
# Get Android version
adb shell getprop ro.build.version.release
# Get manufacturer
adb shell getprop ro.product.manufacturer
Advanced Information
# Get all device properties
adb shell getprop
# Get IMEI (requires authorization)
adb shell service call iphonesubinfo 1
# Get battery information
adb shell dumpsys battery
# Get storage information
adb shell df
# Get RAM information
adb shell cat /proc/meminfo
# Get screen resolution
adb shell wm size
🔍 Troubleshooting
"adb is not recognized" (Windows)
Solution:
- Verify ADB location:
C:\platform-tools\adb.exe - Re-add to PATH (see Step 3 above)
- Restart Command Prompt
- Try full path:
C:\platform-tools\adb.exe version
"command not found: adb" (Mac)
Solution:
# Reinstall via Homebrew
brew install android-platform-tools
# Or add to PATH manually
echo 'export PATH=$PATH:/usr/local/platform-tools' >> ~/.zshrc
source ~/.zshrc
Device shows "unauthorized"
Solution:
- Disconnect device
- Settings → Developer Options → Revoke USB debugging authorizations
- Reconnect device
- Accept authorization popup
Device not detected
Solutions:
- Try different USB cable (use original if possible)
- Try different USB port (avoid USB hubs)
- Enable "File Transfer" mode on Android
- Install device-specific USB drivers (Windows)
- Restart both device and computer