Alexei
Alexei

Reputation: 15664

Is it possible to start adb logcat without cable?

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?

Upvotes: 0

Views: 1338

Answers (3)

Saim Rashid
Saim Rashid

Reputation: 11

Following are the steps to connect an Android device without a cable

  • Connect your Android device with the cable and open your terminal
  • in the terminal type "adb tcpip 5555" and press enter
  • then type "adb connect <your_device_ip_address>" press enter now
  • check that the device is connected through the command "adb devices"

Upvotes: 0

Alexei
Alexei

Reputation: 15664

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}'

Upvotes: 1

Daniel Perez
Daniel Perez

Reputation: 56

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/

Upvotes: 1

Related Questions