File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # Hosted Android readers occasionally enter the emulator action with no adb
5+ # daemon listening on 5037. Prime the production SDK bridge before an AVD is
6+ # launched. This is Lab-only orchestration: it never changes Nuvio runtime code,
7+ # app manifests, provider JS or player/network behavior.
8+ if ! command -v adb > /dev/null 2>&1 ; then
9+ echo " FIELD_NATIVE_ADB_PRIME status=missing_adb runtime_mutation=false" >&2
10+ exit 1
11+ fi
12+
13+ adb kill-server > /dev/null 2>&1 || true
14+ adb start-server > /dev/null
15+
16+ ready=0
17+ for _attempt in 1 2 3 4 5; do
18+ if adb devices > /tmp/niakvio-adb-devices.txt 2> /tmp/niakvio-adb-error.txt; then
19+ ready=1
20+ break
21+ fi
22+ sleep 1
23+ done
24+
25+ if [ " $ready " -ne 1 ]; then
26+ cat /tmp/niakvio-adb-error.txt >&2 || true
27+ echo " FIELD_NATIVE_ADB_PRIME status=unavailable runtime_mutation=false" >&2
28+ exit 1
29+ fi
30+
31+ echo " FIELD_NATIVE_ADB_PRIME status=ready port=5037 runtime_mutation=false"
You can’t perform that action at this time.
0 commit comments