2.2 KiB
2.2 KiB
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
VpnServiceshell with:- TUN establishment, all-IPv4/IPv6 routes, DNS 1.1.1.1/1.0.0.1.
- Foreground notification.
BIND_VPN_SERVICEmanifest permission.- Native
libawg.soJNI 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
cd mobile-app
flutter pub get
flutter build apk --release
APK output:
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:
sdk.dir=C:\\Users\\<you>\\AppData\\Local\\Android\\Sdk
flutter.sdk=C:\\src\\flutter
If the Gradle wrapper jar is missing:
cd android
gradle wrapper --gradle-version 8.10.2
Install / test
adb install -r build/app/outputs/flutter-apk/app-release.apk
adb shell am start -n com.ldfdpi.mobile/.MainActivity
Then:
- Enter the one-time activation code.
- Allow Android VPN consent.
- For kill-switch, open Settings → VPN ayarlarını aç and enable Always-on VPN + Block connections without VPN for LD FDPI.
- With
libawg.sopresent, Connect starts the tunnel; without it, Connect is rejected rather than leaking traffic.