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
- c
- Domain
- mobile-dev
Research direction
Start with the bytehook_hook_all calls and the send_proxy/recv_proxy callbacks targeting /system/lib/libinput.so; compare the requested sendto and recvfrom symbols with runtime behavior on Android 11 and arm64-v8a. Check whether the callbacks are reached, then document a reproducible diagnosis or confirmed hook behavior.
Written by the indexing model from the issue text.
Description
bytehook Version
1.0.9
Android OS Version
11
Android ABIs
arm64-v8a
Device Manufacturers and Models
vivo x60
Describe the Bug
是想hook libinput.so 里的 send和recv方法 来做onTouch事件的监听, 但是一直不成功 不知道为啥
//__socketcall ssize_t sendto(int __fd, const void* __buf, size_t __n, int __flags, const struct sockaddr* __dst_addr, socklen_t __dst_addr_length);
ssize_t send_proxy(int __fd, const void* __buf, size_t __n, int __flags, const struct sockaddr* __dst_addr, socklen_t __dst_addr_length) {
LOGD("send_proxy");
BYTEHOOK_STACK_SCOPE();
return BYTEHOOK_CALL_PREV(send_proxy, __fd, __buf, __n, __flags,__dst_addr,__dst_addr_length);
}
//__socketcall ssize_t recvfrom(int __fd, void* __buf, size_t __n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_length);
ssize_t recv_proxy(int __fd, void* __buf, size_t __n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_length) {
LOGD("recv_proxy");
BYTEHOOK_STACK_SCOPE();
return BYTEHOOK_CALL_PREV(recv_proxy, __fd, __buf, __n, __flags,__src_addr,__src_addr_length);
}
bytehook_hook_all("/system/lib/libinput.so", "sendto", (void *) send_proxy, nullptr, nullptr);
bytehook_hook_all("/system/lib/libinput.so", "recvfrom", (void *) recv_proxy,
nullptr,
nullptr);
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 405
- 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/bhook
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
pocoproject/poco#5626 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
VMAFx/vmafx#3260 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FujiNetWIFI/fujinet-lib#272 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
facebookincubator/muse-gadget-sdk#301 ·
Maintainers usually reply within 2 days
-
luaebpf: the by-example page's intro names two outcomes of a lowering and omits the stop with the default verdictPossibly taken A pull request linked to this issue is open or already merged. Opendocumentation severity: low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
luainkernel/lunatik#2231 ·
Maintainers usually reply within 1 day