Introduction

To analyze and test Android apps, we need to know program paths, i.e., the control flow of callbacks implemented in the apps. One of the challenges to identify such information is the extensive use of the Android API methods in the apps. These methods can invoke multiple callbacks, and the control flow of these callbacks is context-sensitive in that different callback sequences may be invoked at different API call sites. To address the challenge, in this paper, we design a summary representation for an Android API method that aims to capture the control flow of callbacks in the API methods as well as the conditions under which the callbacks are invoked. We developed a static demand-driven analysis to automatically generate such summaries. To show the usefulness of the summaries, we construct the apps' control flow graphs (CFGs) and apply infeasible path detection on the CFGs. Our experiments show that we are able to generate the API summaries that are compact and reusable, and by replacing the API calls with the summaries we generated, we obtained the apps' CFGs with paths up to 10 callbacks for a set of Android apps under study.



Examples

Examples of Summary Graphs
Example of App ICFG



Demo



Generated Summary Graphs and Readme



Tools to work with Summary Graphs

Description Link
API and parser for Summary Graphs in XML format lithium-parser-1.0.jar
API Documentation for parser of Summary Graphs lithium-parser-docs.zip
Example of a project using Summary Graphs' API lithium-parser-example.zip
Tool to build Inter-callback Control Flow Graphs lithium-appanalysis.zip


App ICFG Construction (Readme)

Note: for apps com.google.zxing.client.android, a2dp.Vol, org.connectbot, org.openintents.filemanager we present a sample of 2000 paths. For complete set of paths contact danilo0 at iastate.edu


App No. Classes No. Methods No. Callbacks Callback Graph Paths (No. of paths) Callback Traces (No. of traces)
com.blippex.app 41 129 21 com.blippex.app.dot com.blippex.app_paths.tsv (4) com.blippex.app.zip (11)
net.sourceforge.andsys 29 95 22 net.sourceforge.andsys.dot net.sourceforge.andsys_paths.tsv (17) net.sourceforge.andsys.zip (6)
com.darknessmap 28 999 25 com.darknessmap.dot com.darknessmap_paths.tsv (30) com.darknessmap.zip (6)
com.example.android.contactslist 37 174 41 com.example.android.contactslist.dot com.example.android.contactslist_paths.tsv (194) com.example.android.contactslist.zip (6)
de.onyxbits.remotekeyboard 29 116 44 de.onyxbits.remotekeyboard.dot de.onyxbits.remotekeyboard_paths.tsv (16) de.onyxbits.remotekeyboard.zip (6)
info.staticfree.SuperGenPass 54 208 50 info.staticfree.SuperGenPass.dot info.staticfree.SuperGenPass_paths.tsv (120) info.staticfree.SuperGenPass.zip (6)
com.markuspage.android.atimetracker 37 237 65 com.markuspage.android.atimetracker.dot com.markuspage.android.atimetracker_paths.tsv (27) com.markuspage.android.atimetracker.zip (6)
aarddict.android 84 351 66 aarddict.android.dot aarddict.android_paths.tsv (2598) aarddict.android.zip (6)
de.ub0r.android.websms 90 533 75 de.ub0r.android.websms.dot de.ub0r.android.websms_paths.tsv (79) de.ub0r.android.websms.zip (6)
com.google.zxing.client.android 123 611 83 com.google.zxing.client.android.dot com.google.zxing.client.android_paths.tsv (2000) com.google.zxing.client.android.zip (6)
a2dp.Vol 113 585 173 a2dp.Vol.dot a2dp.Vol_paths.tsv (2000) a2dp.Vol.zip (10)
org.connectbot 199 1046 176 org.connectbot.dot org.connectbot_paths.tsv (2000) org.connectbot.zip (6)
org.openintents.filemanager 159 855 180 org.openintents.filemanager.dot org.openintents.filemanager_paths.tsv (2000) org.openintents.filemanager.zip (10)
com.evancharlton.mileage 221 1223 241 com.evancharlton.mileage.dot com.evancharlton.mileage_paths.tsv (71) com.evancharlton.mileage.zip (6)