Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问有办法跨进程hook吗? #43

Closed
Enerwen opened this issue Jul 19, 2023 · 1 comment
Closed

请问有办法跨进程hook吗? #43

Enerwen opened this issue Jul 19, 2023 · 1 comment

Comments

@Enerwen
Copy link

Enerwen commented Jul 19, 2023

现在hook 了a方法
使用的时候是在1进程的,然后2进程调用a方法的时候,hook没有触发到
请问有办法可以在2进程的时候hook到吗?

@canyie
Copy link
Owner

canyie commented Jul 20, 2023

由于操作系统的进程隔离机制,修改其他进程的内存需要较高权限,所以在没有权限的情况下无法做到。
你可以选择 ptrace 或 riru/zygisk 的等机制把自己的代码注入进目标进程或 zygote 进程(需要 root 权限),或者用重打包/VirtualApp 等技术把代码注入进目标进程。

@canyie canyie closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants