1We build an equivalent of the jacoco-agent.jar which contains classes from org.jacoco.core, 2org.jacoco.agent and org.jacoco.agent.rt packages but also classes from asm 5.0.1. 3 4However, Jacoco depends on classes that do not exist in Android (java.lang.instrument.* or 5javax.management.*) for runtime instrumentation only. The ART compiler would reject those classes 6when they are either in the bootclasspath (core, frameworks, ...) or system apps. 7 8Since we only use offline instrumentation for code coverage (using Jack) and do not execute these 9classes at runtime, we simply not compile them here. 10 11We also need to modify the source code to cut dependencies to the classes that we exclude from the 12compilation. The changes are surrounded by "BEGIN android-change" and "END android-change". Here 13is the list of the changes: 14 151) Remove the creation of JmxRegistration in org.jacoco.agent.rt.internal.Agent. 16