Skip to content

Install the phone app over USB from the Windows app - #9

Merged
Mohib-76 merged 2 commits into
devfrom
feat/install-over-usb
Oct 20, 2026
Merged

Mohib-76 merged 2 commits into
devfrom
feat/install-over-usb

Conversation

@Mohib-76

Copy link
Copy Markdown
Owner

What and why

In India, Brazil, Singapore, Thailand and other countries, Google Play Protect blocks installing Orbit's APK from a browser or file manager ("App blocked to protect your device"), because Orbit has a notification listener. Android 13+ also locks notification access for such installs ("restricted setting"). Installs through adb hit neither, and the Windows app already ships adb.

  • Pair page: when an authorized phone without Orbit is plugged in, the USB card shows Install on phone. It runs adb install -r --user current on the bundled APK, then pairs over USB.
  • Settings → Privacy & about: Update over USB when the phone's Orbit is older than the PC's; Install over USB when a paired PC sees a phone without Orbit (new or reset phone). A fresh install gives the phone new keys, so the PC forgets the old pairing and pairs again.
  • Packaging: the Windows app ships phone\Orbit.apk. In release.yml the Windows job now waits for the Android job, bundles its signed APK and fails if it's missing. build.ps1 builds Android first. Plain dotnet build has no APK and hides the buttons.
  • Install errors are explained (differently signed copy, downgrade, refused or Xiaomi "Install via USB", storage, timeout). Logs keep only adb's INSTALL_FAILED_… code, never the APK path (which contains the Windows user name).
  • Website: the Android download button and link are commented out for now; the Android card says the Windows app installs it over USB. Phones visiting the page are told to open it on their PC.
  • Docs: README install steps, TROUBLESHOOTING ("App blocked…", "Allow restricted settings"), ARCHITECTURE, CLAUDE.md, SITE_DESIGN.md, CHANGELOG.

How I tested it

  • Windows: Release build, 59/59 tests (15 new: version comparison, error messages, no paths in failure codes).
  • Samsung Galaxy (Android 16) with Windows 11, end to end, twice:
    1. Fresh PC + phone without Orbit: Pair page showed Install on phone → installed in ~28 s → Orbit opened on the phone with "Pair with …?" → paired over USB tethering. Notification access switch was not greyed out, and the normal "Allow" dialog appeared. installerPackageName=null.
    2. Paired PC + Orbit uninstalled from the phone: Settings showed Install over USB → installed in ~5 s → stale pairing dropped → re-paired and connected.
  • Phone with a work profile / Secure Folder: --user current installs for the main user only (plain adb install fails there with a SecurityException).
  • Website: headless render of the hero and install section.

Not tested

  • Update over USB from an older phone app (Android won't install an older Orbit over a newer one without uninstalling).
  • Xiaomi/OPPO phones that ask to confirm USB installs; multiple Android devices plugged in at once (installs on the first ready one).
  • The release workflow change runs on the next tag.

Checklist

  • dotnet test windows/Orbit.Tests passes (no Android changes; CI runs the Android checks)
  • No new packets
  • No personal data, secrets or binaries added; logs don't contain notification or clipboard content
  • UI checked in light theme (dark theme checked; light uses the same styles)
  • CHANGELOG.md updated

🤖 Generated with Claude Code

Mohib-76 and others added 2 commits October 20, 2026 16:43
Play Protect blocks browser installs of apps with a notification listener in several countries, so the
Windows app now carries the release APK (phone\Orbit.apk) and installs or updates it with adb:
- Pair page: "Install on phone" when the plugged-in phone has no Orbit; installs, then pairs over USB.
- Settings: "Update over USB" for an older phone app, "Install over USB" for a new or reset phone (re-pairs).
- Release workflow and build.ps1 build Android first and bundle the APK.
- Website: the Android download is hidden for now; the Android card points to Install on phone.
- Docs: README install steps, troubleshooting for "App blocked" and restricted settings, architecture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mohib-76
Mohib-76 merged commit 1df42a5 into dev Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant