#!/system/bin/sh
ANR=/data/anr/anr_2026-07-31-13-30-08-628
echo "=== header ==="
su -c "head -40 $ANR"
echo "=== main tid ==="
su -c "grep -n '\"main\"' $ANR | head -5"
echo "=== main block ==="
su -c "awk '/\"main\" prio/{p=1} p{print} p&&/^$/{c++} c>=2{exit}' $ANR" | head -80
echo "=== cpu ==="
su -c "grep -A20 'CPU usage' $ANR | head -30"
