#!/usr/bin/env bash # Cold-start an app's launcher activity the way Android 17 accepts from the shell. Usage: launch.sh PKG [WAIT] [SHOT.png] p=$1 w=${2:-6} shot=${3:-} act=$(adb shell "cmd package resolve-activity --brief -c android.intent.category.LAUNCHER $p" /dev/null sleep "$w" [ -n "$shot" ] && adb exec-out screencap -p > "$shot"