4

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?

3
  • 2
    There is no official but many third party solutions. I found pidcat quite good. You may give it a try. Dec 28, 2020 at 18:48
  • @IrfanLatif thanks a lot, that worked somehow!
    – Smeterlink
    Dec 28, 2020 at 21:57
  • @IrfanLatif that looks like a good alternative answer, would you post that as a proper answer?
    – Andrew T.
    May 2 at 16:29

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .