Annotated. Each entry says why you would open it, so you can pick the right one under time
pressure.
Two rules this file follows. AOSP file paths are given without line numbers — paths are stable
across releases, line numbers are not, and a citation that drifts is worse than no citation. And
no CVE identifier is invented: where a vulnerability class matters, the class is described and
you are told how to find the actual identifiers yourself.
Pin the branch you are testing against before reading any of these. The permission model has grown
at almost every release, and reading main while testing an Android 12 device will mislead you
about at least the flag set.
# host — one file, from the branch you care about# android.googlesource.com/platform/frameworks/base/+/refs/heads/android13-release/data/etc/platform.xml
You need the real protectionLevel of a platform permission. This is where android.permission.CAMERA and every one of its siblings physically live. It is the file nobody looks at and the one that settles arguments
You need the PROTECTION_* and PROTECTION_FLAG_* constants, or the two masks (PROTECTION_MASK_BASE = 0xf, PROTECTION_MASK_FLAGS = 0xfff0). Read them from your branch rather than memorising them; the flag list grows
frameworks/base/core/java/android/Manifest.java
The generated constants apps compile against. Useful for confirming a permission exists at a given API level
The permission-to-GID mapping — this chapter's §3.5¶
Path
Open it when
frameworks/base/data/etc/platform.xml
The single most important file in this chapter. Ships as /system/etc/permissions/platform.xml. Contains three element types that matter: <permission><group gid="…"/></permission> (permission → Linux group), <assign-permission … uid="shell"/> (permissions given to a UID, not a package — this is why adb shell is not an app), and <split-permission> (permissions an app receives without asking, based on its targetSdk)
You want to know howplatform.xml is parsed, which other files in etc/permissions/ are read, and in what order. Also where the privileged-app allow-lists are loaded
The AID table. platform.xml names groups (inet, net_bt); this file maps those names to numbers (3003, 3002). A vendor build can add names your reference table does not have
Under the Hood
You do not need AOSP to read the mapping — the file is on the device and is world-readable:
The device's copy is authoritative for the device in front of you, and takes three seconds. The
AOSP copy tells you what should be there, which is how you notice a vendor has changed it.
The grant and revoke logic, and the supplementary-GID computation. This is the class named in the SecurityException you get from pm grant on a normal permission
checkComponentPermission — the five-condition ladder that is the whole component access-control model. Root/system, same-UID, not-exported, null-permission, then the string compare, in that order
The check*Permission / enforce*Permission family. Put checkCallingPermission and checkCallingOrSelfPermission side by side — the first tests pid != Process.myPid() and fails closed, the second does not. That single difference is a vulnerability class
requestPermissions —it builds an Intent to another app rather than drawing anything, and that a second concurrent request is silently dropped
frameworks/base/core/java/android/os/Binder.java
getCallingUid, getCallingPid, clearCallingIdentity, restoreCallingIdentity. The UID here is the one the binder driver stamped into the transaction, and it is the only caller identity worth trusting
The PermissionController module — the separate, updatable app that draws the runtime dialog. Read it when a device's prompt behaves differently from what the documentation describes, which on vendor builds it often does
The model as the platform team frames it. Read it for the vocabulary, then read this chapter for what it omits — chiefly that normal is the default and what that means
<queries> and QUERY_ALL_PACKAGES. Read it before you write a probe app, not after it silently returns nothing
Android developer guide — App permissions best practices
The developer-facing version of this chapter's remediation advice. Useful to quote back in a report, because clients act faster on Google's wording than on yours
Android developer guide — Auto-reset permissions from unused apps
The API 30 behaviour behind the AUTO_REVOKED flag
Android Security Bulletins
Where the confused-deputy class from §3.9 actually appears, month after month. Search by component and for the phrase describing a local escalation reachable with no additional execution privileges — that phrasing is the bulletin's way of saying "an ordinary app could reach this"
Android Compatibility Definition Document (CDD)
Section on permissions. What a device manufacturer is required to implement, which is the baseline a vendor build can deviate from. Useful when a device behaves unlike AOSP and you need to say whether that is permitted
"The app minimizes access to sensitive data and resources." The chapter's primary control. A granted-but-unused permission is a direct failure, and the evidence is the granted list cross-referenced against DEX API usage. It is the most-failed and least-reported control in this area, because failing it is boring — report it anyway, in a low-severity section, because the fix is deleting three lines
MASVS-PLATFORM-1
"The app uses IPC mechanisms securely." Custom permission protection levels, exported components and the confused-deputy pattern land here
MASVS-PLATFORM-3
User-facing surfaces: overlay and accessibility abuse — §3.12
MASVS-CODE-4
Manual review of the permission surface as part of secure development
MASTG — Testing App Permissions
The procedure §7 implements. Note what MASTG under-emphasises and this chapter does not: the separation of requested from granted, and the app-op half of appop-flagged permissions
MASTG — Testing for Sensitive Functionality Exposure Through IPC
Warning
Cite a MASVS control by identifier and by what you actually observed. "Fails MASVS-PRIVACY-1"
on its own is unactionable; "requests RECORD_AUDIO, holds it, and no code path calls
AudioRecord — MASVS-PRIVACY-1" is a fix. See 71-OWASP-Mobile
for the full structure and for how not to overstate what a control ID means.
The original permission-to-API mapping, and the first quantification of over-privilege in real apps. The specific numbers are dated; the method — intersect what is requested with what the code calls — is exactly the analysis in §8.3, and is still how over-privilege is found
The original statement of the confused-deputy problem in precisely the form §3.9 describes. Read it for the framing: the attacker never obtains the permission, and the defence is not "check harder" but "check whose authority you are acting on"
"Android Permissions: User Attention, Comprehension, and Behavior" — Felt et al., SOUPS 2012
The empirical basis for treating a dangerous permission dialog as a speed bump. Most users cannot correctly state what a permission they just granted allows
"Analyzing Inter-Application Communication in Android" — Chin, Felt, Greenwood, Wagner. MobiSys 2011
The exported-component surface that permissions are supposed to guard. Pairs with 21-App-Sandbox and 24-IPC
These are old papers about a platform that has changed a great deal. They remain accurate about the
mechanisms — which is the part that has not changed — and they are worth reading precisely
because they were written when the model was small enough to describe completely.
Search by topic rather than by URL; recordings move.
Android Security Bulletin retrospectives — any talk that walks a year of "elevation of privilege
in a system component" entries is, in effect, a tour of the confused-deputy class.
Talks on OEM pre-installed app auditing. The methodology in lab-03
is the standard one, and hearing someone walk a real device is worth more than reading it.
Anything on PendingIntent mutability. It is the permission-borrowing primitive that API 31 made
explicit, and the talks predate that change, which is why they explain why it mattered.
Banking-trojan teardowns, for the accessibility pivot. The permission-side lesson is in §5.8:
an accessibility service can operate the permission dialogs, and therefore defeats the runtime
permission model outright.
From a dumpsys package capture: what does this app hold, and what is the gap between that and what it asked for? Prints the four sets, the GID list, the runtime flags, and flags every appop permission for which dumpsys alone is insufficient
Which of the app's own permissions are enforceable? One row per population that can obtain each permission, and — with a device capture — who owns the name. Verdicts: SQUATTED, NOT-A-BOUNDARY, UNOWNED, UNRESOLVED, EXTERNAL, ENFORCEABLE
At runtime: every permission the app asks about, every request and result, and a loud flag with a stack trace on every checkCallingOrSelfPermission. Observes by default; --force mode labels its own transcript as modified
The UID boundary that permissions punch holes in. Its manifest-exposure.py prints NOT-A-BOUNDARY for a weak custom permission; §3.6 here is the measurement behind that verdict. It forward-references this chapter's §3.5 (GIDs), §3.9 (re-delegation), §3.11 (visibility) and §3.12 (special access)
Provider exploitation. This chapter owns the permission that guards it. 27's own references say you cannot triage a provider without this chapter, and the reverse is also true — once the permission is yours, everything after that is 27's
There is no permission on a Fragment, and no exported attribute either. The host Activity's android:permission is the only gate, and 31 measures what happens when the app adds one of its own
The declaration audit and the targetSdk version matrix. 32 owns which attribute you write and what its default is; this chapter owns what is actually granted, by what mechanism, to whom. Run manifest-audit.py alongside this chapter's tools — they answer different questions