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 条
  • [41] Sentinel: generating GUI tests for sensor leaks in Android and Android wear apps
    Wu, Haowei
    Zhang, Hailong
    Wang, Yan
    Rountev, Atanas
    SOFTWARE QUALITY JOURNAL, 2020, 28 (01) : 335 - 367
  • [42] Sentinel: generating GUI tests for sensor leaks in Android and Android wear apps
    Haowei Wu
    Hailong Zhang
    Yan Wang
    Atanas Rountev
    Software Quality Journal, 2020, 28 : 335 - 367
  • [43] Detection of Android Malware: Combined with Static Analysis and. Dynamic Analysis
    Su, Ming-Yang
    Fung, Kek-Tung
    Huang, Yu-Hao
    Kang, Ming-Zhi
    Chung, Yen-Heng
    2016 INTERNATIONAL CONFERENCE ON HIGH PERFORMANCE COMPUTING & SIMULATION (HPCS 2016), 2016, : 1013 - 1018
  • [44] Combinatorial Testing of Context Aware Android Applications
    Piparia, Shraddha
    Adamo, David
    Bryce, Renee
    Do, Hyunsook
    Bryant, Barrett
    PROCEEDINGS OF THE 2021 16TH CONFERENCE ON COMPUTER SCIENCE AND INTELLIGENCE SYSTEMS (FEDCSIS), 2021, : 17 - 26
  • [45] Context-Aware Android Applications Testing
    de Almeida, Diego Rodrigues
    Machado, Patricia D. L.
    Andrade, Wilkerson L.
    34TH BRAZILIAN SYMPOSIUM ON SOFTWARE ENGINEERING, SBES 2020, 2020, : 283 - 292
  • [46] Detection of Android Malware by Static Analysis on Permissions and Sensitive Functions
    Su, Ming-Yang
    Fung, Kek-Tung
    2016 EIGHTH INTERNATIONAL CONFERENCE ON UBIQUITOUS AND FUTURE NETWORKS (ICUFN), 2016, : 873 - 875
  • [47] The Android Malware Static Analysis: Techniques, Limitations, and Open Challenges
    Bakour, Khaled
    Unver, H. Murat
    Ghanem, Razan
    2018 3RD INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND ENGINEERING (UBMK), 2018, : 586 - 593
  • [48] Androshield: Automated android applications vulnerability detection, a hybrid static and dynamic analysis approach
    Amin A.
    Eldessouki A.
    Magdy M.T.
    Abdeen N.
    Hindy H.
    Hegazy I.
    Information (Switzerland), 2019, 10 (10):
  • [49] AndroShield: Automated Android Applications Vulnerability Detection, a Hybrid Static and Dynamic Analysis Approach
    Amin, Amr
    Eldessouki, Amgad
    Magdy, Menna Tullah
    Abdeen, Nouran
    Hindy, Hanan
    Hegazy, Islam
    INFORMATION, 2019, 10 (10)
  • [50] Detecting Privacy Leaks in Android Hybrid Applications Based on Dynamic Taint Tracking
    Tang, Junwei
    Li, Ruixuan
    Xiong, Zhiqiang
    Han, Hongmu
    Gu, Xiwu
    2021 IEEE 19TH INTERNATIONAL CONFERENCE ON EMBEDDED AND UBIQUITOUS COMPUTING (EUC 2021), 2021, : 193 - 200