Jump to content

About This Hack app


Slice
84 posts in this topic

Recommended Posts

Hi

Is that you need ?

 

On a Laptop Ivy 12GB (4 GB soldered + 8 GB)

 

(Terminal) system_profiler SPMemoryDataType

 

Memory:

 

    Memory Slots:

 

      ECC: Disabled

      Upgradeable Memory: No

 

        BANK 0/DIMM0:

 

          Size: 4 GB

          Type: DDR3

          Speed: 1600 MHz

          Status: OK

          Manufacturer: Micron

          Part Number: 8JTF51264HZ-1G6D 1

          Serial Number: -

 

        BANK 0/DIMM2:

 

          Size: 8 GB

          Type: DDR3

          Speed: 1600 MHz

          Status: OK

          Manufacturer: G Skill Intl

          Part Number: F3-1600C11-8GRSL

          Serial Number: -

 

Regards

Link to comment
Share on other sites

@Slice @matxpa

 

I'm sure that both of you can find the way to get the RAM manufacturer from System Profiler as you get other data but the manufacturer can be as branch (string) or as number (hex code), and the code by itself says nothing if it isn't converted to the branch. Maybe this piece of info is less useful and more complicated to implement. In my opinion, both forks of ATH are very good without it.

Link to comment
Share on other sites

@Slice

I see. Clover has this feature but OpenCore doesn't. I've tried Clover 5155 on Ventura (basic settings, just for boot and see About This Hack) and memory manufacturer is well displayed, Corsair in my case, as Clover memvendors.h includes

{ 2, 0x9e, "Corsair" }

and the code in System Profiler is 0x029E.

Thanks for the info.

 

Link to comment
Share on other sites

@Slice

Hi

 

Is it something like this you want ?

 

image.png.b672ac62a470bfec5b7dc66a0e9d96db.png

 

That content can't be added to Ram Text Field Cell, imagine a MAcPro 2019 with 6 RAM slots, it would be better to create a specific RAM tab

So here (snapshot) it's easy

 

Your version is a mix of last 8-bit-cat ATH and last 0xCUB3 ATH isn't it ?

 

You need in your repo

 1) a new component called ToolTips.swift (with 1 code line, at this time)

 2) a new function in ViewController.swift (func setToolTips())

 3) a new function in YOUR HardwareCollector.swift (static func getMemDesc()

 

1) ToolTips.swif

import Foundation

let ramtoolTip = HCRAM.getMemDesc()

 

2) To add to ViewController.swift

    func setToolTips(){

        ram.toolTip = ramtoolTip

    }

Verify the name of the Text Field Cell (Memory info not the column header)

 

 3) Add that new function in  HardwareCollector.swift (static func getMemDesc() ) just after (or where you want) static func getRam()

...

    static var thesysmemfile = "~/.ath/sysmem.txt"  // put where you want in HardwareCollector.swift or don't use it and replace " + thesysmemfile + " with ~/.ath/sysmem.txt

...

    static func getMemDesc() -> String {

        var memInfoFormatted = ""

        let memoryDataTmp = run("echo $(egrep \"BANK |Manufacturer:|Part Number:\" " + thesysmemfile + " | sed -e 's/$/ /g' -e 's/^. *//g' -e 's/:/: /g' -e 's/:  /: /g' | tr -d '\n' | sed 's/BANK /\\nBANK /g' )")

        let memoryDataArray = memoryDataTmp.components(separatedBy: "BANK ").filter({ $0 != ""})

        for index in 0..<memoryDataArray.count {

            memInfoFormatted += ("BANK " + "\(memoryDataArray[index])" + run("echo \"\n\""))

        }

        return "\(memInfoFormatted)"

    }

 

With Term you'd better to test the egrep commande (removing protectors backslashes)

ie. echo $(egrep "BANK |Manufacturer:|Part Number:" ~/.ath/sysmem.txt | sed -e 's/$/ /g' -e 's/^. *//g' -e 's/:/: /g' -e 's/:  /: /g' | tr -d '\n' | sed 's/BANK /\\nBANK /g')

and the result on my Laptop (old Laptop)

 

 

BANK 0/DIMM0: Manufacturer: Micron Part Number: 8JTF51264HZ-1G6D 1 

BANK 0/DIMM2: Manufacturer: G Skill Intl Part Number: F3-1600C11-8GRSL

 

And, if you would, you could ameliorate that (lol)

 

Regards

 

Edited by matxpa
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

25 minutes ago, miliuco said:

@Slice

I guess that Empty Empty occurs when the slot is empty, no memory module, then first Empty is the Manufacturer and second Empty is Part Number.

But I have 4 slots, 2 filled and 2 empty, and I see no Empty word.

But Alpha22 does.

  • Like 1
Link to comment
Share on other sites

And if you want or need more info

 

echo $(egrep "BANK |Size:|Type:|Speed:|Manufacturer:|Part Number:" ~/.ath/sysmem.txt \

| sed -e 's/$/ /g' -e 's/^. *//g' -e 's/:/: /g' -e 's/:  /: /g'  -e 's/Size://g' -e 's/Type://g' -e 's/Speed://g' -e 's/\Manufacturer://g' -e 's/Part Number:/Part:/g' \

| tr -d '\n' | sed 's/BANK /\\nBANK /g') | sed '1d'  

BANK 0/DIMM0: 4 GB DDR3 1600 MHz Micron Part: 8JTF51264HZ-1G6D 1 

BANK 0/DIMM2: 8 GB DDR3 1600 MHz G Skill Intl Part: F3-1600C11-8GRSL

 

Capturedecran2023-09-15a22_04_01.png.fdd6778e2886bccc9d1abbb583910578.png

Edited by matxpa
  • Like 1
Link to comment
Share on other sites

And if you want to simplify

 

Capturedecran2023-09-15a22_24_26.png.55ccc9a7f3cf5396c4708fec8e1593a4.png

 

And getMemDesc code reduced 

 

    static var thesysmemfile = "~/.ath/sysmem.txt"

    static func getMemDesc() -> String {

        return run("echo \"$(egrep \"BANK |Size:|Type:|Speed:|Manufacturer:|Part Number:\" " + thesysmemfile + ")\"")

    }

 

Regards

  • Like 1
Link to comment
Share on other sites

On 9/13/2023 at 9:55 PM, Slice said:

This is not my project. 

Origin is https://github.com/0xCUB3/About-This-Hack which came from https://github.com/8itCat/About-This-Hack

But when I took new one I encounter a problem with signing. I have no paid Apple developer account so I prohibited from compile the application. It is not working with crash

About This Hack.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)),

bla-bla-bla...

So I found old fork and improve it. It works.

I also add my new features "Acceleration". Memory manufacture (first one) and Serial always hidden.

Also link to our forum instead of Dortania.

image.png

 

It is located in https://github.com/CloverHackyColor/About-This-Hack

There is also release version.

On my hack the serial still shows.

Link to comment
Share on other sites

2 hours ago, miliuco said:

Mine shows XXXXXX.

I really hope no one takes this the wrong way, but this hybrid ATH app of the original is a bit too busy with information for me from the examples I have seen.

Some examples showing wrong or incomplete Memory modules installed. I don't know, but my thinking is it works better with a Clover install oppose to an OC install.

 

The latest released version of the original ATH has a bug which existed in about 2 versions back which I submitted a bug report.

Although it displays the correct version, it omits the Build Number, I submitted another bug report and was told they recognized there is a bug and it

Spoiler

Screenshot2023-09-13at17_05_10.png.57f9746543969cbe2c65b16c2c34761d.pngScreenshot2023-09-14at16_58_28.png.35ae37bd4fa353328c73e25e6dc04f49.png

will be addressed.

The version that works perfectly for me is 0.8.1, I have attached the two versions 0.8.1 and the latest version 0.9.1 showing the difference.

Edited by eSaF
  • Like 2
Link to comment
Share on other sites

2 hours ago, calmesal said:

On my hack the serial still shows.

 

1 hour ago, eSaF said:

I really hope no one takes this the wrong way, but this hybrid ATH app of the original is a bit too busy with information for me from the examples I have seen.

Some examples shows wrong or incomplete Memory modules installed. I don't know, but my thinking is it works better with a Clover install oppose to an OC install.

 

The latest released version of the original ATH has a bug which existed in about 2 versions back which I submitted a bug report.

Although it displays the correct version, it omits the Build Number, I submitted another bug report and was told they recognized there is a bug and it

  Hide contents

Screenshot2023-09-13at17_05_10.png.57f9746543969cbe2c65b16c2c34761d.pngScreenshot2023-09-14at16_58_28.png.35ae37bd4fa353328c73e25e6dc04f49.png

will be addressed.

The version that works perfectly for me is 0.8.1, I have attached the two versions 0.8.1 and the latest version 0.9.1 showing the difference.

These are another versions.

1 hour ago, MacNB said:

 

Which is correct. You click on the Serial number to hide it 😏

This is another version.

Anybody really want to show own serial number? For a what purpose?

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, eSaF said:

I really hope no one takes this the wrong way, but this hybrid ATH app of the original is a bit too busy with information for me from the examples I have seen.

Some examples showing wrong or incomplete Memory modules installed. I don't know, but my thinking is it works better with a Clover install oppose to an OC install.

 

The latest released version of the original ATH has a bug which existed in about 2 versions back which I submitted a bug report.

Although it displays the correct version, it omits the Build Number, I submitted another bug report and was told they recognized there is a bug and it

  Hide contents

Screenshot2023-09-13at17_05_10.png.57f9746543969cbe2c65b16c2c34761d.pngScreenshot2023-09-14at16_58_28.png.35ae37bd4fa353328c73e25e6dc04f49.png

will be addressed.

The version that works perfectly for me is 0.8.1, I have attached the two versions 0.8.1 and the latest version 0.9.1 showing the difference.

 

Commits since 0.9.1 resolve that (missing compiled version #41)

 

 Capturedecran2023-09-16a15_22_34.png.0ee04a17ea53b07a7c4c9df6a52d0866.png

 

  • Like 1
Link to comment
Share on other sites

@Slice

 

Your current ATH: I guess storage data is not right. This is the code:

        return ["""
\(name)
\(size)(\(available)Available)
""",String(percent)]
    }

And the window:

storage.png.d7426164f3d1e330ceb34fc43799a497.png

 

Prefixing percent with 1-:

        return ["""
\(name)
\(size)(\(available)Available)
""",String(1-percent)]
    }

And the window:

storage1-.png.781f0c920bcf9924fc94012d9fc82808.png

 

Do you think so? Thanks.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
On 9/15/2023 at 1:58 PM, Slice said:

Thanks for the test!

Anyway it is OpenCore fault. Do the same with Clover and see the difference. Clover is older bootloader and better tuned for most cases.

The origin of the bug comes from Apple. Old macintoshes have several bugs in System Profiler including memory Manufacture, Serial, PCI devices and ROM properties.

We are observing how Apple programmers excluded these fields instead of cure them. I decided to not follow Apple but show real values. Let Apple envy us.

 

OK, Clover can't detect DDR5 yet. As well as OpenCore.
About manufacture there is good second field while the program took first one. I need some algo to re-detect memory.

Spoiler

2566-09-2706_05_21.png.8aca6652c1598e7478312f0d067f27c6.png

I can't open your version, sir.

Link to comment
Share on other sites

48 minutes ago, miliuco said:

@naiclub

Please translate the text in the dialog window to know what it means, me and others are able to run fine this app.

It warns that it is leaving suddenly.
Click Relaunch to launch the application again. Click Report to view more detailed information and send the report to Apple.
1Newly open
2 inform
3 not interested

 

This one can be opened. https://github.com/0xCUB3/About-This-Hack

Link to comment
Share on other sites

×
×
  • Create New...