Privacy and data boundary

Privacy Review for Local AI Debug Builds

Audit logs, screenshots, profilers, test fixtures, and exported diagnostics.

Review status: Fact and editorial QA complete; owner review pending · 2026-10-05 · Fact IDs: ANDROID-PRIVACY-01, PRIVACY-01

Direct answer

A debug build can expose a different data surface than a release build, but the word debug does not identify what changed. Source sets, manifest overlays, build configuration, logging wrappers, test fixtures, endpoints, and dependency variants may differ. Android security guidance warns against sensitive values in logs and recommends sanitizing production logging. ANDROID-PRIVACY-01 and ANDROID-LOG-DISCLOSURE-2026-01 support a build-specific review; neither fact says a specific application currently logs private prompts. Pin the exact artifacts before comparing them. Record the source revision, app version, build variant, resolved dependency graph, merged manifest, network settings, package contents, and signing identity where relevant. Debug APKs and release bundles may include different resources, libraries, and settings. Inspect the final artifact, not only Gradle source files. Search for local staging hosts, test credentials, sample prompts, private file paths, verbose flags, and fixture assets. A source-level debug condition can be changed by resource merging or dependency injection. Use synthetic canaries for prompts, transcripts, image descriptions, account identifiers, and file paths. Trigger a successful inference, model load failure, cancellation, permission denial, network error, and export in each variant. Inspect Logcat, crash reports, analytics events, screenshots, local caches, and any support bundle. Do not use real user content because debug output can flow into CI, shared developer devices, issue attachments, or crash tooling. Compare outbound paths under controlled actions. A debug build may point to staging or include diagnostic SDKs; a release build may enable analytics or a support route that is absent in debug. Capture traffic separately for each variant. Check the debuggable manifest flag, cleartext settings, network security config, test certificates, and API keys. Never place production secrets in debug configuration and never disable TLS validation to make traffic easier to inspect. Record capture limitations for unsupported native networking or certificate pinning. Check what is packaged and what runs. Test a distribution-like artifact to verify test fixture files, private certificates, local endpoints, verbose tracing, and debug-only screens are absent or disabled as intended. Confirm release log handling by inspecting merged code and exercising actual success and failure paths. R8 may strip selected logging calls, but that does not redact all messages or prevent networking. A build that omits Logcat output may still persist or transmit the same content through other channels. Keep the comparison reproducible with a variant matrix. For each behavior, state the expected debug and release condition, such as whether canary prompts may appear in a local developer console, whether staging endpoints are reachable, or whether export diagnostics are opt-in. Verify the result rather than assuming naming conventions. Run after changes to flavors, build types, SDKs, or instrumentation. If a test tool captures a screenshot or dump, document where that artifact is stored and who can access it. The result applies to the exact commit, build artifacts, and actions tested. It does not prove every debug build leaks data, that every release is private, or that a package is ready for an app store. Separate source review, packaged artifact inspection, and network observations. If a canary appears, identify its source, apply a narrow fix, and rerun the same fixture. This guide turns build-type uncertainty into a privacy regression check rather than a blanket statement about Android.

A prompt diagnostic appears in a Debug error log

A developer adds a trace to investigate a failed local model load. A release reviewer needs to know whether that prompt trace, a staging endpoint, synthetic fixtures, or broader permissions are included in the distribution artifact or active in its runtime.

Decision

Compare final Debug and Release artifacts with synthetic canaries, then exercise the same success and failure actions in both variants.

Expected outcome

The record states the exact build and data paths checked without assuming Release naming itself prevents disclosure.

Evidence to collect

The claim becomes reviewable only when the following evidence is attached to the same artifact and test run:

  • Debug logging policy
  • Fixture provenance
  • Release-build comparison

A privacy claim needs a data inventory and traffic evidence. A local-model label by itself is not proof.

Implementation workflow

  1. Pin both variants and build inputs. Record source revision, app version, variant, dependency graph, merged manifests, network settings, package contents, and signing information before comparison begins.
  2. Run synthetic canaries through outcomes. Use fake prompts, transcript fragments, image labels, account markers, and paths across success, load failure, cancellation, permission, and export flows.
  3. Inspect local diagnostic surfaces. Search Logcat, crash reports, analytics, screenshots, cache files, CI output, and support artifacts for canary values after each task stage.
  4. Compare network paths by action. Capture each variant separately, record endpoints, visible fields, connection state, and action triggers, and note native or certificate-control blind spots.
  5. Verify packaging and retest changes. Check fixture files, endpoints, keys, tracing, and debug screens in the candidate package; rerun after any build or dependency changes.

Keep each transition observable. A failure should identify the stage, artifact, runtime, and recovery action without logging private user content.

Acceptance criteria

  • Debug and Release artifacts are identified and tested independently; each conclusion names the tested commit and actions.
  • Synthetic private-data canaries do not enter unapproved Release logs, crash reports, analytics, or network payloads.
  • Variant and capture limitations are recorded; no build label is treated as a privacy guarantee.

Decision table

DimensionChoice or evidenceHow to interpret it
Debug source configurationReview flags, source sets, hosts, and fixturesShows intended differences but not necessarily merged package contents.
Release artifact inspectionReview final manifest and packaged resourcesConfirms what was packaged; it does not show all runtime requests.
Runtime canary testTrigger flows and inspect logs and trafficProvides action-specific evidence while keeping capture limitations visible.

Failure patterns to prevent

  • Shipping verbose logs
  • Using private user samples

Also prevent silent fallback, unpinned artifacts, missing cancellation, and conclusions that combine unlike configurations. Store unsuccessful runs alongside successful ones.

Minimum reproducibility record

LayerRecord
DeviceManufacturer, model, chipset, RAM class, operating-system build
SoftwareApplication version and git commit
ModelFamily, variant, revision, format, file length, hash, quantization
RuntimeName, revision, requested backend, observed backend evidence
WorkloadFixture revision, input hash, prompt hash, output policy
OutcomeCompleted, failed, cancelled, fallback, and privacy-safe diagnostics

Release checklist

  • ☐ The primary query is answered without an unsupported number.
  • ☐ Every artifact and runtime is pinned.
  • ☐ The representative task and failure policy are explicit.
  • ☐ Lifecycle, cancellation, cleanup, and fallback are tested.
  • ☐ User-content and network boundaries are documented.
  • ☐ Result wording applies only to the recorded configuration.
  • ☐ The page links to raw method or evidence when results are added.

Sources and related evidence

Chinese deployment and troubleshooting content is organized in the .奇连 AI 端侧专题.

Frequently asked questions

Are Debug builds automatically less private than Release builds?

Not automatically. Behavior depends on variant code and configuration. Compare built packages and execute the same synthetic test cases for both, recording the build and triggered actions.

Does R8 log stripping prove prompts cannot leave the device?

No. It affects selected logging calls only. Inspect network clients, analytics, crash reports, caches, and other output channels separately, and state each test’s build coverage.

May developers use real user prompts in a Debug trace?

Avoid that by default. Synthetic canaries help test failure paths without placing private content in CI output, shared devices, or issue attachments; review access and retention too.