Reputation: 826
Based on my understanding of Android Monitor, an Android device needs to be connected to the machine that is running Android Studio in order to profile CPU/memory/GPU usage. Are there any methods that allow profiling an app without connecting it to the PC? For example, writing the debug info that is generated for Android Monitor in a file and process the file later?
My goal is to gather debugging information without connecting the Android device to a PC (either via a USB cable or over the network).
Upvotes: 1
Views: 2192
Reputation: 28288
You cannot monitor it without an active debugging connection. That being said, debugging connection isn't limited to USB. You need some kind of connection, and that connection can be USB, but it can also be over the internet(refer How can I connect to Android with ADB over TCP?).
Some devices don't support this, some have a setting for it in developer settings, and using root you don't need a connection. For devices that support adb over the internet, but aren't rooted or have the setting in developer settings, you need to have a usb connection initially.
Upvotes: 1
Reputation: 1007584
Your initial work with a device usually needs to be over USB. However, after that point, you can switch using adb
over the network, using adb connect
. Once you have adb
connected over the network, everything works just as if you had connected it via USB, including full Android Studio access.
Bear in mind that:
Some devices do not need the initial USB connection, as they are designed to work with adb
over the network "out of the box" (e.g., Fire TV)
I think that older devices may not support this, for some value of "older"
Upvotes: 1