Skip to content

Development Guide

ELRS Mobile is a Flutter app that reimplements the ExpressLRS firmware build and flashing pipeline in Dart so it runs entirely on the phone, offline. This guide covers setting up, running, testing and releasing it.

  • Flutter (stable channel, Dart 3.11 or newer)
  • Android SDK for Android builds; Xcode and CocoaPods on a Mac for iOS and macOS
  • Python 3 for the firmware validation tools and changelog script
  • Node.js 22 if you work on the website (website/)
Terminal window
git clone https://github.com/wbhinton/ELRS-Mobile.git
cd ELRS-Mobile
flutter pub get
flutter run

Generated code (*.g.dart, *.freezed.dart) and localizations are committed, so a fresh clone runs without a code-generation step. After editing a Freezed model, a JSON-serializable class or a @riverpod provider, regenerate:

Terminal window
dart run build_runner build --delete-conflicting-outputs

After editing lib/l10n/app_en.arb, regenerate the localization classes:

Terminal window
flutter gen-l10n

Two values are read with --dart-define at build time:

DefineEffect
SENTRY_DSNEnables crash reporting. Without it, Sentry stays off.
DISTRIBUTION=directMarks the direct-download APK: enables the daily update check and Settings → Check for Updates. Store builds omit it, since the stores handle updates.

For local runs, copy dart_defines/local.json.example to dart_defines/local.json and pass it with flutter run --dart-define-from-file=dart_defines/local.json.


The app follows a feature-first layout under lib/src/. Each feature is a vertical slice with its own domain, data, application or state, and presentation folders as needed; shared infrastructure lives in core/.

FolderResponsibility
features/flashing/The core pipeline: target and version selection, firmware download and caching, on-device assembly, upload, and the safety checks (chip, target, binding phrase)
features/config/Reads the connected device’s configuration, including fallbacks for firmware older than 3.1
features/configurator/Hosts the device’s own web configuration page in a locked WebView
features/firmware_manager/Downloads, lists and deletes cached firmware versions
features/dashboard/Home screen: connection status and navigation
features/settings/Flashing profiles, regulatory defaults, storage, language, analytics, Expert Mode
features/app_update/Update check for the direct-download APK
features/support/, features/splash/Help, FAQ and recovery content; startup screen
core/networking/mDNS discovery, connectivity, the serialized device HTTP client, Android Wi-Fi process binding
core/storage/Preferences, encrypted secure storage, and the on-disk firmware cache
core/analytics/Opt-in Aptabase usage analytics
core/theme/, core/presentation/, core/utils/Theme, responsive layout, binding-phrase UID and validation helpers

Routing uses go_router (lib/src/router.dart).

State and dependency injection use Riverpod with code generation (@riverpod / @Riverpod(keepAlive: true)). Most screens are HookConsumerWidgets, using Flutter Hooks for local widget state. Domain models are immutable Freezed classes.

All user-visible text lives in ARB files under lib/l10n/, with app_en.arb as the source. The app ships in 18 languages. Never hard-code UI text: test/l10n_hygiene_test.dart fails on hard-coded strings and on unused ARB keys. Add new strings in English only; translations are machine-generated by a manually triggered workflow (.github/workflows/translate.yml) so translation spend stays under direct control.

Terminal window
flutter analyze
flutter test

The tests in test/ cover chip compatibility, flash error messages, the update check, the secure-storage upgrade, and localization (hygiene, message formatting, and layout overflow in every locale). CI (.github/workflows/ci.yml) runs flutter analyze, flutter test, and checks that generated localizations are up to date on every push to development and every pull request.

To verify firmware assembly against official binaries, see Firmware Validation.

.github/workflows/release.yml runs on a v* tag or manual dispatch and builds:

  • the direct-download APK (DISTRIBUTION=direct), published to GitHub Releases and mirrored to cdn.elrsmobile.com;
  • the Android App Bundle for Google Play;
  • the iOS build for the App Store.

The changelog is generated with python3 scripts/generate_changelog.py.

The website and these docs live in website/ (Astro and Starlight). See website/README.md for where content lives and how to update it.