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

il2cpp: couldn't resolve export il2cpp_get_corlib #451

Open
justqstn opened this issue Dec 16, 2023 · 1 comment
Open

il2cpp: couldn't resolve export il2cpp_get_corlib #451

justqstn opened this issue Dec 16, 2023 · 1 comment

Comments

@justqstn
Copy link

Device:
Emulator LDPlayer Android 7.1 64-bit

Command
frida -H 127.0.0.1 -l dist/agent.js --realm=emulated

so, i can get libil2cpp.so address, but i cant dump game
Il2Cpp.dump() dont working
i didnt tested other functions

log:

il2cpp: couldn't resolve export il2cpp_get_corlib
    at r (il2cpp/api.ts:501)
    at get getCorlib (il2cpp/api.ts:272)
    at call (native)
    at <anonymous> (utils/lazy.ts:10)
    at initialize (il2cpp/module.ts:17)

script:

import "frida-il2cpp-bridge";

console.log("start!");
Il2Cpp.perform(() => {
    console.log("true");
});
@justqstn
Copy link
Author

maybe, i fixed this by script:

import "frida-il2cpp-bridge";

globalThis.IL2CPP_MODULE_NAME = "libil2cpp.so";
Reflect.defineProperty(Il2Cpp, "module", {value: Process.findModuleByAddress(DebugSymbol.fromName("il2cpp_init").address)});

declare global {
    let IL2CPP_EXPORTS: Record<string, () => NativePointer>;
}

(globalThis as any).IL2CPP_EXPORTS = {
}

for (const module_ of Process.enumerateModules()) {
    for (const export_ of module_.enumerateExports()) {
        if (export_.name.includes("il2cpp")) {
            send(`${module_.name}!${export_.name} @ ${export_.address}`);
            IL2CPP_EXPORTS[export_.name] = () => Il2Cpp.module.base.add(new NativePointer(export_.address));
        }
    }
}

but i have another problem in #452

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

No branches or pull requests

1 participant