diff --git a/tools/install-tv.sh b/tools/install-tv.sh index ce34c4ce..6f5592a6 100755 --- a/tools/install-tv.sh +++ b/tools/install-tv.sh @@ -31,13 +31,13 @@ if [ "${DRY_RUN:-0}" = "1" ]; then python3 "$TOOLS/compare_snapshots.py" "$B/bef $R --es do rollback --es version "$(echo "$PREV" | grep -oE '^[0-9]+\.[0-9]+\.[0-9]+')" | grep -o 'data="[^"]*"' $A -s $D install -r "$APKS/orbit-tv-$NEW.apk" | tail -1 || exit 1 $A -s $D shell cmd package compile -m speed -f tv.orbit.classic >/dev/null -$A -s $D shell am start -n tv.orbit.classic/.MainActivity >/dev/null -sleep 25 +# NO_LAUNCH=1 leaves whatever is on screen alone (17 November 2026: another app was playing in the living room). +if [ "${NO_LAUNCH:-0}" != "1" ]; then $A -s $D shell am start -n tv.orbit.classic/.MainActivity >/dev/null; sleep 25; else sleep 3; fi NOW=$($A -s $D shell dumpsys package tv.orbit.classic | grep -m1 versionName | sed 's/.*versionName=//' | tr -d '\r ') COPIES=$($A -s $D shell "dumpsys activity activities | grep -c 'Hist.*tv.orbit.classic/.MainActivity'" | tr -d '\r') echo "now $NOW, copies of Orbit running: $COPIES" snap after python3 "$TOOLS/compare_snapshots.py" "$B/before" "$B/after"; RESULT=$? ls -d "$OT/backups/${PFX}install-"* 2>/dev/null | sort | head -n -3 | xargs -r rm -rf -[ "$NOW" = "$NEW" ] && [ "$COPIES" = "1" ] && [ $RESULT -eq 0 ] && { echo "Install checked out."; exit 0; } +[ "$NOW" = "$NEW" ] && { [ "$COPIES" = "1" ] || [ "${NO_LAUNCH:-0}" = "1" ]; } && [ $RESULT -eq 0 ] && { echo "Install checked out."; exit 0; } echo "Install needs a look (version $NOW, copies $COPIES, comparison exit $RESULT)."; exit 3