I would like to inject code in an android application at runtime. I have tried to use dx tool to generate a dexfile in the sdcard but when i want to instantiate, it fails. A
You can look this page, but you have to use some tools like APKTool, SignApk.
http://blackhatcrackers.blogspot.de/2013/05/injecting-custom-code-into-android-apks.html