Coder Social home page Coder Social logo

Hook系统函数咋没效果? about andhook HOT 6 CLOSED

aslody avatar aslody commented on July 17, 2024
Hook系统函数咋没效果?

from andhook.

Comments (6)

Rprop avatar Rprop commented on July 17, 2024

有测试代码吗?我这边测试是可以的

from andhook.

mdalvik avatar mdalvik commented on July 17, 2024

Method m1 = Activity.class.getDeclaredMethod("onCreate",Bundle.class);
Method m2 = App.class.getMethod("activityOnCreate",Bundle.class);
如果上面的是Activity.class 的话 hook 是不行的
Method m1 = MainActivity.class.getDeclaredMethod("onCreate",Bundle.class);
Method m2 = App.class.getMethod("activityOnCreate",Bundle.class);
如果是MainActivity 是可以hook成功的.
哥们你这个代码直接下载下来 很多东西要改一下才能运行的.难道是我改的时候改错什么了吗

from andhook.

Rprop avatar Rprop commented on July 17, 2024

你改了什么代码呢?我这边直接用eclipse可以直接运行
另外我更新了测试代码https://raw.githubusercontent.com/rrrfff/AndHook/master/java/test/src/apk/andhook/test/AndTest.java
使用Activity.class也可以hook到,不过我在模拟器测试的,真机晚点看看

from andhook.

mdalvik avatar mdalvik commented on July 17, 2024

andhook.cpp下
jclass clazz = env->FindClass("apk/andhook/DalvikHook"); 这里如果不改 是找不到class
JNINativeMethod gMethods[] 这里面的几个JNI 注册方法 在class 文件是找不到的 哥们你能把源代码更新下嘛. 当前项目下的源码如果下载下来不改动是无法运行的。

from andhook.

Rprop avatar Rprop commented on July 17, 2024

你先直接用 https://github.com/rrrfff/AndHook/releases/tag/v2.1 编译好lib试试?
jni源码因为后来加入的native hook部分还没做好,所以没同步上来

from andhook.

mdalvik avatar mdalvik commented on July 17, 2024

恩用你编译好的lib hook 是没问题得~ 先关注下,待源码同步了 继续学习,谢谢了

from andhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.