Fix bug on macOS#272
Closed
sptndc wants to merge 767 commits into
Closed
Conversation
# Conflicts: # Il2CppInterop.Runtime/Injection/InjectorHelpers.cs
…ns.Logging for all logging
Using 6.0.0.0 is wrong because it is not a valid mscorlib version. In .NET 5 an higher, mscorlib version is locked to 4.0.0.0
# Conflicts: # Directory.Build.props # Il2CppInterop.Runtime/Injection/InjectorHelpers.cs # UnhollowerBaseLib/Il2CppException.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_24_4.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_27_0.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_27_1.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_27_2.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_27_3.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_29_0.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Class/Class_29_1.cs # UnhollowerBaseLib/Runtime/VersionSpecific/Image/Image_27_0.cs # UnhollowerBaseLib/Runtime/VersionSpecific/ParameterInfo/ParameterInfo_16_0.cs # UnhollowerBaseLib/Runtime/VersionSpecific/ParameterInfo/ParameterInfo_24_1.cs # UnhollowerBaseLib/Runtime/VersionSpecific/ParameterInfo/ParameterInfo_27_3.cs
Major refactor, rename project to Il2CppInterop
* implement IL Hook in Il2CppDetourMethodPatcher to skip managed->native->managed * update to use detour instead of il hook
…od. (BepInEx#233) * Added better support for nested classes in GetIl2CppTypeFullName method. * Switched from a list to a stack. No more need to reverse the list. * Only add a . when namespacename exists. --------- Co-authored-by: SlideDrum <slidedrumofficial@gmail.com>
Based on: ds5678@9d09abe More info: BepInEx#244
Il2CppInterop and Il2CppAssemblyUnhollower have always been LGPLv3, simply using the split GPL+LGPL license files. Use the combined license text to avoid confusion.
* Separated Il2CppInterop.Generator * Fix formatting issues --------- Co-authored-by: cetotos <cetotospatatos@gmail.com>
…pInEx#255) * Separated Il2CppInterop.Runtime * Update Il2CppInterop.Runtime/Injection/Hooks/GenericMethod_GetMethod_Unity6_Hook.cs remove comments Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com> * Update Il2CppInterop.Runtime/Injection/InjectorHelpers.cs change unity 6 hook name Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com> * Update Il2CppInterop.Runtime/Injection/InjectorHelpers.cs change unity 6 hook name Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com> * Revise comment Honestly, I don't remember removing it anyways --------- Co-authored-by: cetotos <cetotospatatos@gmail.com> Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
* Unity 6 alignment issue fix for linux * Fix the Dotnet Formatting issues * fixup: forgot to add trace log line
* fix: preserve Nullable<T> data in Harmony patches * style: narrow Nullable check and normalize CopyMemory signature per review
…ect call for reference value type parameter (BepInEx#243)
…ltValue-signature', 'fix-HarmonySupport-ref-valuetype' and 'revert-implement-managed-detour' into illgames-fixes
Various fixes for issues with some Illgames games Co-authored-by: y0soro <y0soro@protonmail.com>
This fixes an issue where `GameAssembly.dylib` was not loaded for IL2CPP games on macOS.
ds5678
requested changes
Jun 21, 2026
Collaborator
Is this true on .NET 10? |
Author
These APIs are architected around Windows-specific memory models. While .NET 10 offers robust macOS support, the operating system's strict user-space security policies—specifically Hardened Runtime and System Integrity Protection (SIP)—prohibit arbitrary process memory traversal for module enumeration. |
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.
Problem
XrefScans.XrefScanMethodDbandInjectorHelpers.Il2CppModuleuseProcess.ModulesandProcessModulewhich are very limited or return incomplete data on macOS.Furthermore,
InjectorHelpers.Il2CppHandleusesNativeLibrary.Loadlike this:The .NET runtime automatically prefixes
liband will throw aDllNotFoundException.Change
dlopen,dlsym, anddladdrusing C# P/Invoke for macOS to get the actual base address and calculate the memory size of a module. Replace theMemoryUtils.FindSignatureInModulemethod with theMemoryUtils.FindSignatureInBlockmethod, which takes three parameters:nint,long, andSignatureDefinition.NativeLibrary.Load, so the .NET runtime will interpret it exactly as it is and skip the prefixing logic.