-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsideload-change-settings
executable file
·132 lines (124 loc) · 2.76 KB
/
sideload-change-settings
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/bash
source sideloader-config
while test $# -gt 0; do
case "$1" in
--nogui)
NOGUIFLAG=--nogui
NOGUI=1
shift
;;
*)
break
;;
esac
done
versionCheck
packageCheck
deviceCheck
# while-menu-dialog: a menu driven system information program
DIALOG_CANCEL=1
DIALOG_ESC=255
HEIGHT=0
WIDTH=0
display_result() {
dialog --title "$1" \
--no-collapse \
--msgbox "$result" 0 0
}
while true; do
exec 3>&1
selection=$(dialog \
--backtitle "https://github.com/whitewhidow/quest-sideloader-linux" \
--title "Main Menu" \
--clear \
--cancel-label "Exit" \
--menu "Please select:" $HEIGHT $WIDTH 20 \
"00" "Mount cloud drive " \
"10" "Browse and sideload apps " \
"20" "Switch on wireless ADB " \
"30" "Change global username" \
"40" "Change apk specific username (crack only)" \
"50" "Change global refresh rate" \
"60" "Change apk specific refresh rate (crack only)" \
"70" "Change global resolution" \
"80" "Change apk specific resolution (crack only)" \
2>&1 1>&3)
exit_status=$?
exec 3>&-
case $exit_status in
$DIALOG_CANCEL)
clear
#echo "Program terminated."
exit
;;
$DIALOG_ESC)
clear
echo "Program aborted." >&2
exit 1
;;
esac
case $selection in
0 )
clear
echo "Program terminated."
;;
00 )
clear
sideload-mount mount
read -p 'Press any key to continue ' x
;;
10 )
clear
sideload-browser $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
20 )
clear
echo "I WILL FINISH THIS WHEN MY CAT STOPS ANNOYING ME"
read -p 'Press any key to continue ' x
;;
30 )
clear
sideload-change-username $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
40 )
clear
sideload-change-username --askpackage $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
50 )
clear
sideload-change-rate $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
60 )
clear
sideload-change-rate --askpackage $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
70 )
clear
sideload-change-res $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
80 )
clear
sideload-change-res --askpackage $NOGUIFLAG
read -p 'Press any key to continue ' x
;;
2 )
result=$(df -h)
display_result "Disk Space"
;;
3 )
if [[ $(id -u) -eq 0 ]]; then
result=$(du -sh /home/* 2> /dev/null)
display_result "Home Space Utilization (All Users)"
else
result=$(du -sh $HOME 2> /dev/null)
display_result "Home Space Utilization ($USER)"
fi
;;
esac
done