Repository navigation
fix(android): import a GGUF from the system document picker - #155
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-asalso 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
.ggufinto the app's privatefiles/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 needslora_edge0_8b-gguf.ggufimported 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/)macos/)ios/)android/)windows/)How was it tested?
./gradlew :app:testDebugUnitTest --tests dev.edge0.runtime.app.runtime.ModelImportTest— 7 tests, 0 failures. Covers the.gguffile-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)mlxpast the pinned0.30.6Made with Cursor