llama.cpp on Android: what the project's own Android guide says
llama.cpp is the open-source engine behind many phone chat apps. Its own Android guide, read on 27 November 2026, describes three routes. We have not followed them ourselves.
Route 1: the Android Studio app binding
You import the project's examples/llama.android folder into Android Studio and build it. The guide says the binding supports hardware acceleration up to SME2 on Arm CPUs and AMX on x86-64, and that it detects the device's hardware and loads compatible kernels. It says this lets it run "on both the latest premium devices and older devices that may lack modern CPU features or have limited RAM, without requiring any manual configuration."
The included demo app can read GGUF model metadata, load a model from the app's private storage, and stream the reply. For a finished app, the guide points to Arm AI Chat on Google Play. The guide credits Arm's engineering groups for the binding.
Route 2: the command line in Termux
Termux is an Android terminal app that needs no root. The guide says you install git and cmake, build llama.cpp as on Linux, download a GGUF model file, then run llama-cli with the model and a context size. It recommends storing the model in the home folder for best performance.
Route 3: cross-compile with the Android NDK
For a build on a computer, the guide shows a CMake setup targeting arm64-v8a and Android platform 28.
The warning to note
The guide tells you to set the context size to a reasonable number, "say 4096," to start with, because otherwise "memory could spike and kill your terminal." That is the project's own warning that context length drives memory use. See how much RAM to run AI on a phone.
What the guide leaves out
- It does not name supported phones or give speeds.
- It does not mention the GPU or NPU on Android. GPU and NPU paths in some apps are covered in Android local AI runtimes, from a secondary guide.
- It shows a Pixel 5 demo video as an old example, not a benchmark.
Sources
Checked: 27 Nov 2026. Figures change; confirm on the source before you rely on them.
Keep reading
- 8 GB vs 12 GB vs 16 GB phone for AI: which one should you buy?What each RAM tier lets you run, with the models, file sizes and the one-sentence verdict for each.
- AI-Benchmark ranking: what the columns mean, and what the top phones showReading the AI-Benchmark phone table: the score columns, five phones with their chip, RAM and AI Score as listed, and what the numbers cannot tell you about chat models.
- The airplane mode test: how to check a phone model is really offlineLoad a model on Wi-Fi, switch on airplane mode, send a prompt. The check VDF AI recommends and what it does and does not prove.
- Android local AI runtimes explained: MLC LLM, llama.cpp, ExecuTorch and moreA May 2026 guide lists five ways to run models on Android and warns about NNAPI deprecation, aggressive background killing and vendor-locked NPU tools. A secondary source, with caveats.