Android library based on Hunter-debug plugin to perform method-level instrumentation of Android Dalvik code. This can be used to trace method calls in order to obtain dynamic source code metrics such as method coverage.
- PyAnaDroid: automatically instruments and builds Android native projects with Hunter-emanafa, executing the respective application in Android devices.
- E-MANAFA: Estimates method-level energy consumption of execution of apps instrumented with Hunter-emanafa.
If you want to use this library in your Android application, perform the following steps:
- Include library as dependency in project' modules:
a) Gradle
plugins {
....
id 'hunter-debug'
}
dependencies {
implementation "io.github.greensoftwarelab:hunter-emanafa-library:1.0.1"
....
}
b) Maven
<dependency>
<groupId>io.github.greensoftwarelab</groupId>
<artifactId>hunter-emanafa-library</artifactId>
<version>1.0.1</version>
<type>aar</type>
</dependency>
- Annotate app methods to be instrumented with @HunterDebug:
import com.hunter.library.debug.HunterDebug;
public class SampleActivity extends AppCompatActivity {
...
@HunterDebug
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
}
...
}
-
Build an run
-
Examine logs