Skip to content

fix(android): import a GGUF from the system document picker - #155

Merged
shuk777 merged 4 commits into
mainfrom
release/android-gguf-import
Oct 29, 2026
Merged

shuk777 merged 4 commits into
mainfrom
release/android-gguf-import

Conversation

@shuk777

@shuk777 shuk777 commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

What & why

The released Android app tells people to import a GGUF with an in-app picker, but 0.1.0 has no such control. adb shell run-as also fails on that APK, because a release build is not debuggable. Discussion #154.

Models now has Import. It opens the system document picker and copies the selected .gguf into the app's private files/models/. No storage permission and no USB debugging. The copy is owned by the process, so leaving the screen does not cancel a multi-gigabyte transfer. A partial file is renamed into place only after the copy finishes. 8B still needs lora_edge0_8b-gguf.gguf imported the same way.

versionName 0.1.1 (versionCode 2), so this build can replace the 0.1.0 sideload.

This branch replaces release/ios-documents-models. That name was for the Files-app change, which is already on main via #150.

Area

  • Python framework (python/)
  • macOS (macos/)
  • iOS (ios/)
  • Android (android/)
  • Windows (windows/)
  • Docs / other

How was it tested?

./gradlew :app:testDebugUnitTest --tests dev.edge0.runtime.app.runtime.ModelImportTest — 7 tests, 0 failures. Covers the .gguf file-name gate, partial-then-rename copy, a truncated stream, a volume that cannot hold the file, and the LoRA companion staying out of the model list.

The system document picker itself was not exercised on a device.

Checklist

  • pytest -m 'not slow' passes locally (Python changes; CI runs this on macOS + MLX)
  • Repo hygiene passes: no new paths or secrets in the Android import code
  • Added/updated tests for new behavior
  • Did not bump mlx past the pinned 0.30.6
  • Updated relevant docs / READMEs (incl. translations if user-facing). The Models screen text is updated. The README copies are not in this branch yet.

Made with Cursor

A release APK cannot use adb run-as. Models copies a selected .gguf into private storage. versionName 0.1.1 (versionCode 2).
The import session lives with the process so leaving the screen does not cancel a multi-gigabyte copy.
The button opens the system document picker and copies the selected .gguf into app-private storage.
The old banner told people to adb push, which a release APK cannot do.
@shuk777
shuk777 merged commit d4a2fa0 into main Oct 29, 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