开发者

bytecode injection on dalvik

I have asked this on android platform, but did not receive a reply. I have referred to this thread, but could not find what post he was referring to (Dynamically Generating Dalvik Bytecode into a running Dalvik/Android application)

Also, This issue was raised(http://code.google.com/p/android/issues/detail?id=6322)

So, my question is,

  1. has there been any 开发者_StackOverflowprogress in this regard?
  2. Is it possible to inject new bytecode into a class that is being loaded?
  3. if so, any pointers to the same?

Cheers. Earlence


Android's Dalvik team is intending to create an API that generates dex files at runtime, but we have nothing to show at the moment.

Your best bet today is to use a Java bytecode injection framework (ASM, cglib, etc.) and to include dx.jar (that is, the guts of the dx tool) in your program to convert generated .class files into a .dex file at runtime. If that (hacky) strategy isn't sufficient, you're on your own. This problem is a good opportunity for open source!


You can also check tools like redexer (http://www.cs.umd.edu/projects/PL/redexer/) and smali (https://code.google.com/p/smali/)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜