dashboard
repositories
activity
search
login
APPS
/
PAILot
summary
reflog
commits
tree
compare
forks
blame
|
history
|
raw
|
HEAD
feat: inline PDF viewer with pinch-to-zoom
Matthias Nott
3 days ago
c9739ac4a22733d45167173446c1d3ce65a767eb
[APPS/PAILot.git]
/
tools
/
deploy-android.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# PAILot Android Deploy Script
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
APP_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
APK="$APP_DIR/build/app/outputs/flutter-apk/app-release.apk"
cd "$APP_DIR"
# Check adb connection
if ! adb devices 2>/dev/null | grep -q "device$"; then
echo "ERROR: No Android device connected. Connect via USB or wireless adb."
exit 1
fi
DEVICE_NAME=$(adb shell getprop ro.product.model 2>/dev/null | tr -d '\r')
echo "=== Deploying to: ${DEVICE_NAME:-unknown device} ==="
if [[ ! -f "$APK" ]]; then
echo "=== No APK found, building first ==="
bash tools/build-android.sh
fi
echo ""
echo "=== Installing APK ==="
adb install -r "$APK"
echo ""
echo "=== Done ==="
echo "Force-quit and reopen PAILot on your ${DEVICE_NAME:-device}."