[Question] Java Edition client design blueprint
Since the Android version client updates slowly, I found that the clone Java branch is still in development (features are not fully implemented). Do you have any design documents for this version of the client? It would help me better work on the PR. @pappz
Hello @Cikaros ,
Do you have the motivation to contribute to our project? That would be awesome!
In the original project, the UI was implemented in React Native. However, it has become difficult to maintain, so we’ve decided to move forward without it. In the first stage, we’re focusing on porting the current existing features to Java.
At the moment, I’m working on the "main" fragment in the java-home-ui branch. What's still completely missing are the "Advanced" and "Change Server" menus.
If you are interested in the project I can give you some instructions on how you can catch up the dev state.
I am very interested, but my time is quite scattered and I cannot engage in long-term online development work for the android-client. If you don't mind, I can contribute to the project.
I'm reading your java branch, but I lack the knowledge of combining gomobile and Android, so I'm looking for information.
What is the implementation idea of [Change Server]? Can you guide me to realize the idea?
The following errors were found during the debugging process:
2025-05-23 14:24:46.781 26389-26448 GoLog io.netbird.client E [INFO] client/iface/iface.go:229 interface tun0 has been removed
2025-05-23 14:24:47.284 26389-26453 GoLog io.netbird.client E [ERRO] client/internal/connect.go:277 error while starting Netbird Connection Engine: enable server router: server route not supported on this os
This is packaged using build-android-lib.sh, and some parameters have been adjusted.
#!/bin/bash
# Script to build NetBird mobile bindings using gomobile
# Usage: ./script.sh [version]
# If no version is provided, "development" is used as default
set -e
export ANDROID_NDK_HOME=/Users/cikaros/Library/Android/sdk/ndk/29.0.13113456
# Set version from the first argument or use "development" as default
version=${1:-development}
app_path=$(pwd)
cd netbird
gomobile init
CGO_ENABLED=0 gomobile bind \
-androidapi=26 \
-o $app_path/gomobile/netbird.aar \
-javapkg=io.netbird.gomobile \
-ldflags="-X golang.zx2c4.com/wireguard/ipc.socketDirectory=/data/data/io.netbird.client/cache/wireguard -X github.com/netbirdio/netbird/version.version=$version" \
$(pwd)/client/android
cd - > /dev/null
The following errors were found during the debugging process:
2025-05-23 14:24:46.781 26389-26448 GoLog io.netbird.client E [INFO] client/iface/iface.go:229 interface tun0 has been removed 2025-05-23 14:24:47.284 26389-26453 GoLog io.netbird.client E [ERRO] client/internal/connect.go:277 error while starting Netbird Connection Engine: enable server router: server route not supported on this osThis is packaged using build-android-lib.sh, and some parameters have been adjusted.
#!/bin/bash # Script to build NetBird mobile bindings using gomobile # Usage: ./script.sh [version] # If no version is provided, "development" is used as default set -e export ANDROID_NDK_HOME=/Users/cikaros/Library/Android/sdk/ndk/29.0.13113456 # Set version from the first argument or use "development" as default version=${1:-development} app_path=$(pwd) cd netbird gomobile init CGO_ENABLED=0 gomobile bind \ -androidapi=26 \ -o $app_path/gomobile/netbird.aar \ -javapkg=io.netbird.gomobile \ -ldflags="-X golang.zx2c4.com/wireguard/ipc.socketDirectory=/data/data/io.netbird.client/cache/wireguard -X github.com/netbirdio/netbird/version.version=$version" \ $(pwd)/client/android cd - > /dev/null
I think you can modify this file or disable firewall for android client
The initial understanding is that the Android system does not support Router. The firewall you mentioned, I have not found how to disable it.
I ignored a very important WARN:
[WARN] client/firewall/uspfilter/localip.go:136 failed to get interfaces: route ip+net: netlinkrib: permission denied
I think it should be the culprit.
I ignored a very important WARN:
[WARN] client/firewall/uspfilter/localip.go:136 failed to get interfaces: route ip+net: netlinkrib: permission deniedI think it should be the culprit.
The branch is ready for review. It points to a submodule, don't forget to check out the committed version. After that, just run ./build-android-lib.sh, and the repo will be ready to build the Android code. Could you double-check how it operates?