GithubHelp home page GithubHelp logo

Comments (6)

hwjump avatar hwjump commented on July 21, 2024

Nice!If we can debug so in studio, it will be more effective!
So what problem on art?

from dexposed.

pangliang avatar pangliang commented on July 21, 2024

art 模块中那个 art_quick_dexposed_invoke_handler.S 汇编, 我放到jni目录里android studio好像并不会编译, 因为ld会报错无法找到函数, 不知道是不是我使用了太新版的gradle-experimental:0.2.0

我现在的临时解决办法是把你之前的art_quick_dexposed_invoke_handler.o文件改成.so 放到 jniLibs中让他去link
现在的状态是编译成功, 但是放到我的mezumx3 android 5.0 中报错, 我明天再看看

然后, art_quick_dexposed_invoke_handler.S这个东西是arm-v7a的汇编吧? 那得另外搞一份x86的汇编来支持才行了...

另外,因为dalvik 和art同时存在同时要include源码的关系, 整个android 源码目录, plaform/art 这个project 得是 android-5 , 其他的可以保持在 android-4

暂时遇到的就是这些问题

from dexposed.

hwjump avatar hwjump commented on July 21, 2024

I didn't compile .S file in studio, So I can't give any suggest. But I found some information for you https://code.google.com/p/android/issues/detail?id=15379. I think ndk-build support .S file, so also studio can support.

As question2: Yes, art_quick_dexposed_invoke_handler.S is for arm 32 bits. So X86's .S file, you should find it in /runtime/arch/x86 directory in art android AOSP, and do some change.

Thank you for your work!

from dexposed.

pangliang avatar pangliang commented on July 21, 2024

hello, art 的x86 和 armeabi 都已经编译成功, 但是放到手机上运行, 报错之后退出了:

08-18 16:33:41.565  28651-28651/com.taobao.dexposed A/art﹕ /Volumes/d/dexposed/dexposed_art/src/main/jni/dexposed.cpp:201] Check failed: proxy_method->GetFrameSizeInBytes() == Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs)->GetFrameSizeInBytes() (proxy_method->GetFrameSizeInBytes()=3179300541, Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs)->GetFrameSizeInBytes()=48) void com.taobao.dexposed.MainActivity.test()

使用你原版的lib 来运行, 也只是显示如下log, 并没有调用设置的beforeHookedMethod
也没有任何报错

08-18 16:36:02.828    9649-9649/com.taobao.dexposed I/art﹕ dexposed: now initializing, Found Dexposed class com/taobao/android/dexposed/DexposedBridge
08-18 16:36:02.828    9649-9649/com.taobao.dexposed I/art﹕ dexposed: com_taobao_android_dexposed_DexposedBridge_initNative
08-18 16:36:02.832    9649-9649/com.taobao.dexposed I/art﹕ dexposed: >>> hookMethodNative 0x74578820 void com.taobao.dexposed.MainActivity.test()
08-18 16:36:02.832    9649-9649/com.taobao.dexposed I/art﹕ dexposed: >>> EnableXposedHook0x74578820 void com.taobao.dexposed.MainActivity.test()

不知道是art 本来就没有实现, 还是别的什么原因 ?

from dexposed.

hwjump avatar hwjump commented on July 21, 2024

hey, I read your code, the “void com.taobao.dexposed.MainActivity.test()” shouldn't empty. there should be have some code. Because art compiler optimization.

As this jni compiled so run error, I think the reason was the compile environment, the artmethod framesize wasn't same.

from dexposed.

hwjump avatar hwjump commented on July 21, 2024

I have another suggest. I think this modify will be better if it didn't dependecy Android AOSP.
You can see this project ( https://github.com/boyliang/AllHookInOne ), he remove the Android AOSP dependecy with (https://github.com/boyliang/ndk-patch) which copy any necessary so into it's ndk directory.

from dexposed.

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.