Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
AdServices
Stay organized with collections
Save and categorize content based on your preferences.
The AdServices module, introduced in Android 13,
supports the Privacy Sandbox initiative that aims to
create technologies that both protect people's privacy online and give companies
and developers tools to build thriving digital businesses.
More information is available on the
Android Developer site.
Motivation
The goals of the Privacy Sandbox Initiative are:
- Build new technology to keep user information private
- Enable publishers and developers to keep online content free
- Collaborate with the industry to build to new internet privacy standards
Module boundary
AdServices architecture: This is all new code with no module boundary.
Code location: packages/modules/AdServices
Figure 1 shows the AdServices module setup.
Figure 1. AdServices module API design
Figure 2. AdServices module setup
Main functionality for the package will be available in APEX:
com.google.android.adservices
.
Privacy Preserving APIs functionality will be available in APK
com.google.android.adservices.api
.
SDK Runtime functionality will be available in APK
com.google.android.app.sdksandbox
.
You can learn more about AdServices on the following pages:
Dependencies
- New sepolicy domain for SDKSandbox
- Restrictions for SDKSandbox: limited storage, intents, broadcasts, etc.
- Well defined permissions; ad SDKs do not inherit permissions from apps
- OS changes to deal with sandbox UIDs
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# AdServices\n\nThe AdServices module, introduced in Android 13,\nsupports the Privacy Sandbox initiative that aims to\ncreate technologies that both protect people's privacy online and give companies\nand developers tools to build thriving digital businesses.\n\nMore information is available on the\n[Android Developer site](https://developer.android.com/privacy-sandbox).\n\nMotivation\n----------\n\nThe goals of the Privacy Sandbox Initiative are:\n\n- Build new technology to keep user information private\n- Enable publishers and developers to keep online content free\n- Collaborate with the industry to build to new internet privacy standards\n\nModule boundary\n---------------\n\nAdServices architecture: This is all new code with no module boundary.\n\nCode location: `packages/modules/AdServices`\n\nFigure 1 shows the AdServices module setup.\n\n**Figure 1.** AdServices module API design\n\n**Figure 2.** AdServices module setup\n\nPackage format\n--------------\n\nMain functionality for the package will be available in APEX:\n`com.google.android.adservices`.\n\nPrivacy Preserving APIs functionality will be available in APK\n`com.google.android.adservices.api`.\n\nSDK Runtime functionality will be available in APK\n`com.google.android.app.sdksandbox`.\n\nYou can learn more about AdServices on the following pages:\n\n- [Privacy Sandbox Overview](https://developer.android.com/design-for-safety/ads/introduction)\n- [SDK Runtime Design](https://developer.android.com/design-for-safety/ads/sdk-runtime)\n- [Topics Design](https://developer.android.com/design-for-safety/ads/topics)\n- [FLEDGE on Android Design](https://developer.android.com/design-for-safety/ads/fledge)\n- [Attribution Reporting Design](https://developer.android.com/design-for-safety/ads/attribution)\n\nDependencies\n------------\n\n- New sepolicy domain for SDKSandbox\n- Restrictions for SDKSandbox: limited storage, intents, broadcasts, etc.\n- Well defined permissions; ad SDKs do not inherit permissions from apps\n- OS changes to deal with sandbox UIDs"]]