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
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2019年 / 49卷 / 02期
关键词
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 条
  • [31] Static Analysis of Android Programs
    Payet, Etienne
    Spoto, Fausto
    AUTOMATED DEDUCTION - CADA-23, 2011, 6803 : 439 - 445
  • [32] Fixing Resource Leaks in Android Apps with Light-weight Static Analysis and Low-overhead Instrumentation
    Liu, Jierui
    Wu, Tianyong
    Yan, Jun
    Zhang, Jian
    2016 IEEE 27TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE), 2016, : 342 - 352
  • [33] Practical Static Analysis of Detecting Intent-based Permission Leakage in Android Application
    Wu, Songyang
    Zhang, Yong
    Jin, Bo
    Cao, Wei
    2017 17TH IEEE INTERNATIONAL CONFERENCE ON COMMUNICATION TECHNOLOGY (ICCT 2017), 2017, : 1953 - 1957
  • [34] A scalable, flow-and-context-sensitive taint analysis of android applications
    Choi, Wontae
    Kannan, Jayanthkumar
    Babic, Domagoj
    JOURNAL OF COMPUTER LANGUAGES, 2019, 51 : 1 - 14
  • [35] Static Dalvik Bytecode Optimization for Android Applications
    Kim, Jeehong
    Kim, Inhyeok
    Min, Changwoo
    Jun, Hyung Kook
    Lee, Soo Hyung
    Kim, Won-Tae
    Eom, Young Ik
    ETRI JOURNAL, 2015, 37 (05) : 1001 - 1011
  • [36] LeakPred: An Approach for Identifying Components with Resource Leaks in Android Mobile Applications
    Lima, Josias Gomes
    Giusti, Rafael
    Dias-Neto, Arilo Claudio
    COMPUTERS, 2024, 13 (06)
  • [37] Crowdsourced test case generation for android applications via static program analysis
    Yuying Li
    Yang Feng
    Chao Guo
    Zhenyu Chen
    Baowen Xu
    Automated Software Engineering, 2023, 30
  • [38] Crowdsourced test case generation for android applications via static program analysis
    Li, Yuying
    Feng, Yang
    Guo, Chao
    Chen, Zhenyu
    Xu, Baowen
    AUTOMATED SOFTWARE ENGINEERING, 2023, 30 (02)
  • [39] EstiDroid: Estimate API Calls of Android Applications Using Static Analysis Technology
    Fan, Wenhao
    Zhang, Daishuai
    Chen, Ye
    Wu, Fan
    Liu, Yuan'an
    IEEE ACCESS, 2020, 8 (08): : 105384 - 105398
  • [40] DroidRista: a highly precise static data flow analysis framework for android applications
    Areej Alzaidi
    Suhair Alshehri
    Seyed M. Buhari
    International Journal of Information Security, 2020, 19 : 523 - 536