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

SDK version 21 上无法hook android.util.Log类静态方法 #66

Open
Carlyle-Lee opened this issue Aug 22, 2018 · 1 comment
Open

SDK version 21 上无法hook android.util.Log类静态方法 #66

Carlyle-Lee opened this issue Aug 22, 2018 · 1 comment

Comments

@Carlyle-Lee
Copy link

Carlyle-Lee commented Aug 22, 2018

经过验证,已知在两台 sdk int version 21 的设备上无法hook住 Log类的几个静态方法。
native 添加日志打点 表明hook 成功。
在debug 的时候,偶然能hook 成功一次。但是之后 都是直接调用 Log 的原生方法。
调试反射查看 target method 的artMethod 内部数据 和 hook 方法的artMethod 数据,发现并未修改成功。

@Carlyle-Lee Carlyle-Lee changed the title SDK version 22 上无法hook android.util.Log类静态方法 SDK version 21 上无法hook android.util.Log类静态方法 Aug 22, 2018
@rk700
Copy link
Member

rk700 commented Sep 6, 2018

Android 5.0的话,可以存在代码内联优化的情况,特别是一些系统库函数。具体需要去看调用log时对应的机器指令,参考 #2

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