hacks/fixcatalina/fixcatalina.sh

211 lines
5.8 KiB
Bash
Raw Normal View History

2020-05-06 20:07:58 +00:00
#!/bin/bash
2020-05-06 20:09:55 +00:00
# script originally found at
# https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21
# thanks to @pwnsdx
2020-05-06 20:07:58 +00:00
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
# 'com.apple.speech.speechdatainstallerd' 'com.apple.speech.speechsynthesisd' 'com.apple.speech.synthesisserver' will freeze Edit menus
# 'com.apple.bird' will prevent saving prompt from being shown
TODISABLE=()
# iCloud
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
2020-05-06 20:07:58 +00:00
'com.apple.cloudd' \
'com.apple.cloudpaird' \
'com.apple.cloudphotosd' \
'com.apple.followupd' \
2020-05-06 20:09:55 +00:00
'com.apple.iCloudUserNotifications' \
'com.apple.icloud.findmydeviced.findmydevice-user-agent' \
'com.apple.icloud.fmfd' \
'com.apple.icloud.searchpartyuseragent' \
'com.apple.protectedcloudstorage.protectedcloudkeysyncing' \
'com.apple.security.cloudkeychainproxy3' \
)
2020-05-06 20:07:58 +00:00
# Safari useless stuff
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
2020-05-06 20:07:58 +00:00
'com.apple.SafariCloudHistoryPushAgent' \
2020-05-06 20:09:55 +00:00
'com.apple.WebKit.PluginAgent' \
'com.apple.SafariBookmarksSyncAgent' \
)
2020-05-06 20:07:58 +00:00
# iMessage / Facetime
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.avconferenced' \
2020-05-06 20:07:58 +00:00
'com.apple.imautomatichistorydeletionagent' \
'com.apple.imklaunchagent' \
'com.apple.imtransferagent' \
2020-05-06 20:09:55 +00:00
'com.apple.imagent' \
)
2020-05-06 20:07:58 +00:00
# Game Center / Passbook / Apple TV / Homekit...
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.CommCenter-osx' \
2020-05-06 20:07:58 +00:00
'com.apple.Maps.pushdaemon' \
2020-05-06 20:09:55 +00:00
'com.apple.homed' \
'com.apple.passd' \
2020-05-06 20:07:58 +00:00
'com.apple.videosubscriptionsd' \
2020-05-06 20:09:55 +00:00
'com.apple.gamed' \
)
2020-05-06 20:07:58 +00:00
# Ad-related
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.ap.adservicesd' \
'com.apple.ap.adprivacyd' \
)
2020-05-06 20:07:58 +00:00
# Screensharing
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
2020-05-06 20:07:58 +00:00
'com.apple.screensharing.agent' \
2020-05-06 20:09:55 +00:00
'com.apple.screensharing.menuextra' \
'com.apple.screensharing.MessagesAgent' \
)
2020-05-06 20:07:58 +00:00
# Siri
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.Siri.agent' \
2020-05-06 20:07:58 +00:00
'com.apple.assistant_service' \
'com.apple.assistantd' \
2020-05-06 20:09:55 +00:00
'com.apple.parsec-fbf' \
'com.apple.siriknowledged' \
)
2020-05-06 20:07:58 +00:00
# VoiceOver / accessibility-related stuff
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
2020-05-06 20:07:58 +00:00
'com.apple.accessibility.AXVisualSupportAgent' \
'com.apple.accessibility.dfrhud' \
2020-05-06 20:09:55 +00:00
'com.apple.accessibility.heard' \
'com.apple.voicememod' \
'com.apple.VoiceOver' \
)
2020-05-06 20:07:58 +00:00
# Quicklook
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.quicklook' \
2020-05-06 20:07:58 +00:00
'com.apple.quicklook.ThumbnailsAgent' \
2020-05-06 20:09:55 +00:00
'com.apple.quicklook.ui.helper' \
)
2020-05-06 20:07:58 +00:00
# Sidecar
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.sidecar-relay'
'com.apple.sidecar-hid-relay' \
)
2020-05-06 20:07:58 +00:00
# Debugging process
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.DiagnosticReportCleanup' \
2020-05-06 20:07:58 +00:00
'com.apple.ReportCrash' \
'com.apple.ReportGPURestart' \
'com.apple.ReportPanic' \
2020-05-06 20:09:55 +00:00
'com.apple.TrustEvaluationAgent' \
'com.apple.spindump_agent' \
)
2020-05-06 20:07:58 +00:00
# Screentime
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.UsageTrackingAgent' \
'com.apple.ScreenTimeAgent' \
)
2020-05-06 20:07:58 +00:00
# Others
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
2020-05-06 20:07:58 +00:00
'com.apple.AOSHeartbeat' \
2020-05-06 20:09:55 +00:00
'com.apple.AOSPushRelay' \
'com.apple.AddressBook.SourceSync' \
'com.apple.AddressBook.abd' \
2020-05-06 20:07:58 +00:00
'com.apple.AirPlayUIAgent' \
'com.apple.AirPortBaseStationAgent' \
2020-05-06 20:09:55 +00:00
'com.apple.CalendarAgent' \
'com.apple.CallHistoryPluginHelper' \
'com.apple.CallHistorySyncHelper' \
'com.apple.KeyboardAccessAgent' \
'com.apple.RemoteDesktop' \
'com.apple.SocialPushAgent' \
'com.apple.amp.mediasharingd' \
'com.apple.appleseed.seedusaged' \
'com.apple.appleseed.seedusaged.postinstall' \
'com.apple.exchange.exchangesyncd' \
2020-05-06 20:07:58 +00:00
'com.apple.familycircled' \
'com.apple.familycontrols.useragent' \
'com.apple.familynotificationd' \
'com.apple.findmymacmessenger' \
2020-05-06 20:09:55 +00:00
'com.apple.helpd' \
2020-05-06 20:07:58 +00:00
'com.apple.identityservicesd' \
'com.apple.java.InstallOnDemand' \
2020-05-06 20:09:55 +00:00
'com.apple.keyboardservicesd' \
'com.apple.knowledge-agent' \
2020-05-06 20:07:58 +00:00
'com.apple.macos.studentd' \
'com.apple.mediaanalysisd' \
'com.apple.mediaremoteagent' \
2020-05-06 20:09:55 +00:00
'com.apple.mobileassetd' \
'com.apple.parentalcontrols.check' \
'com.apple.parsecd' \
'com.apple.photoanalysisd' \
2020-05-06 20:07:58 +00:00
'com.apple.remindd' \
2020-05-06 20:09:55 +00:00
'com.apple.security.keychain-circle-notification' \
'com.apple.sharingd' \
'com.apple.suggestd' \
'com.apple.syncdefaultsd' \
2020-05-06 20:07:58 +00:00
'com.apple.telephonyutilities.callservicesd' \
2020-05-06 20:09:55 +00:00
'com.apple.touristd' \
'com.apple.telephonyutilities.callservicesd' \
)
2020-05-06 20:07:58 +00:00
echo Disabling unwanted LaunchAgents...
for agent in "${TODISABLE[@]}"; do
if [[ -e "./System/Library/launchAgents/${agent}.plist" ]]; then
mv "./System/Library/LaunchAgents/${agent}.plist" \
"./System/Library/LaunchAgents/${agent}.plist.bak"
echo "[OK] Agent ${agent} disabled"
fi
2020-05-06 20:07:58 +00:00
done
# Daemons to disable
TODISABLE=()
# iCloud
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.analyticsd' \
'com.apple.icloud.findmydeviced' \
)
2020-05-06 20:07:58 +00:00
# Others
2020-05-06 20:09:55 +00:00
TODISABLE+=( \
'com.apple.ManagedClient' \
2020-05-06 20:07:58 +00:00
'com.apple.ManagedClient.cloudconfigurationd' \
'com.apple.ManagedClient.enroll' \
'com.apple.ManagedClient.startup' \
2020-05-06 20:09:55 +00:00
'com.apple.RemoteDesktop.PrivilegeProxy' \
'com.apple.SubmitDiagInfo' \
'com.apple.appleseed.fbahelperd' \
'com.apple.apsd' \
'com.apple.eapolcfg_auth' \
2020-05-06 20:07:58 +00:00
'com.apple.locate' \
'com.apple.locationd' \
2020-05-06 20:09:55 +00:00
'com.apple.mediaremoted' \
'com.apple.preferences.timezone.admintool' \
'com.apple.remotepairtool' \
'com.apple.screensharing' \
'com.apple.security.FDERecoveryAgent' \
'com.apple.netbiosd' \
)
2020-05-06 20:07:58 +00:00
for daemon in "${TODISABLE[@]}" ; do
if [[ -e "./System/Library/LaunchDaemons/${daemon}.plist" ]]; then
mv "./System/Library/LaunchDaemons/${daemon}.plist" \
"./System/Library/LaunchDaemons/${daemon}.plist.bak"
echo "[OK] Daemon ${daemon} disabled"
fi
2020-05-06 20:07:58 +00:00
done