#!/system/bin/sh
# Run after testing: shows whether the Rust HAL stayed up and what it logged.
NAME=vendor.qti.hardware.vibrator.service.oplus_sm8750
pid=$(pidof $NAME)
echo "service: $(getprop init.svc.vendor.qti.vibrator) pid $pid threads $(ls /proc/$pid/task 2>/dev/null | wc -l)"
grep -E '^(Pss|Rss):' /proc/$pid/smaps_rollup 2>/dev/null
echo "== crash buffer (vibrator)"
logcat -b crash -d | grep -i vibrator | tail -20
echo "== HAL log"
logcat -d -s vendor.qti.vibrator vendor.qti.vibratorCL | tail -30
echo "== avc"
logcat -d | grep avc | grep -i vibrator | tail -10
