Code Monkey home page Code Monkey logo

async-droid's Introduction

Android App Schedule Enumerator

A tool for concurrency testing of Android apps.

Requirements

  • Android SDK: http://developer.android.com/sdk/index.html

    • Android SDK Tools
    • Android SDK Platform-tools
    • Android SDK Platform (we use Android 4.4.2 / API 19)
    • Android system image for the emulator
    • (Optional) Eclipse + ADT plugin
  • (Optional) Alternative Android Virtual Devices:

  • Java (SE 7)

  • Apache Ant (1.9.4)

  • Python (2.7.5)

Usage

Ensure the ANDROID_HOME environment variable points to a valid Android platform SDK containing an Android platform library, e.g., $ANDROID_HOME/platforms/android-19/android.jar. Also, be sure you have created and started an Android Virtual Device (AVD).

Instrument your application .apk file for testing. For instance, try the example app in example/HelloWorldApk.apk:

ant -Dapk=example/HelloWorldApp.apk

(Note that the original .apk file will remain unmodified.)

Then, test the instrumented application by:

Recording a set of user events (this overwrites the previously recorded events):

python bin/aase.py --record build/HelloWorldApp.apk

Then replaying them for schedules with/without a delay bound.

python bin/aase.py --replay --delays 1 build/HelloWorldApp.apk

Running the sample application

To demonstrate the detection of a sample concurrency bug, we provide a previous version of vlilleChecker Android App (built from commit 86b22a7).

Instrument the application .apk file for testing:

ant -Dapk=example/sample_vlillechecker.apk -Dandroid.api.version=19

You can replay the user events that trigger the bug (with particular thread interleavings) by running:

python bin/aase.py --replay --delays 1 --events events.trc build/sample_vlillechecker.apk

(Optional) You can also record your own a set of user events with the command below and then replay them:

python bin/aase.py --record build/sample_vlillechecker.apk     

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.