#!/usr/bin/env bash # TEMPLATE (rb_unify) — review before use. set -euo pipefail : "${RB_PACKAGE:?must be exported by the runner from instance.json}" D="$(cd "$(dirname "$0")" && pwd)"; SER="${DEVICE_SERIAL:-emulator-5554}" APK="$(find "$D" -name '*.apk' | head -1)" [ -n "$APK" ] || { echo "ERROR: no apk found; extract reference.tar.gz first" >&2; exit 1; } adb -s "$SER" install -r -g "$APK" adb -s "$SER" shell monkey -p "$RB_PACKAGE" -c android.intent.category.LAUNCHER 1