#!/bin/sh # Watch logcat filtered to our app's package and common tags. # Usage: sh tools/logcat.sh [optional_extra_tag] # Examples: # sh tools/logcat.sh # all logs from our app # sh tools/logcat.sh LocationSvc # also include LocationSvc tag from any process set -e cd "$(dirname "$0")/.." . ./android_env.sh PID=$(adb shell pidof dev.azom.privacypin 2>/dev/null || echo "") if [ -z "$PID" ]; then echo "App not running. Showing all logs tagged with PrivacyPin*..." adb logcat -v time "*:S" PrivacyPin:V LocationService:V LocationSvc:V $1:V else echo "App running with PID $PID. Filtering..." adb logcat -v time --pid="$PID" fi