Last active
December 7, 2022 19:37
-
-
Save zhijunc/54abcad2e0bd5e275e368b66ba16c8bc to your computer and use it in GitHub Desktop.
Disable bunch of #$!@ in Catalina
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## HOW TO RUN | |
# | |
# 1. Enter Recovery mode w. CMD+R | |
# 2. cd /Volumes/Macintosh\ HD | |
# 3. sh /Volumes/Macintosh\ HD/Users/disable.sh | |
## LOCATIONS | |
# | |
# /System/Library/LaunchDaemons/ - System-wide daemons provided by Mac OS X | |
# /System/Library/LaunchAgents/ - Per-user agents provided by Mac OS X. | |
# ~/Library/LaunchAgents/ - Per-user agents provided by the user. | |
# /Library/LaunchAgents/ - Per-user agents provided by the administrator. | |
# /Library/LaunchDaemons/ - System-wide daemons provided by the administrator | |
TODISABLE+=( | |
'com.apple.AirPlayUIAgent' | |
'com.apple.CallHistoryPluginHelper' | |
'com.apple.familycircled' | |
'com.apple.homed' | |
'com.apple.keyboardservicesd' | |
'com.apple.knowledge-agent' | |
'com.apple.Maps.pushdaemon' | |
'com.apple.mediaremoteagent' | |
'com.apple.rapportd-user' # Handoff | |
'com.apple.remindd' | |
'com.apple.sharingd' # AirDrop | |
'com.apple.SocialPushAgent' | |
'com.apple.suggestd' | |
'com.apple.telephonyutilities.callservicesd' | |
'com.apple.touristd' # What's New | |
# Ads | |
'com.apple.ap.adprivacyd' | |
'com.apple.ap.adservicesd' | |
# Apple Music | |
'com.apple.AMPDeviceDiscoveryAgent' | |
'com.apple.AMPDevicesAgent' | |
'com.apple.AMPLibraryAgent' | |
# ScreenTime | |
'com.apple.ScreenTimeAgent' | |
'com.apple.UsageTrackingAgent' | |
# iMessage | |
'com.apple.imagent' | |
'com.apple.imautomatichistorydeletionagent' | |
# Safari | |
'com.apple.Safari.SafeBrowsing.Service' | |
'com.apple.SafariBookmarksSyncAgent' | |
# Siri related | |
'com.apple.assistantd' | |
'com.apple.parsec-fbf' | |
'com.apple.parsecd' | |
) | |
for agent in "${TODISABLE[@]}" | |
do | |
FROM="./System/Library/LaunchAgents/${agent}.plist" | |
TO="./System/Library/LaunchAgents/${agent}.plist.bak" | |
if [ -f "${FROM}" ]; then | |
mv ${FROM} ${TO} | |
echo "[OK] Agent ${agent} disabled" | |
fi | |
done | |
TODISABLE+=( | |
'com.apple.AirPlayXPCHelper' | |
'com.apple.analyticsd' # iCloud Analytic | |
'com.apple.GameController.gamecontrollerd' | |
'com.apple.netbiosd' | |
'com.apple.rapportd' # Handoff | |
'com.apple.SubmitDiagInfo' | |
# Time Machine | |
'com.apple.backupd-helper' | |
'com.apple.backupd' | |
) | |
for daemon in "${TODISABLE[@]}" | |
do | |
FROM="./System/Library/LaunchDaemons/${daemon}.plist" | |
TO="./System/Library/LaunchDaemons/${daemon}.plist.bak" | |
if [ -f "${FROM}" ]; then | |
mv ${FROM} ${TO} | |
echo "[OK] Daemon ${daemon} disabled" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment