0

Android studio 3.6 If I want to start adb I use USB/microUSB cable. After plugin cable I start in console command:

adb logcat -vtime

And as result I see all logs of my application.

Nice. It's work find.

Is it possible to start adb logcat WITHOUT cable?

Alexei
  • 14,350
  • 37
  • 121
  • 240
  • yes, you can use ADB over wifi https://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp – Blundell Feb 13 '20 at 15:25

2 Answers2

1

At the moment I don't believe it's possible without at least initializing with the cable. Connect your cable, run

adb connect DEVICE-IP-ADDRESS

and that should connect your device to Android Studio, and then you can forego the cable for the rest of the session, but you'll have to do this every time. My dev phone/watch has a static IP address on my home network, so I wrote a shell script that makes it easy to connect with the syntax

connect watch/phone

Looks like Android 11 will add support without the cable though.

https://www.xda-developers.com/android-11-native-wireless-adb/

1

This work for me on Windows machine:

  1. Get phone's ip address. Settings->About device-> Status
  2. Enable Developer options
  3. Turn on USB Debugging
  4. Plug In cable
  5. adb tcpip 5555
  6. Unplugging cable
  7. adb connect "IP address of your phone".

    Ready

  8. adb logcat -vtime

    To disconnect just type: adb disconnect

P.S. Print device's ip address by adb

adb shell ip addr show wlan0 | grep "inet\s" | awk '{print $2}' | awk -F'/' '{print $1}'
Alexei
  • 14,350
  • 37
  • 121
  • 240