-
Notifications
You must be signed in to change notification settings - Fork 351
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 System.loadLibrary失败 #131
Comments
设备是piexl xl,android10 |
我通过观察源码,发现loadLibrary方法有注解 @CallerSensitive,而String的startswith没有,是不是这个原因导致失败的 |
应该是了,调用 |
那大佬能修复这个bug吗? |
调用原方法是从hook代码里唤起的,所以 可以试下在创建插件的 |
并没有hook成功,没有执行hook代码,不过应该是librarySearchPath不正确,谢谢。 |
whale可以hook成功,执行hook代码,但同样也会报dlopen failed: library "libhello.so" not found,它应该是这种原因造成的 |
这个其实是art的bug, 放弃这个思路 |
2020-10-14 00:17:10.009 19886-19886/lab.galaxy.yahfa.demoApp W/y.yahfa.demoAp: Got a deoptimization request on un-deoptimizable method void java.lang.System.loadLibrary(java.lang.String)
2020-10-14 00:17:10.009 19886-19886/lab.galaxy.yahfa.demoApp W/y.yahfa.demoAp: Got a deoptimization request on un-deoptimizable method void java.lang.System.loadLibrary(java.lang.String)
2020-10-14 00:17:17.101 19886-19886/lab.galaxy.yahfa.demoApp D/AndroidRuntime: Shutting down VM
2020-10-14 00:17:17.177 19886-19886/lab.galaxy.yahfa.demoApp E/AndroidRuntime: FATAL EXCEPTION: main
Process: lab.galaxy.yahfa.demoApp, PID: 19886
java.lang.UnsatisfiedLinkError: dlopen failed: library "libhello.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
at java.lang.System.loadLibrary(Native Method)
at lab.galaxy.yahfa.demoApp.MainActivity$1.onClick(MainActivity.java:72)
没办法hook System.loadLibrary,会报如上的错误,加入不hook,则会运行正确
The text was updated successfully, but these errors were encountered: