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

``` #212

Open
ljydnhy opened this issue Aug 31, 2024 · 0 comments
Open

``` #212

ljydnhy opened this issue Aug 31, 2024 · 0 comments

Comments

@ljydnhy
Copy link

ljydnhy commented Aug 31, 2024

          ```

void hack_start(const char* game_data_dir) {
bool load = false;
bool check_have_il2cpp = false;
for (int i = 0; i < 10; i++) {
void* handle = xdl_open("libil2cpp.so", 0);
if (handle) {
load = true;
il2cpp_api_init(handle);
il2cpp_dump(game_data_dir);
break;
} else {
if (!check_have_il2cpp) {
void* libunity = xdl_open("libunity.so", 0);
if (libunity) {
xdl_info_t info;
xdl_info(libunity, XDL_DI_DLINFO, &info);
std::string lib_path = info.dli_fname;
lib_path = lib_path.substr(0, lib_path.find_last_of('/'));
lib_path += "/libil2cpp.so";
LOGI("libil2cpp.so path %s", lib_path.data());
if (access(lib_path.data(), F_OK) == -1) {
LOGI("game not have libil2cpp.so,use default libunity.so");
load = true;
il2cpp_api_init(libunity);
il2cpp_dump(game_data_dir);
xdl_close(libunity);
break;
}
check_have_il2cpp = true;
xdl_close(libunity);
}
}

        sleep(1);
    }
}
if (!load) {
    LOGI("libil2cpp.so not found in thread %d", gettid());
}

}

使用此代码可以解决

_Originally posted by @enenH in https://github.com/Perfare/Zygisk-Il2CppDumper/issues/203#issuecomment-2203853118_
            
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