计算机科学与探索 ›› 2018, Vol. 12 ›› Issue (9): 1397-1406.DOI: 10.3778/j.issn.1673-9418.1710026

• 系统软件与软件工程 • 上一篇    下一篇

安卓应用HTTP缓存缺陷的动态检测

杨嘉成1,2+,彭  鑫1,2,赵文耘1,2   

  1. 1. 复旦大学 软件学院,上海 201203
    2. 复旦大学 上海市数据科学重点实验室,上海 201203
  • 出版日期:2018-09-01 发布日期:2018-09-10

Dynamic Detection of HTTP Cache Deficiencies of Android Apps

YANG Jiacheng1,2+, PENG Xin1,2, ZHAO Wenyun1,2   

  1. 1. Software School, Fudan University, Shanghai 201203, China
    2. Shanghai Key Laboratory of Data Science, Fudan University, Shanghai 201203, China
  • Online:2018-09-01 Published:2018-09-10

摘要: 移动应用数据流量消耗和响应速度是用户和开发者都非常关心的问题,很多移动应用都使用了缓存技术(特别是HTTP缓存)以有效减少移动数据流量和电量消耗,加快应用响应速度。然而,移动应用缓存的合理使用与应用的特点和具体功能相关,许多应用中对于缓存的不合理使用非但不能起到应有的作用,反而会占用移动设备宝贵的存储空间。为此,提出了一种基于动态分析的安卓应用缓存缺陷自动检测方法,可以在应用运行时动态监控应用内部的缓存行为,并分析其缓存是否存在缺陷,以及存在怎样的缺陷。实现了相应的运行时库以及安卓应用自动化改造的工具,并针对当前安卓应用市场上的25个安卓应用进行了检测。实验结果表明,该方法适用于安卓市场上的很大一部分应用,并能够有效发现安卓应用中存在的缓存缺失、缓存空间无限增长和缓存冗余等问题。

关键词: 安卓应用, HTTP缓存, 程序改造, 动态检测

Abstract: Both users and developers of Android application are concerned with data traffic consumption and response time of an application. To solve these problems, many mobile applications make use of cache (especially HTTP cache) to effectively reduce traffic and energy consumption, and improve responsiveness. However, the proper use of cache in a mobile application is related to the application??s features and specific functions. The improper use of cache in many applications not only would be ineffective, but also waste precious storage space in mobile device. For this purpose, this paper proposes a dynamic analysis based automatic detection method of HTTP cache deficiencies of Android Apps, which can dynamically monitor interior cache behavior of Apps, and analyze whether there are   deficiencies, and what kinds of deficiencies. This paper realizes a corresponding runtime library and an automated program transformation tool of Android application, and conducts an experiment on 25 present Android applications. The results show that the method is applicable for a large part of applications, and can effectively find problems like lack of cache, unlimited cache space and redundant cache in Android applications.

Key words: Android applications, HTTP cache, program transformation, dynamic detection