An Android Archive, or AAR, is a packaged Android library format that contains compiled code, resources, manifests and other assets for reuse in another Android project. Unlike a full application package, it is meant to be consumed as a dependency during build time, which makes its contents part of the application supply chain.
What an Android Archive contains
An Android Archive is a dependency artifact rather than a finished app. It packages compiled bytecode, Android resources, a manifest, and other assets so another project can consume them during build. That makes the AAR itself part of the software supply chain, where the contents can shape what ends up inside the final application.
Because AARs are merged into downstream builds, they can influence code execution, runtime permissions, exported components, resource namespaces, and bundled configuration. Teams often treat them as harmless library bundles, but they are executable inputs to the build process, not just passive files.
How AARs fit into Android build and reuse
In practice, AARs are the standard way to distribute reusable Android library functionality. They let teams ship reusable UI components, helper logic, Android manifest entries, native libraries, and resources without publishing a full application package. Build tools then resolve the dependency and fold its contents into the consuming app.
This reuse model is efficient, but it also means the consuming project inherits the library’s design choices. A poorly designed AAR can introduce manifest conflicts, duplicate resources, unexpected permissions, or incompatible code paths that only appear after integration.
For supply-chain integrity, the key question is not just whether the library builds, but whether the artifact is trusted, versioned, and produced by a known source. AARs are often consumed through package repositories and CI pipelines, so provenance matters as much as the code inside the archive.
Security implications of packaged Android libraries
An AAR can carry security-sensitive behavior even when it looks like a routine dependency. If the archive contains hidden logic, unsafe defaults, or altered resources, the risk is inherited by every app that consumes it. That is why library review must cover both source code and packaged contents.
Security review should also account for what the AAR exposes through its manifest and compiled resources. Permissions, exported components, deep links, network endpoints, and embedded secrets can all become part of the consuming application’s attack surface if they are accepted without inspection.
Because AARs are consumed before runtime, defects can be difficult to notice in ordinary application testing. A dependency may work correctly in development while still introducing trust, integrity, or transitive dependency risk into production builds.
What makes AARs different from application packages
An AAR is designed for reuse, while an APK or app bundle is designed for installation and execution as a complete app. That distinction matters because an AAR is expected to be merged into another project, where its code and resources must coexist with the consumer’s own build configuration.
The practical consequence is that AARs must be evaluated as part of dependency governance. Their value lies in modularity and reuse, but their risk lies in the fact that a downstream team may adopt them without fully understanding what was bundled, overridden, or added to the final application.
For readers comparing Android packaging formats, the safest mental model is simple: an AAR is not an endpoint artifact, it is an input artifact. That is why its provenance, contents, and compatibility with the target build matter so much.
Risk and Threat Considerations
AARs increase supply-chain exposure because they are trusted build inputs. If a malicious or compromised library is introduced, it can influence code, resources, and manifest behavior in the final app, sometimes without obvious signs at review time.
Failure mechanism: A tainted archive can deliver altered logic, malicious resources, or unintended permissions into a downstream build, and the consuming team may only see the final integrated result rather than the original source of the change.
Impact: The result can be application compromise, hidden data exposure, weakened access controls, or persistence of vulnerable behavior across every app version that depends on the artifact.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
SLSA, CIS Controls v8, NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| SLSA | Supply-chain integrity | AARs are build artifacts whose provenance and integrity affect the consuming app. |
| Recommendation — Verify AAR provenance and integrity before allowing it into the build pipeline. | ||
| CIS Controls v8 | CIS-2 — Software Inventory | AARs are third-party software assets that should be inventoried and governed. |
| Recommendation — Inventory Android library artifacts and track their approved sources and versions. | ||
| NIST SP 800-53 Rev 5 | CM-8 — System Component Inventory | AAR dependencies are component inputs that should be tracked as part of the system build. |
| SI-7 — Software, Firmware, and Information Integrity | Integrity checks help detect tampering in packaged dependencies such as AARs. | |
| Recommendation — Maintain a complete inventory of library artifacts that can enter the application build. Validate dependency integrity before merging the artifact into production builds. | ||
| OWASP ASVS | V15 — Secure Coding and Architecture | AARs influence application architecture and can introduce unsafe behavior through reused code and resources. |
| Recommendation — Review library architecture and trust assumptions before integrating an AAR. | ||
Practitioner Guidance
Why practitioners should care: Treat AARs as governed software supply-chain inputs, not as ordinary static files. The dependency decision is a security decision because the archive can shape the app’s runtime behavior and attack surface after integration.
What to watch for: Review the packaged manifest, resources, native libraries, and transitive dependencies before adoption, and prefer provenance you can trace to a known build process or repository. When a library is updated, revalidate the whole artifact, not just the source diff.
Practitioner takeaway: If you would not trust the contents to ship inside your own application, do not accept the AAR as a build dependency.
Related resources from NHI Mgmt Group
- What are the signs that archive extraction is failing safely in an Android app?
- How should security teams detect Android malware that abuses cloud services for exfiltration?
- How can mobile threat teams reduce the blast radius of Android RAT activity?
- When does log retention become an operational risk instead of a harmless archive?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org