Skip to content

Add cloudfone install: APK install over REST - #1

Merged
Xavierfok merged 1 commit into
mainfrom
fix/review2-side
Oct 12, 2026
Merged

Xavierfok merged 1 commit into
mainfrom
fix/review2-side

Conversation

@Xavierfok

Copy link
Copy Markdown
Owner

cloudf.one serves POST /api/v1/devices/{serial}/install: it's live (an unauthenticated POST gets the app's own 401 {"error":"unauthorized"}, not an STF 404) and documented on cloudf.one/developers since 2026-10-01. This repo still said "No APK install over REST. Use the web panel, or adb", so a reader would think the invite-only WireGuard tunnel was the only route.

Client / CLI

  • CloudfoneClient.install(serial, path) sends multipart field file (same field name as routes/apk_install.py). It refuses a missing file or anything over 512 MB before uploading, and uses a 900 s timeout because the server answers only after Android finishes installing (nginx allows 900 s).
  • cloudfone install SERIAL FILE prints installed <package> on <serial>, or the raw response with --json.
  • 413 and 429 get a hint, like 401/403/404 already do. Server reasons (409 install_in_progress, Android's INSTALL_FAILED_*) come through in the error text.

Docs

  • New "Installing an app" README section; the "no APK install" bullet is gone, and so is the client docstring line.
  • Install line now points at GitHub: PyPI has no cloudfone-cli release yet.

Tests: 27 passed before, 33 after (6 new: multipart field, long timeout, missing file, size cap, 409 surfacing, CLI output). pyflakes clean. Also checked against a local HTTP server that real requests sends Content-Length (the route answers 411 without it) and name="file".

Not done: no version bump or release. cloudfone-android-test-action still pins cloudfone-cli@v0.1.0, so it won't see install until a tag is cut.

🤖 Generated with Claude Code

cloudf.one serves POST /api/v1/devices/{serial}/install (live, and
documented on cloudf.one/developers since 2026-10-01), but the README
and the client docstring still said there is no APK install over REST,
so a reader would think the invite-only adb tunnel was the only way.

- CloudfoneClient.install(serial, path): multipart field `file`, a
  local 512 MB check before uploading, and a 900 s timeout because the
  server answers only after Android has installed the app.
- `cloudfone install SERIAL FILE` prints the installed package (--json
  for the raw response). 413/429 get a hint like 401/403/404 do.
- README: new "Installing an app" section, the "no APK install" bullet
  removed, and the install line now points at GitHub because PyPI has
  no cloudfone-cli release yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Xavierfok
Xavierfok merged commit 96bd6c4 into main Oct 12, 2026
10 checks passed
@Xavierfok
Xavierfok deleted the fix/review2-side branch October 12, 2026 09:58
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