logcat
record does not have a "package name field". Therefore there is no standard/built-in way to filter by it.
Although since Android 7.0 you can use logcat --pid
option combined with pidof -s
command to filter output by binary/package name:
adb shell "logcat --pid=$(pidof -s <package_name>)"
Replace "
with '
for Linux/MacOS
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…