#!/system/bin/sh
logcat -c
am force-stop my.com.tngdigital.ewallet
sleep 1
monkey -p my.com.tngdigital.ewallet -c android.intent.category.LAUNCHER 1 >/dev/null 2>&1
sleep 2
echo "=== @2s ==="; ps -A | grep -i tng || echo NONE
sleep 5
echo "=== @7s ==="; ps -A | grep -i tng || echo NONE
sleep 8
echo "=== @15s ==="; ps -A | grep -i tng || echo NONE
logcat -d > /data/local/tmp/tngfull.txt
echo "=== guard ==="
grep TngExitGuard /data/local/tmp/tngfull.txt | tail -30
echo "=== outcome ==="
grep -E 'exited cleanly|exited due|has died|skipped SIGILL|blocked kill|blocked tgkill|UserLogin|Displayed|PLT blocked' /data/local/tmp/tngfull.txt | tail -30