components/webapps/docs/identifiers.md
This document clarifies the differences between various identifiers used in the context of Web Apps (PWAs, WebAPKs, and TWAs) within Chromium and on different platforms.
These identifiers are platform-independent and are defined by web standards or Chrome's core architecture.
manifest.json via the id member).webapps::ManifestId (defined in
manifest_id.h). It is essentially the start_url
with the id member applied, and fragments stripped.webapps::AppId (defined in
web_app_id.h).ManifestId string.fedbieoalmbobgfjapopkghdmhgncnaahttps://example.com) that the app is
locked to.example.com), typically used for
broader data clearing scopes.On Android, web apps can be integrated with the OS as WebAPKs or TWAs, which introduces Android OS-level identifiers.
| Identifier | Scope | Source | WebAPK | Standard TWA | TWA Installer (Auto-Minted) |
|---|---|---|---|---|---|
| Manifest ID | Web App | Web Developer (in manifest.json) | Used to identify the PWA; influences package name. | Optional in manifest; does not influence package name automatically. | Used to identify the PWA; influences package name. |
| Package Name | Android OS | Generated by Server/Installer or specified by Developer | org.chromium.webapk.<hash> (hash derived from Manifest ID/URL). | Manually specified in Android project (e.g., com.example.app). | com.android.webapp.<hash> (hash derived from Manifest ID/URL). |
| Android UID | Android OS | Assigned by Android at install time | Unique per installation instance (varies by user profile). | Unique per installation instance. | Unique per installation instance. |
| Android AppId | Android OS | Assigned by Android at install time | Constant across users for the same app package. | Constant across users for the same app package. | Constant across users for the same app package. |
| App Name / Label | User Visible | Web Manifest or Android Project | Derived from name or short_name in manifest. | Specified in Android project AndroidManifest.xml. | Derived from name or short_name in manifest. |
| Origin | Web | Web URL | The web origin (e.g., https://example.com) the app is locked to. | The web origin the app is locked to. | The web origin the app is locked to. |
| Domain | Web | Derived from Origin | eTLD+1 (e.g., example.com) used for broader data clearing scopes. | Used for broader data clearing scopes. | Used for broader data clearing scopes. |
org.chromium.webapk.<hash>, where the hash is derived from the Manifest
ID.build.gradle (e.g., com.example.app).WebAppManager. The
package name is com.android.webapp.<hash>.UID = UserId * 100000 + AppId.sharedUserId in AndroidManifest.xml) and are signed by the same key.Web Manifest ID -> (influences) -> Android Package Name -> (installed by
Android) -> assigns Android UID (containing Android AppId).