Practical static analysis of context leaks in Android applications

被引:2
|
作者
Toffalini, Flavio [1 ]
Sun, Jun [1 ]
Ochoa, Martin [2 ]
机构
[1] Singapore Univ Technol & Design, Singapore 487372, Singapore
[2] Univ Rosario, Dept Appl Math & Comp Sci, Bogota, Colombia
关键词
Android; memory leak; static analysis;
D O I
10.1002/spe.2659
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Android native applications, written in Java and distributed in APK format, are widely used in mobile devices. Their specific pattern of use lets the operating system control the creation and destruction of resources, such as activities and services (contexts). Programmers are not supposed to interfere with such life cycle events. Otherwise, contexts might be leaked, ie, they will never be deallocated from memory, or be deallocated late, leading to memory exhaustion and frozen applications. In practice, it is easy to write incorrect code, which hinders garbage collection of contexts and leads to context leakages. In this work, we present a novel static analysis method that finds context leaks in Android code. We apply this analysis to APKs translated into Java bytecode. We provide a formal analysis of our algorithms and suggest further research directions for improving precision by combining different approaches. We discuss the results of a large number of experiments with our analysis, which reveal context leaks in many widely used applications from the Android marketplace. This shows the practical usefulness of our technique and its superiority w.r.t. the well-known Lint and Infer static analysis tools. We estimate the amount of memory saved by the collection of the leaks found and explain, experimentally, where programmers often go wrong and limitations of our tool. Such lessons could be used for designing of a sound or more powerful static analysis tool. This work can be considered as a practical application of software analysis techniques to solve practical problems.
引用
收藏
页码:233 / 251
页数:19
相关论文
共 50 条
  • [1] Static Analysis of Context Leaks in Android Applications
    Toffalini, Flavio
    Sun, Jun
    Ochoa, Martin
    2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING - SOFTWARE ENGINEERING IN PRACTICE TRACK (ICSE-SEIP 2018), 2018, : 215 - 224
  • [2] Static Analysis of Memory Leak in Android Applications
    Zhou, Di
    Fu, Zhengyu
    PROCEEDINGS OF THE 4TH INTERNATIONAL CONFERENCE ON MECHATRONICS, MATERIALS, CHEMISTRY AND COMPUTER ENGINEERING 2015 (ICMMCCE 2015), 2015, 39 : 1023 - 1027
  • [3] HybriDroid: Static Analysis Framework for Android Hybrid Applications
    Lee, Sungho
    Dolby, Julian
    Ryu, Sukyoung
    2016 31ST IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2016, : 250 - 261
  • [4] Prioritizing Test Cases for Memory Leaks in Android Applications
    Ju Qian
    Di Zhou
    Journal of Computer Science and Technology, 2016, 31 : 869 - 882
  • [5] Prioritizing Test Cases for Memory Leaks in Android Applications
    Qian, Ju
    Zhou, Di
    JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2016, 31 (05) : 869 - 882
  • [6] Practical Precise Taint-flow Static Analysis for Android App Sets
    Klieber, William
    Flynn, Lori
    Snavely, Will
    Zheng, Michael
    13TH INTERNATIONAL CONFERENCE ON AVAILABILITY, RELIABILITY AND SECURITY (ARES 2018), 2019,
  • [7] LESDroid - A Tool for Detecting Exported Service Leaks of Android Applications
    Ma, Jun
    Liu, Shaocong
    Jiang, Yanyan
    Tao, Xianping
    Xu, Chang
    Lu, Jian
    2018 IEEE/ACM 26TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2018), 2018, : 244 - 254
  • [8] Static/Dynamic Analysis of Android Applications to Improve Energy-Efficiency
    Jalili, Mohammad
    Faghih, Fathiyeh
    2022 CPSSI 4TH INTERNATIONAL SYMPOSIUM ON REAL-TIME AND EMBEDDED SYSTEMS AND TECHNOLOGIES (RTEST 2022), 2022,
  • [9] Characterizing and Detecting Resource Leaks in Android Applications
    Guo, Chaorong
    Zhang, Jian
    Yan, Jun
    Zhang, Zhiqiang
    Zhang, Yanli
    2013 28TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2013, : 389 - 398
  • [10] DryJIN: Detecting Information Leaks in Android Applications
    Choi, Minseong
    Im, Yubin
    Ko, Steve
    Kwon, Yonghwi
    Jeon, Yuseok
    Cho, Haehyun
    ICT SYSTEMS SECURITY AND PRIVACY PROTECTION, SEC 2024, 2024, 710 : 76 - 90