skills/llm-android-cross-build/SKILL.md
Cross-compile for Android (x-android-aarch64 preset), optionally build tests/benchmarks, and outline adb push/run steps. Use when building for Android targets or diagnosing Android toolchain issues.
npx skillsauth add arm-examples/llm-runner llm-android-cross-buildInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this to build for Android targets using the x-android-aarch64 preset.
Windows note: if python3 isn’t available, use python (or py -3) for any scripts below.
During configure, CMake may use FetchContent to download dependencies from the network. If your network is blocked, configure can fail before tests run. To enable network access when the process runs in a sandbox, see skills/README.md. Otherwise, run the build on your local machine (with network access) and share the resulting build path with the tool (for example: build dir: /path/to/build), or point CMake at pre-downloaded dependencies in your environment.
cmake --preset=x-android-aarch64 -B build
If configure fails because the NDK is missing, set it explicitly:
export NDK_PATH=/path/to/ndk
cmake --preset=x-android-aarch64 -B build
Note: configure triggers downloads via the standard downloader; set HF_TOKEN (or ~/.netrc) for gated models.
Optional flags:
cmake --preset=x-android-aarch64 -B build -DLLM_FRAMEWORK=llama.cpp -DBUILD_JNI_LIB=ON
cmake --preset=x-android-aarch64 -B build -DBUILD_BENCHMARK=ON
cmake --build ./build --parallel
Use adb to copy binaries and models/configs to the device, then run them from a shell. Keep paths consistent with your config modelRoot.
NDK_HOME).JAVA_HOME and JDK version.TROUBLESHOOTING.md for platform-specific notes.tools
Update scripts/py/requirements.json entries (URLs + sha256sum) for models/tools, validate hash changes, and keep downloads deterministic without committing artifacts. Use when adding or refreshing model/tool downloads.
tools
Run fast “session start / doctor” checks for this repository (toolchain + wiring sanity, framework version report, optional upstream update check), optionally generate a debug bundle, and when needed bump pinned backend framework versions with build+ctest verification. Use at session start or when upgrading llama.cpp/onnxruntime-genai/mediapipe/mnn pins.
tools
Run a fast JNI-focused build/test smoke check (JNI on, minimal test run), and isolate JNI toolchain issues. Use when changing JNI/Java code or validating JNI setup.
development
Debug failing LLM integration tests caused by model output drift, incorrect context/runtime parameters (contextSize, batchSize, threads), prompt/template mismatches, or backend/framework regressions. Use when tests fail and you need to see the model response, reproduce a single failing CTest, or trace issues into src/cpp/frameworks (llama.cpp, onnxruntime-genai, mediapipe, mnn).