bytedance / bytedance/bhook

[Regression] Cannot hook on v1.1.x, hooking dlopen cause SIGSEGV on v1.0.x

Open
#123 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
2.6k
Forks
399
PR merge metrics
No merged PRs in 30d

Description

### bytehook Version

1.1.2

### Android OS Version

13

### Android ABIs

arm64-v8a

### Device Manufacturers and Models

Samsung Galaxy A53

### Describe the Bug

Hooking no longer works when updating to v1.1.0 or above. `bytehook_hook_all` returns a pointer but hook never gets called.

Only log from bytehook is `bytehook version 1.1.2: bytehook init(mode: AUTOMATIC, debuggable: false), return: 0, real-init: yes`

v1.0.10 and below works, v1.1.0 and above broken.

Bug can be reproduced on other phones.

Please tell me instructions on how to troubleshoot deeper.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with bytehook 1.1.2 on Android 13 arm64-v8a, using bytehook_hook_all and checking whether its returned pointer leads to a callback. Compare the behavior with v1.0.10 and v1.1.0, then trace the version change that prevents the hook from being called; done means the regression is explained and hooking works again on the reported setup.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.