#!/bin/sh # Check if our app and/or foreground service is running. # Usage: sh tools/check_service.sh set -e cd "$(dirname "$0")/.." . ./android_env.sh echo "=== Process ===" PID=$(adb shell pidof dev.azom.privacypin 2>/dev/null || echo "") if [ -z "$PID" ]; then echo "App is NOT running." else echo "App is running (PID: $PID)" fi echo "" echo "=== Foreground services ===" adb shell dumpsys activity services dev.azom.privacypin 2>/dev/null | grep -E "(ServiceRecord|foreground=|app=)" || echo "(no services found)" echo "" echo "=== Notifications ===" adb shell dumpsys notification | grep -A 2 "dev.azom.privacypin" || echo "(no notifications)"