You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see Il2Cpp.Delegate simply assign callback to System.IntPtr, so I did
constcallbackPtr=callback.field<Il2Cpp.Object>("method_ptr").value;console.log(`${callbackPtr} will be patched`);constcallbackMethod=newIl2Cpp.Method<void>(callbackPtr);replaceCallback(callbackMethod);
where replaceCallback sets implementation for callbackMethod
but still error:
0x7669b404c0 will be patched
Error: access violation accessing 0xe8aa0003fd
at get name (../../frida-il2cpp-bridge/dist/structs/type.ts:132)
at call (native)
at <anonymous> (../../frida-il2cpp-bridge/dist/utils/lazy.ts:10)
at get isByReference (../../frida-il2cpp-bridge/dist/structs/type.ts:102)
at call (native)
at <anonymous> (../../frida-il2cpp-bridge/dist/utils/lazy.ts:10)
at get fridaAlias (../../frida-il2cpp-bridge/dist/structs/type.ts:95)
at call (native)
at <anonymous> (../../frida-il2cpp-bridge/dist/utils/lazy.ts:10)
at wrap (../../frida-il2cpp-bridge/dist/structs/method.ts:366)
at set implementation (../../frida-il2cpp-bridge/dist/structs/method.ts:179)
at replaceCallback (index.ts:144)
at <anonymous> (index.ts:160)
at call (native)
at <anonymous> (../../frida-il2cpp-bridge/dist/structs/method.ts:361)
I have
System.Action<T>
argument which extendsSystem.Delegate
, can i get handle of callback to replace it implementation?Note: I need to get method handle from argument, replacing all callbacks will cause a lot of repeating code
My current impl is:
where
callback
isSystem.Action<T>
, but output is invalidThe text was updated successfully, but these errors were encountered: