Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: quilhoado
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 87.6 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed over 3 years ago
Metadata Files
Readme License Citation

README.md

AnaDroid

Build Status made-with-python PyPI version PyPI license PyPI status DOI

Anadroid is a tool capable of automating the process of analyzing and benchmarking Android applications' energy consumption, using state-of-the-art energy analysis tools. Anadroid can be configured to use different energy profilers and test frameworks in its execution pipeline, being able to perform automatic instrumentation and building of application source code. It can be used to perform both white-box and black-box testing.

Documentation

(Ommited)

Use cases

  • Application Benchmarking: Replicating test work/procedures on different applications to carry out comparative studies of energy consumption.
  • Detection of energy hotspots in application code;
  • Detection of energy-greedy coding practices;
  • Calibration of energy consumption prediction models;
  • Many others.

Supported Test Frameworks

  • JUnit-based frameworks (Robotium, Espresso, JUnit);
  • Application UI/Exerciser Monkey;
  • Monkeyrunner;
  • DroidBot;
  • App Crawler;
  • RERAN;
  • Monkey++ (soon).

Supported energy profilers:

  • Trepn Profiler;
  • Manafa;
  • GreenScaler;
  • Monsoon (soon);
  • Petra (soon).

Workflow

By default, Anadroid is configured to perform white-box testing of applications, instrumenting its code (Java and/or Kotlin), in order to collect tracing of the methods invoked during application execution and estimate the energy consumed by these. After the instrumentation phase, a project is created in the original directory, which is a copy of it, with the code and build scripts already instrumented. Then, the source code and apk are built from the sources of the instrumented project (both debug and release builds are supported), and the application is installed on the device. After installation, the energy profiler is enabled and the application tests are executed. At the end of the process, the monitoring process is stopped and its results collected, and the application is uninstalled.

Anadroid Workflow

Installation:

Using python-pip

$ pip install xxxx

From sauce

$ git clone --recurse-submodules https://github.com/quilhoado/pyanadroid.git

Examples

Plug-and-play execution

$ pyanadroid [-h] [-t {Monkey,Monkeyrunner,JUnit,RERAN,Espresso,Robotium,Crawler,Droidbot,Other}] [-p {Trepn,GreenScaler,Petra,Monsoon,E-manafa,None}] [-b {Release,Debug,Custom}] [-i {JInst,Hunter}] [-it {MethodOriented,TestOriented,'ActivityOriented',),AnnotationOriented,None}] [-a {MethodOriented,TestOriented,('ActivityOriented',,AnnotationOriented,None}] [-d DIRETORY] [-bo] [-r] [-rb] [-ri] [-ja] [-sc {USB,WIFI}] [-ds DEVICE_SERIAL] [-td TESTS_DIR] [-n PACKAGE_NAMES [PACKAGE_NAMES ...]] [-apk APPLICATION_PACKAGES [APPLICATION_PACKAGES ...]]

From Sauce

Execute a simple Monkey test over an application

By default, Anadroid uses Manafa profiler to estimate energy consumption. The Monkey test (or any other test with other supported testing framework) and its parameters can be configured by modifying the .cfg present in the resources/testingFrameworks/ directory. The results are stored in the results// directory

``` from anadroid.Anadroid import AnaDroid

folderofapp = "demoProjects/SampleApp" anadroid = AnaDroid(folderofapp, testingframework=TESTINGFRAMEWORK.MONKEY) anadroid.defaultWorkflow() ```

TODO

  • merge test apk with androguard
  • results resume file
  • test greenscaler on rooted devices
  • monsoon

GitHub Events

Total
Last Year

Dependencies

requirements.txt pypi
  • androguard ==3.4.0a1
  • incremental >=17.5.0
  • lxml ==4.6.5
  • manafa >=0.3.127
  • physalia ==0.0.1.dev122
  • pylogcatparser >=0.2.7
  • six >=1.15.0
  • termcolor ==1.1.0