@@ -179,8 +179,10 @@ def _merge_kdk_with_root(self, save_hid_cs: bool = False) -> None:
179179 self .mount_location ,
180180 self .skip_root_kmutil_requirement
181181 ).merge (save_hid_cs )
182-
183-
182+ def clean_launchpad (self ) -> None :
183+ logging .info ("- Cleaning LaunchPad Settings" )
184+ subprocess .run (["mkdir" , "-p" , "/Library/Preferences/FeatureFlags/Domain" ],capture_output = True ,text = True )
185+ subprocess .run (["defaults" , "write" , "/Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist" , "SpotlightPlus" , "-dict" , "Enabled" , "-bool" , "false" ],capture_output = True ,text = True )
184186 def _unpatch_root_vol (self ):
185187 """
186188 Reverts APFS snapshot and cleans up any changes made to the root and data volume
@@ -191,6 +193,7 @@ def _unpatch_root_vol(self):
191193
192194 self ._clean_skylight_plugins ()
193195 self ._delete_nonmetal_enforcement ()
196+ self .clean_launchpad ()
194197 kernelcache .KernelCacheSupport (
195198 mount_location_data = self .mount_location_data ,
196199 detected_os = self .constants .detected_os ,
@@ -554,7 +557,14 @@ def start_patch(self):
554557 if self .patch_set_dictionary == {}:
555558 logging .info ("- No Root Patches required for your machine!" )
556559 return
557-
560+ if self .constants .change_launchpad is True :
561+ logging .info ("- LaunchPad patching enabled, run command......" )
562+ subprocess .run (["mkdir" , "-p" , "/Library/Preferences/FeatureFlags/Domain" ],capture_output = True ,text = True )
563+ subprocess .run (["defaults" , "write" , "/Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist" , "SpotlightPlus" , "-dict" , "Enabled" , "-bool" , "false" ])
564+ else :
565+ logging .info ("- LaunchPad patching disabled,skip......" )
566+ subprocess .run (["mkdir" , "-p" , "/Library/Preferences/FeatureFlags/Domain" ],capture_output = True ,text = True )
567+ subprocess .run (["defaults" , "write" , "/Library/Preferences/FeatureFlags/Domain/SpotlightUI.plist" , "SpotlightPlus" , "-dict" , "Enabled" , "-bool" , "true" ])
558568 logging .info ("- Verifying whether Root Patching possible" )
559569 if patchset_obj .can_patch is False :
560570 logging .error ("- Cannot continue with patching!!!" )
0 commit comments