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.
I think the newest Xcode is version is 9.4

Agree, but it seems that the Xcode Command Line Tools follow an independent updating channel, I did updated the Xcode Command Line Tools directly through Mojave's Software Update prefpane, it was automatically detected by Mojave beta 4, I did nothing to detect if there was an update of those Tools.
 
Last edited:
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'm running Xcode 10 beta 4+tools on HS 10.13.6 and it codesigns
I'm also running Xcode 10 beta 4+tools on Mojave db4 and it codesigns
Same with xcode 9.4

xcode-select --install should work (and report whether you need the latest command line tools or not)

Something's borked, try another full reinstall from the install package @ developer.apple.com with either 10beta or 9.4
 
I'm running Xcode 10 beta 4+tools on HS 10.13.6 and it codesigns
I'm also running Xcode 10 beta 4+tools on Mojave db4 and it codesigns
Same with xcode 9.4

xcode-select --install should work (and report whether you need the latest command line tools or not)

Something's borked, try another full reinstall from the install package @ developer.apple.com with either 10beta or 9.4

Agree, infact I have used the cbpatcher from HS 10.13.6 and it worked without any signature issues.
 
That patched CoreBrightness will NOT work correctly if you're running Beta 4 of Mojave. What I'd recommend is ensuring that the CoreBrightness on your system is stock, and then patching using my patch. It should modify the file properly.
Hi - Is there a way for Patch Updater to check the current macOS build version before presenting potential patches? I'm on dB4 and the Night Shift Patch is listed as an option even though it's incompatible. Just afraid of potentially shooting myself in the foot...
 
  • Like
Reactions: TimothyR734
Hi - Is there a way for Patch Updater to check the current macOS build version before presenting potential patches? I'm on dB4 and the Night Shift Patch is listed as an option even though it's incompatible. Just afraid of potentially shooting myself in the foot...
It's not incompatible... There was a Code Signing issue, which I think I have now fixed (unfortunately I wasn't able to replicate this issue myself, as it worked fine on all of my Mojave installs). Go ahead and install it, if it doesn't work, it saves a backup of the modified file which can be restored fairly easily.
 
I want to enable Night Shift on my MacBookAir4,2 (13" mid 2011) that has High Sierra on it's primary boot drive. This MBA is HS fully supported but non-metal. So i cannot enable night shift.

Found a script on GitHub that supposed to enable it. https://github.com/TMRJIJ/Night-Shift-on-Unsupported-Macs/blob/master/Enable NightShift.sh

Unfortunately, ran into issues.
I guess my question is: can I @dosdude1's patcher app (either HS or Mojave) to resolve? Or is not safe since this is a HS supported mac?

~Mahalo (Thanks)~

P.S. I posted this question as well on the High Sierra Thread forum
https://forums.macrumors.com/threads/night-shift-on-high-sierra-supported-mbair.2130050/
 
  • Like
Reactions: TimothyR734
It's not incompatible... There was a Code Signing issue, which I think I have now fixed (unfortunately I wasn't able to replicate this issue myself, as it worked fine on all of my Mojave installs). Go ahead and install it, if it doesn't work, it saves a backup of the modified file which can be restored fairly easily.
Yup. Patch Updater works fine on macpro 3,1 Mojave dB4. DarkMode and NightShift : excellent Dude.
 
  • Like
Reactions: TimothyR734
Have the same MBA here. At first, I used Mojave on an external drive for a while, then split the internal volume in two boot partitions and used one for HS, one for Mojave. In the meantime after figuring that Mojave is stable and up to my daily tasks, I even deleted the HS volume and merged free space back with the Mojave boot.
This can all be done with disk utility without losing data on the volumes - as long as you have enough free disk space in the first place...

Thanks for this info. I am now tempted to delete my HS volume and go with Mojave only on this MBA. When you deleted the HS volume, and since HS volume is my primary boot volume, what steps would you recommend? I do have a TM backup of both volumes.

~Mahalo~
 
I want to enable Night Shift on my MacBookAir4,2 (13" mid 2011) that has High Sierra on it's primary boot drive. This MBA is HS fully supported but non-metal. So i cannot enable night shift.

Found a script on GitHub that supposed to enable it. https://github.com/TMRJIJ/Night-Shift-on-Unsupported-Macs/blob/master/Enable NightShift.sh

Unfortunately, ran into issues.
I guess my question is: can I @dosdude1's patcher app (either HS or Mojave) to resolve? Or is not safe since this is a HS supported mac?

~Mahalo (Thanks)~

P.S. I posted this question as well on the High Sierra Thread forum
https://forums.macrumors.com/threads/night-shift-on-high-sierra-supported-mbair.2130050/
Yeah, you can use my new binary patcher to do so. Use it like this (be sure to back up your current CoreBrightness.framework first just in case):
Code:
sudo ./cbpatcher /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness
sudo chmod -R 755 /System/Library/PrivateFrameworks/CoreBrightness.framework
sudo chown -R 0:0 /System/Library/PrivateFrameworks/CoreBrightness.framework
sudo codesign -f -s - /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness
Then reboot, and it should now work.
 

Attachments

  • cbpatcher.zip
    1.4 KB · Views: 203
I've just released a new version of Mojave Patcher, which should fix the issue people were having where the installer would crash when attempting to update a current install of macOS. Now, you should be able to do an upgrade from a previous macOS version without issue.
 
You should have booted in single user mode, it seems NOT, from the USB Installer/Recovery HD you can't use tilde

Just to clarify why the ~ isn't working: In single user mode you are by definition logged in as root. The ~ points to your home folder which is /var/root/. That's why people are having trouble.
[doublepost=1532891032][/doublepost]
it saves a backup of the modified file which can be restored fairly easily.

To make the restore process even simpler for those who are less experienced with the command line, you could (fairly easily, I think) make the patch auto-generate a script at the root of the hard drive to move back the backup. Just like

#!/bin/bash
mount -uw /
mv /path/to/backup /System/Library/PrivateFrameworks/
... fix permissions ...
reboot

So that way, someone could just boot into single user mode and run bash fixEverythingForMe.bash rather than having to run the commands themself.

Just an idea so the inexperienced users don't have to re-install from scratch.
 
Just to clarify why the ~ isn't working: In single user mode you are by definition logged in as root. The ~ points to your home folder which is /var/root/. That's why people are having trouble.
[doublepost=1532891032][/doublepost]

To make the restore process even simpler for those who are less experienced with the command line, you could (fairly easily, I think) make the patch auto-generate a script at the root of the hard drive to move back the backup. Just like

#!/bin/bash
mount -uw /
mv /path/to/backup /System/Library/PrivateFrameworks/
... fix permissions ...
reboot

So that way, someone could just boot into single user mode and run bash fixEverythingForMe.bash rather than having to run the commands themself.

Just an idea so the inexperienced users don't have to re-install from scratch.

I can't be disagree with you, of course your simplified script is great, I thought that with "mv" something couldn't be overwritten, instead you're right, but I guess if you boot targeting a MacOS disk in single user mode the tilde ~ will point exactly to the user home folder, only if you boot from a Recovery HD or an USB Installer the ~ become generalized as you wrote.

EDIT!!!:

Nooo, my apologies you are totally right as always!!!
Even from single user mode targeting the MacOSLabel partition, the TILDE ~ will point ever to the bash root.

The only real advantage from single user mode is that you can avoid typing /Volumes/MacOSLabel/ in favor of /

In conclusion "tilde" will point to "User Home Folder" only from a Terminal logged-in user.

I'm totally agree with you.

Ironically I almost never use the tilde ~ , I always type from any Terminal the full path /Volumes/MacOSLabel/Users/Username/ , this time I wanted to simplify instead I did a mess!
 
Last edited:
MacBook pro 8,1 update patches and it broke.... I had to reinstall the OS again. @dosdude1 the fix you say you did a while ago is fixed, and I can apply them on my existing OS with no problem? About 2 hours ago I recieved the patcher update notification. I apply them and it broke the system... Is it safe now?
 
  • Like
Reactions: TimothyR734
Thanks for this info. I am now tempted to delete my HS volume and go with Mojave only on this MBA. When you deleted the HS volume, and since HS volume is my primary boot volume, what steps would you recommend? I do have a TM backup of both volumes.

~Mahalo~
It´s just my personal opinion, but I´d take a sufficiently big capacity external drive, install Mojave on it, patch it and boot from there in a first step. Clean install - always preferable if you can start fresh.
(Interlude: Delete unwanted language packs and processor binaries with Monolingual to save a couple of 100Megs).
Then, start "Migration Assistant" and direct it to take all your data and applications, network settings etc. from your previous working volume (I guess it was High Sierra until a short while ago). Let it complete (it will take some time).
Now you can partition / erase your internal disk (i.e. to one APFS volume).
Use "Carbon Copy Cloner" to clone your external Mojave volume (inkl. your migrated user profile) back to the internal volume and set boot drive default to it (by using system settings).
If you have already patched the ROM to accept APFS as boot drives, your´re done - if not, do either this or use an older Mojave Patcher (or the current HS patcher!) to apply the "APFS patch" from the post install section.
 
MacBook pro 8,1 update patches and it broke.... I had to reinstall the OS again. @dosdude1 the fix you say you did a while ago is fixed, and I can apply them on my existing OS with no problem? About 2 hours ago I recieved the patcher update notification. I apply them and it broke the system... Is it safe now?

To fix the After "Night Patch" issue into your system without reinstall, try this very useful solution upon suggestion by ASentientBot
Boot in single user mode from your Mojave (hold CMD+S before booting), after you landed to a root Terminal type in sequence:

fsck -fy

mount -uw /


mv /Users/YourUserNAME/CoreBrightness-backup/ /System/Library/PrivateFrameworks/

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

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

reboot
 
Last edited:
MacBook pro 8,1 update patches and it broke.... I had to reinstall the OS again. @dosdude1 the fix you say you did a while ago is fixed, and I can apply them on my existing OS with no problem? About 2 hours ago I recieved the patcher update notification. I apply them and it broke the system... Is it safe now?
Yes, the issue should now be fixed. Applying now should cause no issues.
 
Where can I get the patch?
You should receive the update automatically... see on patches updates
[doublepost=1532897759][/doublepost]
To fix the After "Night Patch" issue into your system without reinstall, try this very useful solution upon suggestion by ASentientBot
Boot in single user mode from your Mojave (hold CMD+S before booting), after you landed to a root Terminal type in sequence:

fsck -fy

mount -uw /


mv /Users/YourUserNAME/CoreBrightness-backup/ /System/Library/PrivateFrameworks/

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

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

reboot
Yes, thnx. I was having an issue and I couldn't reach the single user mode.. it was because I had firmware password active. So, I had to remove that first, but I only discovered that after I started to install the OS again. Lol
 
Yeah, you can use my new binary patcher to do so. Use it like this (be sure to back up your current CoreBrightness.framework first just in case):
Code:
sudo ./cbpatcher /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness
sudo chmod -R 755 /System/Library/PrivateFrameworks/CoreBrightness.framework
sudo chown -R 0:0 /System/Library/PrivateFrameworks/CoreBrightness.framework
sudo codesign -f -s - /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/CoreBrightness
Then reboot, and it should now work.

Mahalo Nui Loa @dosdude1.

I got a codesigning error on my first try (I have xCode version 9.3 (9E145). I restored my previous CoreBrightness.framework files and tried it again. Reran cbpatch and did not get the codesign error this time.
Now I got night shift enabled on my High Sierra volume.

In gratitude, my previous offer stands ~ if ever you are in Hawaii, give me a buzz and we can toast your skills to awesome Hawaiian beer(s) ~ best in the world. My treat!
[doublepost=1532900200][/doublepost]
It´s just my personal opinion, but I´d take a sufficiently big capacity external drive, install Mojave on it, patch it and boot from there in a first step. Clean install - always preferable if you can start fresh.
(Interlude: Delete unwanted language packs and processor binaries with Monolingual to save a couple of 100Megs).
Then, start "Migration Assistant" and direct it to take all your data and applications, network settings etc. from your previous working volume (I guess it was High Sierra until a short while ago). Let it complete (it will take some time).
Now you can partition / erase your internal disk (i.e. to one APFS volume).
Use "Carbon Copy Cloner" to clone your external Mojave volume (inkl. your migrated user profile) back to the internal volume and set boot drive default to it (by using system settings).
If you have already patched the ROM to accept APFS as boot drives, your´re done - if not, do either this or use an older Mojave Patcher (or the current HS patcher!) to apply the "APFS patch" from the post install section.

OK, thanks. I will try your recommended steps.
 
Last edited:
After update the "Night Patch" still hang on Apple boot logo... Then I tried to do the command to not reinstall the system, but system hangs too on Apple boot logo... What's the problem!? I have a MacBook pro 8,1..
By the way, after the apple boot logo bat bat reaches full, would I wait how many minutes? I reached the full bar and wait 5 minutes and doesn't boot.
 
  • Like
Reactions: TimothyR734
Thanks for this info. I am now tempted to delete my HS volume and go with Mojave only on this MBA. When you deleted the HS volume, and since HS volume is my primary boot volume, what steps would you recommend? I do have a TM backup of both volumes.

~Mahalo~

You already have all that you need: a TM backup of volumes, you can use it from Mojave's Utilities Migration Assistant, if you launch clicking continue it will bring you back to the Welcome Screen letting you choose the way of transfer, in your case from a time machine backup.
All explained better than me right here: https://support.apple.com/en-us/HT204350

Sincerely I will keep an High Sierra installation until the Mojave Golden Master release, but I have to admin that Mojave beta 4 seems enough stable.
[doublepost=1532904522][/doublepost]
After update the "Night Patch" still hang on Apple boot logo... Then I tried to do the command to not reinstall the system, but system hangs too on Apple boot logo... What's the problem!? I have a MacBook pro 8,1..
By the way, after the apple boot logo bat bat reaches full, would I wait how many minutes? I reached the full bar and wait 5 minutes and doesn't boot.

Maybe the "mv" didn't replaced recursively, anyway to avoid the reinstall, booting from your Mojave disk in single user mode (CMD+S) try these steps:

mount -uw /

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

cp -R /Users/YourUsername/CoreBrightness-backup/CoreBrightness.framework/Versions/A/ /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/

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

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


reboot

Give it a try.
 
Last edited:
You already have all that you need: a TM backup of volumes, you can use it from Mojave's Utilities Migration Assistant, if you launch clicking continue it will bring you back to the Welcome Screen letting you choose the way of transfer, in your case from a time machine backup.
All explained better than me right here: https://support.apple.com/en-us/HT204350

Sincerely I will keep an High Sierra installation until the Mojave Golden Master release, but I have to admin that Mojave beta 4 seems enough stable.
[doublepost=1532904522][/doublepost]

Maybe the "mv" didn't replaced recursively, anyway to avoid the reinstall, booting from your Mojave disk in single user mode (CMD+S) try these steps:

mount -uw /

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

cp -R /Users/YourUsername/CoreBrightness-backup/CoreBrightness.framework/Versions/A/ /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/A/

reboot

Give it a try.
It booted, but now system preferences gives me error on some things like energy management, iCloud, general, desktop... Etc... What's wrong? How can I recover?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.