Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usage of javaagent with Android

I've recently became interested in DBC methodology. As Java is my "native" language I've looked at cofoja and more recently java-on-contracts. I mainly create Android software, so naturally I'd like to be able to use contracts on my phone.

Both projects require the usage of something similar to

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

as JVM parameter. Is it possible to use this JVM parameter to launch apk on phone? Does dalvik even support this kind of parameters?

How could I even pass this parameter to start an application? I don't have a clue on how to start. Maybe through an ant script?

like image 983
kajman Avatar asked Nov 04 '22 14:11

kajman


1 Answers

Closest thing to javaagent on android is instrumentation:

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

but I doubt cofoja wil support this out of the box. I think it would be possible to implement this but not sure whether such project already started

And here is project goung roughly in direction desired by you:

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

like image 54
Konstantin Pribluda Avatar answered Nov 15 '22 00:11

Konstantin Pribluda