Using javaagent with Android

I recently became interested in the DBC methodology. Since Java is my native language, I looked through cofoja and most recently java-on-contracts . I mainly create software for Android, so naturally, I would like to be able to use contracts on my phone.

Both projects require the use of something similar to

java -javaagent:path/to/cofoja-<version>.jar <someclass> 

as a JVM parameter. Can I use this JVM parameter to run apk on the phone? Does Dalwick even support such parameters?

How can I pass this parameter to run the application? I do not know how to start. Perhaps through an ant script?

+4
source share
1 answer

The closest thing for javaagent on Android is the tool:

http://developer.android.com/reference/android/app/Instrumentation.html

but I doubt he will support this out of the box. I think it would be possible to realize this, but I'm not sure that this project has already begun

And here is the goung project in about the direction you want:

http://code.google.com/p/droidbox/

+2
source

Source: https://habr.com/ru/post/1437776/


All Articles