Skip to content

Building from Source

TFD-42 edited this page Aug 13, 2026 · 1 revision

Building from Source

Full details live in the repo's SETUP.md. This is the condensed version.

Flipper FAP (with ufbt)

pip install ufbt          # or: pipx install ufbt
cd flipper/
ufbt                      # build → dist/rf_logger.fap
ufbt launch               # build + flash + run on a connected Flipper

Copy dist/rf_logger.fap to your SD card under /ext/apps/Sub-GHz/. The manifest (application.fam) requires the gui, subghz, and bt services.

First run downloads the Flipper SDK. If ~/.ufbt is in a bad state, ufbt clean then ufbt update re-deploys it.

Android APK

The repo ships only android/www/ and android/plugin/; the Capacitor project shell is regenerated (it is intentionally not committed). Requirements: Node 18+, JDK 17+, Android SDK (platform + build-tools), Gradle (bundled with Android Studio).

Outline (see SETUP.md for the exact commands):

# scaffold a Capacitor app, then drop in our sources
npm install --save @capacitor/core @capacitor/android @capacitor/geolocation
npx cap init "RF Triangulator" com.mhzlocalise.rftriangulator --web-dir www
cp -r <repo>/android/www/*    www/
cp    <repo>/android/plugin/*.java  android/app/src/main/java/com/mhzlocalise/rftriangulator/

# wire it up:
#  - build.gradle: implementation 'com.github.mik3y:usb-serial-for-android:3.7.0' + JitPack repo
#  - MainActivity: registerPlugin(FlipperSerialPlugin.class); registerPlugin(FlipperBlePlugin.class);
#  - AndroidManifest: USB-host + location + BLE permissions (see SETUP.md)

npx cap sync android
cd android && ./gradlew assembleDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk

Both native plugins must be registered and must expose the same connect/disconnect/data/status interface — that's what lets the web UI treat USB and BLE as interchangeable transports.

CI

.github/workflows/ci.yml runs on every push/PR: byte-compiles the Python scraper, validates spectrum.csv, syntax-checks the web JS, and builds the FAP with ufbt — a good reference for the minimal toolchain each part needs.

Spectrum data (optional)

spectrum_scraper/ (pure Python stdlib) regenerates android/www/spectrum.csv from the baseline CSVs, optionally enriched per-country via the CEPT EFIS service. See spectrum_scraper/README.md.

Clone this wiki locally