Skip to main content
QUICK REVIEW

[Paper Review] DPerm: Assisting the Migration of Android Apps to Runtime Permissions

Denis Bogdanas|arXiv (Cornell University)|Jun 15, 2017
Advanced Malware Detection TechniquesComputer Science11 references6 citations
TL;DR

This paper presents DPSpec, a comprehensive and precise Android permission specification derived from official SDK documentation and source code analysis, and DPerm, a context-sensitive static analysis tool that recommends accurate runtime permission request locations. DPerm achieves 96% precision and 89% recall in identifying where to insert permission requests, significantly improving migration support for Android apps to the runtime permission model.

ABSTRACT

Android apps require permissions when accessing resources related to privacy or system integrity. Starting from Android 6, these permissions have to be asked at runtime. However, migrating to the new permission model poses multiple challenges for developers. First, developers have to discover where the app uses permissions, which requires a permission specification. To date several such specifications have been built, yet these are either imprecise, incomplete or don't support all types of protected resources. We first present DPSpec, a novel permission specification built from several documentation formats supplied with the Android SDK. Compared with the state the art specification, it contains 2.5x as many entries for protected methods and detects dangerous permission usages in more than twice as many apps. A second challenge for developers is where to insert permission requests, with possible locations restricted by the request mechanism. We also present DPerm, a static analysis for Android apps that recommends locations for permission requests in code. It achieves high precision through context sensitivity and improves recall through a general call graph augmentation algorithm for incomplete code. Our empirical evaluation on 32 apps shows a precision of 96% and recall of 89%.

Motivation & Objective

  • Address the lack of a complete, precise, and up-to-date permission specification for Android, especially for protected fields and methods.
  • Overcome the challenge of identifying correct insertion points for runtime permission requests in complex call graphs, particularly when SDK source code is unavailable.
  • Improve developer productivity and security by enabling automated, high-precision migration of Android apps to the Android 6+ runtime permission model.
  • Provide a foundation for future tooling that supports long-term maintenance of runtime permission handling in evolving Android apps.

Proposed method

  • Construct DPSpec by aggregating permissions from multiple Android SDK documentation formats, including Java annotations, XML annotations, and Javadoc comments, with manual validation and conservative interpretation of ambiguities.
  • Augment DPSpec with inferred mappings from static analysis of 22 open-source apps from F-Droid to include protected fields and improve completeness.
  • Design DPerm as a context-sensitive static analysis tool that performs backwards reachability analysis from permission check points to identify valid request insertion locations.
  • Enhance call graph recall using a general call graph augmentation algorithm that adds safe edges based on heuristics and API behavior, compensating for incomplete SDK source access.
  • Integrate DPerm with Android Studio-style inspections to recommend permission request locations while preserving inter-procedural correctness.
  • Evaluate DPerm on 32 real-world Android apps to measure precision and recall, using DPSpec as the ground truth for permission mappings.

Experimental results

Research questions

  • RQ1How complete and precise is a permission specification derived from official Android SDK documentation compared to existing automated approaches?
  • RQ2To what extent can static analysis with context sensitivity and call graph augmentation improve the recall of permission request location recommendations in the absence of SDK source code?
  • RQ3How does the proposed DPerm tool compare in precision and recall to existing tools, such as Android Studio's built-in inspection, for identifying correct runtime permission request locations?
  • RQ4Can a specification like DPSpec serve as a reliable benchmark for evaluating and improving future permission specification mining tools?
  • RQ5What is the real-world impact of incomplete or imprecise permission specifications on the migration of Android apps to runtime permissions?

Key findings

  • DPSpec contains 120 mappings for protected methods—2.5 times more than the state-of-the-art Axplorer specification—and detects dangerous permission usages in more than twice as many apps.
  • DPSpec is the first permission specification to include protected fields, significantly improving coverage over existing tools.
  • DPerm achieves 96% precision and 89% recall in recommending runtime permission request locations across 32 real-world Android apps.
  • The call graph augmentation algorithm in DPerm effectively improves recall by adding safe edges, compensating for incomplete SDK source code access.
  • The evaluation shows that even with limited access to SDK sources, DPerm can identify correct request locations with high accuracy, outperforming existing tools like Android Studio's inspection.
  • The authors successfully delivered DPSpec to Google engineers, indicating real-world applicability and potential for integration into future Android tooling and documentation.

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.