DarkIRC (bin/darkirc in the DarkFi repo) is AGPL-3.0. Shipping its binary in the APK obligates you to comply with the license (source/corresponding offer, etc.). Coordinate with your legal review before distributing.
- Foreground service (
DarkircDaemonService) starts the packaged executable and shows a low-priority notification (Android foreground rules). DarkircEmbeddedRunnerrunslibdarkirc_embedded.sofromjniLibs(Android 10+ cannotexec()fromfilesDir). Assets remain as a fallback copy source at build time viasyncEmbeddedDaemonJniLibs.- Generated config uses clearnet
tcp+tlslilith seeds (DarkfiChatDefaults), loopback IRCtcp://127.0.0.1:6667, and sandboxed datastore paths — aligned with upstream defaults but without relying on~/.configon device. - Preferences:
DarkfiChatPreferences.runEmbeddedDarkirc(default true). User toggle: Chat → settings → Run embedded DarkIRC node. - Bootstrap:
DarkircDaemonBootstrap.maybeStartruns fromNighthawkWalletApplicationwhen the pref is on and a binary exists for the device ABI.
Production builds expect artifacts/darkirc/<abi>/darkirc_exec at the repository root.
The darkfi-android-sdk module runs syncDarkircArtifacts, wired through the Variant API (addGeneratedSourceDirectory) into generated-darkirc-bundle-assets/darkirc/, then merges them into the library AAR/APK alongside darkirc/README.txt from src/main/assets.
Git tracks artifacts/darkirc/README.md and .gitkeep ABI dirs; darkirc_exec files are gitignored — CI should build or download them before assemble.
Binaries are not committed by default; omitting them keeps CI green but chat’s embedded daemon will not start until you supply artifacts.
Prerequisites: Rust, cargo-ndk, Android NDK, and a clone of darkfi (same tree you use for make darkirc on desktop).
From the wallet repo root:
export DARKFI_SRC="$HOME/src/darkfi" # your path
export ANDROID_NDK_HOME="$HOME/Library/Android/sdk/ndk/$(ls "$HOME/Library/Android/sdk/ndk" | head -1)"
./scripts/build-darkirc-android.shThe script compiles upstream RLN zkas proofs (src/event_graph/proof/*.zk → *.zk.bin) with host zkas before cross-compiling. Vendored trees sometimes ship .zk.bin files that are still source text; without this step darkirc exits with ZkasDecoderError("Magic bytes are incorrect") when starting the IRC server.
The script places darkirc_exec under each ABI folder you build for. Gradle syncEmbeddedDaemonJniLibs renames them to libdarkirc_embedded.so in jniLibs. Then rebuild the app.
- Install APK on device/emulator whose ABI you built.
- Open the app — you should see the foreground notification when embedded DarkIRC is enabled.
- Chat settings: IRC
127.0.0.1, port6667, Retry — connection should succeed after P2P/DAG sync (first launch may take minutes).
- Battery & data: a full darkirc node is heavy; users can disable the toggle.
- DAG sync / seeds: if lilith endpoints are unreachable, the daemon logs errors; see DarkFi network troubleshooting.
- Tor profile inside darkirc: the generated config uses clearnet
tcp+tlsseeds for simpler bootstrap. To mirror upstreamactive_profiles = ["tor"], extend the generator to set[net] tor_socks5_proxyto the app’s loopback SOCKS and switch profiles (ensure embedded Tor is up beforedarkircconnects — ordering is a follow-up).