-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsideload-change-res
executable file
·78 lines (51 loc) · 1.74 KB
/
sideload-change-res
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
#!/bin/bash
source sideloader-config
while test $# -gt 0; do
case "$1" in
--askpackage)
ASKPACKAGE=1
shift
;;
--packagename*)
PACKAGENAME=`echo $1 | sed -e 's/^[^=]*=//g'`
shift
;;
--res*)
RES=`echo $1 | sed -e 's/^[^=]*=//g'`
shift
;;
*)
break
;;
esac
done
clearLog
deviceCheck
if [ $ASKPACKAGE ]; then
while [ -z $PACKAGENAME ] && [ -z $CI ]; do
PACKAGENAME=$(dialog --title "Packagename" --inputbox "Please enter a packagename:" 0 0 --output-fd 1)
done
fi
if [ -z $PACKAGENAME ]; then
[ -z $CI ] && OLDRES=$($ADB shell getprop debug.oculus.textureWidth)
[ -z $CI ] && [ "$OLDRES" != "" ] && ok "Current global texturesize (setprop) detected as $OLDRES x $OLDRES"
[ -z $CI ] && [ "$OLDRES" == "" ] && ok "Current global texturesize (setprop) not set"
fi
if [ ! -z $PACKAGENAME ]; then
[ -z $CI ] && OLDRES=$($ADB shell get global texture_size_$PACKAGENAME)
[ -z $CI ] && [ "$OLDRES" != "" ] && ok "$PACKAGENAME texturesize (putglobal) detected as $OLDRES x $OLDRES"
[ -z $CI ] && [ "$OLDRES" == "" ] && ok "$PACKAGENAME texturesize (putglobal) not set"
fi
while [[ -z $RES ]] && [ -z $CI ]; do
RES=$(dialog --default-item "$OLDRES" --menu "Please choose a resolution:" 0 0 0 "1024" "1024" "1208" "1208" "1536" "1536" "2048" "2048" "2560" "2560" "3072" "3072" --output-fd 1)
done
if [ -z $PACKAGENAME ]; then
$ADB shell setprop debug.oculus.textureHeight $RES
$ADB shell setprop debug.oculus.textureWidth $RES
ok "Current global resolution (setprop) changed to $RES x $RES"
fi
if [ ! -z $PACKAGENAME ]; then
$ADB shell settings put global texture_size_$PACKAGENAME $RES
ok "$PACKAGENAME resolution changed to $RES x $RES"
fi
dialogLog