KRE Android tool-chain

Smartphone apps create and handle a large variety of “instance” data that has to persist across runs, such as the current navigation route, workout results, antivirus settings, or game state. Due to the nature of the smartphone platform, an app can be paused, sent into background, or killed at any time. If the instance data is not saved and restored between runs, in addition to data loss, partially-saved or corrupted data can crash the app upon resume or restart. While smartphone platforms offer API support for data-saving and data-retrieving operations, the use of this API is ad-hoc: left to the programmer, rather than enforced by the compiler. We have observed that several categories of bugs—including data loss, failure to resume/restart or resuming/restarting in the wrong state—are due to incorrect handling of instance data and are easily triggered by just pressing the ‘Home’ or ‘Back’ buttons. We name KR data the data that should be preserved across runs (kill-and-restart or pause- and-resume cycles). Motivated by this observation, we have investigated the consequences of incorrect KR data handling in Android apps. We found that several categories of bugs— loss of user’s work, loss of app or device settings— are due to incorrect KR data handling; we call them KR errors. To help address this problem, we have constructed a tool chain for Android (the KREfinder static analysis and the KREreproducer input generator) that helps find and reproduce such incorrect handling. We have evaluated our approach by running the static analysis on 324 apps, of which 49 were further analyzed manually.

KREFinder

KREFinder is a toolset designed to identify and reproduce Kill-restart errors (KR Errors) inside an Android application. Learn More...

KREReproducer

KREReproducer aims to create GUI specific input sequences to trigger a particular method of interest within the app. Learn More...

KREfinder and KREReproducer operational diagram

Overview KREfinder

Features

  • KR Error finder and reproducer for android applications.
  • Statically detects Kill and Restart errors from the application.
  • Generate input sequences to reproduce the errors.
  • Tested on an wide range of applications from different categories from Google Play store.
  • Reveals program bugs due to incorrect handling of KR data.