Can Jacoco offline instrument .class file without source code?

64 views
Skip to first unread message

Tool Ply

unread,
Jan 17, 2018, 10:15:17 PM1/17/18
to JaCoCo and EclEmma Users
Recently, I wanted to collect code coverage information of an Android APK. Without the source code, we decompiled the APK to dex, got the .class by using dex2jar and tried to intrument .class files directly by using ASM. 
This method achieves success, however, implementing the coverage code manually will cost a lot and Jacoco has done a great job in this area so that I prefer to use Jacoco. It seems the offline mode is suitable for this job, however, There is no experience showing that Jacoco in offline mode has an ability to instrument .class files directly without source code.
I am not sure about this, does the source code necessary indeed?

Evgeny Mandrikov

unread,
Jan 18, 2018, 3:03:49 AM1/18/18
to JaCoCo and EclEmma Users


On Thursday, January 18, 2018 at 4:15:17 AM UTC+1, Tool Ply wrote: 
I am not sure about this, does the source code necessary indeed?

From http://www.jacoco.org/jacoco/trunk/doc/mission.html :
Based on Java byte code and therefore works also without source files.

Tool Ply

unread,
Jan 18, 2018, 10:04:02 PM1/18/18
to jac...@googlegroups.com
👌Thank you, it's great.

--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/_Jj0MZQ6m4U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/77decf3e-dc6d-481f-985a-13938de62316%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages