-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.disable_services.sh
executable file
·138 lines (123 loc) · 3.96 KB
/
.disable_services.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
#!/usr/bin/env bash
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
# iCloud
AGENTS+=('com.apple.icloud.fmfd' \
#'com.apple.cloudphotosd' \
'com.apple.followupd')
# Safari useless stuff
AGENTS+=('com.apple.SafariBookmarksSyncAgent' \
'com.apple.SafariCloudHistoryPushAgent' \
'com.apple.WebKit.PluginAgent')
# iMessage / Facetime
AGENTS+=('com.apple.avconferenced')
#AGENTS+=('com.apple.imagent' \
# 'com.apple.imautomatichistorydeletionagent' \
# 'com.apple.imklaunchagent' \
# 'com.apple.imtransferagent')
# Game Center / Passbook / Apple TV / Homekit...
AGENTS+=('com.apple.gamed' \
'com.apple.passd' \
'com.apple.Maps.pushdaemon' \
'com.apple.videosubscriptionsd' \
'com.apple.CommCenter-osx' \
'com.apple.homed')
# Ad-related
AGENTS+=('com.apple.ap.adprivacyd' \
'com.apple.ap.adservicesd')
# Screensharing
AGENTS+=('com.apple.screensharing.MessagesAgent' \
'com.apple.screensharing.agent' \
'com.apple.screensharing.menuextra')
# Siri
AGENTS+=('com.apple.siriknowledged' \
'com.apple.assistant_service' \
'com.apple.assistantd' \
'com.apple.Siri.agent' \
'com.apple.parsec-fbf')
# VoiceOver / accessibility-related stuff
AGENTS+=('com.apple.VoiceOver' \
'com.apple.voicememod' \
'com.apple.accessibility.AXVisualSupportAgent' \
'com.apple.accessibility.dfrhud' \
'com.apple.accessibility.heard')
# Debugging process
AGENTS+=('com.apple.spindump_agent' \
'com.apple.ReportCrash' \
'com.apple.ReportGPURestart' \
'com.apple.ReportPanic' \
'com.apple.DiagnosticReportCleanup' \
'com.apple.TrustEvaluationAgent')
# Screentime
AGENTS+=('com.apple.ScreenTimeAgent' \
'com.apple.UsageTrackingAgent')
# Others
AGENTS+=('com.apple.parsecd' \
'com.apple.AirPlayUIAgent' \
'com.apple.AirPortBaseStationAgent' \
'com.apple.familycircled' \
'com.apple.familycontrols.useragent' \
'com.apple.familynotificationd' \
'com.apple.sharingd' \
'com.apple.java.InstallOnDemand' \
'com.apple.parentalcontrols.check' \
'com.apple.appleseed.seedusaged' \
'com.apple.appleseed.seedusaged.postinstall' \
'com.apple.CallHistorySyncHelper' \
#'com.apple.RemoteDesktop' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.SocialPushAgent' \
'com.apple.touristd' \
'com.apple.macos.studentd' \
'com.apple.KeyboardAccessAgent' \
'com.apple.exchange.exchangesyncd' \
'com.apple.suggestd' \
'com.apple.helpd' \
'com.apple.amp.mediasharingd' \
'com.apple.remindd' \
'com.apple.telephonyutilities.callservicesd' \
'com.apple.DictationIM' \
'com.apple.SafariNotificationAgent')
# Daemons to disable
DAEMONS+=('com.apple.analyticsd'
'com.apple.netbiosd' \
'com.apple.remotepairtool' \
'com.apple.security.FDERecoveryAgent' \
'com.apple.SubmitDiagInfo' \
'com.apple.screensharing' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient' \
'com.apple.ManagedClient.startup' \
'com.apple.locate' \
'com.apple.eapolcfg_auth' \
#'com.apple.RemoteDesktop.PrivilegeProxy' \
'com.apple.familycontrols' \
'com.apple.AirPlayXPCHelper' \
'com.apple.awdd' \
'com.apple.CrashReporterSupportHelper')
echo -e ":::"
echo -e "::: Disabling LaunchAgents"
echo -e ":::"
for agent in "${AGENTS[@]}"
do
if [ -f ./System/Library/LaunchAgents/${agent}.plist ]; then
mv ./System/Library/LaunchAgents/${agent}.plist ./System/Library/LaunchAgents/${agent}.plist.bak
echo -e "\t|- [\033[32m+\033[m] Disabled ${agent}"
else
echo -e "\t|- [\033[32m+\033[m] ${agent}"
fi
done
echo -e ":::"
echo -e "::: Disabling LaunchDaemons"
echo -e ":::"
for daemon in "${DAEMONS[@]}"
do
if [ -f ./System/Library/LaunchDaemons/${daemon}.plist ]; then
mv ./System/Library/LaunchDaemons/${daemon}.plist ./System/Library/LaunchDaemons/${daemon}.plist.bak
echo -e "\t|- [\033[32m+\033[m] Disabled ${daemon}"
else
echo -e "\t|- [\033[32m+\033[m] ${daemon}"
fi
done