> ## Documentation Index
> Fetch the complete documentation index at: https://docs.edge0.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Android Guide

> This guide explains how to build the Edge0 Android app, prepare models on a computer, import them to the device via adb, and start chatting.

## Prerequisites

### Android device

* Android 13 or later (API 33+).
* arm64-v8a architecture; a Snapdragon 8 Elite-class device is recommended.
* 8B: 8 GB or more of memory; 35B: 12–16 GB.
* Developer options and USB debugging enabled, with the device connected to the computer over USB.

Our reference device is a **Lenovo TB322FC (Snapdragon 8 Elite, 16 GB RAM)**.

### Build computer

* Git, Bash, JDK 17+.
* Android SDK 35, adb, and an `sdkmanager` usable from the terminal.
* NDK r28: `28.2.13676358`.
* CMake 3.21+ and Ninja.
* Python 3.10+ with NumPy and `huggingface_hub` (which provides the `huggingface-cli` command).
* The `md5sum` command, which the model import script uses to check files. On macOS, install GNU coreutils to get it.
* At least 30 GB of free disk space for model source files and the converted files.

Run the commands below in Bash.

**1. Get the source and prepare the Android tools**

```bash theme={null}
git clone https://github.com/Edge0-AI/Edge0.git
cd Edge0/android
```

Install the required SDK components:

```bash theme={null}
sdkmanager --install \
  "platforms;android-35" \
  "platform-tools" \
  "ndk;28.2.13676358" \
  "cmake;3.22.1"
```

Replace the SDK path below with its actual location on your computer, then set the environment variables:

```bash theme={null}
export ANDROID_HOME="/path/to/Android/Sdk"
export NDK_DIR="$ANDROID_HOME/ndk/28.2.13676358"
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmake/3.22.1/bin:$PATH"
```

You can find the SDK location in Android Studio's SDK settings; on macOS it is usually `~/Library/Android/sdk`.

Run the subsequent commands in the `Edge0/android` directory.

**2. Build and install the app**

First build the local engine libraries. The first build needs a network connection to download the engine source:

```bash theme={null}
bash tools/llama/build_vendor_libs.sh
```

After that step succeeds, build the app:

```bash theme={null}
./gradlew :app:assembleDebug
```

Connect the device, allow USB debugging in the on-device dialog, then confirm the connection:

```bash theme={null}
adb devices
```

The device status should be `device`. If it shows `unauthorized`, allow the authorization on the device and check again. The steps below assume only one device is connected.

Install the app:

```bash theme={null}
./gradlew :app:installDebug
```

You can also install the built APK directly; use either method:

```bash theme={null}
adb install -r app/build/outputs/apk/debug/app-debug.apk
```

**3. Download and convert the model**

The model conversion script is in the repository's `windows/tools/` directory. Android and Windows share this tool, and it runs on your current computer.

### Prepare 8B

```bash theme={null}
huggingface-cli download Edge0/Edge0-8B-A1B-preview --local-dir models/edge0-8b
python ../windows/tools/convert_mlx_to_gguf.py --dir models/edge0-8b
```

The result is saved in `models/edge0-8b-gguf/`.

### Prepare 35B

```bash theme={null}
huggingface-cli download Edge0/Edge0-35B-A3B-preview --local-dir models/edge0-35b
python ../windows/tools/convert_mlx_to_gguf.py --dir models/edge0-35b
```

The result is saved in `models/edge0-35b-gguf/`.

Import onto the device only after conversion completes successfully.

**4. Import the model via adb**

With the app installed and the device connected, run the command for the model you prepared:

```bash theme={null}
bash tools/model/push_models.sh --8b
```

Or import 35B only:

```bash theme={null}
bash tools/model/push_models.sh --35b
```

When both tiers are ready, you can import them at once:

```bash theme={null}
bash tools/model/push_models.sh --all
```

The script copies the model into the app's private directory and checks that the files transferred completely. If the script reports missing files or a checksum mismatch, verify that the download and conversion steps completed successfully, then run the script again.

**5. Load and chat**

1. Open **Edge0 Chat**.
2. Go to **Models** and tap **Refresh**.
3. Select a model and tap **Load**.
4. Return to the chat screen, then enter and send a message.

The title bar shows the active model. Use the button in the upper-right corner to switch models. Each response shows generation speed and memory usage.

**Unload** only unloads the running model; it does not delete model files.

## Why is the first turn slower?

With 35B, the first turn of each new topic has to read model data from device storage first, so it is slower. On the reference device, the first turn of a new topic takes about 10–15 seconds to begin replying, and later turns are much faster.

During long continuous use, the device may heat up and the system may reduce performance, lowering the generation speed. If you see error messages, crashes, or a long period of no progress, see [Troubleshooting](/troubleshooting).

## A model is missing or fails to load

First confirm the import script completed successfully, then tap **Refresh** on the **Models** page. After clearing app data or uninstalling the app, you need to import the model again. If loading fails, note the message shown in the interface; for how to obtain logs, see [Troubleshooting](/troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.