Next-Gen App & Browser
Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud

How to Setup Android Debug Bridge?

Setting up Android Debug Bridge (ADB) involves downloading the platform tools, configuring your system to recognize ADB, and enabling USB debugging on your Android device. Here's a step-by-step guide:

Step 1: Download Android SDK Platform-Tools (ADB & Fastboot)

ADB is part of the Android SDK Platform-Tools. You can get it in two ways:

Option 1: Download Platform-Tools Only (Recommended)

  • Visit the official Android Platform-Tools page.
  • Download the ZIP file for your OS:
    • Windows: platform-tools-latest-windows.zip
    • macOS: platform-tools-latest-darwin.zip
    • Linux: platform-tools-latest-linux.zip
  • Extract the ZIP to a folder (e.g., C:\platform-tools).

Option 2: Install via Android Studio (Full SDK)

  • Download Android Studio (https://developer.android.com/studio).
  • Open SDK Manager (Configure → SDK Manager).
  • Under SDK Tools, check "Android SDK Platform-Tools" and install.
  • ADB will be located in:
    • Windows: %USERPROFILE%\AppData\Local\Android\Sdk\platform-tools
    • macOS/Linux: ~/Android/Sdk/platform-tools

Step 2: Add ADB to System PATH (Optional but Recommended)

Adding ADB to PATH allows you to run it from any directory in Command Prompt/Terminal.

Windows

  • Open Start → Search for "Edit the system environment variables" → Open.
  • Click "Environment Variables" → Under System variables, select Path → Click Edit.
  • Click New and add the path to platform-tools (e.g., C:\platform-tools).
  • Click OK → OK → OK.

macOS/Linux

  • Open Terminal and edit your shell config file (~/.bashrc, ~/.zshrc, or ~/.bash_profile).
  • nano ~/.bashrc
  • Add this line (adjust path if needed):
  • export PATH="$PATH:$HOME/Android/Sdk/platform-tools"
  • Save (Ctrl+O, Enter, Ctrl+X) and reload:
  • source ~/.bashrc

Step 3: Enable USB Debugging on Your Android Device

  • Go to Settings → About Phone → Tap Build Number 7 times to enable Developer Mode.
  • Go back to Settings → System → Developer Options.
  • Enable USB Debugging.
  • Connect your phone to the PC via USB.

On the First Connection

  • A prompt will appear on your phone: "Allow USB debugging?" → Check "Always allow" and tap OK.

Step 4: Verify ADB is Working

  • Open Command Prompt (Windows) or Terminal (macOS/Linux).
  • Run:
  • adb devices
    • If you see your device listed (e.g., 1234567890abcdef device), ADB is working!
    • If it says "unauthorized", check the USB debugging prompt on your phone again.

Step 5: Basic ADB Commands to Try

CommandDescription
adb devicesList connected devices
adb shellOpen a shell on the device
adb install app.apkInstall an APK
adb logcatView device logs
adb reboot bootloaderReboot into Fastboot mode

Troubleshooting

❌ "ADB is not recognized"

👉🏼 Ensure ADB is in PATH or run it from the platform-tools folder.

❌ No devices listed

👉🏼 Check USB Debugging is enabled.

👉🏼 Try a different USB cable/port.

👉🏼 Install proper USB drivers (for Windows, download from Google USB Driver).

❌ "Unauthorized" device

👉🏼 Revoke USB debugging authorizations in Developer Options and reconnect.

Now you can use ADB to debug, sideload apps, or control your Android device from a PC.

Test Your Website on 3000+ Browsers

Get 100 minutes of automation test minutes FREE!!

Test Now...

KaneAI - Testing Assistant

World’s first AI-Native E2E testing agent.

...
ShadowLT Logo

Start your journey with LambdaTest

Get 100 minutes of automation test minutes FREE!!

Signup for free