Skip to content
forked from honeynet/droidbot

A lightweight test input generator for Android

License

Notifications You must be signed in to change notification settings

hao-fu/droidbot

 
 

Repository files navigation

DroidBot

About

DroidBot is a lightweight test input generator for Android. It has the following advantages as compared with other input generators:

  1. It does not require system modification or app instrumentation;
  2. Events are based on a GUI model (instead of random);
  3. It is programmable (can customize input for certain UI);
  4. It can produce UI structures and method traces for analysis.

Prerequisite

  1. Python version 2.7
  2. Java version 1.7
  3. Android SDK
  4. Add platform_tools directory and tools directory in Android SDK to PATH

How to install

Clone this repo and intall with pip:

git clone https://github.com/honeynet/droidbot.git
pip install -e droidbot

If successfully installed, you should be able to execute droidbot -h.

How to use

  1. Make sure you have:

    • .apk file path of the app you want to analyze.
    • A device or an emulator connected to your host machine via adb.
    • Get the serial number (e.g. emulator-5554) of target device using adb devices.
  2. Start DroidBot:

    droidbot -d <serial> -a <path_to_apk> -event dfs
    

Test strategy

DroidBot uses an app model to generate test input. Currently, DroidBot support following three strategies:

  1. random -- Generate random input events;
  2. dfs/bfs -- Explore the UI states using a depth-first/breadth-first strategy;
  3. script -- Use a script to customize input for certain states. HOW.

Evaluation

We have conducted several experiments to evaluate DroidBot by testing apps with DroidBot and Monkey. The results can be found at DroidBot Posts. A sample evaluation report can be found here.

Acknowledgement

  1. AndroidViewClient
  2. Androguard
  3. The Honeynet project
  4. Google Summer of Code

Useful links

About

A lightweight test input generator for Android

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%