I would like to execute opcodes directly against the running Dalvik VM instance from within my application on Android. I'm looking for something similar to the C asm function. I have a list of opcodes for dalvik, but I am unfamiliar with how to either execute them directly, or write them out to .class files and execute them against some sort of VM CLI command like dalvikvm from within a running application.
So, the answer is that you can not really do this in the way I was suggesting, without root access?
Heat Miser
2009-06-02 20:58:44
+2
A:
its not possible. See the Google IO 2008 presentation on youtube about Dalvik internals for details. Mobile VMs including both Java and MS .NET are not full VMs and due to memory and performance constraints thus leave out parts that allow to accomplish what you have described.
Fred Grott
2009-06-03 15:35:37
As I dug further into it, I see that this is unfortunately true...Thanks!
Heat Miser
2009-06-03 22:20:00