Run the Flutter SDK natively on Android with Termux.
Prebuilt, patched, and packaged by TermuxVoid.
Flutter for Termux provides a ready-to-use Flutter SDK for Termux on Android. The SDK is built from the upstream Flutter source with a small set of Termux compatibility patches, then published as a prebuilt archive and installed through the TermuxVoid repository.
No Android Studio and no on-device compilation are required. Install the package, run flutter doctor, and start building.
- Features
- Requirements
- Installation
- Quick start
- Building Android apps
- Supported targets
- Updating and uninstalling
- Build from source
- Repository layout
- Release process
- TermuxVoid
- Troubleshooting
- Contributing
- Acknowledgments
- Disclaimer
- Prebuilt SDK — no engine compilation on your device.
- Termux-native — patched Dart, Skia, and engine sources for the Termux environment.
- Android, Linux, and web workflows — build Android apps, run Linux desktop apps through Termux:X11, or serve a web build locally.
- Hash-verified installs — the TermuxVoid package checks the release archive SHA-256 before extracting.
- Simple updates — upgrade with the normal Termux package manager.
- Scripted builds — the same script and patches are used by the GitHub Actions release workflow.
| Requirement | Details |
|---|---|
| Device | Android device with aarch64 (arm64) or x86_64 userspace |
| Termux | Installed from F-Droid or GitHub — not the Play Store build |
| Storage | About 2 GB free for the download, extraction, and package cache |
| Network | Internet access for the first install and for fetching dependencies |
| Optional | Termux:X11 for Linux desktop apps |
| Optional | android-sdk, android-ndk, and android-cmake from TermuxVoid for Android builds |
Release assets are built for
aarch64andx86_64. The source build also acceptsarmandx86, but those are not published as release assets.
Choose the repository that matches your Termux setup.
APT (dpkg) Termux
curl -fsSL https://github.com/termuxvoid/repo/raw/main/install.sh | bashPacman Termux
curl -fsSL https://github.com/termuxvoid/pacman-repo/raw/main/install-repo.sh | bashPrefer to inspect a script before running it? Download it from the TermuxVoid APT repository or Pacman repository, read it, then run it locally.
pkg update
pkg install flutterThe APT package declares x11-repo as a pre-dependency. Install x11-repo first if your Termux setup does not already include it. The package selects the release archive that matches your device architecture.
flutter --version
flutter doctor -vflutter doctor may report missing Android tooling until you install and configure the Android packages. That is expected for Linux-only or web-only setups.
Create and run a project:
flutter create hello_termux
cd hello_termuxInstall the Linux desktop build tools, start Termux:X11, point Flutter at its display, then run:
pkg install x11-repo termux-x11-nightly cmake ninja clang pkg-config gtk3
termux-x11 :0 >/dev/null 2>&1 &
export DISPLAY=:0
flutter run -d linuxInstall the TermuxVoid Android packages, then connect a device:
pkg install android-sdk android-ndk android-cmake
flutter config --android-sdk "$PREFIX/opt/android-sdk"
flutter devices
flutter run -d <device-id>android-sdk provides the SDK, platform tools, and build tools; android-ndk and android-cmake provide native compilation. No environment variables need to be exported.
Flutter projects also need the Termux-specific local.properties, gradle.properties, and app/build.gradle.kts values. See Building Android apps for the required edits, or use apkgen-cli, whose Flutter template already includes them.
flutter run -d web-server --web-port 8080Open http://localhost:8080 in a browser on the device.
| Target | Status | Notes |
|---|---|---|
| Linux desktop (GTK) | Supported | Requires Termux:X11 |
| Android | Supported | Requires android-sdk, android-ndk, android-cmake, and a connected device |
| Web server | Supported | Use flutter run -d web-server |
| iOS / macOS / Windows | Not applicable | Requires their native toolchains |
# Refresh package lists and upgrade Flutter
pkg update
pkg upgrade flutter
# Remove Flutter and its launcher
pkg uninstall flutterThe package installs the SDK to $PREFIX/opt/flutter and creates $PREFIX/bin/flutter. Uninstalling removes both.
The release workflow builds both arm64 and x64 on Linux x86_64 runners. A local Linux host works too; building inside Termux is not recommended because the engine build needs substantially more RAM and disk than most phones provide.
- Linux x86_64 host (or the GitHub Actions runner)
- Python 3
- Git and
curl ninjaanddpkg-deb- Host build headers:
libfreetype-dev,libfontconfig-dev - depot_tools on
PATH(gclient,vpython3) - Android NDK r27c
- About 20 GB free disk space
git clone --depth 1 https://github.com/termuxvoid/flutter-termux.git
cd flutter-termux
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$PWD/depot_tools:$PATH"
export ANDROID_NDK="$HOME/android-ndk-r27c"
python3 build.py --arch arm64 # or: --arch x64ANDROID_NDK is only for building the Flutter SDK itself. Building apps uses local.properties; see Building Android apps.
build.py reads the Flutter version from VERSION, clones that Flutter tag, syncs the engine dependencies, applies the patches in patches/, builds the debug engine, assembles the SDK, and writes:
dist/flutter_<version>_aarch64.tar.gz
dist/flutter_<version>_x86_64.tar.gz
Useful options:
python3 build.py --help
python3 build.py --version 3.47.8 --arch arm64 --jobs 6.
├── .github/workflows/release.yml # Build and publish GitHub releases
├── build.py # Clone, patch, build, assemble, package
├── BUILDING_APPS.md # Android app build setup on Termux
├── patches/
│ ├── engine.patch # Termux engine and toolchain changes
│ ├── dart.patch # Dart host-platform detection
│ └── skia.patch # Skia Termux platform detection
├── VERSION # Flutter tag to build
└── README.md
- Update
VERSIONto the new Flutter tag in a pull request. - Merge the pull request into
main. - The release workflow checks whether the release already exists, builds both architectures in parallel on free
ubuntu-latestrunners, and publishesflutter_<version>_aarch64.tar.gzandflutter_<version>_x86_64.tar.gz.
The workflow only runs when VERSION changes on main. Pushing to a release branch or opening a pull request does not start it.
The build uses the upstream Flutter source plus the patches in this repository. Engine compilation is cached with ccache to keep later releases faster.
This project is maintained as part of TermuxVoid, a third-party Termux repository for security, Android, AI, and utility tools.
| Resource | Link |
|---|---|
| TermuxVoid organization | github.com/termuxvoid |
| This repository | github.com/termuxvoid/flutter-termux |
| APT repository | github.com/termuxvoid/repo |
| Pacman repository | github.com/termuxvoid/pacman-repo |
| Website | termuxvoid.github.io |
| Flutter package page | termuxvoid.github.io/tool.html?name=flutter |
| Telegram | t.me/termuxvoid |
| YouTube | @alienkrishnorg |
The TermuxVoid repository is probably not configured, or the package is not installed. Add the repository, run pkg update, then install flutter again. Open a new shell if $PATH was cached.
Confirm that the TermuxVoid repository was added successfully. For APT, check $PREFIX/etc/apt/sources.list.d/; for Pacman, check the configured repository list. Re-run the installer if needed.
Install android-sdk, android-ndk, and android-cmake from TermuxVoid and accept the Android licenses when prompted. A physical device or emulator must also be connected for flutter run.
Install the Termux:X11 app, start the server with termux-x11 :0, and export DISPLAY=:0 before running flutter run -d linux.
The download may be incomplete or corrupted. Clear the partial archive from $TMPDIR and retry:
rm -f "$TMPDIR/flutter.tar.gz"
pkg reinstall flutterOpen an issue with the command you ran, the full error output, and your device architecture (uname -m):
github.com/termuxvoid/flutter-termux/issues
Pull requests are welcome. Please keep changes focused, test the build or packaging path when possible, and describe the Flutter version and device architecture used for testing.
For a release update, change VERSION, verify that all patches in patches/ still apply, and open a pull request. Do not push release changes directly to main.
- mumumusuc/termux-flutter — the original Flutter-on-Termux work.
- yamsergey/yamsergey.termux.flutter — reference patches and build configuration.
- Flutter and Dart — the upstream SDK and engine.
- Termux — the Android terminal environment.
- TermuxVoid — packaging, repository hosting, and release automation.
This is an unofficial community build. It is not affiliated with or endorsed by Google, the Flutter team, or the Termux project. Flutter and the Flutter logo are trademarks of Google LLC. Use at your own risk.
Flutter is distributed under the BSD 3-Clause License. See the upstream Dart, Skia, and Flutter repositories for their respective licenses.