Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add about 760 keys to MobileGestalt.h #79

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dlevi309
Copy link
Contributor

@dlevi309 dlevi309 commented Apr 7, 2023

What does this implement/fix? Explain your changes.

Complete the list of MG keys (or list about 760 keys)

Checklist

  • New code follows the code rules
  • I've added modulemaps for any new libraries (e.g. see libactivator/module.modulemap): it should be possible to @import MyLibrary; in ObjC, or import MyLibrary in Swift.
  • My contribution is code written by myself from reverse-engineered headers, licensed into the Public Domain as per LICENSE.md; or, code written by myself / taken from an existing project, released under an OSI-approved license, and I've added relevant licensing credit to LICENSE.md

Does this close any currently open issues?

Any relevant logs, error output, etc?

Any other comments?

Where has this been tested?

Operating System:

Platform:

Target Platform:

Toolchain Version:

SDK Version:

@dlevi309 dlevi309 changed the title update Add about 760 keys to MobileGestalt.h Apr 7, 2023
kirb
kirb previously requested changes Apr 7, 2023
Copy link
Member

@kirb kirb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great stuff, thanks! There is a slight problem though, changing the keys to kMGQ rather than kMG is a breaking change, don’t really want to do that. Could we change them back?

@dlevi309
Copy link
Contributor Author

dlevi309 commented Apr 7, 2023

This is great stuff, thanks! There is a slight problem though, changing the keys to kMGQ rather than kMG is a breaking change, don’t really want to do that. Could we change them back?

for sure! for some reason I totally missed that lol

Copy link
Contributor Author

@dlevi309 dlevi309 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switched kMGQ back to kMG

@dlevi309 dlevi309 requested a review from kirb April 7, 2023 13:29
@dlevi309
Copy link
Contributor Author

dlevi309 commented Apr 9, 2023

@kirb Just to put this out there, I looked into why I originally formatted the keys as kMGQ* rather than kMG* and found that kMGQ (stands for MobileGestaltQuestion) is the correct format for keys if you were to use data provided by Apple in the last decade

when the header was originally written, the case may have been otherwise (either way is fine with me, just wanted to document this in case you thought reformatting was worth the trouble to keep in sync with Apple)

@leptos-null
Copy link
Member

This PR removes the following keys, which is a breaking change:

static const CFStringRef kMGAllDeviceCapabilities = CFSTR("AllDeviceCapabilities");
static const CFStringRef kMGAppleInternalInstallCapability = CFSTR("AppleInternalInstallCapability");
static const CFStringRef kMGCarrierBundleInfo = CFSTR("CarrierBundleInfoArray");
static const CFStringRef kMGDeviceSupportsFaceTime = CFSTR("DeviceSupportsFaceTime");
static const CFStringRef kMGDiagnosticsData = CFSTR("DiagData");
static const CFStringRef kMGDieID = CFSTR("DieId");
static const CFStringRef kMGHWModel = CFSTR("HWModelStr");
static const CFStringRef kMGHasAllFeaturesCapability = CFSTR("HasAllFeaturesCapability");
static const CFStringRef kMGRegulatoryIdentifiers = CFSTR("RegulatoryIdentifiers");
static const CFStringRef kMGTotalSystemAvailable = CFSTR("TotalSystemAvailable");

I have discussed this with @dlevi309, who responded:

I’m thinking of actually rewriting a portion of the header to support values that have been changed. I’m having some trouble pinpointing exactly when some of these values changed, since all the keys I added were based on files from an iOS 16 decompilation (yet all support as far back as iOS 14 from my own tests)

I'm open to not indicating the availability of these values because these values are difficult to determine in the first place and getting them for enough iOS versions to determine availability is more challenging than I think is worth-while for this repo.

In either case, dlevi309 and I agree that the current contents of this PR should not be merged and for this reason, I'm moving the status of this PR to draft.

@leptos-null leptos-null marked this pull request as draft April 27, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants