Spaces:
Running
Running
|
Download ANDROID.md from 2Btainment/spaceforge: direct link, hf CLI and curl.
- Browser
- Download file 1.8 kB
-
https://huggingface.co/spaces/2Btainment/spaceforge/resolve/main/ANDROID.md
- Command line
-
hf download hf://spaces/2Btainment/spaceforge/ANDROID.md
-
curl -L -o ANDROID.md https://huggingface.co/spaces/2Btainment/spaceforge/resolve/main/ANDROID.md
1.8 kB
SpaceForge — Android (Capacitor) MVP
Artifact shipped
| Preferred | Debug APK (.apk) when Android SDK + JDK are in the SpaceForge Docker image |
| Fallback | Capacitor 6 Android project ZIP if APK build fails / SDK missing |
| Mode | Hosted Wrapper (Hybrid runtime — WebView loads live Space URL) |
| Unsigned | Debug APK is unsigned (sideload / adb install); not Play Store release |
| Converter | backend/app/converters/mobile/android.py + finalize.py |
Compatibility badges (UI)
- ✓ project — Capacitor + Gradle scaffold generated
- ✓ APK included — when
assembleDebugsucceeds inside SpaceForge - ⚠ APK not built — fallback project zip only
- ✗ GPU local impossible — when Space needs GPU; inference stays on Hugging Face
What the user installs
- Analyze Space → select Android (Capacitor) → Build → Download.
- If filename ends with
.apk: transfer to a device and sideload (adb install -r app.apkor Files → install). Allow unknown sources if prompted. - If filename ends with
.zip(fallback): unzip →npm install→npx cap sync android→ Android Studio /./scripts/build-android.sh.
Labeling rules
- Never call the Hosted Wrapper a “Local offline APK” of the model/GPU runtime.
- Correct: “Debug APK (Hosted Wrapper / WebView)” or “project zip fallback”.
binary_included/apk_includedare true only when a real.apkfile is returned.
Docker image
The Space Dockerfile bakes:
- OpenJDK 17, Node 20, Android cmdline-tools
platforms;android-34,build-tools;34.0.0- Optional Gradle warmup via
scripts/docker_warmup_android.sh
Env: ANDROID_HOME=/opt/android-sdk, SPACEFORGE_ANDROID_BUILD_TIMEOUT=900.