不知道为啥,hook一款游戏,有时候能进hook函数,有时候没进来
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytedance/android-inline-hook
-
armeabi-v7a ThumbOpenbug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bytedance/android-inline-hook#125 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bytedance/android-inline-hook#111 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
bytedance/android-inline-hook#109 · 2 comments · 1 reaction ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bytedance/android-inline-hook#105 · 2 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
bytedance/android-inline-hook#91 · 5 comments ·
All issues in bytedance/android-inline-hook
Similar issues
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
FujiNetWIFI/fujinet-lib#122 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 12 days
-
bug format I/O medium priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100