How to connect ta Android device via TCP/IP?
Sometimes there is a need to debug applications, especially Android applications written in Java or Kotlin on a real device. When talking about real devices I mean smartphone, tablet or development kit(hardware). We should be able to access debug output using some Unix shell command. In order to do that, we need to go through the following steps:
- Activate USB debug mode in Android device
- Connect via USB Android device to computer
- Open terminal/command prompt and type as follows:
adb tcpip 5555
. This:5555
is a port number that we are now using. - Disconnect your computer from Android device
- Open terminal/command prompt again and type:
adb connect <IP_ADRESS>
This setup allows to use adb commants, for example:
adb shell
adb logcat
and many others.
Reference:
My site is free of ads and trackers. Was this post helpful to you? Why not
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.