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:

1. Activate USB debug mode in Android device
2. Connect via USB Android device to computer
3. Open terminal/command prompt and type as follows: adb tcpip 5555. This: 5555 is a port number that we are now using.
4. Disconnect your computer from Android device
5. 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