# Mobile app LD FDPI Android client scaffold. ## What is implemented - Flutter dark UI: connection state, assigned IP, endpoint, ping, activation code. - X25519 key generation in Dart (`cryptography`). - Private key and enrollment config in **Android EncryptedSharedPreferences** via `flutter_secure_storage`. - One-time device enrollment against `https://ttmadethat.shop/api/v1/enroll`. - Android `VpnService` shell with: - TUN establishment, all-IPv4/IPv6 routes, DNS 1.1.1.1/1.0.0.1. - Foreground notification. - `BIND_VPN_SERVICE` manifest permission. - Native `libawg.so` JNI boundary (`NativeTunnel`). - Settings screen with Android VPN settings deep link for Always-on/Block without VPN. ## What is not bundled `android/app/src/main/jniLibs/*/libawg.so` is **not** included. The stock WireGuard Android backend does not implement AmneziaWG obfuscation (`Jc/Jmin/Jmax/S1-S4/H1-H4/HeaderProtectionKey`). Without that native core the APK installs and the UI runs, but **Connect reports “AmneziaWG çekirdeği yok”** and does not open a TUN. This is deliberate: a fake tunnel that silently leaks or blocks all traffic is worse. See `docs/TUNNEL_BACKEND.md` for the required JNI contract and build steps. ## Build ```bash cd mobile-app flutter pub get flutter build apk --release ``` APK output: ```text build/app/outputs/flutter-apk/app-release.apk ``` The project expects: - Flutter 3.29+ / Dart 3.4+ - Android SDK platform 35, build-tools 35.0.0 - JDK 17+ (tested with JDK 21) - `android/local.properties`: ```properties sdk.dir=C:\\Users\\\\AppData\\Local\\Android\\Sdk flutter.sdk=C:\\src\\flutter ``` If the Gradle wrapper jar is missing: ```bash cd android gradle wrapper --gradle-version 8.10.2 ``` ## Install / test ```bash adb install -r build/app/outputs/flutter-apk/app-release.apk adb shell am start -n com.ldfdpi.mobile/.MainActivity ``` Then: 1. Enter the one-time activation code. 2. Allow Android VPN consent. 3. For kill-switch, open **Settings → VPN ayarlarını aç** and enable **Always-on VPN** + **Block connections without VPN** for LD FDPI. 4. With `libawg.so` present, Connect starts the tunnel; without it, Connect is rejected rather than leaking traffic.