Towards Automatic Detection and Repair of Compatibility Issues in Android Apps

PhD Thesis Proposal Defence


Title: "Towards Automatic Detection and Repair of Compatibility Issues in 
Android Apps"

by

Mr. Huaxun HUANG


Abstract:

Android is a fast-evolving operating system for mobile phones. The API 
specifications and development guidelines of the Android framework 
constantly change with the release of new versions. As a result, 
compatibility issues arise when developers are unable to adapt their apps 
to such changes in the Android framework. Such compatibility issues 
induced by Android framework changes have been recognized as a major 
challenge for the development of Android apps. To help app developers 
resolve this challenge, in this thesis proposal, we empirically 
investigated how the Android framework changes can induce various types of 
compatibility issues. Based on the empirical findings, we further proposed 
a series of solutions to automatically detect and repair compatibility 
issues in Android apps. Specifically, this thesis proposal focuses on the 
following two aspects:

(1) Compatibility issues in XML configuration files (Configuration 
Compatibility Issues). XML configuration files are widely used in Android 
apps to render user interfaces (UIs) and provide essential information for 
execution. However, configuration compatibility issues can be incurred 
when the processing of these configuration files is inconsistent across 
different Android API levels. From the perspective of app developers, the 
manual effort of issue detection can be non-trivial given the large number 
of XML configuration files in a typical Android app. Moreover, there is no 
universal solution available to resolve configuration compatibility issues 
and app developers need to diagnose the issues and resolve them case by 
case. To bridge such gaps, we conducted a systematic study by analyzing 
196 real-world issues collected from 43 popular apps. Specifically, we 
first identified common patterns of Android framework code changes that 
induce such configuration compatibility issues. We then proposed 
ConfDroid, which can automatically extract issue-detection rules from the 
Android framework changes. Furthermore, we empirically studied the common 
strategies adopted by app developers to repair configuration compatibility 
issues. With the empirical finding, we then proposed ConfFix, which is 
driven by the knowledge of how an XML configuration file is handled 
inconsistently in different versions of the Android framework and 
generates patches to eliminate such inconsistencies. The evaluation 
results show that all the above-proposed techniques outperform the 
state-of-the-art methods and receive positive feedback from app 
developers.

(2) Compatibility issues in callback APIs (Callback Compatibility Issues). 
Android includes event-driven features in its development. The Android 
apps respond to system events (e.g., click events) by overriding the 
callback APIs provided in the Android framework. The executions of the 
callback APIs are determined by the operating system rather than the app 
developers. However, the timing of invoking the callback APIs by the 
Android framework may change with the update of the Android version, 
resulting in callback compatibility issues. Such callback compatibility 
issues mainly affect the apps' control flow and data flow, resulting in 
app crashes or other functional consequences. To fill the research gap, we 
first collected 100 real callback compatibility issues from real-world 
Android apps and then investigated how the Android framework changes can 
induce such issues. Based on the findings, we further designed and 
implemented an automation tool, CIDER, to detect callback compatibility 
issues in Android apps. CIDER works by encoding a set of predefined rules 
that model the execution order of callback APIs across Android framework 
versions. The experimental results show that CIDER outperforms the 
state-of-the-art approaches in detecting callback compatibility issues in 
real-world Android apps with high precision.


Date:			Monday, 30 January 2023

Time:                  	4:00pm - 6:00pm

Venue: 			Room 3494
 			Lifts 25/26

Committee Members:	Prof. Shing-Chi Cheung (Supervisor)
 			Dr. Dimitris Papadopoulos (Chairperson)
 			Dr. Jiasi Shen
 			Dr. Shuai Wang


**** ALL are Welcome ****