Commit Graph

11 Commits

Author SHA1 Message Date
niccellular
1ea87dbbad Rename from Tak centric to "Lockdown" mode
3 files renamed (via git mv, history preserved):
  - TakLockHandler.kt → LockdownHandler.kt
  - TakPassphraseStore.kt → LockdownPassphraseStore.kt
  - TakUnlockDialog.kt → LockdownUnlockDialog.kt

  16 files updated with consistent renames across the entire codebase. No stray TAK-named symbols remain in any .kt or .aidl source file.

  What stayed the same (wire protocol / firmware-defined):
  - The firmware notification strings: "TAK_LOCKED", "TAK_NEEDS_PROVISION", "TAK_UNLOCKED", "TAK_UNLOCK_FAILED" — still matched as string literals in LockdownHandler.kt
  - Config.DeviceConfig.Role.TAK / TAK_TRACKER proto enum values
  - The SharedPrefs key changed from "tak_passphrase_store" → "lockdown_passphrase_store" (existing stored passphrases won't migrate automatically — users will need to re-enter on first launch of the updated app)
2026-03-03 17:17:24 -05:00
niccellular
e7ba8e8497 feature: Add TAK passphrase lock/unlock support
Implement the client-side TAK passphrase authentication flow for
  devices running TAK-locked firmware.

  Key components:
  - TakPassphraseStore: per-device passphrase persistence using
    EncryptedSharedPreferences (Android Keystore AES-256-GCM), with
    boot and hour TTL fields stored alongside the passphrase
  - TakLockHandler: orchestrates the full lock/unlock lifecycle —
    auto-unlock on reconnect using stored credentials, passphrase
    submission, token info parsing, and backoff/failure handling
  - MeshCommandSender: sendTakPassphrase() and sendTakLockNow() build
    plain local packets that bypass PKC signing and session_passkey;
    hour TTL is encoded as an absolute Unix epoch as required by firmware
  - ServiceRepository: TakLockState sealed class (None, Locked,
    NeedsProvision, Unlocked, LockNowAcknowledged, UnlockFailed,
    UnlockBackoff), TakTokenInfo (boots remaining + expiry epoch), and
    sessionAuthorized flag
  - TakUnlockDialog: Compose dialog for passphrase entry, shown on
    Locked and NeedsProvision states; onDismissRequest is a no-op to
    prevent race conditions with firmware response timing; cancel
    disconnects the user and navigates to the Connections tab
  - Lock Now (Security settings): immediately disconnects the client
    after informing firmware, purges cached config, navigates away
    without showing a passphrase dialog
  - ConnectionsScreen: suppress "region unset" prompt while the device
    is TAK-locked, since pre-auth config is zeroed/redacted and would
    lead the user to a blank LoRa settings screen
  - AIDL: sendTakUnlock() and sendTakLockNow() wired through
    MeshService → MeshActionHandler → TakLockHandler
  - Security settings: "Lock Now (TAK)" button and token info display
    showing boots remaining and expiry date
2026-02-27 08:31:05 -05:00
James Rich
986c60ce88 docs: Update READMEs and library versions
This commit updates the README files for the `core:api`, `core:model`, and `core:proto` modules to improve documentation and reflect current usage.

Key changes include:
- Bumping the library version to `v2.7.13` in usage examples.
- Adding a detailed README for the `core:proto` module.
- Updating the `core:api` README to use `MeshtasticIntent` constants instead of hardcoded strings.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:54:51 -06:00
James Rich
34b0755192 refactor: Centralize Meshtastic intent constants
This commit centralizes all Android Intent constants into a new `MeshtasticIntent` object within the `core/api` module.

This refactoring makes the constants accessible to external applications and removes the duplicated definitions from the main application. The app and the service example have been updated to use these new centralized constants.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:45:11 -06:00
James Rich
18aae852fd build(ksp): ksp and publishing tuning (#4462)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-05 22:36:38 +00:00
James Rich
f1520eb383 feat(example): Add packet log and UI improvements (#4455)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-05 07:24:15 -06:00
James Rich
3eefa801d6 refactor(build): Introduce AndroidLibraryFlavors convention plugin (#4449) 2026-02-04 16:01:09 -06:00
James Rich
25657e8f8f feat(wire): migrate from protobuf -> wire (#4401)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-04 00:01:12 +00:00
James Rich
5441f87b7a Update README with JitPack integration details (#4372)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-30 13:30:06 +00:00
James Rich
039e785a2d build: Lower JDK to 17 and minSdk to 21 (#4369) 2026-01-29 20:04:30 -06:00
James Rich
15760da074 Refactor: Create core:api module and set up publishing (#4362) 2026-01-29 13:45:00 -06:00