Skip to main content
QUICK REVIEW

[Paper Review] Measuring the Declared SDK Versions and Their Consistency with API Calls in Android Apps

Daoyuan Wu, Ximing Liu|arXiv (Cornell University)|Feb 16, 2017
Advanced Malware Detection TechniquesComputer Science5 citations
TL;DR

This paper proposes a three-dimensional analysis to measure declared SDK versions (DSDK) in 24,000 Android apps and their consistency with actual API calls. It identifies that ~1.8K apps crash on older Android versions due to under-set minSdkVersion, and over 400 apps remain vulnerable to remote code execution due to outdated targetSdkVersion, highlighting critical compatibility and security risks in SDK declaration practices.

ABSTRACT

Android has been the most popular smartphone system, with multiple platform versions (e.g., KITKAT and Lollipop) active in the market. To manage the application's compatibility with one or more platform versions, Android allows apps to declare the supported platform SDK versions in their manifest files. In this paper, we make a first effort to study this modern software mechanism. Our objective is to measure the current practice of the declared SDK versions (which we term as DSDK versions afterwards) in real apps, and the consistency between the DSDK versions and their app API calls. To this end, we perform a three-dimensional analysis. First, we parse Android documents to obtain a mapping between each API and their corresponding platform versions. We then analyze the DSDK-API consistency for over 24K apps, among which we pre-exclude 1.3K apps that provide different app binaries for different Android versions through Google Play analysis. Besides shedding light on the current DSDK practice, our study quantitatively measures the two side effects of inappropriate DSDK versions: (i) around 1.8K apps have API calls that do not exist in some declared SDK versions, which causes runtime crash bugs on those platform versions; (ii) over 400 apps, due to claiming the outdated targeted DSDK versions, are potentially exploitable by remote code execution. These results indicate the importance and difficulty of declaring correct DSDK, and our work can help developers fulfill this goal.

Motivation & Objective

  • To systematically study the practice of declared SDK versions (DSDK) in real-world Android apps.
  • To analyze the consistency between DSDK versions and actual API calls made by apps.
  • To quantify the real-world impact of incorrect DSDK declarations, including runtime crashes and security vulnerabilities.
  • To provide insights into the challenges and risks associated with improper SDK versioning in Android development.

Proposed method

  • The study performs a three-dimensional analysis across Google Play, Android documentation, and individual app binaries to extract SDK and API mappings.
  • It parses Android documentation to build a comprehensive mapping between each API and its corresponding platform API level.
  • The authors analyze over 24,000 apps from Google Play, excluding 1,300 multi-Apk apps to avoid redundancy.
  • A threshold-based filtering technique is applied to reduce noise from version-dependent if-else blocks in code.
  • The analysis identifies apps with API calls exceeding declared minSdkVersion and those with outdated targetSdkVersion, particularly focusing on security-sensitive APIs like addJavascriptInterface().
  • The study uses control-flow analysis limitations as a threat, but excludes library code and applies heuristics to minimize false positives.

Experimental results

Research questions

  • RQ1How prevalent is the correct declaration of minSdkVersion, targetSdkVersion, and maxSdkVersion in real Android apps?
  • RQ2To what extent do apps make API calls that exceed their declared minSdkVersion, leading to runtime crashes?
  • RQ3How many apps remain vulnerable to known security flaws due to outdated targetSdkVersion declarations?
  • RQ4What is the impact of incorrect DSDK declarations on app compatibility and security?

Key findings

  • Approximately 17% of the analyzed apps either fail to declare the targetSdkVersion or declare it incorrectly.
  • Around 1,800 apps have API calls with higher API levels than their declared minSdkVersion, causing runtime crashes on older Android versions.
  • Over 400 apps have outdated targetSdkVersion values, making them vulnerable to remote code execution via the addJavascriptInterface() API.
  • Among apps using addJavascriptInterface(), 413 are vulnerable due to targetSdkVersion < 17, with 238 not defining the targetSdkVersion at all.
  • The study reveals that 1,750 apps have more than five API calls exceeding their minSdkVersion, and 692 have over ten such calls, indicating widespread inconsistency.
  • The findings highlight that incorrect DSDK declarations are a significant source of both functional instability and security risks in Android apps.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.