Code Monkey home page Code Monkey logo

fax's Introduction

Fax -- ReadMe

This artifact is for the paper: "Multiple-Entry Testing of Android Applications by Constructing Activity Launching Contexts".

Structure:

  • Fax
    • Coverage: Coverage result in paper
    • Crashes: Coverage result in paper
    • IntentBench: Self-designed benchmark
    • FaxTool: Runable tool Fax

Requirements:

  • Install Java

  • Install Ant

  • Install Python 2.7

  • Fax requires the Z3 dynamic link library as well as the dynamic link library for the Z3/Java API .

    • For Windows: copy lib/libz/libz3.dll and lib/libz3/libz3java.dll to %JAVA_HOME%\bin.
    • For Unix-like platforms:
      • copy lib/libz3/libz3.so and lib/libz3/libz3java.so to [your_library_path]
      • add java.library.path into file "/etc/profile" (export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/[your_library_path]).
      • save the modification (source /etc/profile)
  • Prepare Android environment ( Android sdk installation information, https://developer.android.com/), the version of Android SDK Tools should lower than 25.2.3.

  • Run "java -version", "python", "ant -version", "android create project" to check whether these tools are successfully configured.

Usage of Fax:

  • Prepare an Android device or emulator and connect it to you computer. Turn the setting item "developer mode" on and allow "usb debugging".

  • Clone the project to your computer.

  • For quick start, you can run: runFax.sh or runFax.bat
    *To modify the exploration time of Fax_ex, please update the variable exploration_time in file FaxTool\script\run.py.
    In our paper, the exploration time is one hour (3600). If you want a quick validation, use the default value in Fax (60).

  • Preprocess Put the apk under test under the [apk_input_dir], and get the result in the [apk_output_dir].
    python script/Prerocess.py [apk_input_dir] [apk_output_dir]
    e.g., python script/Prerocess.py apk apk_processed
    Then the activities will be exposed, the app will be instrumented, and then installed on the device.
    For log-in required apps, you can log-in first after installation to improve the exploration coverage.

  • Test Generation python script/GenerateTestCases.py lib/Fax0108.jar [apk_input_dir] [testcase_dir] [execute_info_dir] [max_number_of_path]
    e.g., python script/GenerateTestCases.py lib/Fax0108.jar apk Result_testGen executeInfo 10000
    Get results in folder [testcase_dir].

  • Fax Launching Test python script/LaunchActs.py [testcase_dir] [launch_dir]
    e.g., python script/LaunchActs.py Result_testGen Result_launch
    Get results in folder [launch_dir].

  • Detect Crashes for Fax Launching python script/FindCrashes.py [testcase_dir] [launch_dir]
    e.g., python script/FindCrashes.py Result_testGen Result_launch

  • Fax Exploration Test python script/FairAndroidExploer.py [launch_dir] [explore_dir] [testcase_dir] [apk_output_dir] [EA/All]
    Set EA if you want to set only EA as the exploration entry.
    Set All if you want to set all activities as the exploration entry.
    e.g., python script/FairAndroidExploer.py Result_launch Result_explore Result_testGen apk_processed ALL
    Get results in folder [explore_dir].

  • Detect Crashes for Fax Exploration python script/FindCrashes.py [testcase_dir] [explore_dir]
    e.g., python script/FindCrashes.py Result_testGen Result_explore

  • Calculate Coverage Result python script/CollectLogcat.py [testcase_dir] [explore_dir] [apk_output_dir]
    e.g., python script/CollectLogcat.py Result_testGen Result_explore apk_processed

fax's People

Contributors

hanada31 avatar

Watchers

James Cloos avatar

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.