llm-android-cross-build

Cross-compile LLM libraries for Android AArch64 using CMake presets and the Android NDK.

4|3|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/Arm-Examples/LLM-Runner --skill llm-android-cross-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-android-cross-build
Source: https://github.com/Arm-Examples/LLM-Runner/tree/main/skills/llm-android-cross-build
Command: npx skills add https://github.com/Arm-Examples/LLM-Runner --skill llm-android-cross-build

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of compiling Large Language Models (LLMs) for Android devices, enabling on-device AI capabilities.

Core Features & Use Cases

  • Android Cross-Compilation: Utilizes CMake presets to build LLM libraries specifically for Android's AArch64 architecture.
  • Toolchain Management: Assists in configuring the Android NDK and other necessary build tools.
  • Deployment Workflow: Outlines steps for pushing compiled binaries and models to an Android device via ADB.
  • Use Case: A mobile developer wants to integrate a local LLM for offline text generation on an Android app. This Skill provides the exact commands to build the LLM library for the target platform and deploy it.

Quick Start

Configure the build for Android using the x-android-aarch64 preset and specify the NDK path if needed.

Frequently Asked Questions about llm-android-cross-build

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cross-compile an LLM library for Android AArch64 using CMake?

Cross-compile an LLM library for Android AArch64 by applying CMake presets and configuring the Android NDK toolchain. This process generates binaries specifically configured for mobile deployment targets.

What is needed to build LLMs for Android on-device deployment?

Building LLMs for Android requires the Android NDK, CMake, and ADB for deployment. The workflow involves compiling libraries for AArch64, pushing binaries via ADB, and running models directly on the device.

Can I use CMake presets to configure the Android NDK toolchain for LLM builds?

Yes, CMake presets support configuring the Android NDK toolchain for LLM builds. You can use the x-android-aarch64 preset and specify the NDK path to streamline the cross-compilation setup.

How do I deploy a cross-compiled LLM binary to an Android device using ADB?

Deploy cross-compiled LLM binaries to an Android device using ADB push and run procedures. After building the libraries with CMake and the NDK, transfer the compiled files and models to the target hardware.

Does this Android LLM cross-compilation workflow support building tests and benchmarks?

Yes, the Android LLM cross-compilation workflow supports optional building of tests and benchmarks. This allows developers to validate LLM library performance directly on AArch64 mobile targets.

Why is cross-compiling LLMs for Android difficult without a dedicated build Skill?

Cross-compiling LLMs for Android is difficult due to toolchain setup complexities and LLM integration challenges for mobile applications. A dedicated build process addresses these by managing NDK configuration and ADB deployment steps.