No description
  • Kotlin 93%
  • Shell 7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-18 06:57:57 -03:00
app v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
gradle/wrapper v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
releases v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
.dockerignore v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
build-apk.sh v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
build.gradle.kts v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
Dockerfile.build v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
gradle.properties v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
gradlew v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
LICENSE v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
README-v0.3.md v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
README.md v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00
settings.gradle.kts v0.7 - Welcome to the New Internet 2026-05-18 06:57:57 -03:00

btp-app — BTP for Android

The official Android client for the Berkeley Transport Protocol (BTP).

For the protocol specification and source code: https://git.securityops.co/cristiancmoises/btp

For the Docker deployment stack: https://git.securityops.co/cristiancmoises/btp-docker

Current version v0.6.0 (versionCode 7)
Package co.securityops.btp (release) / co.securityops.btp.debug (debug)
Min SDK Android 7.0 (API 24)
Target SDK Android 14 (API 34)
Native ABIs arm64-v8a + armeabi-v7a
Default gateway https://btp-gw.securityops.co
Default origin btp://btp.securityops.co:3004/
License Apache-2.0 (app source + bundled libbtp_ffi.so built from the Rust crates of the BTP reference implementation)

Pre-built binaries

This tarball ships without pre-built release binaries. You must build and sign with your production keystore — see releases/README.md for the exact gradle invocation.

After building:

sha256sum -c releases/SHA256SUMS
adb install releases/btp-v0.6.0-release.apk

Build from source

# 1. Get the BTP source for JNI native code
git clone https://git.securityops.co/cristiancmoises/btp.git ../btp

# 2. This repo
git clone https://git.securityops.co/cristiancmoises/btp-app.git
cd btp-app

# 3. Build
./gradlew assembleRelease bundleRelease \
    -PbtpGatewayUrl=https://btp-gw.securityops.co
ls app/build/outputs/apk/release/
ls app/build/outputs/bundle/release/

The Gradle build invokes cargo build against the parent ../btp/ to produce libbtp_ffi.so for both arm64-v8a and armeabi-v7a, then bundles them into the APK.

What's new in v0.6.0

  • In-app .btp file upload. A Floating Action Button on the Library tab opens the system Storage Access Framework picker (ActivityResultContracts.OpenDocument). Pick any .btp from device storage, Downloads, NextCloud, Drive, USB-OTG — anywhere the system file picker can see. The existing importFrom pipeline runs BtpNative.verifyDoc before writing to disk, so the verify-before-save invariant from v0.5-hardened H-4 still holds for in-app uploads.
  • About screen rewritten for v0.6.0, license clarified to Apache-2.0 end-to-end (the previous string mentioned AGPL — that was wrong; the BTP reference implementation moved to Apache-2.0 per CHANGELOG v0.6.1 and the Android client tracks it).
  • New strings: lib_pick_file ("Open .btp file" — FAB content description for accessibility) and lib_pick_failed (snackbar when the picker is cancelled).
  • New drawable: ic_upload.xml, a Material-style 24dp vector tinted by the FAB's app:tint.
  • No new dependencies. Material 1.11.0 already provides FloatingActionButton; AndroidX Activity 1.8.x already provides the ActivityResultContracts.OpenDocument contract.
  • No new permissions. SAF on Android 7+ doesn't require any. The existing READ_EXTERNAL_STORAGE already has android:maxSdkVersion="32" so it's a no-op on Android 13+ where the picker would otherwise trip the runtime permission flow.

Closes 7 findings from Session E audit (4 High, 3 Medium):

  • H-1 — Secret-key wipe-on-use via IdentityManager.withSecretKey { sk, pk -> ... }
  • H-2 — Refuse to render documents with invalid signatures
  • H-3 — End-to-end TextHtmlSandboxed validation via new BtpNative.canonicalizeHtmlSandboxed(bytes) JNI export
  • H-4 — DocStore path-traversal guards with strict allow-list
  • M-1 — JNI zeroizes sk_bytes after MlDsa87Signer::from_keypair_bytes
  • M-2 — MainActivity validates share-link host
  • M-5 — Streaming size cap (12 MiB) on attached files

See the parent BTP repo's audit-reports/SESSION-F-fixes-report.md for full details.

License & trademark

Asset License
Kotlin app source code Apache-2.0
The bundled libbtp_ffi.so (built from btp Rust crates) Apache-2.0
The name "BTP" Registered trademark of Security Ops — see TRADEMARK.md in the main repo

If you fork this app and modify it in ways that diverge from BTP protocol conformance, you must not call your fork "BTP". The trademark exists to protect end users from impostor implementations.

Contact


In Code We Trust.