DEV Community

Cover image for Wireless Debugging in Android
Dilip Chandar
Dilip Chandar

Posted on

1

Wireless Debugging in Android

An interesting and useful feature in android is wireless debugging. This helps us achieve whatever we can do through USB cable like debugging, catching logs in logcat by unplugging our device once wireless connection is established.

Before we establish a wireless connection, we have to keep our device connected through USB cable. Once developer options are enabled, we will be able to see our device in Android Studio. In this article, steps are covered for Mac OS.

Step 1: Open Terminal and go to platform-tools directory. For example

cd Library/Android/sdk/platform-tools

Step 2: Check if adb command is working by typing

adb devices

Step 3: If Step 2 fails by a message zsh: command not found: adb, type the following in terminal. For example

export ANDROID_HOME=/Users/dilipchandar/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Step 4: After Step 3, entering the command adb devices will show us list of devices like this

List of devices attached
28c95c50 device

Step 5: Now we need to establish TCP IP connection with a port number by typing following command

adb tcpip 5555

Above command will display -> restarting in TCP mode port: 5555

Step 6: Finally we can enter the following command after getting our IP Address from our phone’s WiFi Settings. For example if our IP Address is 192.168.1.4

adb connect 192.168.1.4:5555

Above command will display -> connected to 192.168.1.4:5555

We will see the list of devices like the below

List of devices attached
28c95c50 device
192.168.1.4:5555 device (shows device is connected wirelessly)

After this, we can disconnect USB cable and check Android Studio. We will see the device with IP Address in logcat as shown in screenshot

Please note that wireless connection may have to be reactivated if device goes offline by entering command from Step 6 again. That’s all about wireless debugging. Thanks for reading. Happy coding!!

Let’s connect on LinkedIn https://www.linkedin.com/in/dilip-chandar-97570158?

Please leave your appreciation by commenting on this post!

It takes one minute and is worth it for your career.

Get started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay