- Kotlin 93%
- Shell 7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app | ||
| gradle/wrapper | ||
| releases | ||
| .dockerignore | ||
| build-apk.sh | ||
| build.gradle.kts | ||
| Dockerfile.build | ||
| gradle.properties | ||
| gradlew | ||
| LICENSE | ||
| README-v0.3.md | ||
| README.md | ||
| settings.gradle.kts | ||
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.btpfrom device storage, Downloads, NextCloud, Drive, USB-OTG — anywhere the system file picker can see. The existingimportFrompipeline runsBtpNative.verifyDocbefore 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) andlib_pick_failed(snackbar when the picker is cancelled). - New drawable:
ic_upload.xml, a Material-style 24dp vector tinted by the FAB'sapp:tint. - No new dependencies. Material 1.11.0 already provides
FloatingActionButton; AndroidX Activity 1.8.x already provides theActivityResultContracts.OpenDocumentcontract. - No new permissions. SAF on Android 7+ doesn't require any. The
existing
READ_EXTERNAL_STORAGEalready hasandroid:maxSdkVersion="32"so it's a no-op on Android 13+ where the picker would otherwise trip the runtime permission flow.
v0.5-hardened changes from v0.4 share-links
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_bytesafterMlDsa87Signer::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
- General: sac@securityops.co
- Bug reports: https://git.securityops.co/cristiancmoises/btp-app/issues
- Trademark licensing: sac@securityops.co
- Security: sac@securityops.co (PGP at https://securityops.co/.well-known/security.asc)
In Code We Trust.