-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·45 lines (35 loc) · 1.07 KB
/
deploy.sh
File metadata and controls
executable file
·45 lines (35 loc) · 1.07 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# FreePay Android POS Deployment Script
echo "Deploying FreePay POS to Multzo device..."
# Check if device is connected
adb devices | grep -q "device$"
if [ $? -ne 0 ]; then
echo "Error: No Android device connected"
echo "Please connect your Multzo POS device and enable USB debugging"
exit 1
fi
# Build the app first
./build.sh
if [ $? -ne 0 ]; then
echo "Build failed, aborting deployment"
exit 1
fi
# Uninstall previous version (if exists)
echo "Uninstalling previous version..."
adb uninstall com.freepay.pos 2>/dev/null
# Install new APK
echo "Installing new APK..."
adb install -r app/build/outputs/apk/debug/app-debug.apk
if [ $? -eq 0 ]; then
echo "Installation successful!"
# Launch the app
echo "Launching FreePay POS..."
adb shell am start -n com.freepay.pos/.MainActivity
# Set as launcher (for kiosk mode)
echo "Setting as default launcher..."
adb shell cmd package set-home-activity com.freepay.pos/.MainActivity
echo "Deployment complete!"
else
echo "Installation failed!"
exit 1
fi