The ${{ env.ANDROID_HOME }} expression resolves against workflow-level
env, not the runner's process environment, so the NDK and AVD system-
image cache paths came out empty-prefixed and the saves were dropped
with "Path Validation Error". Hardcode the ubuntu-latest sdk path
(/usr/local/lib/android/sdk) for both.
Also fix the screen recording: touch the sentinel file BEFORE launching
the background loop, otherwise the loop sees no file on its first
iteration and exits immediately, producing zero recordings.
- setup-go: point cache-dependency-path to netbird/go.sum so the Go
module cache actually restores (build-android-lib.sh shaves ~1-2 min).
- Cache the NDK install dir and the gomobile binary by pinned version,
skipping the corresponding install step on cache hit.
- Cache the AVD plus the API 30 google_apis x86_64 system image, add a
warm-up step that boots once to capture a snapshot, and run tests with
force-avd-creation=false plus -no-snapshot-save so subsequent jobs
load the cached snapshot without overwriting it.
- Move the screenrecord/gradle/pull pipeline to
.github/scripts/run-instrumented-tests.sh because the emulator-runner
action executes each line of the inline script as a separate sh -c,
which broke the multi-line subshell loop.
Run adb screenrecord in a background loop (180s segments) for the full
duration of connectedDebugAndroidTest, then upload the segments as an
artifact. Helps diagnose UiAutomator failures that only repro in CI.
Adds SetupKeyAuthTest, a UiAutomator-driven instrumentation test that
drives the in-app "Change server" screen end-to-end with a setup key
and waits for the success dialog. The test taps "Use NetBird", so the
management URL is the one hard-coded in the app (Preferences.defaultServer()).
The setup key comes from an instrumentation runner argument so CI can
inject it as a secret without baking it into the APK.
Wires it into the existing build-debug workflow as a workflow_dispatch-only
job that reuses the netbird-aar artifact, so PR builds are unaffected
and the AAR is built only once per run.
Required repo config:
- Secret: INSTRUMENTATION_NB_SETUP_KEY (UUID, ideally reusable + ephemeral)
* Add network connectivity stress test for VPN resilience
Instrumented test that simulates real-world network disruptions (WiFi/mobile
switching, airplane mode, flapping, long outages) and verifies VPN recovery
via ping. Auto-detects real device vs emulator and uses appropriate network
control strategy for each.
* Fix review findings: resource leak, version bump, markdown lint
- Use try-with-resources in sendEmulatorConsoleCommand to prevent socket leak
- Bump testRules version from 1.6.1 to 1.7.0
- Add language specifier to fenced code block in README
* Fix review findings: restore in finally, label mismatch, readUntilOK error handling
- Always call disruption.restore in finally block to prevent stale network state
- Fix EMU latency label from 5s to 10s to match actual delay value
- Make readUntilOK propagate IOException and detect KO/EOF failures
* Exclude NetworkConnectivityStressTest from CI
This test requires a configured VPN and real network interfaces,
so it cannot run on the CI emulator. Run it manually on a real device.
* Add network change detector and listeners
* Add network toggle listener to VPNService
* Add unit tests for ConcreteNetworkChangeListener
* Rename NetworkChangeListener to NetworkAvailabilityListener
* Change EngineRunner's Set implementation
From HashSet to ConcurrentHashMap's KeySet,
which is thread-safe.
* Update submodule to the latest tag (v0.59.6)
* Add EngineRestarter to restart the Go engine
* Add LOGTAG to NetworkChangeDetector
* Add some documentation to NetworkToggleListener
* Use EngineRestarter as implementation of NetworkToggleListener
When subscribing to ConcreteNetworkAvailabilityListener
* Replace HashMap usage with ConcurrentHashMap
The availableNetworkTypes HashMap is accessed from network
callback threads without synchronization
* Wrap connectivityManager.unregisterNetworkCallback with try-catch
* Add restart runnable and timeout callback to EngineRestarter
Restart runnable is used as a debouncing mechanism to
prevent concurrent restarts
Timeout callback is to reset the isRestartInProgress flag's
value if the engine takes too long to restart
* Update git submodule reference to latest tag
* Reverse cleanup order on VPNService's onDestroy
Now it disposes of network listener components
before stopping engineRunner
* Ci tests (#99)
Add testing steps for CI
* Remove line break
---------
Co-authored-by: Zoltan Papp <zoltan.pmail@gmail.com>
Rewrite the client in native Java.
There were no new features added in this change, but that's the first step in moving to a faster development cycle for NetBird client.
If apps that target Android 14 use a foreground service, they must declare a specific permission, based on the foreground service type, that Android 14 introduces. These permissions appear in the sections labeled "permission that you must declare in your manifest file" in the intended use cases and enforcement for each foreground service type section on this page.
update compile SDK version to 34
update Go version in CI