forked from Wyvern/macos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacOS
268 lines (237 loc) · 16.8 KB
/
macOS
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
MacOS:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew analytics off
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
rm -rf /usr/local/var/homebrew/locks
git config —system core.fsmonitor true
git config —system --add --bool push.autoSetupRemote true
/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install --upgrade pip
chsh -s /bin/zsh
sudo mdutil -a -i off
sudo mdutil -a -i on
launchctl disable gui/501/com.apple.XProtect.agent.scan
sudo launchctl disable system/com.apple.XprotectFramework.PluginService
sudo launchctl disable gui/501/com.apple.XprotectFramework.PluginService
launchctl remove gui/501/com.apple.XProtect.agent.scan
sudo launchctl remove system/com.apple.XprotectFramework.PluginService
sudo launchctl remove gui/501/com.apple.XprotectFramework.PluginService
# dot files, text
defaults write ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist \
LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.4;}' \
'{LSHandlerContentType=public.unix-executable;LSHandlerRoleAll=com.sublimetext.4;}'
#xcode speed up
defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
defaults write com.apple.dt.Xcode BuildSystemScheduleInherentlyParallelCommandsExclusively -bool NO
defaults write com.apple.dt.xcodebuild PBXNumberOfParallelBuildSubtasks `sysctl -n hw.ncpu`
defaults write com.apple.dt.xcodebuild IDEBuildOperationMaxNumberOfConcurrentCompileTasks `sysctl -n hw.ncpu`
defaults write com.apple.dt.Xcode PBXNumberOfParallelBuildSubtasks `sysctl -n hw.ncpu`
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks `sysctl -n hw.ncpu`
xcrun simctl delete unavailable
# boot volume in macOS
csrutil disable
csrutil authenticated-root disable
sudo bless --folder /[mountpath]/System/Library/CoreServices --bootefi --create-snapshot
#disable/enable mds server
sudo mdutil -a -i off/on
#disable OCSP
sudo defaults write /Library/Preferences/com.apple.security.revocation.plist OCSPStyle None
sudo defaults write /Library/Preferences/com.apple.security.revocation.plist CRLStyle None
sudo defaults write com.apple.security.revocation.plist OCSPStyle None
sudo defaults write com.apple.security.revocation.plist CRLStyle None
dsenableroot
csrutil disable; csrutil enable
reboot
sudo spctl --master-disable
DevToolsSecurity -enable
sudo softwareupdate --list
sudo softwareupdate -ia
mdutil -i off -d /path/to/volume
# Disable the "Are you sure you want to open this application?" dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
sudo spctl --master-disable
# Disable Disk Image Verification: Verifying ...
defaults write com.apple.frameworks.diskimages skip-verify -bool true
defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
brew install --cask mpv
sudo systemsetup -getcomputersleep
sudo systemsetup -setcomputersleep Never
sudo systemsetup -setcomputersleep 10
sudo pmset -a sleep 0; sudo pmset -a hibernatemode 0; sudo pmset -a disablesleep 1;
sudo pmset -a sleep 1; sudo pmset -a hibernatemode 3; sudo pmset -a disablesleep 0;
xcrun simctl delete unavailable
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES
defaults write com.apple.dt.Xcode ShowBuildOperationDuration YES
defaults write com.apple.dt.Xcode BuildSystemScheduleInherentlyParallelCommandsExclusively -bool YES
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSWindowResizeTime -float 0.001
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
defaults write -g NSToolbarTitleViewRolloverDelay -float 0
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
defaults write -g QLPanelAnimationDuration -float 0
defaults write -g NSScrollAnimationEnabled -bool false
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
defaults write -g NSScrollViewRubberbanding -bool false
defaults write com.apple.CrashReporter DialogType none
defaults write com.apple.finder DisableAllAnimations -bool true
defaults write com.apple.finder AnimateInfoPanes -bool false
defaults Write com.apple.finder AnimateSnapToGrid -bool false
defaults write com.apple.finder FXEnableSlowAnimation -bool false
defaults write com.apple.finder QLEnableSlowMotion -bool false
defaults write com.apple.dock expose-animation-duration -float 0
defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES
defaults write com.apple.dock launchanim -bool false
defaults write com.apple.dock workspaces-edge-delay -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock springboard-show-duration -float 0
defaults write com.apple.dock springboard-hide-duration -float 0
defaults write com.apple.dock springboard-page-duration -float 0
defaults write com.apple.universalaccess reduceTransparency -bool true
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -stop
defaults write com.apple.Terminal FocusFollowsMouse -string YES
defaults write com.apple.finder AppleShowAllFiles true
defaults write com.apple.finder ShowStatusBar -bool true
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
sudo defaults write /Library/Preferences/com.apple.driver.AppleIRController DeviceEnabled -int 0
sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ProgramArguments -array-add "-NoMulticastAdvertisements"
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
sudo nvram BootAudio=%00
sudo nvram StartupMute=%01
defaults write com.apple.Mail DisableSendAnimations -bool true
defaults write com.apple.Mail DisableReplyAnimations -bool true
defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.1
defaults write com.apple.Safari WebKitResourceTimedLayoutDelay 0.1
launchctl unload -w /System/Library/LaunchAgents/com.apple.diagnostics_agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.diagnosticextensionsd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.symptomsd-diag.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.spindump_agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportPanic.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportGPURestart.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.sysdiagnose_agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.UsageTrackingAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.assessmentagent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.icloud.fmfd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.icloud.findmydeviced.findmydevice-user-agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.alf.useragent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.parentalcontrols.check.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.photoanalysisd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ap.adprivacyd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ap.adservicesd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.assistantd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.assistant_service.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.SocialPushAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.donotdisturbd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.familycircled.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.familycontrols.useragent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.familynotificationd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.progressd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.macos.studentd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.routined.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ScreenTimeAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.homed.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.newsd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.dmd.agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.corespotlightd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.helpd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.gamed.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.corespeechd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.speech.synthesisserver.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.parsecd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.parsec-fbf.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.coreservices.useractivityd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.networkserviceproxy-osx.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.avatarsd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.BiomeAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.biomesyncd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.universalaccessd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.siriknowledged.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.siriactionsd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.amsengagementd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.AMPLibraryAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.coreparsec.silhouette.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.appleseed.seedusaged.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.contacts.donation-agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.AirPlayUIAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.FollowUpUI.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.followupd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.suggestd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.reversetemplated.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.photolibraryd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.amsaccountsd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.knowledge-agent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.WiFiVelocityAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.cloudphotod.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.mediaremoteagent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.systemprofiler.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.Safari.SafeBrowsing.Service.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.SafeEjectGPUAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.triald.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.metrickitd.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.ContextStoreAgent.plist
launchctl unload -w /System/Library/LaunchAgents/com.apple.Spotlight.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportMemoryException.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.symptomsd-diag.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.CrashReporterSupportHelper.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.DumpPanic.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.DumpGPURestart.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.icloud.findmydeviced.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.findmymac.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.findmymacmessenger.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.spindump.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.tailspind.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.SubmitDiagInfo.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.awdd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.diagnosticd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.aslmanager.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.nand.aspcarry.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.emond.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.emond.aslmanager.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.familycontrols.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.sysdiagnose.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.analyticsd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.wifianalyticsd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.systemstats.analysis.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.systemstats.daily.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.biokitaggdd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.biometrickitd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.systemstats.microstackshot_periodic.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.watchdogd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.symptomsd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.coresymbolicationd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.siriinferenced.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.endpointsecurity.endpointsecurityd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.InstallerDiagnostics.installerdiagwatcher.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.InstallerDiagnostics.installerdiagd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.jetsamproperties.Mac.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.coreduetd.osx.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.appleseed.fbahelperd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mobileassetd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.PerfPowerServices.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.applessdstatistics.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.backupd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.backupd-helper.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.revisiond.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.wifivelocityd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.icloud.searchpartyd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.AirPlayXPCHelper.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.GameController.gamecontrollerd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.SafeEjectGPUStartupDaemon.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dprivacyd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.sandboxd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.rtcreportingd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.bluetoothReporter.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.bluetoothd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.bluetoothuiservice.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.contextstored.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mediaremoted.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mobile.keybagd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.logd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.newsyslog.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.managedconfiguration.teslad.plist