# Healing Data Loss Problems in Android Apps

**Authors:** Oliviero Riganelli, Daniela Micucci, Leonardo Mariani

arXiv: 1701.05467 · 2017-01-20

## TL;DR

This paper introduces DataLossHealer, a runtime technique for Android apps that automatically detects and heals data loss problems caused by improper state restoration during stop-start events, improving app robustness.

## Contribution

The paper presents DataLossHealer, a novel runtime approach that identifies and repairs data loss issues in Android apps as they occur in the field, with incremental learning to reduce overhead.

## Key findings

- Effectively detects data loss problems during app execution.
- Automatically heals apps to prevent data loss and crashes.
- Reduces monitoring overhead over time through learning.

## Abstract

Android apps should be designed to cope with stop-start events, which are the events that require stopping and restoring the execution of an app while leaving its state unaltered. These events can be caused by run-time configuration changes, such as a screen rotation, and by context-switches, such as a switch from one app to another. When a stop-start event occurs, Android saves the state of the app, handles the event, and finally restores the saved state. To let Android save and restore the state correctly, apps must provide the appropriate support. Unfortunately, Android developers often implement this support incorrectly, or do not implement it at all. This bad practice makes apps to incorrectly react to stop-start events, thus generating what we defined data loss problems, that is Android apps that lose user data, behave unexpectedly, and crash due to program variables that lost their values. Data loss problems are difficult to detect because they might be observed only when apps are in specific states and with specific inputs. Covering all the possible cases with testing may require a large number of test cases whose execution must be checked manually to discover whether the app under test has been correctly restored after each stop-start event. It is thus important to complement traditional in-house testing activities with mechanisms that can protect apps as soon as a data loss problem occurs in the field. In this paper we present DataLossHealer, a technique for automatically identifying and healing data loss problems in the field as soon as they occur. DataLossHealer is a technique that checks at run-time whether states are recovered correctly, and heals the app when needed. DataLossHealer can learn from experience, incrementally reducing the overhead that is introduced avoiding to monitor interactions that have been managed correctly by the app in the past.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1701.05467/full.md

## Figures

1 figure with captions in the complete paper: https://tomesphere.com/paper/1701.05467/full.md

---
Source: https://tomesphere.com/paper/1701.05467