forked from Kingsman44/Pixelify
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild_and_flash.sh
More file actions
executable file
·75 lines (72 loc) · 1.78 KB
/
build_and_flash.sh
File metadata and controls
executable file
·75 lines (72 loc) · 1.78 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
71
72
73
74
75
#!/bin/bash
source colors.sh || echo "Colors file could not be loaded"
if [ $(adb shell su -c "magisk") ]; then
ROOT=magisk
elif [ $(adb shell su -c "ksud") ]; then
ROOT=KSU
elif [ ! command -v "adb" 2>/dev/null ]; then
blue "ADB not found on your pc, please install it"
exit 1
elif [ ! $(adb devices) 2>/dev/null ]; then
blue "There aren't any ADB devices connected to the pc, please connect one"
exit 1
else
echo "Unkown error"
exit 1
fi
echo "Select your build version"
red "1 for BETA"
green "2 for STABLE"
read -p "Enter your selection: " SELECTION
case $SELECTION in
"1")
red "building BETA version"
.echo ""
red "Building VK version"
./gradlew :beta:zipRelease --no-configuration-cache
red "Building no VK version"
./gradlew :beta:novkzipRelease --no-configuration-cache
blue "Cleaning"
./gradlew :beta:cleanDir --no-configuration-cache
blue "Pushing the zip to the phone"
./gradlew :beta:pushVK
if [[ $ROOT == "magisk" ]]; then
blue "Flashing"
./gradlew :beta:flashMagiskVK
elif [[ $ROOT == "KSU" ]]; then
blue "Flashing"
./gradlew :beta:flashKsuVK
else
echo "Unkown error"
fi
blue "Rebooting"
./gradlew :beta:Reboot
;;
"2")
green "building STABLE version"
echo ""
green "Building VK version"
./gradlew :stable:zipRelease --no-configuration-cache
green "Building no VK version"
./gradlew :stable:novkzipRelease --no-configuration-cache
blue "Cleaning"
./gradlew :stable:cleanDir --no-configuration-cache
blue "Pushing the zip to the phone"
./gradlew :stable:pushVK
if [[ $ROOT == "magisk" ]]; then
blue "Flashing"
./gradlew :stable:flashMagiskVK
elif [[ $ROOT == "KSU" ]]; then
blue "Flashing"
./gradlew :stable:flashKsuVK
else
echo "Unkown error"
fi
blue "Rebooting"
./gradlew :stable:Reboot
;;
*)
echo "No option selected, aborting"
exit 1
;;
esac