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

YAHFA支持Android O吗? #31

Closed
c1024 opened this issue Sep 19, 2017 · 3 comments
Closed

YAHFA支持Android O吗? #31

c1024 opened this issue Sep 19, 2017 · 3 comments

Comments

@c1024
Copy link

c1024 commented Sep 19, 2017

我在Android O上测试,hook不成功,如果hook jni直接崩溃。测试设备Nexus 6p。同样的代码在Nexus 5 6.0上可以hook成功。

@svengong
Copy link

刚试了一下8.0,的确不成功,手机是谷歌PIXEL XL,现象就是hook不成功,调用原函数;
09-20 19:18:21.433 16994-16994/? I/YAHFA-Native: init to SDK 26
09-20 19:18:21.433 16994-16994/? D/YAHFA: target method param count is 4
09-20 19:18:21.434 16994-16994/? I/YAHFA-Native: Start findAndBackupAndHook for non-static method tac(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
09-20 19:18:21.434 16994-16994/? W/YAHFA-Native: not enough capacity. Allocating...
09-20 19:18:21.434 16994-16994/? I/YAHFA-Native: Allocating done
09-20 19:18:21.434 16994-16994/? I/YAHFA-Native: origin method is at 0x70098c91a0, hook method is at 0x70098c9108, backup method is at 0x70098c9138
09-20 19:18:21.434 16994-16994/? I/YAHFA-Native: hook and backup done
09-20 19:18:21.589 16994-17039/? D/OpenGLRenderer: HWUI GL Pipeline
09-20 19:18:21.629 16994-17039/? I/Adreno: QUALCOMM build : 7142022, Ib5823dd10c
Build Date : 06/23/17
OpenGL ES Shader Compiler Version: EV031.18.00.00
Local Branch : O11A
Remote Branch :
Remote Branch :
Reconstruct Branch :
09-20 19:18:21.633 16994-17039/? I/Adreno: PFP: 0x005ff087, ME: 0x005ff063
09-20 19:18:21.636 16994-17039/? I/OpenGLRenderer: Initialized EGL, version 1.4
09-20 19:18:21.636 16994-17039/? D/OpenGLRenderer: Swap behavior 2
09-20 19:18:23.618 16994-16994/lab.galaxy.yahfa.demoApp E/origin: call Log.e()
09-20 19:18:23.619 16994-16994/lab.galaxy.yahfa.demoApp W/origin: foo startsWith f is true
09-20 19:18:23.620 16994-16994/lab.galaxy.yahfa.demoApp W/origin: virtual tac a,b,c,d, got dcba
09-20 19:18:23.620 16994-16994/lab.galaxy.yahfa.demoApp W/origin: static tac a,b,c,d, got dcba
09-20 19:18:23.623 16994-16994/lab.galaxy.yahfa.demoApp W/origin: JNI method return string: hello from JNI

@rk700
Copy link
Member

rk700 commented Oct 31, 2017

在avd上实验,部分函数只修改entrypoint后hook不生效,具体原因不明,

@rk700
Copy link
Member

rk700 commented Dec 7, 2017

感谢 @svengong 及其同事的发现和建议,通过将方法设为native属性可避免其被解释执行

相关更新说明

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

3 participants