Sobes.tech
Middle

How do you view logs on a real device not through Android Studio, but via ADB?

sobes.tech AI

Answer from AI

To view logs on a real Android device via ADB, the command adb logcat is used. It outputs the device's system logs to the console.

Basic usage example:

adb logcat

To filter logs by tag or level, you can use parameters, for example:

adb logcat -s MyAppTag:D

where MyAppTag is your application's tag, and D is the Debug level.

It's also useful to clear the log buffer before starting to see only fresh messages:

adb logcat -c
adb logcat

Thus, without Android Studio, you can quickly retrieve and analyze device logs through the terminal.

How do you view logs on a real device not through… - sobes.tech