Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
Looks like the latest patch broke my MBP5,3. Can't get past the loading screen.

Is there a way to uninstall the night shift patch and return to the previous build, or do I need to do another clean install?
 
  • Like
Reactions: TimothyR734
Looks like the latest patch broke my MBP5,3. Can't get past the loading screen.

Is there a way to uninstall the night shift patch and return to the previous build, or do I need to do another clean install?

There is, let me check a while on my MB

First of all boot in single user mode (hold CMD+S before Mojave booting) or from the USB Mojave Installer launch Terminal then do these:

to do the tilde ~ press ALT+5
then type into the terminal ONLY if you are in single user mode (because elsewhere instead may vary):

fsck -fy
mount -uw /
rm -R /System/Library/PrivateFrameworks/CoreBrightness.framework
cp -R
~/CoreBrightness-backup/ /System/Library/PrivateFrameworks/
reboot



instead of "~" you can write also /Users/YourUserName/
EDIT!!!:
you can't use ~ (TILDE) for this scope but only /Users/YourUserName/

Thanks to ASentientBot for pointed out!


It could be much more safe replacing just the only Corebrightness unix exec, but try the method I wrote.

edit:
Agree with Larsvonhier, but careful doing from USB Installer cause the root Volumes are a bit changed so maybe the tilde could not work requiring instead the full path /Volumes/yourMojave/Users/yourUsername/CoreBrightness-backup/
 
Last edited:
There is, let me check a while on my MB

First of all boot in single user mode (hold CMD+S before Mojave booting) or from the USB Mojave Installer launch Terminal then do these:

to do the tilde ~ press ALT+5
then type into the terminal ONLY if you are in single user mode (because elsewhere instead may vary):
- cd ~/CoreBrightness-backup
-
Or just boot from a working volume (i.e. an external High Sierra or even older OS) and copy back the contents in /CoreBrightness-backup into /System/Library/PrivateFrameworks/CoreBrightness

Yet another method (if you still have FireWire on two Macs and a cable): Start Mojave-MacBook into "target mode" (CMD-T or just T before booting / while startup chime). Connect with Firewire cable to working Mac. Replace above mentioned files through mounting the Mojave boot volume on working Mac.
 
Unfortunately I don't have the capability to do these methods. I think it's best to reinstall fresh.

No, you can, and consider that if you may fail, you can ever reinstall fresh, please try at least.
Booting your Mojave in single user mode would be better, after power on hold the keys: CMD+S until you see a verbose Terminal then type with calm what I wrote on previous post.
 
  • Like
Reactions: TimothyR734
No, you can, and consider that if you may fail, you can ever reinstall fresh, please try at least.
Booting your Mojave in single user mode would be better, after power on hold the keys: CMD+S until you see a verbose Terminal then type with calm what I wrote on previous post.

the fsck command ran successfully, but, cd ~/CoreBrightness-backup failed: 'var/root/CoreBrightness-backup: No such file or directory'
 
  • Like
Reactions: TimothyR734
the fsck command ran successfully, but, cd ~/CoreBrightness-backup failed: 'var/root/CoreBrightness-backup: No such file or directory'

Are you in Mojave single user mode? I guess you are booting from the USB Installer instead

WAIT, you should type
mount -uw /

Please check my previous post I have adjusted a little while ago.
 
  • Like
Reactions: TimothyR734
Are you in single user mode? I guess NO

WAIT, you should type
mount -uw /

Yep, I see your edits. I tried that, still no good.
 

Attachments

  • 2018-07-29 10.15.51.jpg
    2018-07-29 10.15.51.jpg
    3.9 MB · Views: 182
  • Like
Reactions: TimothyR734
Yep, I see your edits. I tried that, still no good.

You should have booted in single user mode, it seems NOT, from the USB Installer/Recovery HD you can't use tilde, anyway try typing these:

rm -R /Volumes/YourMojaveLabel/System/Library/PrivateFrameworks/CoreBrightness.framework

cp -R /Volumes/YourMojavelabel/Users/YourUserName/CoreBrightness-backup/ /Volumes/YourMojaveLabel/System/Library/PrivateFrameworks/

reboot
 
Last edited:
You instead should have booted in single user mode, it seems NOT, from the USB Installer/Recovery HD you can't use tilde, anyway try typing these:

rm -R /Volumes/YourMojaveLabel/System/Library/PrivateFrameworks/CoreBrightness.framework

cp -R /Volumes/YourMojavelabel/Users/YourUserName/CoreBrightness-backup/ /Volumes/YourMojaveLabel/System/Library/PrivateFrameworks/CoreBrightness.framework

reboot

I rebooted back into single user mode, and followed the earlier steps in the correct order of operations. I believe I was able to remove the offending CoreBrightness framework, and was able to successfully reboot. Thank you!

That said, there are some issues now—I seem to have lost the ability to adjust the monitors brightness, and a number of the settings in System Preferences are missing.



tX61guX
 

Attachments

  • Screen Shot 2018-07-29 at 10.31.52 AM.png
    Screen Shot 2018-07-29 at 10.31.52 AM.png
    336.2 KB · Views: 212
I rebooted back into single user mode, and followed the earlier steps in the correct order of operations. I believe I was able to remove the offending CoreBrightness framework, and was able to successfully reboot. Thank you!

That said, there are some issues now—I seem to have lost the ability to adjust the monitors brightness, and a number of the settings in System Preferences are missing.



tX61guX

You are right, go back into single user mode

I have re-adjusted the script, because I cannot test it I'm going to intuition.

Here is the definitive script (repeat them again even if you did before), boot from your Mojave in single user mode:

fsck -fy

mount -uw /

rm -R /System/Library/PrivateFrameworks/CoreBrightness.framework

cp -R ~/CoreBrightness-backup/ /System/Library/PrivateFrameworks/


chown -R root:wheel /System/Library/PrivateFrameworks/CoreBrightness.framework

chmod -R 755 /System/Library/PrivateFrameworks/CoreBrightness.framework

reboot


This time it will 100% work.

After you will be sure it is fixed, try this: Already Patched CoreBrightness through dosdude1 cbpatcher

EDIT!!!:
Instead of ~ type /Users/YourUserNAME/
 
Last edited:
@dosdude1
Can you help me?

Your NightShift patch works very well with Mojave, thanks.
So far, I patched myself and I want to understand.

HS still in line:
0001d490: 0900 0000 0d00 0000 0600 0000 0500 0000
0001d4a0: 0600 0000 0800 0000

Mojave now in line:
00044260: 0900 0000 0100 0000 0d00 0000 0600 0000
00044270: 0500 0000 0600 0000 0800 0000

and new is iMacPro1,1

Everything clear so far.

Unfortunately, codesign does not work anymore.

sudo codesign -f -s - /Users/peet/Desktop/CoreBrightness.framework/Versions/Current/CoreBrightness
Password: ....
/Users/peet/Desktop/CoreBrightness.framework/Versions/Current/CoreBrightness: replacing existing signature
codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH
/Users/peet/Desktop/CoreBrightness.framework/Versions/Current/CoreBrightness: the codesign_allocate helper tool cannot be found or used

Everything worked with the old Xcode versions. I did not have to update, right?

Can you help me?
 
@dosdude1
Can you help me?

Your NightShift patch works very well with Mojave, thanks.
So far, I patched myself and I want to understand.

HS still in line:
0001d490: 0900 0000 0d00 0000 0600 0000 0500 0000
0001d4a0: 0600 0000 0800 0000

Mojave now in line:
00044260: 0900 0000 0100 0000 0d00 0000 0600 0000
00044270: 0500 0000 0600 0000 0800 0000

and new is iMacPro1,1

Everything clear so far.

Unfortunately, codesign does not work anymore.

sudo codesign -f -s - /Users/peet/Desktop/CoreBrightness.framework/Versions/Current/CoreBrightness
Password: ....
/Users/peet/Desktop/CoreBrightness.framework/Versions/Current/CoreBrightness: replacing existing signature
codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH
/Users/peet/Desktop/CoreBrightness.framework/Versions/Current/CoreBrightness: the codesign_allocate helper tool cannot be found or used

Everything worked with the old Xcode versions. I did not have to update, right?

Can you help me?

I guess that's the focus point, you should need to update the Xcode Command Line Developer Tools from the Mojave's System Preferences "Software Update".
 
It looks to be a code signing issue causing a problem with the Night Shift Patch. Those of you who have machines that stopped booting, just re-install the OS, or replace the patched CoreBrightness framework with the one backed up in your /Users/yourusername/CoreBrightness-backup directory.
 
thanks, but that's not the problem.
Your patch works very well.
If I patch CoreBrightness.framework myself, then I can not sign it.
Error with latest xcode and codesign.

new command in terminal for codesign ???
 
thanks, but that's not the problem.
Your patch works very well.
If I patch CoreBrightness.framework myself, then I can not sign it.
Error with latest xcode and codesign.

new command in terminal for codesign ???
xcode and/or the appropriate command line tools aren't installed correctly.
check what xcode-select -p and -v report.
[doublepost=1532882623][/doublepost]
you might need to clean your dvd but I did notice something that DVD player in the utilities folder is missing in macOS Mojave maybe that could be the issue
I have DVD Player 6.0 running fine under Mojave dB4.
 
Peets-Mac-Pro-3-1:~ peet$ xcode-select -p

/Applications/Xcode.app/Contents/Developer

Peets-Mac-Pro-3-1:~ peet$ xcode-select -v

xcode-select version 2347.


DVD player now in Mojave can be found under / System / Library / CoreServices / Applications
 
  • Like
Reactions: TimothyR734
Peets-Mac-Pro-3-1:~ peet$ xcode-select -p

/Applications/Xcode.app/Contents/Developer

Peets-Mac-Pro-3-1:~ peet$ xcode-select -v

xcode-select version 2347.


DVD player now in Mojave can be found under / System / Library / CoreServices / Applications
Is codesign_allocate installed in /usr/bin ? If not try re-installing xcode or doing xcode-select --install.
Then again I'm not sure what environment you're trying to do this in (version of macOS, version of xcode , sip status etc.)
 
  • Like
Reactions: TimothyR734
Is codesign_allocate installed in /usr/bin ? YES

Unfortunately, xcode-select --install did not work, did install, still getting error with "sudo codesign -f -s - /Users/peet/Desktop/CoreBrightness.framework/Versions/A/CoreBrightness"

I tried Sierra, HS and Mojave with Terminal
xcode version is version 9.2 (9C40b)
SIP is off (csrutil disable)
codesign worked before the xcode update
 
Is codesign_allocate installed in /usr/bin ? YES

Unfortunately, xcode-select --install did not work, did install, still getting error with "sudo codesign -f -s - /Users/peet/Desktop/CoreBrightness.framework/Versions/A/CoreBrightness"

I tried Sierra, HS and Mojave with Terminal
xcode version is version 9.2 (9C40b)
SIP is off (csrutil disable)
codesign worked before the xcode update

Totally agree, that was probably caused by the updated Xcode Beta Command Line Tools.
 
Is codesign_allocate installed in /usr/bin ? YES

Unfortunately, xcode-select --install did not work, did install, still getting error with "sudo codesign -f -s - /Users/peet/Desktop/CoreBrightness.framework/Versions/A/CoreBrightness"

I tried Sierra, HS and Mojave with Terminal
xcode version is version 9.2 (9C40b)
SIP is off (csrutil disable)
codesign worked before the xcode update
I think the newest Xcode is version is 9.4
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.