14 Commits

Author SHA1 Message Date
Jamil
a5b4ec489f fix(docs): fix spacing due to new prettier (#9630)
Prettier was upgraded and has changed its mind on some spacing rules in
markdown files.
2025-06-23 05:52:57 +00:00
Thomas Eizinger
a78b4a29f1 chore(android): update README instructions (#9497)
While setting up Android Studio on my Mac, I noticed that these
instructions are slightly out of date and can be improved.
2025-06-10 14:08:29 +00:00
Thomas Eizinger
0d7e73be3c docs(android): document how to use adb logcat (#8931)
I've found myself having to look this up numerous times so I am
documenting it in the README now.
2025-04-30 00:04:44 +00:00
Jamil
90bac88194 build(deps): Bump cargo gradle plugin to fix pipes issue (#7598)
This fixes a recent issue regarding the `pipes` module being deprecated
in python3.

Docs are also updated to fix an intermittent issue I sometimes hit with
the plugin not finding my `rustc` or `cargo`.

https://github.com/mozilla/rust-android-gradle/releases/tag/v0.9.5
2024-12-30 07:22:54 +00:00
Andrew Dryga
5b1e3ea1d1 feat(portal): Billing system (#3642) 2024-02-20 15:01:17 -06:00
Jamil
931dd972bd Revert "chore(android): Remove i686 android target" (#3586)
Reverts firezone/firezone#3547

Seems that this wasn't the issue.
2024-02-06 11:26:15 -08:00
Jamil
bbab37f1e1 chore(android): Remove i686 android target (#3547)
This increases our app bundle size with no real benefit. ~~I'm also
encountering an issue where the `x86` shared library is being loaded
instead of the appropriate x86_64 one, causing a crash.~~ Edit: The
crash appears to be coming from somewhere else, still investigating.
Still it would be good to remove this as the Rust dependency in the
Android build is built serially.
2024-02-03 17:41:31 +00:00
Jamil
b1738bdd46 feat(ci): Add e2e test bed (#3135)
- [x] Launch control plane via docker compose
- [x] Ensure all clients build
2024-01-16 01:57:41 +00:00
Jamil
6113effb5e chore(ci): Lint Android readme (#3038) 2023-12-28 18:37:05 -06:00
Jason Elie Bou Kheir
141bd60c47 include detail about toolchain in README.md (#3020)
Sometimes, the targets installed in the `kotlin/android/README.md`
rustup steps are not installed in the same toolchain as the one that is
used to build the `debugApp`.

Added a small detail to check that the current toolchain has these
targets.

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-28 17:38:54 -06:00
bmanifold
d483fdeeed Update Android README dev instructions (#2814)
Updated the Dev Setup instructions for Android
2023-12-07 13:45:21 +00:00
Jamil
2bca378f17 Allow data plane configuration at runtime (#2477)
## Changelog

- Updates connlib parameter API_URL (formerly known under different
names as `CONTROL_PLANE_URL`, `PORTAL_URL`, `PORTAL_WS_URL`, and
friends) to be configured as an "advanced" or "hidden" feature at
runtime so that we can test production builds on both staging and
production.
- Makes `AUTH_BASE_URL` configurable at runtime too
- Moves `CONNLIB_LOG_FILTER_STRING` to be configured like this as well
and simplifies its naming
- Fixes a timing attack bug on Android when comparing the `csrf` token
- Adds proper account ID validation to Android to prevent invalid URL
parameter strings from being saved and used
- Cleans up a number of UI / view issues on Android regarding typos,
consistency, etc
- Hides vars from from the `relay` CLI we may not want to expose just
yet
- `get_device_id()` is flawed for connlib components -- SMBios is rarely
available. Data plane components now require a `FIREZONE_ID` now instead
to use for upserting.


Fixes #2482 
Fixes #2471

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
2023-10-30 23:46:53 -07:00
Jamil
3316d9098a fix(android): Fix auth flow and callback thread safety, and pass fd through FFI (#1930)
* Refactor sharedPreferences to only save the AccountId
* Update TeamId -> AccountId to match naming elsewhere
* Update JWT -> Token to avoid confusion; this token is **not** a valid
JWT and should be treated as an opaque token
* Update FFI `connect` to accept an optional file descriptor (int32) as
a first argument. This seemed to be the most straightforward way to pass
it to the tunnel stack. Retrieving it via callback is another option,
but retrieving return vars with the `jni` was more complex. We could
have used a similar approach that we did in the Apple client
(enumerating all fd's in the `new()` function until we found ours) but
this approach is [explicitly
documented/recommended](https://developer.android.com/reference/android/net/VpnService.Builder#establish())
by the Android docs so I figured it's not likely to break.

Additionally, there was a thread safety bug in the recent JNI callback
implementation that consistently crashed the VM with `JNI DETECTED ERROR
IN APPLICATION: use of invalid jobject...`. The fix was to use
`GlobalRef` which has the explicit purpose of outliving the `JNIEnv`
lifetime so that no `static` lifetimes need to be used.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Pratik Velani <pratikvelani@gmail.com>
Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
2023-08-23 14:13:55 -07:00
Pratik Velani
e23dbeab60 Add android client to the repo (#1738)
- Add android client to the repo

---------

Signed-off-by: Pratik Velani <pratikvelani@gmail.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-07-07 04:54:51 -07:00