-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
73 lines (45 loc) · 2.47 KB
/
build.sh
File metadata and controls
73 lines (45 loc) · 2.47 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
export ANDROID_SDK_ROOT=$HOME/android-sdk
#export ANDROID_SDK_ROOT=~/android-sdk
#rm -rf ~/.gradle/caches/
#./gradlew build --refresh-dependencies
WRAPPER_JAR="gradle/wrapper/gradle-wrapper.jar"
echo "Checking for Gradle wrapper..."
if [ -f "$WRAPPER_JAR" ]; then
echo "✓ gradle-wrapper.jar exists."
else
echo "✗ gradle-wrapper.jar NOT found."
# Check if gradle is installed
if ! command -v gradle >/dev/null 2>&1; then
echo "ERROR: 'gradle' is not installed."
echo "Install it first with:"
echo " sudo apt install gradle"
exit 1
fi
echo "Running 'gradle wrapper' to regenerate wrapper..."
gradle wrapper
if [ -f "$WRAPPER_JAR" ]; then
echo "✓ Wrapper successfully regenerated."
else
echo "✗ Failed to generate gradle-wrapper.jar"
exit 1
fi
fi
./gradlew clean :app:assembleDebug :app:assembleAndroidTest
/usr/bin/adb -s 192.168.1.111:5555 install -r app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
/usr/bin/adb -s 192.168.1.111:5555 install -r app/build/outputs/apk/debug/app-debug.apk
/usr/bin/adb -s 192.168.1.127:5555 install -r app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
/usr/bin/adb -s 192.168.1.127:5555 install -r app/build/outputs/apk/debug/app-debug.apk
/usr/bin/adb -s 192.168.1.220:5555 install -r app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
/usr/bin/adb -s 192.168.1.220:5555 install -r app/build/outputs/apk/debug/app-debug.apk
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
#bash runPinch.sh
#bash runSwipe.sh
# below command is for finding out what ui to be pinched on, feed this output to chatGPT to let it figure out
#/usr/bin/adb -s 192.168.1.111:5555 shell uiautomator dump /sdcard/ui.xml
#/usr/bin/adb -s 192.168.1.111:5555 pull /sdcard/ui.xml .
# adb -s 192.168.1.111:5555 shell settings put global enable_accessibility_global_gesture_enabled 1
# adb -s 192.168.1.111:5555 shell appops set com.example.uiautomator SYSTEM_ALERT_WINDOW allow
# adb -s 192.168.1.111:5555 shell pm grant com.example.uiautomator android.permission.SYSTEM_ALERT_WINDOW
# adb -s 192.168.1.111:5555 shell am start -a android.settings.action.MANAGE_OVERLAY_PERMISSION -d package:com.example.uiautomator
# adb -s 192.168.1.111:5555 shell am start -a android.settings.action.MANAGE_OVERLAY_PERMISSION -d package:com.example.uiautomator
# adb -s 192.168.1.111:5555 shell am start-foreground-service -n com.example.uiautomator/.OverlayService