Reputation: 432
Context
I'm working on an application that involves a hardware connected through a USB cable. In order to be able to debug my application, I need to do it over wifi, since the USB port is being used for communication with the hardware.
Expected behavior
Connect to device through ADB > Run the app > Connect the hardware > Select my app from App Chooser dialog > "new instance" of my app opens > Observe my logs printed to the logcat
Current behavior
Connect to device through ADB > Run the app > Connect the hardware > Select my app from App Chooser dialog > "new instance" of my app opens > ADB connection is lost
OBS: I'm not sure if I'm using the right nomenclature, correct me if I'm wrong. When I say "ADB connection is lost", I mean that the logcat stop printing anything, from my app or the system, but the actual WiFi connection between the ADB and the device is held (I don't need to adb connect ip_address
again).
Environment
Upvotes: 1
Views: 182
Reputation: 353
If all you're after is your logcat output and your app still actually runs on the device just use adb logcat.
https://developer.android.com/studio/command-line/logcat
Use the command and filter the logs of your application on the device.
If the device doesn't print anything from the logcat and the device doesn't output any errors in the logs then the device has to be crashing.
Upvotes: 1