Android 调试|日志脚本 发表于 2019-04-08 | 分类于 前端 | 12345678910111213141516171819#!/bin/bashPackageName=$1#PackageName=com.example.appinfomanagertinnopid="$(adb shell ps | grep $PackageName | awk '{print $2}')"echo "PackageName-----"echo "$PackageName"echo "-----------------------------------------"echo "-----------------------------------------"echo "pid-----"echo "$pid"echo "-----------------------------------------"echo "-----------------------------------------"adb logcat | grep $pid 使用方法./logcat_package.sh com.XXX.XXX