Comments (44)
thank you! ❤️ I will try to add this into the next major release; the next minor release (0.7.2) will primarily consist of bug fixes!
from about-this-hack.
" non-NVRAM approach" may be, ask OCLP Team to do that
"/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist " exists if your Hack had been patched and with the use of bootloader OC OR CLOVER bootloader regardless of the content of NVRAM.
The aim is to show if your Hack is patched or not and with detailed OCLP info.
from about-this-hack.
good idea! I will try to see if there's a way to implement this
from about-this-hack.
if anyone has a mac with the opencore legacy patcher and is willing to help me get it into the code, please let me know! I can't add this feature since I don't own a mac running the patcher right now.
from about-this-hack.
I have OCLP installed. There are two ways that I know to "extract" the current OCLP patch version:
- In '/Library/Application Support/Dortania' there is the application 'OpenCore - Patcher.app'. The version of this app is the version of the applied OCLP patches
- In EFI/OC/config.plist, there is the property NVRAM > Add > 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 > OCLP-Version. This property (a String) is supposed to be the version of OCLP that generated the EFI. It is less reliable (my opinion) than the version of OpenCore - Patcher.app. For those using OCLP on a hackintosh, I think that this property may not exist.
from about-this-hack.
in the application support folder, where specifically can the version of the app be found?
from about-this-hack.
I'm not sure of the .app file structure. If I perform "GetInfo" on the file (in Finder), I see the following:
from about-this-hack.
Thank you. It must be somewhere within the Info.plist of the app.
from about-this-hack.
Good guess. I looked in the info.plist: It is "Bundle version string (short)"
from about-this-hack.
Thank you!
from about-this-hack.
Hi
You could see Logs in ($HOME) "~/Library/Logs/Dortania/"
and in OCLP App config.plist
Regards
from about-this-hack.
I'm curious... since it's NVRAM data, it should be possible to get the value from terminal, right?
Try this command: nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
from about-this-hack.
The value OCLP-Version will only exist in NVRAM (if it does) because it is in the OC config.plist as I mentioned here. When OCLP is used to generate the OC EFI for a real Mac (OCLP is not intended for hacks), it will include OCLP-Version in the config.plist. Hackintosh users may not include OCLP-Version in their OC config.plist, so in my opinion, using NVRAM is an unreliable method for determining whether a hack has been root-patched with OCLP. As far as I know, the only "sure" way to determine whether OCLP is used to apply root patches on both real Macs and Hacks is to look for the OpenCore-Patcher.app in '/Library/Application Support/Dortania' and if it is present, get the version of OpenCore-Patcher.app.
from about-this-hack.
Why wouldn't it be reliable? If the NVRAM arg doesn't exist, we will not show the OCLP version at all. This is what we do for the OpenCore version as well.
Could you check if this command works for you, please?
from about-this-hack.
We're talking passed each other. It's not reliable for Hacks that don't included OCLP-Version in their OC config.plist. I'm not sure how else to state my opinion - you need to get detect OCLP root patching by looking for the app and then getting the version of the app. If you want to take the easy route and use NVRAM, that's fine, but not reliable for hackintoshes.
from about-this-hack.
We're talking passed each other. It's not reliable for Hacks that don't included OCLP-Version in their OC config.plist.
That's what I'm saying. Hackintoshes don't have this value because they don't use OCLP. In this case, I will not add the OCLP version to the output.
from about-this-hack.
Hacks can use OCLP to apply root patches. It is very possible to use OCLP without having OCLP-Version in NVRAM.
from about-this-hack.
Hacks can use OCLP to apply root patches.
that's fine. If they are just applying root patches, they aren't really using OCLP.
from about-this-hack.
That makes no sense. You need to learn OCLP.
from about-this-hack.
I've used OCLP on my 2011 MacBook Pro and my 2015 MacBook Pro. Using an EFI generated by OCLP is using OCLP. Just applying root patches is not, as you are still using a hackintosh EFI that you created, just with a few extra patches.
from about-this-hack.
You need to learn how hackintosh users use OCLP. This discussion is pointless. Good luck.
from about-this-hack.
You need to learn how hackintosh users use OCLP. This discussion is pointless. Good luck.
As I said previously, it is not the same. If you believe otherwise, feel free to make a pull request with what you want it to look like and I will consider adding it. However, this is my app, so I am allowed to have liberty with how I structure things.
from about-this-hack.
from about-this-hack.
@MDNich Thanks for adding humor to this post. All views expressed were professional. The app-owner received feedback and made a call. That's how this works.
from about-this-hack.
@TonyC5 a little (humility) goes a long way
...
wx_gui/gui_sys_patch_display.py:199: patch_text = f"{self.constants.computer.oclp_sys_version}, {date}"
...
wx_gui/gui_sys_patch_display.py:201: patch_label = wx.StaticText(frame, label="Root Volume last patched:", pos=(-1, patch_label.GetPosition().y + 25))
...
wx_gui/gui_sys_patch_display.py:205: patch_label = wx.StaticText(frame, label=patch_text, pos=(available_label.GetPosition().x - 10, patch_label.GetPosition().y + 20))
And the "Root Volume last patched" info come from "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
See that "plist" content below
You could see that the info shown under "Root Volume last patched" and data in the "plist" are identical.
The lack of URL content 'coz its an OCLP local build (sonoma-dev branch) otherwise with a github OCLP repo downloaded release (OpenCore-Patcher-0.6.9-c9a14e2-20230801.app) it could be as shown below with an URL and a commit value
Commit Information:
Branch: refs/heads/sonoma-development
Date: 2023-08-01T13:24:41-06:00
URL: dortania/OpenCore-Legacy-Patcher@c9a14e2
With an OCLP local build ( no branch, no URL, only build datetime) as shown below (info from Settings/App on OCLP Main Menu)
Commit Information:
Branch: Built from source
Date: 2023-08-31 14:32:35
URL: N/A
The solution is to extract needed info from "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist" (if exists)
...
grep -A1 "OpenCore Legacy Patcher" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.?OCLP: ?g' -e 's??, ?g'
grep -A1 "Time Patched" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.?Patched: ?g' -e 's?@?at?g' -e 's???g'
grep -A1 "Commit URL" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.??g' -e 's???g' | awk -F 'commit/' '{print "Commit: " $NF}' | cut -c 1-15
OCLP: v0.6.9,
Patched: August 31, 2023 at 11:35:51
Commit:
Regards
from about-this-hack.
@matxpa Yes - you are very humble indeed. Thank you for providing another example showing that NVRAM is not the way to solve this. Given your advice, I'm certain you wouldn't be suggesting that there is only one non-NVRAM approach. I'm fine with any approach that does not rely on NVRAM and supports the hackintosh users.
from about-this-hack.
We're in violent agreement. Your approach does not rely on NVRAM and neither does mine. Either is fine.
By the way - re-read this thread to see that there is still confusion about what it means for a hackintosh to be patched by OCLP. I agree that the aim is to show if your hack is patched or not with the detailed OCLP info (the reason I created this request and thus the title of the request). There was a comment earlier (to which I objected) which stated that users who apply post-install patches with OCLP without using OCLP to generate the OC EFI are not really using OCLP.
One more thing - we are both suggesting the use of a plist: You are suggesting the use of /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist. I am suggesting the use of '/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/Info.plist'
Both plists include the version of OCLP used to apply the post-install root patches and both plists exist on hacks and real Macs.
from about-this-hack.
'/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/Info.plist' is the one of your actual, current OCLP release and may be not the one you've used to patch your Mac or Hack.
Each time you patch a macOS after release upgrade on (a Non Supported MAC or NEVER supported HACK) with OCLP a new history content of your action in /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist is generated. This file is the only one which can and may contain details of the LAST OCLP PATCH action.
For exemple you've patched your system 15 days ago, today you launch OCLP and a new release is available, OCLP ask you if you want to install this new release and you do it. Your current OCLP release ( /Library/Application Support/Dortania/OpenCore-Patcher.app ) is not the one you've used to patch your Mac/Hack.
The only real info of the LAST OCLP PATCH are available in /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist.
from about-this-hack.
That's good to know - sounds like a technicality, but who am I to argue? Using /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist is fine with me and better than the NVRAM approach suggested earlier in this thread.
from about-this-hack.
Here's a question - does the PLIST approach work for EVERYONE who has OCLP? In a way that the NVRAM apparently didn't ?
from about-this-hack.
Given a choice between OCLP-Version in NVRAM and the plist, the plist is the only choice that works for everyone.
from about-this-hack.
@MDNich Hi
If you own a Mac (patched Mac or Hack) try to see if /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist exists.
If you've used OCLP to patch a Non Supported (M/H)ac(k) this plist exists, created or content replaced with new patch action
from about-this-hack.
Unfortunately I do not - hence why I stayed out of this discussion until now
(That is to say I have a Mac but not patched or hack)
from about-this-hack.
Alright my angry little elves (@TonyC5 and @matxpa (although you are not as angry 😄)). Your wish has been granted. Please test this latest build to make sure everything is functioning properly: https://drive.google.com/file/d/1Yq_M2M6xOI0SOXwh1JlagsrzdC6XGxk0/view?usp=sharing
from about-this-hack.
Thanks. I downloaded the new version on my HackBookPro6,2 (Dell Latitude E6410) running Ventura 13.5.1 and patched with OCLP 0.6.8.
from about-this-hack.
Your last modifications, last downloaded "app"
HCBootloader.swift
...
if run("grep -A1 "OpenCore Legacy Patcher" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.?OCLP: ?g' -e 's??, ?g'").contains("No") ...
result is : ", , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , "
Try this 5 commands on a term window (if you have a patched Mac or Hack), otherwise no result
OCLPRelease=$(grep -A1 "OpenCore Legacy Patcher" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.?Patcher OCLP ?' -e 's?</string>??')
OCLPDateTime=$(grep -A1 "Time Patched" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.??' -e 's?</string>??' -e 's/@ /(/')
OCLPCommit=$(grep -A1 "Commit URL" /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist | tail -1 | sed -e 's?.*??' -e 's?</string>??' | awk -F'/' '{print substr($NF,1,7)}')
OCLPDisplayValue=$(echo "${OCLPRelease}(${OCLPCommit}) ${OCLPDateTime})")
echo "${OCLPDisplayValue}"
and you'll see (displayed values come from /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist on my Laptop)
Patcher OCLP v0.6.9(c9a14e2) September 01, 2023 (17:18:27)
What you'd like to see
Regards
from about-this-hack.
@matxpa I don't have a patched Mac or hackintosh, so unfortunately I can't really be of help there. I wonder why it's doing that...
from about-this-hack.
@0xCUB3 and @matxpa - you have clearly demonstrated yourselves to be the experts, so I'm going to watch the progress. Forgive what may be a remedial suggestion, but couldn't @0xCUB3 Test without patching simply by placing @matxpa 's plist in /System/Library/CoreServices? @matxpa - maybe you can provide @0xCUB3 with your plist?
from about-this-hack.
And like this
with ToolTip on BootLoader
Regards
from about-this-hack.
Serial Number? Not thrilled with relegating all OCLP info to a tool tip.
from about-this-hack.
Hi @deeveedee
Serial Number? May be I forgot to hide it. Coz you wanna steal it ?
Not thrilled with relegating all OCLP info to a tool tip : we're waiting your way to do that.
Regards
from about-this-hack.
Hi @0xCUB3
And now the same (Sonoma 14.0 Dev beta 7) with Clover
Next step will be with a fake NOT patched OS (ie. file /System/Library/CoreServices/OpenCore-Legacy-Patcher.plist renamed /System/Library/CoreServices/OpenCore-Legacy-Patcher.plast which one doesn't exist)
ls -l /System/Library/CoreServices/OpenCore-Legacy-Patcher.plast
ls: /System/Library/CoreServices/OpenCore-Legacy-Patcher.plast: No such file or directory
So we wouldn't see OCLP detailed info with Bootloader (ToolTip)
Regards
from about-this-hack.
Hi @0xCUB3
A NOT OCLP patched OS
you can't see OCLP detailed info with Bootloader (ToolTip)
Regards
from about-this-hack.
Added in the latest commit
from about-this-hack.
Related Issues (20)
- Display Bug HOT 31
- Storage Config > 2TB bug HOT 34
- App crashes immediately after launch HOT 5
- Immediate crash after opening HOT 1
- App update function not working HOT 1
- App crashes when clicking on "Displays" HOT 2
- No displays info - v1.0.0 HOT 24
- Display Preferences button does nothing HOT 3
- "Bootloader" section says "Apple UEFI" if Clover is used as a Bootloader HOT 4
- "Software Update..." not properly redirecting HOT 12
- Crashing when clicking on "Displays" HOT 21
- I think the inbuilt-updater hasn't been fixed yet? HOT 1
- When I click on Hackintosh Guide it opens Apple Help Home page HOT 5
- GPU and Displays do not appear HOT 6
- Reporting a model name issue HOT 2
- Cannot install on Windows HOT 1
- There is no image on Storage tab HOT 6
- The latest version is 404:NotFound. You are currently running 1.2.0. HOT 3
- ATH v1.1.1 Update HOT 4
- Code signature changed? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from about-this-hack.