MacOS – Automate Continuity reactivation post-update

automationcontinuitymacos

I've got an early 2011 MBP with an upgraded AirPort card. I know that one has to jump through kext- and Terminal-based hoops to enable Continuity, but I also know that Continuity Activation Tool does the entire process at the press of a button. The one problem is that whenever I install a software update or reinstall Yosemite, it undoes the Continuity-enabling process.

My question: Is there a way to make the Continuity-enabling process automatically run after every update/reinstall?

Best Answer

Continuity Activation Tool author here.

Writing an additional script and tweaking CAT's script would be necessary as the tools' activation feature isn't currently designed to run automatically and silently. Stuart H's suggestion points you in the right direction IMO.

Functionality I'd include in a boot time script:

  1. Detect if one of the IOBluetoothFamily.kext or IO80211Family.kext drivers, located in /System/Library/Extensions/, pass code signature validation (with Apple's codesign command line utility). If one or both of them do, they likely have been updated/replaced by an OS X update and need to be re-patched: the script can proceed.

  2. Rename any KextsBackupBeforePatch and KextsBackupAfterPatch folders in the user dir to avoid any "overwrite files" prompt during the activation.

  3. Run contitool.sh -a with admin privileges to activate Continuity from the command line. Catch and log CAT's output in a file: in case of failure you may want to know what happened.

Additionally, I'd modify the rebootPrompt() function of contitool.sh to restart the system automatically. You could also add a popup asking or warning the user about the reboot on top of that, e.g. through Apple Script (osascript command line utility).

Last but not least: Apple may release an OS X update anytime that breaks the methods used by this tool to activate Continuity. So far this hasn't been the case - but risks of issues with your system are increased if you automate the activation right after an OS X update.