How to Connect Your Android Device to ADB Over Wireless

How to Connect Your Android Device to ADB Over Wireless

30 November 2024 Stephan Petzl Leave a comment Tech-Help

Connecting your Android device to ADB wirelessly can significantly simplify your development process by eliminating the need for constant cable switching. This guide will walk you through the steps necessary to set up a wireless connection for ADB, without requiring root access on your device.

Step-by-Step Guide

Prerequisites

  • Ensure that USB Debugging is enabled on your Android device. You can find this option in the “Developer Options” section, which can be activated by tapping the “Build Number” in your device’s settings seven times.
  • Ensure both your computer and your Android device are connected to the same Wi-Fi network.

Initial Setup with USB

Initially, a USB connection is required to establish the wireless ADB setup. Follow these steps:

  1. Connect your Android device to your computer using a USB cable.
  2. Open a terminal or command prompt on your computer and enter the following command to switch ADB to TCP/IP mode:
  3. adb tcpip 5555
  4. Disconnect the USB cable from your device.

Connecting Wirelessly

Once the initial setup is complete, follow these steps to connect wirelessly:

  1. Find the IP address of your Android device. This can typically be found in your device’s Wi-Fi settings.
  2. In the terminal or command prompt, enter the following command, replacing 192.168.1.133 with your device’s IP address:
  3. adb connect 192.168.1.133
  4. To verify the connection, use the following command. Your device should appear in the list of connected devices:
  5. adb devices

Switching Back to USB Mode

If needed, you can switch back to USB mode using the following command:

adb usb

Note that your device may automatically revert to USB mode after a reboot.

Troubleshooting

If you encounter issues during setup, consider the following solutions:

  • Ensure that both your computer and Android device are on the same Wi-Fi network.
  • If the connection fails, try restarting the ADB server with the command:
adb kill-server
  • Re-attempt the connection process from the beginning.
  • Enhance Your Testing Workflow with Repeato

    While setting up ADB over wireless can streamline your development process, Repeato offers a robust solution for automated testing of your iOS and Android applications without the need for coding. With Repeato, you can quickly create, run, and maintain automated tests, enhancing your development workflow. Additionally, Repeato’s integration with ADB allows for executing ADB commands in sequence, making it a perfect companion for developers looking to optimize their testing processes.

    Learn more about how Repeato can assist in your development workflow by visiting our Android Testing Tool page.

    Like this article? there’s more where that came from!