vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
1k stars 200 forks source link

Access violation due to stripped methods #489

Open etmltg69 opened 7 months ago

etmltg69 commented 7 months ago

Why I'm getting always access violation error when trying to add values to generic list or what I'm doing wrong?

let list = Il2Cpp.corlib.class("System.Collections.Generic.List`1")
let int = Il2Cpp.corlib.class("System.Int32")
let listInt = list.inflate(int).new()

listInt.method(".ctor").invoke()
listInt.method("Add").invoke(1)

Getting always the same error, doesn't matter if I try method "Add", "Insert" or "set_Item"

Error: access violation accessing 0x3e8 at invokeRaw (il2cpp/structs/method.ts:233) at (src/index.ts:1023) at call (native) at (il2cpp/structs/method.ts:354)

soletsabuse commented 6 months ago

Same problem. Need some help =/

soletsabuse commented 3 months ago

Looks like these methods were stripped by linker. This can happens to any functions which are not used in the project.

vfsfitvnm commented 1 month ago

Looks like these methods were stripped by linker. This can happens to any functions which are not used in the project.

As far as I recall, this is correct - but those methods would have a virtualAddress should be NULL.

What's the app name and platform?