Taming Fragmentation-Induced Compatibility Issues in Android Applications

The Hong Kong University of Science and Technology
Department of Computer Science and Engineering


PhD Thesis Defence


Title: "Taming Fragmentation-Induced Compatibility Issues in Android
Applications"

By

Miss Lili WEI


Abstract:

Android ecosystem is heavily fragmented. The numerous combinations of
different device models and operating system versions make it impossible
for Android app developers to exhaustively test their apps. As a result,
various compatibility issues arise, causing poor user experience.

Such fragmentation-induced compatibility issues (FIC issues) have been
well recognized as a prominent problem in Android app development.
However, little is known on the characteristics of these FIC issues and no
mature tools exist to help developers quickly diagnose and fix these
issues. To bridge the gap, we conducted an empirical study on 220
real-world compatibility issues collected from five popular open-source
Android apps. We further interviewed Android practitioners and conducted
an online survey to gain insights from their real practices. Our study
characterized the the symptoms, root causes, and triggering contexts of
the FIC issues, investigated common practices to handle the FIC issues,
and disclosed that these issues and their patches exhibit common patterns.
With these findings, we proposed a technique, FicFinder, to automatically
detect compatibility issues in Android apps. FicFinder has been evaluated
to be effective in detecting fragmentation-induced compatibility issues
with high precision and satisfactory recall.

An important input required by FicFinder is the FIC issue patterns that
capture specific Android APIs as well as their associated context by which
compatibility issues can be triggered. We denote such FIC issue patterns
as API-context pairs. In the initial version of FicFinder, the API-context
pairs were manually extracted from our empirical study dataset. Manually
extracting FIC issue patterns can be expensive. In addition, API-context
pairs can eventually get outdated since FIC issues are evolving as new
Android versions and devices are released. To address this problem, we
developed a novel framework, Pivot, that combines program analysis
and data mining techniques to automatically learn API-context pairs from
large corpora of popular Android apps. Specifically, Pivot takes an
Android app corpora as input and outputs a list of API-context pairs
ranked by their likelihood of capturing real FIC issues. With the learned
API-context pairs, we can further transfer knowledge learned from existing
Android apps to automatically detect potential FIC issues using FicFinder.
This can significantly reduce the search space for FIC issues and benefit
Android development community. To evaluate Pivot, we measured the
precision of the learned API-context pairs and leverage them to detect
previously-unknown compatibility issues in open-source Android apps.

One fundamental limitation of Pivot is that it can only learn FIC issue
patterns that have already been identified and fixed by some existing
apps. Pivot can never identify a FIC issue if it is not fixed by any apps
in the input app copora. To address this problem, we proposed Pixor to
leverage existing Android apps to proactively expose inconsistent
behaviors of different Android versions. Pixor selects and exercises
subroutines of Android apps on different Android versions to expose
inconsistent Android system behaviors. Such inconsistent behaviors can be
useful to both Android system and app developers. On the one hand, some of
the inconsistent behaviors may reveal some bugs in the Android systems.
Reporting them to the Android system developers may help improve the
reliability of Android systems. On the other hand, some of the
inconsistent behaviors can be intended customization of specific Android
versions. Identifying such inconsistent behaviors can help app developers
avoid FIC issues. In our evaluation, Pixor has identified both bugs and
intended system behavior changes in Android Q (Android 10). Three of our
identified bugs have been confirmed fixed by Android development team.


Date:                   Monday, 9 March 2020

Time:                   3:00pm - 5:00pm

Zoom Meeting:           https://hkust.zoom.us/j/556590493

Chairman:               Prof. Kai LIU (LIFS)

Committee Members:      Prof. Shing-Chi CHEUNG (Supervisor)
                        Prof. Shuai WANG
                        Prof. Raymond WONG
                        Prof. Rhea Patricia LIEM (MAE)
                        Prof. Mary Lou SOFFA (Univ of Virginia)


**** ALL are Welcome ****