mirror of
git://f0xx.org/ac/ac-mobile-android
synced 2026-07-29 02:07:35 +03:00
- scripts/build-native-codecs.sh: cross-compile libvpx, opus, speex for Android ABIs (arm64-v8a, armeabi-v7a, x86_64) using NDK clang with -fPIC - scripts/android-ndk.sh: NDK root detection helper - scripts/native-build-cache.sh: ccache detection helper - scripts/init-third-party-submodules.sh: init codec submodules - scripts/ensure-gradle-wrapper.sh: gradle wrapper sanity check - scripts/adb-reconnect.sh: ADB device discovery helpers - ndk/CMakeLists.txt: per-ABI include dirs for opus/ and speex_config_types.h Co-authored-by: Cursor <cursoragent@cursor.com>
44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# ADB reconnection helpers. Source this file.
|
|
# Provides: adb_reconnect_init_hints, adb_reconnect_all, adb_http_status, adb_prepare_device_for_deploy, adb_update_connect_cache
|
|
|
|
DEV_ADB_HTTP_PORT="${DEV_ADB_HTTP_PORT:-5039}"
|
|
ADB_TCP_PROBE="${ADB_TCP_PROBE:-no}"
|
|
|
|
adb_reconnect_init_hints() {
|
|
: # Placeholder: load hints from local config if present
|
|
}
|
|
|
|
adb_http_status() {
|
|
local ip="$1"
|
|
local port="${2:-$DEV_ADB_HTTP_PORT}"
|
|
local url="http://${ip}:${port}/adb.json"
|
|
local result
|
|
result="$(curl -sf --max-time 3 "$url" 2>/dev/null || echo "{}")"
|
|
echo "adb_http_status $ip: $result"
|
|
}
|
|
|
|
adb_reconnect_all() {
|
|
local label="${1:-reconnect}"
|
|
|
|
# Try any IPs registered via HTTP discovery
|
|
if [[ "$ADB_TCP_PROBE" == "yes" ]]; then
|
|
for ip in $(adb devices | awk 'NR>1 {print $1}' | grep -E '^[0-9]+\.' | cut -d: -f1 | sort -u); do
|
|
adb connect "$ip:5555" >/dev/null 2>&1 || true
|
|
done
|
|
fi
|
|
|
|
# mDNS / default discovery (adb already handles this)
|
|
true
|
|
}
|
|
|
|
adb_prepare_device_for_deploy() {
|
|
local serial="$1"
|
|
# Disable screen lock prompts, maximize brightness — non-critical
|
|
adb -s "$serial" shell settings put global package_verifier_enable 0 >/dev/null 2>&1 || true
|
|
}
|
|
|
|
adb_update_connect_cache() {
|
|
: # Placeholder: persist known device IPs
|
|
}
|