logcat specific android application

24年 12月 26日 Thursday
87 words
1 minutes

First, get the package name if you're unsure about it, use pm list packages

and get the process id either with pidof, adb shell ps -A | grep <package-name> or top, you can use termux but you need to be root first and must use ps executable from /system/bin to fully list all running process (somehow ps executable from termux package is limited even when executed as root).

and get the log by filter its pid:

text
adb shell 'logcat --pid=$(pidof -s <package_name>)'

reference:

Title:logcat specific android application

Author:ReYuki

Link:https://www.reyuki.site/posts/android-logcat-specific-process [copy]

Last updated:


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are free to share and adapt it, as long as you give appropriate credit, don’t use it for commercial purposes, and distribute your contributions under the same license. Provided under license CC BY-NC-SA 4.0