Android App Links assetlinks.json & SHA-256 Generator

Generate a verified `/.well-known/assetlinks.json` payload containing BOTH your Play App Signing certificate SHA-256 and local upload key SHA-256, plus matching `AndroidManifest.xml` `autoVerify` intent filters and ADB verification commands.

How to Use

  1. Enter your exact Android `applicationId` and production HTTPS web domain: Provide the exact reverse-DNS package identifier (`com.example.app`) and apex or subdomain (`app.example.com`) without trailing slashes or HTTP redirects.
  2. Paste your Play App Signing SHA-256 fingerprint (and optional upload/debug SHA-256): Copy the 32-byte colon-separated uppercase `SHA-256 certificate fingerprint` from `Play Console -> Test and release -> Setup -> App signing -> App signing key certificate`, alongside your local upload key for local testing.
  3. Select link relation permissions (App Links `handle_all_urls` vs. TWA / Credential Sharing): Enable `delegate_permission/common.handle_all_urls` for verified deep links and Trusted Web Activity Chrome address-bar hiding, plus optional `get_login_creds` for Credential Manager passkey autofill.
  4. Deploy to `/.well-known/assetlinks.json` and run the generated ADB verification commands: Serve the JSON with `Content-Type: application/json` (`HTTP 200`, zero `301`/`302` redirects) and run `adb shell pm verify-app-links --re-verify <package>` to confirm `verified` domain state.

The #1 Closed Testing Deep-Link Bug: Upload Key vs. Play App Signing SHA-256

During local development, engineers generate `assetlinks.json` using `keytool -list -v` against their local debug or upload keystore, verify that HTTPS links open directly into their app on USB-connected phones, and assume deep links are production-ready. Then, on Day 1 of Closed Testing, human testers installing the app from Google Play report that OAuth magic links redirect into Chrome instead of opening the app — or worse, a Trusted Web Activity (TWA) displays a permanent Chrome browser URL bar across the top of the screen.

The root cause is Google Play App Signing's dual-certificate architecture. When you upload an `.aab` to Google Play Console, Google strips your upload signature and re-signs the final split APKs delivered to testers using Google's cloud-managed **App signing key certificate**. On Android 12+ (`API 31+`), `IntentFilterIntentSvc` fetches `https://<domain>/.well-known/assetlinks.json` at install time and compares the JSON array against the certificate on the installed binary.

Because `sha256_cert_fingerprints` in Digital Asset Links natively accepts an array of multiple fingerprints, best practice is including your **Play App Signing SHA-256**, your **Upload Key SHA-256**, and (on staging hosts) your **Debug SHA-256** inside the same array so both local builds and Play Store Closed Testing builds pass domain verification seamlessly.

Strict HTTP Serving Rules for `/.well-known/assetlinks.json` on CDNs and Edge Routers

Android's OS-level domain verifier enforces far stricter HTTP rules than mobile browsers. Even if your JSON syntax and SHA-256 hashes are 100% accurate, Android marks your domain verification status as `1024` (unverified) or `legacy_failure` if `https://example.com/.well-known/assetlinks.json` issues an HTTP `301` or `302` redirect — such as redirecting apex `example.com` to `www.example.com` or catching `/.well-known/*` inside a Single-Page Application (`index.html`) fallback rule!

Every distinct host declared via `<data android:scheme="https" android:host="..." />` inside `AndroidManifest.xml` is verified independently by Android. If your manifest lists both `example.com` and `www.example.com`, BOTH hosts must return a direct `HTTP 200 OK` with `Content-Type: application/json` and zero redirects, and neither host may block Google's verification proxy via `robots.txt` or WAF bot challenges.

Always test your live endpoint with `curl -I https://example.com/.well-known/assetlinks.json` to confirm an immediate `HTTP/2 200` status and JSON MIME header before cutting your Closed Testing release.

Debugging Domain State with `adb shell pm get-app-links` Before Production Access

Broken passwordless magic links, OAuth callbacks, and TWA address bars are prime triggers for Google Play `Broken functionality` rejections when reviewers test your app during Closed Testing or Production Access review. Fortunately, Android 12+ exposes deterministic CLI diagnostics over `adb`.

After installing your Play-signed build from the Closed Testing track (or via `bundletool` signed with a matching test key), run `adb shell pm verify-app-links --re-verify com.example.app` followed by `adb shell pm get-app-links com.example.app`. Every host under the `Domain verification state:` block must print `verified` — never `none`, `legacy_failure`, or HTTP error codes.