
👉Android Debug Bridge ADB
Introduction
Android Debug Bridge ADB: Android Debug Bridge (ADB) is a powerful command-line tool that enables communication between your computer and Android devices or emulators. It is widely used in mobile automation testing, app installation, debugging, and more.
In this guide, you’ll learn:
- What is ADB?
- How to connect devices using USB
- How to connect devices over Wi-Fi
- Commands to manage ADB connections
- Troubleshooting common issues
👉What is Android Debug Bridge (ADB)?
Android Debug Bridge ADB: ADB (Android Debug Bridge) is a client-server utility that facilitates communication with Android devices or emulators. It allows developers and testers to execute shell commands, install apps, access logs, and debug applications.
🔧 ADB Components:
- Client: Runs on your development machine.
- Daemon (adbd): Runs on the device/emulator.
- Server: Manages communication between client and daemon.
👉USB Debugging and ADB Configuration
Android Debug Bridge ADB: Before starting mobile automation testing using tools like Appium, you must:
- Enable USB debugging on the device.
- Install Android SDK Platform Tools (includes ADB).
- Configure desired capabilities based on the device.
👉How to Connect to an Emulator using ADB
✅ Prerequisite:
Make sure Android SDK is installed on your system.
🔹 Steps:
- Navigate to SDK Folder
Go to the installed Android SDK directory. - Open SDK Manager
Launch the SDK Manager and install:
- Android SDK Tools
- Android SDK Platform-tools
- Android SDK Tools
- Open Command Window
Inside the platform-tools folder, use:
- Shift + Right Click → “Open Command window here”
- Shift + Right Click → “Open Command window here”
Connect to Emulator
ADB automatically detects running emulators. Use:
bash
adb devices
👉How to Connect a Real Android Device via USB
🔹 Step-by-Step Guide:
- Enable USB Debugging
- Go to Settings > About phone > Tap “Build number” 7 times to enable Developer Options.
- Then enable USB Debugging under Developer Options.
- Go to Settings > About phone > Tap “Build number” 7 times to enable Developer Options.
- Connect Device via USB Cable
Use the original cable for better stability. - Navigate to Platform-Tools Folder
Example path: C:\android-sdk\platform-tools
Check Connected Devices
Run:
bash
adb devices
- You should see a list of connected devices.
👉Understanding ADB Ports
- ADB server binds to TCP port 5037.
- Devices are connected to odd-numbered ports (5555–5585).
- Emulator uses two ports: one for ADB connection (odd) and one for console (even).
- Example: Emulator on 5554 uses 5555 for ADB, 5556 for console.
- Example: Emulator on 5554 uses 5555 for ADB, 5556 for console.
👉ADB Commands to Manage Devices
Purpose | ADB Command |
List connected devices | adb devices |
Kill ADB server | adb kill-server |
Start ADB server | adb start-server |
Connect to specific device | adb -s <deviceID> shell |
Install app on device | adb -s <deviceID> install myapp.apk |
👉How to Connect Android Device Over Wi-Fi using ADB
🔹 Pre-requisites:
- Android Debug Bridge ADB: Device and computer should be on same Wi-Fi network
- Bluetooth should be turned off on the device
✅ Steps to Connect:
- Connect Device via USB First
- Enable USB debugging
- Enable USB debugging
Enable ADB TCP/IP mode
bash
adb tcpip 5555
- Find Device IP Address
- On phone: Settings > Wi-Fi > Advanced > IP Address
- On phone: Settings > Wi-Fi > Advanced > IP Address
- Disconnect USB Cable
Connect via IP
bash
adb connect <device_ip>:5555
Verify Connection
bash
adb devices
💡 Example:
bash
adb tcpip 5555
adb connect 192.168.1.5:5555
👉Troubleshooting ADB Connection Issues
Issue | Solution |
Device not detected | Reconnect USB, enable USB Debugging |
ADB server not responding | adb kill-server → adb start-server |
Wi-Fi connection not working | Ensure same network, disable Bluetooth |
IP address not reachable | Recheck IP address and firewall settings |
👉Conclusion
Android Debug Bridge ADB: Android Debug Bridge (ADB) is a vital tool for connecting and managing Android devices and emulators for testing, debugging, and automation. Whether you’re connecting over USB or Wi-Fi, ADB offers flexible control and helps streamline mobile testing workflows.