From a17855325456d5b3b3595d2ccbf9669178eb4f9b Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:25:14 -0500 Subject: [PATCH] feat(lab): tell the app's own agent to continue after a Lab build restart --- tools/agent/dd-lab-build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/agent/dd-lab-build b/tools/agent/dd-lab-build index 678fa3d0b..01a43759b 100755 --- a/tools/agent/dd-lab-build +++ b/tools/agent/dd-lab-build @@ -100,5 +100,7 @@ echo "Lab build ready: $name ($(du -h "$lab/next/overlay.apk" | cut -f1)) in $(( device cmd package compile -m verify -f $pkg >/dev/null progress restarting echo "Restarting DroidDeck on the Lab build" +# The app's own agent ends with the app, so it is told to carry on once the app is back. +if [ -n "${DD_AGENT:-}" ]; then mkdir -p "/data/user/0/$pkg/files/agent" && : > "/data/user/0/$pkg/files/agent/resume"; fi device "nohup sh -c 'sleep 3; monkey -p $pkg -c android.intent.category.LAUNCHER 1' >/dev/null 2>&1 &" for pid in $(device pidof $pkg); do kill "$pid" 2>/dev/null || true; done