Skip to content

An Android Instrumentation tool to compute Code Coverage

License

Notifications You must be signed in to change notification settings

JordanSamhi/AndroLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AndroLog

Welcome to AndroLog, your simple solution to insert probes into Android apps with the goal to compute code coverage at runtime.

AndroLog offers, so far, several levels of granularity:

  • Classes
  • Methods
  • Statements
  • Activities
  • Services
  • Broadcast Receivers
  • Content Providers

Do not hesitate to contribute or open issues may you need additional levels of granularity.

🚀 Getting started

⬇️ Downloading the tool

git clone https://github.com/JordanSamhi/AndroLog.git

🔧 Installing the tool

➡️ Before compiling AndroLog, make sure to set the paths to zipalign and apksigner in the config.properties file located in src/main/resources/

cd AndroLog
mvn clean install

💻 Using the tool

java -jar AndroLog/target/androlog-0.1-jar-with-dependencies.jar options

Options:

  • -a : The path to the APK to process.
  • -p : The path to Android platofrms folder.
  • -l : The log identifier to use.
  • -o : The output where to write the instrumented APK.
  • -pa : Parsing runtime output logs.
  • -c : Logging classes.
  • -m : Logging methods.
  • -s : Logging statements.
  • -cp : Logging Android components (Activity, Service, BroadcastReceiver, ContentProvider).
  • -mc : Log method calls (e.g., a()-->b()).
  • -n : If set, this flag tells AndroLog to not consider libraries in the process.
  • -pkg : Sets the package name of classes to be exclusively instrumented.

ℹ️ Examples

Instrumenting

  java -jar AndroLog/target/androlog-0.1-jar-with-dependencies.jar -p ./Androidplatforms/ -l MY_SUPER_LOG -o ./output/ -a my_app.apk -c -m -cp

Computing Code Coverage

  java -jar AndroLog/target/androlog-0.1-jar-with-dependencies.jar -p ./Androidplatforms/ -l MY_SUPER_LOG -a my_app.apk -c -m -cp -pa logs

🔨 Built With

  • Maven - Dependency Management

📃 License

This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSE 2.1 - see the LICENSE file for details

📧 Contact

For any question regarding this study, please contact us at: Jordan Samhi

About

An Android Instrumentation tool to compute Code Coverage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published