Skip to content

improve(android): install debug builds alongside the production app - #125099

Merged
steipete merged 1 commit into
mainfrom
steipete/android-debug-app-id-suffix
Aug 17, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/android-debug-app-id-suffix

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Android developers could not install a debug build on a device that already had the production OpenClaw app. Both builds used ai.openclaw.app, so testing on a real device required uninstalling the configured production app and losing its pairing state.

Why This Change Was Made

All phone debug variants now use the always-on .debug application-ID suffix and -debug version-name suffix, with an OpenClaw Dev launcher label. The Wear debug companion uses the same suffix so Wear Data Layer package/signature matching remains intact, while release builds keep ai.openclaw.app unchanged.

Debug launch tasks are registered from the Android variant model, so pnpm android:run and pnpm android:run:third-party use the final application ID and the namespace-qualified activity class instead of duplicating a package literal.

The package-ID audit also repaired these assumptions:

  • package.json: both Android run scripts now call the variant-owned Gradle run tasks.
  • apps/android/app/src/main/res/xml/shortcuts.xml: App Actions target the generated variant application-ID resource.
  • apps/android/benchmark/...: macrobenchmark and navigation tests derive the target package from instrumentation and use the full activity class.
  • apps/android/scripts/voice-e2e.sh: targets the debug package and namespace-qualified receiver/activity; debug actions derive from the package.
  • apps/android/scripts/perf-online-benchmark.sh and perf-startup-hotspots.sh: default to the debug package and full activity class.
  • scripts/android-screenshots.sh: phone and Wear debug capture use the debug package and full activity classes.

Release/Fastlane checks, Google Play links, the Wear production base ID, Kotlin namespaces, generated package declarations, and the external App Actions action intentionally remain ai.openclaw.app.

User Impact

Developers can install and launch Play or third-party debug builds alongside the production app without uninstalling it or wiping pairing state. The launcher shows separate OpenClaw Node and OpenClaw Dev entries.

Evidence

Built the current origin/main Play debug APK as the production-ID stand-in, installed it on emulator emulator-5556, then installed and launched this branch with pnpm android:run:

> Task :app:runPlayDebug
Starting: Intent { cmp=ai.openclaw.app.debug/ai.openclaw.app.MainActivity }
Status: ok
Activity: ai.openclaw.app.debug/ai.openclaw.app.MainActivity
BUILD SUCCESSFUL

Both packages coexisted and cold-started independently:

package:ai.openclaw.app
package:ai.openclaw.app.debug

Status: ok
Activity: ai.openclaw.app/.MainActivity
topResumedActivity=... ai.openclaw.app/.MainActivity

Status: ok
Activity: ai.openclaw.app.debug/ai.openclaw.app.MainActivity
topResumedActivity=... ai.openclaw.app.debug/ai.openclaw.app.MainActivity

The app drawer accessibility tree reported both OpenClaw Node and OpenClaw Dev:

Android app drawer showing production and debug OpenClaw apps installed together

Packaged artifact inspection:

Play debug:        ai.openclaw.app.debug  2026.7.4-debug  OpenClaw Dev
Third-party debug: ai.openclaw.app.debug  2026.7.4-debug  OpenClaw Dev
Wear debug:        ai.openclaw.app.debug  2026.7.4-debug  OpenClaw Dev
FileProvider:      ai.openclaw.app.debug.fileprovider
Voice permission:  ai.openclaw.app.debug.permission.RUN_VOICE_E2E

Validation:

  • pnpm android:format — passed
  • pnpm android:lint — passed
  • pnpm android:lint:android — passed for Play, third-party, Wear, and Wear shared
  • pnpm android:test — passed (Play, Wear, Wear shared)
  • pnpm android:test:third-party — passed
  • pnpm android:assemble — passed
  • pnpm android:assemble:third-party — passed
  • pnpm android:run — installed and launched the debug app on emulator-5556
  • pnpm android:run:third-party — installed and launched the same debug package on emulator-5556
  • Fresh Codex autoreview — clean, no accepted/actionable findings

Production/tooling LOC: +61/-22 (net +39) | Benchmark tests: +5/-3 (net +2). The production growth is the variant-owned install/launch capability, source-set labels, and complete debug-tooling repair.

AI-assisted implementation; all listed behavior and emulator evidence was exercised and inspected by the maintainer agent.

@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android scripts Repository scripts app: wearos App: wearos size: S labels Aug 17, 2026
@steipete steipete self-assigned this Aug 17, 2026
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 17, 2026
@steipete
steipete marked this pull request as ready for review August 17, 2026 06:12
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 17, 2026
@clawsweeper

clawsweeper Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 2:19 AM ET / 06:19 UTC.

ClawSweeper review

What this changes

The branch gives Android phone and Wear debug variants a separate .debug package identity and updates launch, benchmark, voice, and screenshot tooling to use it.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. This maintainer-owned PR addresses a current Android debug-install limitation with a coherent variant-owned fix and real emulator evidence; it needs normal exact-head CI and merge handling.

Priority: P2
Reviewed head: e2e0eeb49592c5101bfb5b709f9a234cd96929b3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch has strong real-device evidence and no concrete correctness finding; exact-head CI remains the normal merge gate.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies after-fix emulator output, installed-package results, independent cold-start evidence, and an app-drawer capture showing both identities.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies after-fix emulator output, installed-package results, independent cold-start evidence, and an app-drawer capture showing both identities.
Evidence reviewed 5 items Current-main behavior: Current main assigns the production package ID and leaves the debug build type without an application-ID suffix, so the reported coexistence limitation remains.
Branch owner boundary: The branch applies the debug suffix at the Gradle variant owner and registers each debug variant's install-and-launch task from its resolved application ID.
Wear sibling contract: The Android documentation requires phone and Wear to share application ID and signing identity for Data Layer pairing; the branch applies the same debug suffix to both build owners.
Findings None None.
Security None None.

How this fits together

Android Gradle variants produce phone and Wear packages, while manifests, tests, and developer scripts use those package identities to install, launch, automate, and capture the intended app on a device.

flowchart LR
  A[Phone and Wear build variants] --> B[Debug package identity]
  B --> C[Manifest and resources]
  B --> D[Variant launch tasks]
  C --> E[Tests and device scripts]
  D --> F[Installed device apps]
  E --> F
Loading

Before merge

  • Resolve merge risk (P1) - Existing debug installs using ai.openclaw.app will remain a separate data sandbox; the first .debug install will need its own pairing state even though the production app remains untouched.
Agent review details

Security

None.

PR surface

Config 0, Other +41. Total +41 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 1 2 2 0
Generated 0 0 0 0
Other 13 64 23 +41
Total 14 66 25 +41

Review metrics

Metric Value Why it matters
Production vs test delta production/tooling +61/-22; benchmark tests +5/-3 The production growth implements the variant-owned package and launch path; the test changes retarget benchmark execution to the resolved app package.

Merge-risk options

Maintainer options:

  1. Accept the separate debug profile (recommended)
    Land with the explicit upgrade expectation that the new .debug package has separate local state while the existing production-ID app remains intact.

Technical review

Best possible solution:

Land the variant-owned identity after exact-head checks complete, with maintainer acceptance that debug installs intentionally begin as a separate local app profile.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible: current main assigns debug builds the production package ID, while the branch's supplied emulator transcript shows the resulting .debug package can coexist and launch.

Is this the best way to solve the issue?

Yes. The Gradle variant model owns the application ID, and deriving dependent device commands from that resolved identity is safer than maintaining independent package literals.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7b4981bfd287.

Labels

Label changes:

  • add P2: This is a bounded Android developer-workflow improvement rather than a released production-runtime incident.
  • add merge-risk: 🚨 compatibility: Changing debug application IDs creates a separate installed-app data boundary for developers upgrading their local debug workflow.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix emulator output, installed-package results, independent cold-start evidence, and an app-drawer capture showing both identities.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies after-fix emulator output, installed-package results, independent cold-start evidence, and an app-drawer capture showing both identities.

Label justifications:

  • P2: This is a bounded Android developer-workflow improvement rather than a released production-runtime incident.
  • merge-risk: 🚨 compatibility: Changing debug application IDs creates a separate installed-app data boundary for developers upgrading their local debug workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies after-fix emulator output, installed-package results, independent cold-start evidence, and an app-drawer capture showing both identities.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix emulator output, installed-package results, independent cold-start evidence, and an app-drawer capture showing both identities.

Evidence

What I checked:

  • Current-main behavior: Current main assigns the production package ID and leaves the debug build type without an application-ID suffix, so the reported coexistence limitation remains. (apps/android/app/build.gradle.kts:217, 7b4981bfd287)
  • Branch owner boundary: The branch applies the debug suffix at the Gradle variant owner and registers each debug variant's install-and-launch task from its resolved application ID. (apps/android/app/build.gradle.kts:259, e2e0eeb49592)
  • Wear sibling contract: The Android documentation requires phone and Wear to share application ID and signing identity for Data Layer pairing; the branch applies the same debug suffix to both build owners. (apps/android/README.md:36, e2e0eeb49592)
  • Current-main provenance: The PR head is not an ancestor of current main, and the Android paths were unchanged between the PR base and current main; this work has not been superseded. (apps/android/app/build.gradle.kts:217, e2e0eeb49592)
  • Submitted real behavior proof: The PR body records an emulator install-and-launch run where production and debug package IDs coexist and cold-start independently. (package.json:1485, e2e0eeb49592)

Likely related people:

  • steipete: Peter Steinberger authored the PR head and recent Android commits 4b2aa93 and d095113; the central current-main behavior is in this actively maintained area. (role: recent Android and Wear contributor; confidence: high; commits: e2e0eeb49592, 4b2aa935f342, d095113698b6; files: apps/android/app/build.gradle.kts, apps/android/wear/build.gradle.kts, package.json)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Allow exact-head required checks to finish before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer decision on the remaining merge-risk item: accepted. A new ai.openclaw.app.debug install intentionally starts with separate local state and pairing; preserving or migrating the old debug sandbox would defeat the safety boundary because the old debug package is also the production package. The existing production app and its pairing remain untouched.

Rank-up move completed: exact-head required checks finished on e2e0eeb49592c5101bfb5b709f9a234cd96929b3. CI run 32000666050 is green, including openclaw/ci-gate. UI-E2E shard 1 initially hit an unrelated cloud-worker form flake; the exact test passed locally (3/3), and the targeted CI job retry passed without a code change.

@steipete
steipete merged commit 3010318 into main Aug 17, 2026
449 of 451 checks passed
@steipete
steipete deleted the steipete/android-debug-app-id-suffix branch August 17, 2026 06:37
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: wearos App: wearos maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant