-
Notifications
You must be signed in to change notification settings - Fork 0
/
preinstall.sh
executable file
·245 lines (213 loc) · 6.67 KB
/
preinstall.sh
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
#!/bin/sh
# sudo ./preinstall.sh
# BigMac MacPro pre-install tool v1.1
# Created by StarPlayrX on 12.14.2020
#Auto Switch to the current directory
dir=$(dirname "$0")
cd "$dir"
if [ $UID != 0 ]
then
echo
echo "Root permissions are vital."
echo "Please re-run this script with sudo."
echo
exit 1
fi
#Black background
k () {
printf '\e[K'
printf '\e[48;5;0m'
printf '\e[K'
}
#New Line
n () {
k
echo
k
}
#Orange Text
o () {
k
printf '\e[38;5;172m'
k
}
#Green Text
g () {
k
printf '\e[38;5;112m'
k
}
n
o
printf "—————————————————————————————————————————————————————————————————"
n
g
printf " StarPlayrX -> Big Mac Post Installation Tool for Mac Pros 1.0.3"
n
o
printf "—————————————————————————————————————————————————————————————————"
n
g
n
IsNotRecovery=$(csrutil disable 2>&1)
Recovery="Recovery"
if [[ "$IsNotRecovery" == *"$Recovery"* ]]
then
g
printf " 🍟 Activating Hax Do No Seal - Enabling Mac OS Extended Journaled"
else
g
printf " 🍟 Activating Hax Do No Seal - Enabling JHGS+ and APFS"
fi
mount -uw /
bootArgs=$(nvram -p | grep boot-args)
bootArgs=$(echo $bootArgs | cut -d " " -f2-)
recommended="-v -no_compat_check amfi_get_out_of_my_way=1"
#sudo nvram csr-active-config='%ff%00%00%00'
#legacy_hda_tools_support=1 kext-dev-mode=1
#cs_enforcement_disable=1 keepsyms=1 intcoproc_unrestricted=1
n
n
o
printf "—————————————————————"
n
g
printf " 🤠 macOS boot-args"
n
o
printf "—————————————————————"
g
n
n
printf " [R]ecommended \e[38;5;172m——>\e[38;5;112m $recommended"
n
printf " [C]urrent \e[38;5;172m——>\e[38;5;112m $bootArgs"
n
n
read -p " Enter [c] or [r] : " default
if [ "$default" == "R" ] || [ "$default" == "r" ]
then
bootArgs="$recommended"
nvram boot-args="$bootArgs"
fi
n
n
echo "Setting Boot Args"
n
nvram -p | grep boot-args
n
#printf '\e[K';
#printf '\e[K';echo "Check System Integrity";printf '\e[K';
#printf '\e[K';
#printf '\e[K';csrutil status;printf '\e[K';
#printf '\e[K';
bin="/📠/"
vers="/sw_vers"
sw=$(pwd)$bin$vers
n
echo "Software Version Check";
#kern.osversion
version=$(sysctl -n kern.osproductversion)
echo $version
o
printf "—————————————————————————————————————"
n
g
printf " ☑️ Checking Root Status"
n
g
o
printf "—————————————————————————————————————"
g
n
# Authenticated Root status: disabled
# csr-active-config %7f%08%00%00
if [[ $version == *"11."* ]]
then
csrutil authenticated-root status
fi
nvram -p | grep csr-active-config
o
printf "————————————————————————————————————"
n
g
printf " 📚 Disabling Library Validation"
n
o
printf "————————————————————————————————————"
n
defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true
n
o
printf "———————————————————————————————————————————————————————————————————"
n
g
printf " 🪚 Loading Hax Do Not Seal into Memory by ASentientBot | BarryKN"
o
g
n
hax="/🍟/HaxDoNotSealNoAPFSROMCheck.dylib"
asentientbot=$(pwd)
barrykn=$hax
if [[ "$IsNotRecovery" == *"$Recovery"* ]]
then
sudo -u $SUDO_USER launchctl setenv DYLD_INSERT_LIBRARIES "$asentientbot$barrykn"
o
printf "———————————————————————————————————————————————————————————————————"
n
g
printf " 📀 DO NOT REBOOT. Please run the 'Install macOS Big Sur.app' now!"
else
launchctl setenv DYLD_INSERT_LIBRARIES "$asentientbot$barrykn"
o
printf "———————————————————————————————————————————————————————————————————"
n
g
printf " Disabling System Integrity Protection (SIP)"
n
g
printf " "
##csrutil enable --no-internal --without kext --without fs --without debug --without dtrace --without nvram --without basesystem
csrutil disable
o
printf "———————————————————————————————————————————————————————————————————"
g
n
printf " Disabling Authenticated Root"
n
g
printf " "
csrutil authenticated-root disable
o
printf "———————————————————————————————————————————————————————————————————"
n
g
printf " Quit the Terminal and Select Install macOS Big Sur in the Window"
n
printf " 📀 DO NOT REBOOT. Please run the 'Install macOS Big Sur.app' now!"
n
o
printf "———————————————————————————————————————————————————————————————————"
n
fi
n
o
printf "———————————————————————————————————————————————————————————————————"
n
g
printf " 💰 Please Support Big Mac via PayPal https://tinyurl.com/y2dsjtq3"
n
o
printf "———————————————————————————————————————————————————————————————————"
g
n
n
printf "\033[0m"
INSTALLASSISTANT='/Volumes/Image Volume/Install macOS Big Sur.app/Contents/MacOS/InstallAssistant'
if [ -d $INSTALLASSISTANT ]
then
$INSTALLASSISTANT &> /dev/null
else
INSTALLASSISTANT='/Install macOS Big Sur.app/Contents/MacOS/InstallAssistant'
$INSTALLASSISTANT &> /dev/null
fi