top of page

Connecting Your Android Device to ADB Over Wi-Fi for Unity Development

For many developers, constantly plugging and unplugging your Android device while developing and testing apps in Unity can be cumbersome. Thankfully, you can connect your Android device to ADB over Wi-Fi, making the process much more convenient. This guide will walk you through the steps to set up ADB over Wi-Fi and view logcat logs directly from your device.

Prerequisites

  1. ADB Installed: Ensure you have ADB (Android Debug Bridge) installed. It comes with the Android SDK, which you can download from here.

  2. USB Cable: You'll need a USB cable for the initial setup.

  3. Android Device: Ensure your Android device is connected to the same Wi-Fi network as your computer.

Step-by-Step Guide

1. Enable Developer Options and USB Debugging

First, you need to enable developer options on your Android device.

Enable Developer Options:

  • Go to Settings > About phone.

  • Tap Build number seven times until you see a message saying “You are now a developer!”.

Enable USB Debugging:

  • Go to Settings > System > Developer options.

  • Enable USB debugging.

2. Connect Your Device via USB

Use a USB cable to connect your Android device to your computer. This initial connection is necessary to configure the device for Wi-Fi debugging.

3. Open a Command Prompt or Terminal

On your computer, open a Command Prompt (Windows) or Terminal (macOS/Linux).

4. Verify ADB Connection

Ensure your device is connected via USB by running the following command:

adb devices

You should see your device listed.

5. Enable TCP/IP Mode

Switch the ADB connection to TCP/IP mode with the following command:

adb tcpip 5555

6. Get Your Device IP Address

On your Android device, find the IP address:

  • Go to Settings > About phone > Status.

  • Note the IP address listed (e.g., 192.168.1.101).

This IP address is just a sample; your device's IP address will be different.

7. Connect ADB Over Wi-Fi

Disconnect the USB cable and connect to your device over Wi-Fi using the IP address you noted:

adb connect 192.168.1.101:5555

Replace 192.168.1.101 with your device's actual IP address.


8. Verify the Wi-Fi Connection

Ensure that your device is connected over Wi-Fi by running:

adb devices

You should see your device listed with its IP address.


Building Over Wi-Fi It's also possible to make a build over Wi-Fi. You can add the same IP address you used for ADB connection in the Unity Build settings.

Go to File > Build Settings, select Android as your platform, and enter your device's IP address in the relevant field. This allows Unity to build and deploy your Connecting Your Android Device to ADB Over Wi-Fi for Unity Development app directly to the device over Wi-Fi.


By following these steps, you can conveniently connect your Android device to ADB over Wi-Fi, making your development and testing process smoother and more efficient. Happy coding!

29 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page