---
description: Using any real device for mobile automation Testing is always been a challenge for testers. But, Android offers a handful solution to connect a real device over USB i.e. Android Debug Bridge (ADB). AD
title: Android Debug Bridge (ADB) Connect to Device over USB, WiFi
image: https://www.guru99.com/images/adb-connect-device-over-usb.png
---

 

[Skip to content](#main) 

**⚡ Smart Summary**

Android Debug Bridge connects a workstation to an emulator or a physical handset, opening a shell, installing builds and exposing the device to automation tools over either a USB cable or a wireless link.

* 🔴 **Three parts:** ADB is a client, a background server on TCP port 5037 and a daemon running on the device.
* ☑️ **First requirement:** USB debugging must be switched on under Developer Options before any device appears.
* ✅ **Verify the link:** adb devices lists every attached emulator and handset with its serial number.
* 🧪 **Target one device:** adb -s <serial> sends a command to a single device when several are connected.
* 🛠️ **Wireless option:** adb tcpip 5555 followed by adb connect moves an existing session onto Wi-Fi.
* 📊 **Modern devices:** Android 11 and higher pair over Wi-Fi with adb pair, so no cable is needed at all.

[ Read More ](javascript:void%280%29;) 

![Android Debug Bridge connecting a device over USB and Wi-Fi](https://www.guru99.com/images/adb-connect-device-over-usb.png) 

## What is Android Debug Bridge (ADB)?

Android Debug Bridge (ADB) is a command-line tool that lets you communicate with a device. It bridges an emulator instance (Android device) and the background daemon process (server), so you can install builds, debug a device and run commands through a Unix shell.

Using a real device for mobile automation [testing](https://www.guru99.com/software-testing.html) has always been a challenge. Android offers solutions to connect one over USB (Universal Serial Bus) — namely Android Debug Bridge.

## USB debugging and ADB Configuration

Appium can execute tests on real devices, but the following pre-requisites must be set up first.

* USB debugging should be enabled
* ADB configuration
* Desired capability setup as per the hardware changes.

We will cover both an emulator and a real device. The emulator steps come first.

### How to Connect to an Emulator

Pre-requisite: the SDK (Software Development Kit) should be installed on the machine. ADB in Android is packaged with Google’s Android SDK.

Steps to enable ADB from SDK Manager.

**Step 1)** Open Android SDK folder

**Step 2)** Double click on SDK Manager

**Step 3)** From the list of all packages select Tools and mark the checkbox for

* Android SDK Tools and
* Android SDK Platform-tools.

The SDK Manager package list with both entries ticked is shown below.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir9.png)

⚠️ **Version note:** the standalone SDK Manager above was deprecated in SDK Tools 25.2.3 and its launcher removed in 25.3.0\. Open the same package list from Android Studio (Tools > SDK Manager) or the `sdkmanager` CLI. The package is still _Android SDK Platform-tools_, which contains `adb`.

### How to Connect Android Device with ADB (Android Debug Bridge)

**Step 1)** Enable USB Debugging on your device

Enable the USB debugging option from ‘Developer Option’ on the Android phone, then connect the device to the computer with a USB cable, as shown here.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir10.png)

**Step 2)** Go to the Android SDK folder

Open the folder where the Android SDK files were saved, ‘Android SDK >> Platform-tools’ — for example `C:\android-sdk\platform-tools`, shown below.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir11.png)

**Step 3)** Open the Command window

Inside the folder, hold Shift and use the right-click menu >> select ‘Open command window here’, shown below. You can also reach the folder path from the Run command.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir12.png)

The command prompt then opens already pointed at the platform-tools folder.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir13.png)

**Step 4)** Connect an external Android device

Connect an external Android device (mobile phone) with its USB cable. Then, in the command prompt above, type:

'adb devices' & press Enter

It will display a list of all the connected devices, as shown below.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir14.png)

First check whether the ADB server is running as a background process: type ‘adb’ in the same command prompt and press enter. It should list the adb processes running.

When the server starts it binds local TCP port 5037\. All ADB clients use port 5037 to reach the server, which then scans ports to find every connected emulator or device instance.

The ADB daemon runs on an odd-numbered port and the matching emulator console takes the even-numbered port beside it. Android’s [ADB documentation](https://developer.android.com/tools/adb) puts the scanned range at odd ports 5555 to 5585, covering the first 16 emulators.

If a single device is connected, the server finds and connects to it automatically. With several devices or emulators running, you must name the target on the command line. The instance on odd port 5557 has its console on even port 5556 — one odd and one even port each.

emulator 1: console 5556
emulator 1: adb 5557
emulator 2: console 5554
emulator 2: adb 5555

Command to detect all connected devices:

### RELATED ARTICLES

* [UIAutomatorViewer Tutorial: Inspector for Android Testing ](https://www.guru99.com/uiautomatorviewer-tutorial.html "UIAutomatorViewer Tutorial: Inspector for Android Testing")
* [Mobile App Performance Testing ](https://www.guru99.com/mobile-app-performance-testing-strategy-tools.html "Mobile App Performance Testing")
* [Top 20 Mobile Testing Interview Questions and Answers (2026) ](https://www.guru99.com/mobile-testing-interview-questions.html "Top 20 Mobile Testing Interview Questions and Answers (2026)")
* [8 Best Mobile Application Testing Services Companies (2026) ](https://www.guru99.com/mobile-testing-services.html "8 Best Mobile Application Testing Services Companies (2026)")

<$ adb devices>
emulator-5554 device
emulator-5556 device
emulator-5558 device

Command detecting a single device from multiple connected devices:

<$ adb -s emulator-5554 install Guru99.apk>

It targets the adb connection for device 5554 and installs the application — this is how you address a single ADB instance from the command line.

Syntax used to access ADB instances from the command line:
adb -d — An adb command when a single USB device is connected
adb -e — An adb command when only a single emulator is running
adb devices — This will print the list of emulators / devices attached.
adb version — List the adb version number.
adb help — Print the list of supported commands.

## How to Configure ADB for Wi-Fi Support

ADB can also be configured over Wi-Fi, which frees the handset from the cable during a long [Appium](https://www.guru99.com/introduction-to-appium.html) run.

**Pre-requisite**

* Both the Android device and the host computer should be connected to the same wireless network, and
* the device Bluetooth option should be disabled.

Steps to connect:

1. Connect the device using a USB cable to the host computer. Confirm USB debugging is enabled on the device.
2. Set the target device to listen for a TCP/IP connection on port 5555\.  
$ adb tcpip 5555

The command prompt confirms the switch to TCP/IP mode, as shown below.

[](https://www.guru99.com/images/Datastage/072916%5F1116%5FAppiumDesir15.png)

1. Now disconnect the USB cable from the device.
2. On the device, find the IP address under Settings >> Wi-Fi Setting >> Advanced >> IP Address. Connect to it, then confirm the session.  
$ adb connect 148.100.1.17:5555  
$ adb devices  
List of devices attached
148.100.1.17:5555 device

The configuration is now complete and ‘adb’ is working over the wireless network.

⚠️ **Version note:** the cable-first sequence above remains the only route on Android 10 and lower. Android 11 (API 30) and higher add Wireless debugging: enable it in Developer Options, choose _Pair using pairing code_, then run `adb pair ipaddr:port` and enter the code. No cable needed.

NOTE: if a connection error occurs, kill the adb host connection below, then reconnect from step one.

$ adb kill-server

If you are looking for an emulator, see this [list of the best Android emulators for Windows](https://www.guru99.com/best-android-emulators-mac-windows.html).

## FAQs

🔐 Why does adb devices show my phone as unauthorized?

The RSA key prompt on the handset was never accepted. Unlock the screen, reconnect the cable and tap Allow USB debugging. If no prompt appears, revoke USB debugging authorisations in Developer Options and try again.

🤖 How is AI used when triaging Android device logs?

Machine learning groups near-identical stack traces from logcat, ranks crashes by affected sessions and flags the first commit likely to have caused a regression, so a tester reads a handful of clusters instead of thousands of lines.

🧑‍💻 Can GitHub Copilot write adb shell scripts?

Copilot completes routine loops over adb devices, install and pull commands from a comment. Verify every generated command on one handset first, because a wrong flag can wipe application data without a confirmation prompt.

📥 Which adb commands install and remove an app?

Use adb install with a path to the APK, add the -r flag to reinstall over an existing build, and use adb uninstall with the package name to remove it. Add -s to target one device.

🚫 My device is not listed by adb devices. What should I check?

Confirm USB debugging is on, try a data-capable cable rather than a charge-only one, install the manufacturer USB driver on Windows, and run adb kill-server followed by adb devices to restart the daemon.

📡 What is the difference between adb tcpip and adb pair?

adb tcpip switches an existing USB session to a network port and works on every version. adb pair uses the Wireless debugging screen added in Android 11 and needs no cable at any point.

🧰 Do I need the whole Android SDK just to run adb?

No. The adb binary ships inside the Android SDK Platform-tools package, which can be downloaded on its own. Add that folder to your PATH and the command works from any directory.

📜 How do I capture logs from a connected device?

Run adb logcat to stream the system log, and adb logcat > log.txt to save it. Add adb bugreport for a full diagnostic archive when you need to attach evidence to a defect.

#### Summarize this post with:

ChatGPT Perplexity Grok Google AI 

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.** 

##### Sign up for the newsletter

Subscribe for Free 

You have successfully subscribed.  
Please check your inbox. 

![AI-Newsletter]() Chosen by over **350,000+** professionals 

[Scroll to top ](#wrapper)Scroll to top 

× 

Toggle Menu Close 

Search for: 

Search

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/adb-connect-device-over-usb.png","url":"https://www.guru99.com/images/adb-connect-device-over-usb.png","width":"700","height":"250","caption":"ADB - Connect Device over USB","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/adb-connect.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/mobile-testing","name":"Mobile Apps Testing"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/adb-connect.html","name":"Android Debug Bridge (ADB) Connect to Device over USB, WiFi"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/adb-connect.html#webpage","url":"https://www.guru99.com/adb-connect.html","name":"Android Debug Bridge (ADB) Connect to Device over USB, WiFi","dateModified":"2026-07-30T11:20:47+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/adb-connect-device-over-usb.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/adb-connect.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/thomas","name":"Thomas Hamilton","description":"I am Thomas Hamilton, a seasoned professional in software testing, specializing in crafting comprehensive guides to help you master your software testing skills.","url":"https://www.guru99.com/author/thomas","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/thomas-hamilton-author-v2-120x120.png","url":"https://www.guru99.com/images/thomas-hamilton-author-v2-120x120.png","caption":"Thomas Hamilton","inLanguage":"en-US"},"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"Mobile Apps Testing","headline":"Android Debug Bridge (ADB) Connect to Device over USB, WiFi","description":"Using any real device for mobile automation Testing is always been a challenge for testers. But, Android offers a handful solution to connect a real device over USB i.e. Android Debug Bridge (ADB). AD","keywords":"mobile","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/thomas","name":"Thomas Hamilton"},"dateModified":"2026-07-30T11:20:47+05:30","image":{"@id":"https://www.guru99.com/images/adb-connect-device-over-usb.png"},"copyrightYear":"2026","name":"Android Debug Bridge (ADB) Connect to Device over USB, WiFi","subjectOf":[{"@type":"HowTo","name":"How to Connect Android Device with ADB (Android Debug Bridge)","description":"Here is step by step process how to Connect Android Device with ADB","step":[{"@type":"HowToStep","name":"Step 1) Enable USB Debugging on your device","text":"Enable USB debugging option from 'Developer Option' in Android phone. Now, connect your Android device to the computer using USB cable.","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/Datastage/072916_1116_AppiumDesir10.png"},"url":"https://www.guru99.com/adb-connect.html#step1"},{"@type":"HowToStep","name":"Step 2) Go to the Android SDK folder","text":"Open the local folder where Android SDK files has been saved.","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/Datastage/072916_1116_AppiumDesir11.png"},"url":"https://www.guru99.com/adb-connect.html#step2"},{"@type":"HowToStep","name":"Step 3) Open the Command window","text":"Inside folder hold Shift + Right click menu &gt;&gt; Select 'Open command window here' option.","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/Datastage/072916_1116_AppiumDesir12.png"},"url":"https://www.guru99.com/adb-connect.html#step3"},{"@type":"HowToStep","name":"Step 4) Connect an external Android device","text":"Now, prior to check the device, user have to connect an external Android device (mobile phone).","image":{"@type":"ImageObject","url":"https://cdn.guru99.com/images/Datastage/072916_1116_AppiumDesir14.png"},"url":"https://www.guru99.com/adb-connect.html#step4"}]},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Why does adb devices show my phone as unauthorized?","acceptedAnswer":{"@type":"Answer","text":"The RSA key prompt on the handset was never accepted. Unlock the screen, reconnect the cable and tap Allow USB debugging. If no prompt appears, revoke USB debugging authorisations in Developer Options and try again."}},{"@type":"Question","name":"How is AI used when triaging Android device logs?","acceptedAnswer":{"@type":"Answer","text":"Machine learning groups near-identical stack traces from logcat, ranks crashes by affected sessions and flags the first commit likely to have caused a regression, so a tester reads a handful of clusters instead of thousands of lines."}},{"@type":"Question","name":"Can GitHub Copilot write adb shell scripts?","acceptedAnswer":{"@type":"Answer","text":"Copilot completes routine loops over adb devices, install and pull commands from a comment. Verify every generated command on one handset first, because a wrong flag can wipe application data without a confirmation prompt."}},{"@type":"Question","name":"Which adb commands install and remove an app?","acceptedAnswer":{"@type":"Answer","text":"Use adb install with a path to the APK, add the -r flag to reinstall over an existing build, and use adb uninstall with the package name to remove it. Add -s to target one device."}},{"@type":"Question","name":"My device is not listed by adb devices. What should I check?","acceptedAnswer":{"@type":"Answer","text":"Confirm USB debugging is on, try a data-capable cable rather than a charge-only one, install the manufacturer USB driver on Windows, and run adb kill-server followed by adb devices to restart the daemon."}},{"@type":"Question","name":"What is the difference between adb tcpip and adb pair?","acceptedAnswer":{"@type":"Answer","text":"adb tcpip switches an existing USB session to a network port and works on every version. adb pair uses the Wireless debugging screen added in Android 11 and needs no cable at any point."}},{"@type":"Question","name":"Do I need the whole Android SDK just to run adb?","acceptedAnswer":{"@type":"Answer","text":"No. The adb binary ships inside the Android SDK Platform-tools package, which can be downloaded on its own. Add that folder to your PATH and the command works from any directory."}},{"@type":"Question","name":"How do I capture logs from a connected device?","acceptedAnswer":{"@type":"Answer","text":"Run adb logcat to stream the system log, and adb logcat &gt; log.txt to save it. Add adb bugreport for a full diagnostic archive when you need to attach evidence to a defect."}}]}],"@id":"https://www.guru99.com/adb-connect.html#schema-24943","isPartOf":{"@id":"https://www.guru99.com/adb-connect.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/adb-connect.html#webpage"}}]}
```
