Add macOS readMtgaInventory via heap signature scan#6
Open
dan-blanchard wants to merge 2 commits intomtgatool:mainfrom
Open
Add macOS readMtgaInventory via heap signature scan#6dan-blanchard wants to merge 2 commits intomtgatool:mainfrom
dan-blanchard wants to merge 2 commits intomtgatool:mainfrom
Conversation
Bypasses the broken PAPA walker by scanning Arena's heap directly for the card-collection Dictionary<int,int>. Identifies it via the hash==key invariant for DefaultEqualityComparer<int>. Returns ~4300 cards in <1s. Requires sudo for task_for_pid. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Scans for ClientPlayerInventory using class-pointer-set pre-filter plus value plausibility and activity-score ranking. Returns wildcards, gold, gems, and vault progress. Key discovery: vaultProgress is an 8-byte double (not int32), storing the UI percentage directly (e.g. 58.9%). Ground-truth verified against Arena's UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scans for
ClientPlayerInventoryin Arena's heap using a class-pointer-set pre-filter plus value plausibility and activity-score ranking. Returns wildcards, gold, gems, and vault progress.Depends on #3 for the scanner infrastructure.
Key discovery
vaultProgressis an 8-bytedouble(notint32as the existing IL2CPP research summary suggested). Field spacing confirms it:vaultProgress @ 0x30,boosters @ 0x38= 8-byte field. The stored value is the UI percentage directly (58.9 means "Vault: 58.9%").How the scanner works
find_all_classes_by_name("ClientPlayerInventory")collects every matchingIl2CppClass*in__DATA(handles metadata-vs-runtime class duplication)Diagnostic cascade on failure dumps pointer occurrences and nearby inventory-related classes.
Testing
Verified against live Arena on macOS arm64:
MTGA_DEBUG_INVENTORY=1produces useful diagnostic output🤖 Generated with Claude Code