Skip to content

GeneralKaos666/termux-flutter-wsl

Β 
Β 

Repository files navigation

termux-flutter-wsl

Flutter for Termux ARM64

A packaged Flutter SDK for Android/Termux ARM64 with APK builds, Linux desktop builds, and hot reload.

flutter build apk βœ… | flutter build linux βœ… | flutter run + Hot Reload βœ… | installable .deb βœ…

δΈ­ζ–‡ | English

Flutter Version Dart Version Target CI License

🍴 Forked from mumumusuc/termux-flutter

Flutter running on Termux with Hot Reload


Quick navigation

What this is

Flutter's ARM64 target support does not mean the official SDK can be used as an Android/Termux host SDK. Termux uses Android bionic, Android linker paths, and a different toolchain layout; the official Linux SDK assumes a glibc host.

This repository packages a Flutter SDK for Termux ARM64:

  • Cross-compiles Flutter Engine, Dart runtime, and required host tools from WSL/Linux.
  • Assembles an installable flutter_3.44.0_aarch64.deb package for Termux.
  • Runs post_install.sh to patch Flutter Tools, the Gradle plugin, NDK/build-tools wrappers, Android SDK constraints, and Termux shebangs.
  • Enables flutter doctor, flutter create, flutter build apk, flutter build linux, and hot reload through Termux:X11.

Current release and validation

Item Value
Flutter 3.44.0
Dart 3.12.1
Architecture aarch64 / arm64-v8a
Release asset flutter_3.44.0_aarch64.deb
Size 666,366,556 bytes
SHA256 b8af08d26ee4ae4b3dcf1aab4ee6b05965529587ddf1bc9b936b48b5f01f9846

Device smoke test

Last full device validation: 2026-06-01, Samsung SM-X716B / Android 16 / Termux.

Check Result
dpkg -i + post_install.sh βœ…
flutter --version / dart --version / dartvm --version βœ…
flutter doctor -v βœ… expected channel/device warnings only
flutter create --platforms=android,linux βœ…
flutter build apk --release --target-platform android-arm64 βœ…
flutter build linux --release βœ…

Quick install

Requirements

Item Requirement
Device Android ARM64 / aarch64
Android Android 11+ recommended
App F-Droid Termux; Termux:X11 for Linux GUI
Storage At least 8GB free space recommended

One-click install (recommended)

pkg update && pkg upgrade -y
pkg install -y curl
curl -L https://raw.githubusercontent.com/ImL1s/termux-flutter-wsl/master/install_flutter_complete.sh -o install_flutter_complete.sh
bash install_flutter_complete.sh

Manual release .deb install

pkg update && pkg install -y wget
wget https://github.com/ImL1s/termux-flutter-wsl/releases/download/v3.44.0/flutter_3.44.0_aarch64.deb
sha256sum flutter_3.44.0_aarch64.deb

dpkg -i flutter_3.44.0_aarch64.deb
apt --fix-broken install -y
bash $PREFIX/share/flutter/post_install.sh
source ~/.bashrc
flutter --version

Do not install the file if its SHA256 differs from the value in the release table above.

Create a project and build an APK

flutter create my_app
cd my_app

Android builds inside Termux should explicitly use Termux native aapt2 and restrict the APK target to ARM64:

# android/gradle.properties
android.aapt2FromMavenOverride=/data/data/com.termux/files/usr/bin/aapt2
// android/app/build.gradle.kts
android {
    compileSdk = 34

    defaultConfig {
        targetSdk = 34
        ndk { abiFilters += listOf("arm64-v8a") }
    }
}

Build the APK:

flutter build apk --release --target-platform android-arm64

post_install.sh patches Flutter Tools defaults for Termux, but keeping the project-level Gradle settings above makes different templates and plugins more predictable.

Linux desktop / Termux:X11

pkg install -y x11-repo termux-x11-nightly
termux-x11 :0 &
export DISPLAY=:0

flutter create --platforms=linux linux_demo
cd linux_demo
flutter run -d linux

You can also build only:

flutter build linux --release

Build the .deb yourself

A full build requires WSL/Linux, Android NDK, depot_tools, a Flutter Engine checkout, and usually takes multiple hours.

python3 build.py build_all --arch=arm64

Common step-by-step commands:

python3 build.py clone
python3 build.py sync
python3 build.py patch_engine && python3 build.py patch_dart && python3 build.py patch_skia
python3 build.py sysroot --arch=arm64
python3 build.py configure --arch=arm64 --mode=debug
python3 build.py build --arch=arm64 --mode=debug
python3 build.py build_dart --arch=arm64 --mode=debug
python3 build.py debuild --arch=arm64

See docs/guides/BUILD_GUIDE.md for the full build process, mode matrix, and troubleshooting.

CI/CD and release validation

Workflow Trigger Runner Purpose
CI PR / push / manual GitHub-hosted Ubuntu Python, Shell, PowerShell, YAML, and package/docs contract sanity
Build deb Manual self-hosted Linux/WSL Full Flutter Engine build, .deb packaging, optional release publishing
Device smoke Manual self-hosted Windows + ADB Install the deb in Termux, then run doctor/create/APK/Linux smoke tests
Release check Release / manual GitHub-hosted Ubuntu Verify release asset name, size, and SHA256

See docs/CI_CD.md for runner requirements and local equivalents.

Device smoke requires the tablet to stay awake and unlocked; secure lock screens block ADB text injection into Termux.

Project layout

termux-flutter-wsl/
β”œβ”€β”€ .github/workflows/        # GitHub-hosted CI + self-hosted build/device gates
β”œβ”€β”€ docs/                     # Long-form documentation, guides, and release notes
β”‚   β”œβ”€β”€ README.md             # Documentation index
β”‚   β”œβ”€β”€ CI_CD.md              # CI/CD, runner, and device-lab guide
β”‚   β”œβ”€β”€ guides/               # Install, build, and upgrade guides
β”‚   └── releases/             # Changelog and release notes
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ ci/                   # Lightweight repository contract checks
β”‚   β”œβ”€β”€ device/               # ADB β†’ Termux smoke automation
β”‚   β”œβ”€β”€ install/              # Termux install and post-install patches
β”‚   └── test/                 # Release / Termux E2E smoke scripts
β”œβ”€β”€ patches/3.44.0/           # Flutter Engine / Dart / Skia patches
β”œβ”€β”€ build.py                  # Main build CLI
β”œβ”€β”€ build.toml                # Version, NDK, sysroot, and patch configuration
β”œβ”€β”€ package.yaml              # .deb artifact mapping
└── install_flutter_complete.sh

Documentation map

Document Purpose
docs/README.md Full documentation index
docs/guides/INSTALL_GUIDE.md Install flow and Termux runtime prerequisites
docs/guides/BUILD_GUIDE.md WSL/Engine build, packaging, and troubleshooting
docs/guides/UPGRADE_GUIDE.md Checklist for upgrading to a new Flutter release
docs/CI_CD.md CI/CD, self-hosted runners, and device smoke
docs/releases/CHANGELOG.md Version history
docs/releases/RELEASE_NOTES.md Current GitHub release body

Limitations and notes

  • The supported target is ARM64 / arm64-v8a. 32-bit ARM and x64 Android gen_snapshot builds are out of scope.
  • Android APK builds should use compileSdk = 34 / targetSdk = 34 to avoid Termux aapt2 compatibility problems with newer android.jar files.
  • flutter doctor reports custom channel / upstream remote warnings for the packaged SDK. These are expected and do not mean the smoke test failed.
  • ninja flutter does not produce a usable dart binary; source builds must run build_dart() separately.
  • The release .deb is large, so install and first post_install.sh runs can take time.

Troubleshooting entry points

Acknowledgements

  • Original project: mumumusuc/termux-flutter
  • Termux community for the Android userspace, packages, and X11 ecosystem
  • Flutter / Dart / Skia / Chromium Engine upstreams

License

This project is licensed under GPL-3.0.

About

πŸš€ World's first complete Flutter dev environment on Termux ARM64. Build APK, hot reload, native speed, one-click install.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Shell 63.6%
  • Python 32.2%
  • PowerShell 4.2%