Static analysis of context leaks in android applications

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 key resources, such as activities and services (contexts). Programmers are not supposed to in...

Full description

Saved in:
Bibliographic Details
Main Authors: TOFFALINI, Flavio, SUN, Jun, COHOA, Martín
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2018
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/4651
https://ink.library.smu.edu.sg/context/sis_research/article/5654/viewcontent/3183519.3183530.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-5654
record_format dspace
spelling sg-smu-ink.sis_research-56542020-01-02T08:22:56Z Static analysis of context leaks in android applications TOFFALINI, Flavio SUN, Jun COHOA, Martín 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 key resources, such as activities and services (contexts). Programmers are not supposed to interfere with such lifecycle events. Otherwise contexts might be leaked, i.e. they will never be deallocated from memory, or be deallocated too late, leading to memory exhaustion and frozen applications. In practice, it is easy to write incorrect code, which hinders garbage collection of contexts and subsequently leads to context leakage.In this work, we present a new static analysis method that finds context leaks in Android code. We apply this analysis to APKs translated into Java bytecode. 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 proves its superiority w.r.t. the well-known Lint static analysis tool. We then estimate the amount of memory saved by the collection of the leaks found and explain, experimentally, where programmers often go wrong and what the analysis is not yet able to find. Such lessons could be later leveraged for the definition of a sound or more powerful static analysis for Android leaks. This work can be considered as a practical application of software analysis techniques to solve practical problems. 2018-06-03T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/4651 info:doi/10.1145/3183519.3183530 https://ink.library.smu.edu.sg/context/sis_research/article/5654/viewcontent/3183519.3183530.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Programming Languages and Compilers Software Engineering
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Programming Languages and Compilers
Software Engineering
spellingShingle Programming Languages and Compilers
Software Engineering
TOFFALINI, Flavio
SUN, Jun
COHOA, Martín
Static analysis of context leaks in android applications
description 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 key resources, such as activities and services (contexts). Programmers are not supposed to interfere with such lifecycle events. Otherwise contexts might be leaked, i.e. they will never be deallocated from memory, or be deallocated too late, leading to memory exhaustion and frozen applications. In practice, it is easy to write incorrect code, which hinders garbage collection of contexts and subsequently leads to context leakage.In this work, we present a new static analysis method that finds context leaks in Android code. We apply this analysis to APKs translated into Java bytecode. 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 proves its superiority w.r.t. the well-known Lint static analysis tool. We then estimate the amount of memory saved by the collection of the leaks found and explain, experimentally, where programmers often go wrong and what the analysis is not yet able to find. Such lessons could be later leveraged for the definition of a sound or more powerful static analysis for Android leaks. This work can be considered as a practical application of software analysis techniques to solve practical problems.
format text
author TOFFALINI, Flavio
SUN, Jun
COHOA, Martín
author_facet TOFFALINI, Flavio
SUN, Jun
COHOA, Martín
author_sort TOFFALINI, Flavio
title Static analysis of context leaks in android applications
title_short Static analysis of context leaks in android applications
title_full Static analysis of context leaks in android applications
title_fullStr Static analysis of context leaks in android applications
title_full_unstemmed Static analysis of context leaks in android applications
title_sort static analysis of context leaks in android applications
publisher Institutional Knowledge at Singapore Management University
publishDate 2018
url https://ink.library.smu.edu.sg/sis_research/4651
https://ink.library.smu.edu.sg/context/sis_research/article/5654/viewcontent/3183519.3183530.pdf
_version_ 1770574950418087936