Open In App

How to Connect to Android with ADB over TCP?

Last Updated : 09 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will discuss how we connect the Android Debug Bridge (ADB) over TCP. ADB is used to communicate with the device. It provides access to a Unix shell that you can use to run a variety of commands on a device. It has mainly three components: 

  1. Client: It is the user who sends the commands, it runs on the development machine.
  2. Daemon: Background process on each device.
  3. Server: It establishes communication between client and daemon.

Installing steps for Android Debug Bridge (ADB)

  • Go to the SDK platform tools for downloading the ADB (zip).
  • Extract the downloaded zip file.
  • Open the folder and copy/cut the platform-tools folder.
  • Then in C-Drive make a new folder and insert the copied folder in it.
  • Open the environmental system variable tab from settings and set the path of the platform-tools folder: C:\Android\platform-tools.
  • Now it’s all set, you can check it with run the command:
$ adb version

For checking the other features and help for ADB run the below command:

$ adb 

Steps for connecting the Android with ADB over TCP

  • Run the Command Prompt/ Terminal/ Windows PowerShell with Run as administrator.
  • Firstly check if your ADB tool was installed successfully or not, if not then follow the above steps carefully.
  • Connect your android device with a laptop/pc using a USB cable. Then in the android device turn on developer options from settings, and in developer options turn on USB Debugging (PTP/ MTP).
  • After that on the windows terminal run the command to remove previous devices on the ADB server:
$ adb kill-server

This command kills all devices which connected with ADB on your pc.

 

After that start your Daemon (Default port 5037) with the following command:

$ adb usb

Connect your device using TCP/ IP odd number port which is 5555 or 5037

$ adb tcpip 5555

 

Connect the android device with your pc using ADB using the below command:

$ adb connect <Your Android Device IP Address>:<Port Number>

 

For checking if your android device is connected successfully or not just check by the below command:

$ adb devices

 

For checking your android device background process type the below command:

$ adb logcat

Conclusion

Finally, we connected our android device with the pc/ laptop over TCP/ IP with the help of the Android Debug Bridge. We can handle many more features of our android with the help of the ADB tools like file sharing, installations, etc.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads