Skip to content

Commit b968266

Browse files
user1user1
user1
authored and
user1
committed
Minor fixes,Completed full process write up. Beta
1 parent d66fc79 commit b968266

File tree

3 files changed

+92
-68
lines changed

3 files changed

+92
-68
lines changed

Diff for: Disable-Ventura-Bloatware.sh

+13-42
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
## Full Procedure;
3+
## Procedure;
44
#0) Take note of Agents and Daemons currently running; `launchctl list | grep -v "\-\t0"`
55
#1) Reboot in Recovery mode (Eg; https://www.lifewire.com/restart-a-mac-into-recovery-mode-5184142)
66
#2) Open 'Terminal' application in Recovery mode
@@ -9,44 +9,17 @@
99
#5) Identify your system disk identifier - (Eg, 'disk3s3' for Volume 'Macintosh HD') in the diskutil output under the '(synthesized)' set
1010
#6) Mount volume; `diskutil mount disk3s3` (replace 'disk3s3' with your own disk identifier if different)
1111
#7) Make writable; `mount -uw /Volumes/Macintosh\ HD` (replace 'Macintosh\ HD' with your disk volume name)
12-
#8) Update `${MYROOTDISK}` variable in the `Disable-Ventura-Bloatware.sh` script (~Line 59), and in the commands below (steps 11, 12), if different from (`/Volumes/Macintosh\ HD`)
12+
#8) Update `${MYROOTDISK}` variable in the `Disable-Ventura-Bloatware.sh` script (~Line 32), and in the commands below (steps 11, 12), if different from (`/Volumes/Macintosh\ HD`)
1313
#9) Make script executable; `chmod 775 ./Disable-Ventura-Bloatware.sh` and execute `./Disable-Ventura-Bloatware.sh` (in Recovery Mode Terminal)
1414
#10) Check existing snapshots; `diskutil apfs listSnapshots disk3s3` (change disk and partition to yours)
1515
#11) Create new disk snapshot; `/Volumes/Macintosh\ HD/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -s "Custom1" -v /Volumes/Macintosh\ HD` (replace 'Macintosh\ HD' if different)
1616
#12) Tag new snapshot bootable; `/Volumes/Macintosh\ HD/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs_systemsnapshot -r "Custom1" -v /Volumes/Macintosh\ HD` (replace 'Macintosh\ HD' if different)
17+
#OR 11 & 12) `bless --mount /Volumes/Macintosh\ HD --bootefi --create-snapshot` (I have not confirmed if there is any difference between this command and 11+12 - They seem to work the same so far)
1718
#13) Check snapshots; `diskutil apfs listSnapshots disk3s3` (change disk and partition to yours) - Should show your new customised SSV Volume is the new MacOS Boot image
1819
#14) Reboot in Normal mode (first reboot with new snapshot might take upto 10 minutes)
1920
#15) Verify LaunchAgents and Daemons are now stopped; `launchctl list | grep -v "\-\t0"`
20-
#16) Open MacOS Log Console (`open -a Console`), and use your system for a while (test everything you normally use).
21-
#Perform common activities to exercise all needed features, and watch for issues in Console.
22-
#If things are not working as desired, you will need to experiment and try restoring Agents and Daemons one by one.
23-
#You can also try deleting any related app/user plist files from `~/Library/Preferences/` and rebooting, to restore an Apps defaults settings. (Eg, `rm ~/Library/Preferences/com.apple.AppStore.plist`)
24-
#
25-
#Restoring functionality; follow steps 1,6,7 again, removing `.bak` extension from wanted .plists, restore launchctl loading if Agent, follow steps 11-14 (Increment 'CustomX') to commit the restored plists.
26-
#Eg to restore Agents;
27-
#```
28-
#Steps 1,6,7
29-
#mv ${MYROOTDISK}/System/Library/LaunchAgents/<AgentToRestore>.plist.bak ${MYROOTDISK}/System/Library/LaunchAgents/<AgentToRestore>.plist
30-
#launchctl enable user/0/<AgentToRestore> # Root shell user
31-
#launchctl enable gui/501/<AgentToRestore> # UI Login User
32-
#launchctl enable user/501/<AgentToRestore> # Shell Login User
33-
#launchctl bootstrap user/0/<AgentToRestore> # Root shell user
34-
#launchctl bootstrap gui/501/<AgentToRestore> # UI Login User
35-
#launchctl bootstrap user/501/<AgentToRestore> # Shell Login User
36-
#launchctl start user/0/<AgentToRestore> # Root shell user
37-
#launchctl start gui/501/<AgentToRestore> # UI Login User
38-
#launchctl start user/501/<AgentToRestore> # Shell Login User
39-
#Steps 11-14 (Using Custom2 etc)
40-
#```
41-
#Eg to restore Daemons;
42-
#```
43-
#Steps 1,6,7
44-
#mv ${MYROOTDISK}/System/Library/LaunchDaemons/<DaemonToRestore>.plist.bak ${MYROOTDISK}/System/Library/LaunchDaemons/<DaemonToRestore>.plist
45-
#Steps 11-14 (Using Custom2 etc)
46-
#```
47-
#When happy, update the script with your personal changes (for future you), and share fixes for others here..\
48-
#17) Once everything is working as desired (and the things you don't use are gone), reboot into Recovery mode again
49-
#18) Re-enable SIP `csrutil authenticated-root enable`. Reboot and re-enable disk Encryption/FileVault, and Lockdown mode (if used)
21+
22+
# * See README.md for all remaining steps *
5023

5124
# Agents not to disable
5225
#Disabling `com.apple.speech.speechdatainstallerd` `com.apple.speech.speechsynthesisd` `com.apple.speech.synthesisserver` will freeze Edit menus.\
@@ -68,8 +41,8 @@ fi
6841
# TODO Build launchctl man page extracts for Ventura https://gist.github.com/dmattera/883a4457b67534df795cdd0fa1651a26
6942

7043
# Launch Agents
71-
# TODO Bluetooth is excluded below but Bluetooth is not working. Console logs show; <Notice>: service inactive: com.apple.bluetoothd (find dependency)
72-
# Console logs seem to show bluetoothd trying to connect to com.apple.SharingServices which is likely part of com.apple.sharingd
44+
# TODO Testing - When Bluetooth is excluded (from being disabled by commenting 'TODISABLE+=( "${LA_BLUETOOTH[@]}" )'), you also need to stop com.apple.sharingd from being disabled.
45+
# Console logs show bluetoothd trying to connect to com.apple.SharingServices which is likely part of com.apple.sharingd
7346
LA_BLUETOOTH=('com.apple.bluetoothuserd')
7447

7548
LA_QUICKLOOK=('com.apple.quicklook' \
@@ -122,7 +95,7 @@ LA_FAMILYSYNC=('com.apple.familycircled' \
12295
'com.apple.UsageTrackingAgent')
12396

12497
LA_BLOAT=('com.apple.financed' \
125-
#'com.apple.analyticsd' \ # No longer in Ventura (suspect this is was renamed/hidden to obfuscate)
98+
#'com.apple.analyticsd' \ # No longer in Ventura
12699
'com.apple.gamed' \
127100
'com.apple.newsd' \
128101
'com.apple.weatherd' \
@@ -222,9 +195,9 @@ LA_OTHER=('com.apple.networkserviceproxy-osx' \
222195
'com.apple.cmio.ContinuityCaptureAgent')
223196

224197
TODISABLE=()
225-
#TODISABLE+=( "${LA_BLUETOOTH[@]}" ) # Do not disable if you use Bluetooth headphones/keyboards/controllers etc
226-
#TODISABLE+=( "${LA_QUICKLOOK[@]}" ) # Do not disable if you use QuickLook (image/video previews)
227-
#TODISABLE+=( "${LA_TIMEMACHINE[@]}" ) # Do not disable if you use Time Machine backups
198+
TODISABLE+=( "${LA_BLUETOOTH[@]}" ) # Do not disable if you use Bluetooth headphones/keyboards/controllers etc
199+
# TODISABLE+=( "${LA_QUICKLOOK[@]}" ) # Do not disable if you use QuickLook (image/video previews)
200+
# TODISABLE+=( "${LA_TIMEMACHINE[@]}" ) # Do not disable if you use Time Machine backups
228201
TODISABLE+=( "${LA_CLOUD[@]}" )
229202
TODISABLE+=( "${LA_MDM[@]}" )
230203
TODISABLE+=( "${LA_ADVERTISING[@]}" )
@@ -244,7 +217,7 @@ TODISABLE+=( "${LA_IDENTITYDATA[@]}" )
244217
TODISABLE+=( "${LA_MUSIC[@]}" )
245218
TODISABLE+=( "${LA_APPLETV[@]}" )
246219
TODISABLE+=( "${LA_PAYMENTS[@]}" )
247-
TODISABLE+=( "${LA_AUTOMATIONS[@]}" )
220+
# TODISABLE+=( "${LA_AUTOMATIONS[@]}" )
248221
TODISABLE+=( "${LA_SPOTLIGHT[@]}" ) # Make sure you have an alternative like LaunchBar
249222
TODISABLE+=( "${LA_AIRPLAY[@]}" ) # Do not disable if you use AirPlay
250223
TODISABLE+=( "${LA_OTHER[@]}" )
@@ -326,7 +299,6 @@ LD_OTHER=('com.apple.locationd' \
326299
'com.apple.osanalytics.osanalyticshelper' \
327300
#'com.apple.CoreLocationAgent' \ # No longer in Ventura
328301
'com.apple.AirPlayXPCHelper' \
329-
'com.apple.dhcp6d' \
330302
'com.apple.RemoteDesktop.PrivilegeProxy' \
331303
'com.apple.familycontrols' \
332304
'com.apple.findmymacmessenger' \
@@ -336,9 +308,8 @@ LD_OTHER=('com.apple.locationd' \
336308
#'com.apple.ftpd' \ # No longer in Ventura
337309
'com.apple.GameController.gamecontrollerd' \
338310
#'com.apple.geod' \ # No longer in Ventura
339-
'com.apple.netbiosd' \
340-
'com.apple.nsurlsessiond' \
341311
#'com.apple.protectedcloudstorage.protectedcloudkeysyncing' \ # No longer in Ventura
312+
'com.apple.netbiosd' \
342313
'com.apple.rapportd' \
343314
#'com.apple.security.cloudkeychainproxy3' \ # No longer in Ventura
344315
#'com.apple.siri.morphunassetsupdaterd' \ # No longer in Ventura

Diff for: Enable-Ventura-Bloatware.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
LAUNCH_AGENTS=/System/Library/LaunchAgents/*
4+
5+
sudo rm /private/var/db/com.apple.xpc.launchd/disabled.*
6+
7+
for f in $LAUNCH_AGENTS
8+
do
9+
if [[ "$f" == *".bak" ]]; then
10+
o="${f#.bak}"
11+
echo "Re-naming $f to $o"
12+
#mv $f $o
13+
fi
14+
done
15+

0 commit comments

Comments
 (0)