Code Monkey home page Code Monkey logo

Comments (44)

0xCUB3 avatar 0xCUB3 commented on June 6, 2024 2

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.

matxpa avatar matxpa commented on June 6, 2024 1

" 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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

good idea! I will try to see if there's a way to implement this

from about-this-hack.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

in the application support folder, where specifically can the version of the app be found?

from about-this-hack.

TonyC5 avatar TonyC5 commented on June 6, 2024

I'm not sure of the .app file structure. If I perform "GetInfo" on the file (in Finder), I see the following:

Screenshot 2023-05-27 at 3 04 57 PM

from about-this-hack.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

Thank you. It must be somewhere within the Info.plist of the app.

from about-this-hack.

TonyC5 avatar TonyC5 commented on June 6, 2024

Good guess. I looked in the info.plist: It is "Bundle version string (short)"

from about-this-hack.

TonyC5 avatar TonyC5 commented on June 6, 2024

Thank you!

from about-this-hack.

matxpa avatar matxpa commented on June 6, 2024

Hi
You could see Logs in ($HOME) "~/Library/Logs/Dortania/"

and in OCLP App config.plist

Capture d’écran 2023-06-14 à 12 14 49

Regards

from about-this-hack.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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

@matxpa @TonyC5

from about-this-hack.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

That makes no sense. You need to learn OCLP.

from about-this-hack.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

You need to learn how hackintosh users use OCLP. This discussion is pointless. Good luck.

from about-this-hack.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

MDNich avatar MDNich commented on June 6, 2024

from about-this-hack.

TonyC5 avatar TonyC5 commented on June 6, 2024

@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.

matxpa avatar matxpa commented on June 6, 2024

@TonyC5 a little (humility) goes a long way

Capture d’écran 2023-09-04 à 15 10 47

...
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

Capture d’écran 2023-09-04 à 16 05 34

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

@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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

matxpa avatar matxpa commented on June 6, 2024

'/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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

MDNich avatar MDNich commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

matxpa avatar matxpa commented on June 6, 2024

@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.

MDNich avatar MDNich commented on June 6, 2024

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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

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.

TonyC5 avatar TonyC5 commented on June 6, 2024

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.

About This Hack Beta
Screenshot 2023-09-05 at 1 28 11 AM

About This Hack 0.9.1
Screenshot 2023-09-05 at 1 32 46 AM

from about-this-hack.

matxpa avatar matxpa commented on June 6, 2024

@0xCUB3

Your last modifications, last downloaded "app"

Capture d’écran 2023-09-06 à 14 16 49

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.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

@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.

TonyC5 avatar TonyC5 commented on June 6, 2024

@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.

matxpa avatar matxpa commented on June 6, 2024

@0xCUB3 @TonyC5

And like this

Capture d’écran 2023-09-06 à 22 54 45

with ToolTip on BootLoader

Regards

from about-this-hack.

TonyC5 avatar TonyC5 commented on June 6, 2024

Serial Number? Not thrilled with relegating all OCLP info to a tool tip.

from about-this-hack.

matxpa avatar matxpa commented on June 6, 2024

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.

matxpa avatar matxpa commented on June 6, 2024

Hi @0xCUB3

And now the same (Sonoma 14.0 Dev beta 7) with Clover

Capture d’écran 2023-09-07 à 16 36 44

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.

matxpa avatar matxpa commented on June 6, 2024

Hi @0xCUB3

A NOT OCLP patched OS

Sans titre

you can't see OCLP detailed info with Bootloader (ToolTip)

Regards

from about-this-hack.

0xCUB3 avatar 0xCUB3 commented on June 6, 2024

Added in the latest commit

from about-this-hack.

Related Issues (20)

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.