Git Product home page Git Product logo

nightpatch's Introduction

Image

NightPatch

Enable Night Shift on any old Mac models.

You have to disable SIP (System Integrity Protection) before applying. How to disable SIP

Backup your Mac before applying.

Not compatible with some third-party monitors. This is a solution for unsupported Mac, not unsupported monitors!

Supported macOS

macOS 10.12.4 or later including High Sierra. (List of tested macOS build)

About 10.13.4 (17E199) and 10.13.5 (17F35e) - 10.13.4 (17E199) and 10.13.5 (17F35e) work well for me but some people undergo unbootable issue.

How to patch

Enter this command on Terminal without $.

$ cd /tmp; curl -s -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o -qq NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; sudo ./NightPatch.sh

How to revert using backup

You can revert using backup located on /Library/NightPatch. (NightPatch creates backup automatically when you patch your macOS) Enter this command on Terminal without $.

$ cd /tmp; curl -s -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o -qq NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; sudo ./NightPatch.sh --revert

How to revert using macOS combo Update

If you deleted backup (or not backed up with NightPatch), enter this command on Terminal without $. NightPatch will download original system file from Apple. This method works without backup.

$ cd /tmp; curl -s -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o -qq NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; sudo ./NightPatch.sh --fix

How to run beta build

Enter this command on Terminal without $.

$ cd /tmp; curl -s -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o -qq NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; sudo ./NightPatch-beta.sh

If you want to revert using backup, use --revert. Also using macOS combo Update is --fix.

Troubleshootings

  • ERROR : Turn off System Integrity Protection before doing this.

: Solution

  • 'Password:' ???

: Enter your login password.

  • NightPatch repeatedly requires password.

: Update to latest macOS to solve this, or run NightPatch with sudo su.

  • xcrun error

: Try xcode-select --install command.

References

aonez/NightShiftPatcher

Supported Mac models for Night Shift in Sierra 10.12.4+

Supported Mac models for Night Shift in High Sierra 10.13.2

nightpatch's People

Contributors

pookjw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nightpatch's Issues

unknown operand 44690

TOOL_VERSION=247
TOOL_BUILD=beta
SYSTEM_BUILD=17G3025
SYSTEM_VERSION=10.13.6
MACHINE_MODEL=MacBookPro8,1
PATCH_COUNT=7
TOOL_MODE=patch
VERBOSE=YES
SKIP_CHECK_SYSTEM=NO
SKIP_CHECK_HW=NO
USE_LOCAL_CACHE=NO
PWD=/private/tmp/NightPatch-master


Detected backup, reverting...
/System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness: replacing existing signature
Creating backup...
Patching...
FIRST_SHA=39c486ffa09734384717ab95f8c0bbe65e5d5375
CB_OFFSET=0x44670
44690
dd: unknown operand 44690
SECOND_SHA=39c486ffa09734384717ab95f8c0bbe65e5d5375
ERROR : Faild to patch system file.
Exit code: 1

High Sierra not working.

Unfortunately NightPatch is not working with the GM release of High Sierra.
Is there any chance of an updated binary?
Thank you!

(Fix) for unbootable Machine

On macOS 10.13.4, you cannot boot up. DO NOT REINSTALL macOS, just boot into safe mode, and run the uninstaller.sh script in Terminal.

Invalid signature

When I'm running the .sh script I'm having the following issue:

Checking new signature...

The new signature is invalid or can't be applied. Check the original framework sigature is valid and try again. No patch applied.
/System/Library/PrivateFrameworks/CoreBrightness.framework.hack: invalid signature (code or signature have been modified)
In architecture: x86_64

Not working with macOS Mojave

I have a Mac Pro Mid 2012 12-Core. I have an Apple LED Cinema Display (27") and an AMD Radeon HD 7950 Mac Edition. Worked just fine in High Sierra and when I updated the Mac it stopped working and re-running the script proves to fail even after disabling SIP.

Revert using macOS combo Update

I ran the following command:

cd /tmp; curl -s -o NightPatch.zip https://codeload.github.com/pookjw/NightPatch/zip/master; unzip -o -qq NightPatch.zip; cd NightPatch-master; chmod +x NightPatch.sh; ./NightPatch.sh --fix

I receive the following error:

Downloading pbzx-master... (https://github.com/NiklasRosenstein/pbzx)
######################################################################## 100.0%
Compiling pbzx...
Downloading catalog...
######################################################################## 100.0%
Parsing catalog...
gunzip: /tmp/NightPatch-tmp/assets.sucatalog.gz: not in gzip format
cat: /tmp/NightPatch-tmp/assets.sucatalog: No such file or directory
Downloading update file...
curl: (3) malformed
Extracting... (1)
Could not open package for expansion: /tmp/update.pkg
./NightPatch.sh: line 231: cd: /tmp/NightPatch-tmp/1: No such file or directory
ERROR : Failed to extract pkg file. Re-downloading...
Downloading catalog...
######################################################################## 100.0%
Parsing catalog...
gunzip: /tmp/NightPatch-tmp/assets.sucatalog.gz: not in gzip format
cat: /tmp/NightPatch-tmp/assets.sucatalog: No such file or directory
Downloading update file...
curl: (3) malformed
Extracting... (1)
Could not open package for expansion: /tmp/update.pkg
./NightPatch.sh: line 231: cd: /tmp/NightPatch-tmp/1: No such file or directory
ERROR : Failed to extract pkg file. Re-downloading...
ERROR : Failed to unpack update file.

Why are new files created in Home folder?

Sierra 10.12.4 on Mid-2012 Mac Pro

After applying this patch, I see three new files in my Home folder....

_CodeSignature.bak
CoreBrightness.bak
NightPatchBuild

Why are these left here? Can't these be moved, deleted, or hidden?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.