bytedance / bytedance/bhook

Hooking Fails in Emulator Environment When x86 Architecture Libraries Are Missing

Open
#112 0 comments 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.1

### Android OS Version

9

### Android ABIs

x86_64

### Device Manufacturers and Models

LDPlayer, BlueStacks, NOX..

### Describe the Bug

### Environment
- bytehook version: v1.1.1 (latest version)
- Test app: Sample app included in the bytehook open source
- Test device: LDPlayer9 emulator (Android 9, x86_64 architecture)

### Reproduction Scenario
1. Prepare sample app with two different build variants:
- App A: Contains only ARM libraries (armeabi-v7a or arm64-v8a)
- App B: Contains x86 or x86_64 libraries
2. Run each app on an x86_64 emulator
3. Select bytehook toggle
4. Click dlopen() libsample.so button

### Observed Issue
- App B (containing x86 or x86_64 libraries): Hooking works properly
- App A (containing only ARM libraries): Hooking fails

### Expected Behavior
- bytehook should work properly in x86_64 emulator environments even for apps that only contain ARM libraries and no x86/x86_64 libraries

### Additional Information
- We plan to provide a commercial SDK, and many customer apps only include ARM binaries (armeabi-v7a or arm64-v8a)
- With the current limitations of bytehook, we cannot provide the desired hooking functionality for these apps in emulator environments

### Questions
- Is this a known limitation? We couldn't find any mention of this limitation in the documentation.
- Is there a way to make bytehook work properly with apps that only have ARM libraries in emulator environments?
- Do you have any plans to address this issue in the future?

[bytehook_sample_test.zip](https://github.com/user-attachments/files/19116764/bytehook_sample_test.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.