arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.00300cs.SE
收藏

描述和检测Android应用中的配置兼容性问题

Characterizing and Detecting Configuration Compatibility Issues in Android Apps

Huaxun Huang, Ming Wen, Lili Wei, Yepang Liu, Shing-Chi Cheung

摘要:

XML配置文件在Android中广泛用于定义应用的用户界面和基本的运行时信息,如系统权限。随着Android的发展,它可能会在配置环境中引入功能更改,从而导致兼容性问题,表现为不同API级别的应用行为不一致。在特定的Android版本上运行时,此类问题通常会导致软件崩溃和外观不一致。现有的作品通过进行琐碎的数据流分析,同时未能对Android配置文件的XML树层次结构进行建模,从而产生大量的误报和漏报问题检测规则。此外,我们对Android框架中的更改如何导致此类兼容性问题知之甚少。为了弥合这些差距,我们进行了一项系统研究,分析了从43个流行应用程序中收集的196个现实问题。我们确定了导致此类配置兼容性问题的Android框架代码更改的常见模式。基于这些发现,我们提出了\textsc{ConfDroid},它可以自动提取规则来检测配置兼容性问题。直觉是基于从公共代码更改模式中学习的模型执行符号执行。实验结果表明,ConfDroid能够成功地提取出282条有效的问题检测规则,准确率为91.9%。其中,65个提取的规则可以表现出的问题,不能检测到的最先进的基线的规则。更重要的是,其中11个导致检测到107个可重现的配置兼容性问题,而基线无法在316个真实Android应用程序中的30个中检测到。

英文摘要:

XML configuration files are widely used in Android to define an app's user interface and essential runtime information such as system permissions. As Android evolves, it might introduce functional changes in the configuration environment, thus causing compatibility issues that manifest as inconsistent app behaviors at different API levels. Such issues can often induce software crashes and inconsistent look-and-feel when running at specific Android versions. Existing works incur plenty of false positive and false negative issue-detection rules by conducting trivial data-flow analysis while failing to model the XML tree hierarchies of the Android configuration files. Besides, little is known about how the changes in an Android framework can induce such compatibility issues. To bridge such gaps, we conducted a systematic study by analyzing 196 real-world issues collected from 43 popular apps. We identified common patterns of Android framework code changes that induce such configuration compatibility issues. Based on the findings, we propose \textsc{ConfDroid} that can automatically extract rules for detecting configuration compatibility issues. The intuition is to perform symbolic execution based on a model learned from the common code change patterns. Experiment results show that ConfDroid can successfully extract 282 valid issue-detection rules with a precision of 91.9%. Among them, 65 extracted rules can manifest issues that cannot be detected by the rules of state-of-the-art baselines. More importantly, 11 out of them have led to the detection of 107 reproducible configuration compatibility issues that the baselines cannot detect in 30 out of 316 real-world Android apps.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑