Skip to content

Instantly share code, notes, and snippets.

@pestilence669
Last active October 30, 2017 06:33
Show Gist options
  • Save pestilence669/85115c8efaf0ff8cfea8380e3af0e309 to your computer and use it in GitHub Desktop.
Save pestilence669/85115c8efaf0ff8cfea8380e3af0e309 to your computer and use it in GitHub Desktop.
Enable Night Shift on macOS 10.13 for MacBook Air 4,1+

Enable Night Shift on macOS 10.13

Apple made Night Shift check for compatibility to exclude older hardware. An easy way to enable it is to patch the CoreBrightness binary. This Gist contains a patch file for enabling it for the MacBook Air 4,1 (mid-2011).

Requirements

  • macOS 10.13
  • MacBook Air 4,1 or newer
  • Developer CLI tools - xcode-select --install
  • Homebrew - /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • xdelta3 - brew install xdelta

Steps

  1. Disable SIP

    1.1 Boot into recovery mode (⌘ + R) and open Terminal

    csrutil disable
    reboot
  2. Backup the old framework

    cp /System/Library/PrivateFrameworks/CoreBrightness.framework/CoreBrightness CoreBrightness.old
  3. Patch the existing (old) framework

    xdelta3 -d -s CoreBrightness.old CoreBrightness.xdelta3 CoreBrightness
  4. Sign the shit

    sudo codesign -f -s - CoreBrightness
  5. Replace the existing binary with the new and improved version

    sudo cp CoreBrightness /System/Library/PrivateFrameworks/CoreBrightness.framework/CoreBrightness
    sudo reboot
  6. Re-enable SIP

    6.1 Boot into recovery mode (⌘ + R) and open Terminal

    csrutil enable
    reboot
  7. See System Preferences > Displays > Night Shift

Original Instructions

https://pikeralpha.wordpress.com/2017/01/30/4398/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment