Add debug-only agent control bridge

This commit is contained in:
xXJsonDeruloXx authored and xXJSONDeruloXx committed 2026-09-24 21:34:50 -04:00
1 parent 643d82e2fd
commit 63b24ca4c0
13 files changed
+991 -22

No files matched your search

+1 -16
View File
@@ -15,22 +15,7 @@ if [[ ! -f "${apk}" ]]; then
exit 1
fi
if [[ -n "${ADB_SERIAL:-}" ]]; then
serial=${ADB_SERIAL}
else
devices=$("${adb_bin}" devices | awk '$2 == "device" {print $1}')
device_count=$(printf '%s\n' "${devices}" | sed '/^$/d' | wc -l | tr -d ' ')
if [[ "${device_count}" == 0 ]]; then
echo "No authorized Android device found. Connect one or set ADB_SERIAL." >&2
exit 2
fi
if [[ "${device_count}" != 1 ]]; then
echo "Multiple Android devices found; set ADB_SERIAL explicitly." >&2
printf '%s\n' "${devices}" >&2
exit 2
fi
serial=${devices}
fi
serial=$(python3 "${repo_root}/tools/adb_device.py" --adb "${adb_bin}")
"${adb_bin}" -s "${serial}" install -r --no-incremental "${apk}"
installed_path=$("${adb_bin}" -s "${serial}" shell pm path com.droiddeck.launcher | tr -d '\r')