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

# Use Hayate on Android with Termux

> Install and use Hayate on Android via Termux to send and receive files between your phone and any device on your local network.

Hayate ships a native Android binary compiled for `aarch64-linux-android`, so you get the same encrypted QUIC transfers on your phone that you'd expect on a desktop. There's no Python runtime to install and no SSH server to configure — just a single binary running in Termux. Auto-discovery via mDNS works on most home Wi-Fi networks, so your phone and laptop can find each other the same way they would on any other platform.

## Prerequisites

Before installing Hayate, make sure you have:

* **Termux** installed from [F-Droid](https://f-droid.org/packages/com.termux/) (recommended) or Google Play
* Your Android device connected to the **same Wi-Fi network** as the devices you want to transfer to or from
* Storage permission granted to Termux (see setup tips below)

## Installation

Run the following commands inside Termux to download the prebuilt arm64 binary and make it executable:

```bash theme={null}
curl -sSfL "https://github.com/ShiinaSaku/Hayate/releases/latest/download/hayate-termux-arm64" \
  -o "$PREFIX/bin/hayate"
chmod +x "$PREFIX/bin/hayate"
```

The binary is placed in Termux's `bin` directory and becomes available on your `PATH` immediately.

## Verify Installation

Confirm the binary runs correctly:

```bash theme={null}
hayate --version
```

You should see the current Hayate version printed to your terminal.

## Sending a File from Android

You can send files from your Android device to any Hayate receiver on your LAN — whether that's a laptop, desktop, or another phone running Termux.

```bash theme={null}
# To a computer using Pairing Mode
hayate send /sdcard/photo.jpg --code "my-phrase"

# To a computer using Direct Mode (known IP)
hayate send /sdcard/photo.jpg 192.168.1.100:50001
```

In Pairing Mode, Hayate prints the code (or uses the one you supply) and broadcasts its presence until the receiver connects. In Direct Mode, the receiver must be running `hayate receive --port 50001` before you send.

## Receiving a File on Android

Start a receiver on your phone and tell the sender to use the matching code or your phone's IP address:

```bash theme={null}
hayate receive --code "my-phrase" --output /sdcard/Downloads/
```

Received files are saved to the path you specify. If the directory doesn't exist, Hayate creates it.

## Tips for Termux

<Steps>
  <Step title="Grant storage permission">
    Run this command once to give Termux access to `/sdcard/` and your shared storage:

    ```bash theme={null}
    termux-setup-storage
    ```

    After accepting the permission prompt, you can read and write files in `/sdcard/` from Termux.
  </Step>

  <Step title="Disable the progress bar if it looks broken">
    Some Android terminal apps don't render Unicode block characters correctly. If the progress bar looks garbled, suppress it:

    ```bash theme={null}
    hayate send /sdcard/video.mp4 --code "my-phrase" --no-progress
    ```
  </Step>

  <Step title="Fall back to Direct Mode if mDNS doesn't work">
    mDNS auto-discovery works on most home Wi-Fi routers, but some routers and Android hotspot configurations isolate clients from each other. If `hayate discover` doesn't find your peers, switch to Direct Mode:

    ```bash theme={null}
    # On the receiving device, note the IP printed by:
    hayate receive --port 50001

    # On Android, send directly:
    hayate send /sdcard/file.zip 192.168.1.X:50001
    ```
  </Step>
</Steps>

## Platform Notes

Hayate uses the **epoll** I/O backend on Android (via the `aarch64-linux-android` target), the same backend used on Linux systems that predate io\_uring. Performance is excellent for LAN transfers; you won't notice a difference compared to desktop in practice.

<Note>
  Only the **arm64 (aarch64)** architecture is officially supported with prebuilt binaries. If you're on an x86 Android device or a 32-bit ARM device, you'll need to [build Hayate from source](https://github.com/ShiinaSaku/Hayate#build) targeting your architecture.
</Note>
