Bamboo: LLM-Driven Discovery of API-Permission Mappings in the Android Framework

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Hu, Han, Minn, Wei, Liu, Yonghui, Liu, Jiakun, Thung, Ferdian, Zhuo, Terry Yue, Shar, Lwin Khin, Gao, Debin, Lo, David
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914075941797888
author Hu, Han
Minn, Wei
Liu, Yonghui
Liu, Jiakun
Thung, Ferdian
Zhuo, Terry Yue
Shar, Lwin Khin
Gao, Debin
Lo, David
author_facet Hu, Han
Minn, Wei
Liu, Yonghui
Liu, Jiakun
Thung, Ferdian
Zhuo, Terry Yue
Shar, Lwin Khin
Gao, Debin
Lo, David
contents The permission mechanism in the Android Framework is integral to safeguarding the privacy of users by managing users' and processes' access to sensitive resources and operations. As such, developers need to be equipped with an in-depth understanding of API permissions to build robust Android apps. Unfortunately, the official API documentation by Android chronically suffers from imprecision and incompleteness, causing developers to spend significant effort to accurately discern necessary permissions. This potentially leads to incorrect permission declarations in Android app development, potentially resulting in security violations and app failures. Recent efforts in improving permission specification primarily leverage static and dynamic code analyses to uncover API-permission mappings within the Android framework. Yet, these methodologies encounter substantial shortcomings, including poor adaptability to Android SDK and Framework updates, restricted code coverage, and a propensity to overlook essential API-permission mappings in intricate codebases. This paper introduces a pioneering approach utilizing large language models (LLMs) for a systematic examination of API-permission mappings. In addition to employing LLMs, we integrate a dual-role prompting strategy and an API-driven code generation approach into our mapping discovery pipeline, resulting in the development of the corresponding tool, \tool{}. We formulate three research questions to evaluate the efficacy of \tool{} against state-of-the-art baselines, assess the completeness of official SDK documentation, and analyze the evolution of permission-required APIs across different SDK releases. Our experimental results reveal that \tool{} identifies 2,234, 3,552, and 4,576 API-permission mappings in Android versions 6, 7, and 10 respectively, substantially outprforming existing baselines.
format Preprint
id arxiv_https___arxiv_org_abs_2510_04078
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Bamboo: LLM-Driven Discovery of API-Permission Mappings in the Android Framework
Hu, Han
Minn, Wei
Liu, Yonghui
Liu, Jiakun
Thung, Ferdian
Zhuo, Terry Yue
Shar, Lwin Khin
Gao, Debin
Lo, David
Software Engineering
The permission mechanism in the Android Framework is integral to safeguarding the privacy of users by managing users' and processes' access to sensitive resources and operations. As such, developers need to be equipped with an in-depth understanding of API permissions to build robust Android apps. Unfortunately, the official API documentation by Android chronically suffers from imprecision and incompleteness, causing developers to spend significant effort to accurately discern necessary permissions. This potentially leads to incorrect permission declarations in Android app development, potentially resulting in security violations and app failures. Recent efforts in improving permission specification primarily leverage static and dynamic code analyses to uncover API-permission mappings within the Android framework. Yet, these methodologies encounter substantial shortcomings, including poor adaptability to Android SDK and Framework updates, restricted code coverage, and a propensity to overlook essential API-permission mappings in intricate codebases. This paper introduces a pioneering approach utilizing large language models (LLMs) for a systematic examination of API-permission mappings. In addition to employing LLMs, we integrate a dual-role prompting strategy and an API-driven code generation approach into our mapping discovery pipeline, resulting in the development of the corresponding tool, \tool{}. We formulate three research questions to evaluate the efficacy of \tool{} against state-of-the-art baselines, assess the completeness of official SDK documentation, and analyze the evolution of permission-required APIs across different SDK releases. Our experimental results reveal that \tool{} identifies 2,234, 3,552, and 4,576 API-permission mappings in Android versions 6, 7, and 10 respectively, substantially outprforming existing baselines.
title Bamboo: LLM-Driven Discovery of API-Permission Mappings in the Android Framework
topic Software Engineering
url https://arxiv.org/abs/2510.04078