10

Would like to know how can I get the adb logcat of ONLY certain app, and all its errors and messages associated.

I've tried before with adb logcat -c; adb logcat | grep com.fitbit.FitbitMobile, but the thing is, it forces a grep on EVERY line, and sometimes there's a crash that involves multiline where needed information gets omitted.

I've tried the command on page Displaying and filtering with Logcat, however doesn't work. It just gets everything:

adb logcat -c && adb logcat com.fitbit.FitbitMobile:V

I've tried also the filtering option on Android Developers Documentation, but just mutes everything:

adb logcat com.fitbit.FitbitMobile:D *:S

Others commands that get the pid are not useful if the app is not running when I run logcat, and crashes immediately and is relaunched with a different pid.

Any ideas about the proper format?

Smeterlink
  • 284
  • 1
  • 3
  • 11

2 Answers2

3

use

adb shell pidof your.package.name

to get the PID of your app and then

adb logcat -d --pid=PID
Qing
  • 131
  • 2
-1

I found a simple solution without requiring a third party app.

Just connect to the device using shell: adb shell

Then run: logcat | grep your.package.name

It will only show lines that contain that package name.

Sleewok
  • 115
  • 1