Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

不知道为啥,hook一款游戏,有时候能进hook函数,有时候没进来

Open
#68 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, c
Domain
mobile-dev

Research direction

Reproduce the intermittent hook failure with ShadowHook 1.0.9 on the stated Android 13 arm64 device and game. Compare the libil2cpp.so address from getModuleBase plus the offset with the address from AKGetBaseAddress, and check the timing of library loading and hook installation. Done means identifying whether the base-address lookup or ShadowHook causes the missed hook and documenting the evidence.

Written by the indexing model from the issue text.

Description

bug
ShadowHook Version

1.0.9

Android OS Version

13

Android ABIs

arm64-v8a

Device Manufacturers and Models

真我GT5

Describe the Bug

不知道为啥,hook一款游戏(com.olzhas.carparking.multyplayer2 版本名0.3.6.06283941),有时候能进hook函数,有时候没进来,
先使用线程等待libil2cpp.so加载进来后hook getModuleBase + 偏移量

static void* getModuleBase(char* module_name, char* moduleFullPath)
{
char filename[256];
snprintf(filename, sizeof(filename), "/proc/self/maps");
FILE fp = fopen(filename, "r");
void
addr=0;
if (fp != NULL)
{
char line[1024];
while (fgets(line, sizeof(line), fp))
{
if(strstr(line, module_name) && (strstr(line, "r--p")|| strstr(line, "r-xp")))
{
LOGE("getModuleBase:line=%s", line);
sscanf(line, "%[^/]%[^\n]", moduleFullPath);
char pch = strtok(line, "-");
addr = (void
)strtoul(pch, NULL, 16);
if (addr == 0x8000){addr = 0;}
LOGE("getModuleBase:找到%s(%s),base_addr=%p", module_name, moduleFullPath, addr);
break;
}
}
fclose(fp);
}
return (void
)addr;
}

但我使用AndHook每次都可以进hook函数,唯一区别就是基址用AKGetBaseAddress获得后 + 偏移量,不知道是shadowhook问题还是基址获得有问题,能否提供点帮助,非常感谢

Dominant language
C
Stars
2.4k
Forks
415
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bytedance/android-inline-hook

All issues in bytedance/android-inline-hook

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.