Android VPN application for LumenLink.
Website: lumenlink.org · Download · How-To Guide · API: api.lumenlink.org
Current: Foundation implementation with VPN service structure Next: Complete JNI bindings and tunnel implementation
LumenLinkVpnService (Kotlin)
↓
RustCore (JNI bindings)
↓
LumenLink Core (Rust)
↓
TUN Interface
- ✅ VPN Service structure
- ✅ TUN interface creation
- ✅ Traffic routing configuration
- ✅ DNS configuration
- ✅ JNI bindings structure
- ✅ GPS discovery service structure
- ⏳ Complete JNI implementation (TODO)
- ⏳ Tunnel packet processing (TODO)
- ⏳ Discovery channel integration (TODO)
- ⏳ Battery optimization (TODO)
- ⏳ Connection status UI (TODO)
1. LumenLinkVpnService
- Extends Android
VpnService - Creates TUN interface
- Configures routing and DNS
- Starts Rust core tunnel
- Manages discovery listeners
2. VpnTunnel
- Manages TUN interface I/O
- Packet forwarding
- Thread-safe operations
3. RustCore
- JNI bindings to Rust core
- Tunnel management
- Packet handling
- Statistics
4. GpsDiscoveryService
- GPS signal processing
- Gateway discovery
- Location permission handling
# Add Android targets
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
# Build for all Android ABIs (copies .so to app/src/main/jniLibs)
cd mobile/android
chmod +x scripts/build-rust.sh
./scripts/build-rust.shOr build manually:
cd mobile/android/rust-jni
cargo build --release --target aarch64-linux-android
# Copy target/aarch64-linux-android/release/liblumenlink_core.so to app/src/main/jniLibs/arm64-v8a/cd mobile/android
# If gradlew doesn't exist, run: gradle wrapper
./gradlew assembleDebugNote: If ./gradlew doesn't exist, install Gradle and run gradle wrapper from the android directory.
# Rust JNI tests
cd mobile/android/rust-jni
cargo test
# Android instrumented tests
cd mobile/android
./gradlew test- Android SDK 24+ (Android 7.0+)
- Rust toolchain
- Android NDK
- VPN permission in AndroidManifest.xml
# Run unit tests
./gradlew test
# Run instrumented tests
./gradlew connectedAndroidTest