#!/system/bin/sh
# After the swap: lock the phone, wait for the screen to go off (or AOD), then touch the
# fingerprint area once. The UDFPS sensor should fire once per arm.
NAME=android.hardware.sensors-service.oplus-multihal
pid=$(pidof $NAME)
echo "== service: $(getprop init.svc.vendor.sensors-hal-multihal) pid $pid threads $(ls /proc/$pid/task 2>/dev/null | wc -l)"
echo "== UDFPS sensor (active connections and recent events)"
dumpsys sensorservice | grep -i -A3 "udfps" | head -30
echo "== light sensors (FusionLight and ALS capture still feed lux)"
dumpsys sensorservice | grep -i -E "light|lux" | head -15
echo "== HAL log"
logcat -d -s sensors.oplus sensors.fusionlight | tail -20
echo "== crash buffer (sensors)"
logcat -b crash -d | grep -i -E "sensor|multihal" | tail -20
echo "== avc (sensors)"
logcat -d | grep avc | grep -i hal_sensors | tail -10
