netbirdio / android-client

Connect your devices into a single secure private WireGuard®-based mesh network with SSO/MFA and simple access controls.
https://netbird.io
GNU General Public License v3.0
45 stars 10 forks source link
android golang gomobile mesh mesh-networks nat-transversal netbird vpn wireguard wireguard-vpn zero-trust-network-access


Start using NetBird at netbird.io
See Documentation
Join our Slack channel


NetBird Android client

The NetBird Android client allows connections from mobile devices running Android to private resources in the NetBird network.

Screenshots

menu peer-overview mainscreen

Install

You can download and install the app from the Google Play Store:

Get it on Google Play

Building from source

Requirements

We need the following software:

run locally

  1. close all repositories:

    assuming you use a path like ~/projects locally

    mkdir ~/projects
    cd projects
    # clone netbird repo
    git clone git@github.com:netbirdio/netbird.git
    # clone react native app repo
    git clone git@github.com:netbirdio/android-client.git
  2. Checkout the repositories to the branches you want to test. If you want the latest, check the status information on your IDE or on https://github.com and verify the branch list and commit history.
  3. export JDK and Android home vars, on macOS they are: (please contribute with Linux equivalent)
    # replace <USERNAME> with your name
    export ANDROID_HOME=/Users/<USERNAME>/Library/Android/sdk
    export JAVA_HOME=/Applications/Android Studio.app/Contents/jbr/Contents/Home
  4. Install NDK and CMake
    cd ~/projects/android-client
    $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "ndk;23.1.7779620"
  5. Build the gomobile lib and the Android client lib:
    cd ~/projects/android-client
    bash -x build-android-lib.sh ~/projects/netbird
  6. Install the react native app dependencies
    yarn install
    yarn add file:./react/netbird-lib
  7. Run the dev version
    yarn start
  8. select a to install it on your Android phone or emulator

Generate debug bundle

Follow the steps to run locally until the step 5 then run the following steps:

  1. run npx from react native app repo
    cd ~/projects/android-client
    npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
  2. run gradlew
    cd ~/projects/android-client/android
    ./gradlew bundleDebug