Skip to content

About

Bounded Android, Flutter and JVM middleware, with a source-built Android 16 native Binder proof on Linux/KVM.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

BoundaryLab

Bounded middleware, from app clients to a source-built Android 16 system image.

5 hosted lanes passed (recorded run) · Apache-2.0

BoundaryLab architecture illustration: Android, Flutter and desktop clients, with a separate native AOSP profile

Architecture illustration. Every execution claim below links to retained receipts.

Use as a library · Evidence gallery · Run locally · Architecture · Delivery board

Embed a bounded file-hashing broker in Android/Flutter apps, reuse its core in a JVM application, or integrate the generated-only native service host into a custom Android image. Install and configure the libraries.

Built and tested on a real Linux AOSP server

On 30 October 2026, we built and booted the pinned Android 16 source baseline, then a custom native-service image, on a Google Cloud Linux x86_64 server with KVM. The host ran Ubuntu 24.04 with 16 vCPU, 64 GiB nominal RAM (62.8 GiB reported) and a 500 GiB SSD workspace. This was source-built Android running in Cuttlefish on that server. Host/KVM receipts · Allocated host inventory

The original native compiler log records the Linux host directly:

HOST_OS=linux
HOST_OS_EXTRA=Linux-7.0.0-1014-gcp-x86_64-Ubuntu-24.04.5-LTS

Pinned source: android-16.0.0_r4 · Target: aosp_cf_x86_64_only_phone-bp4a-userdebug · Executed overlay: 444ae29.

Recorded proof layer Final result Inspect the evidence
Operator checks 34 / 34 passed Source, image, boot and cleanup aggregate
Harness observations 236 / 236 passed Real Binder/lifecycle checks
Distinct native assertions 61 / 61 passed Original command and stdout

These are separate layers; observations include repeated checks. Native assertions ran under permissive su. Live authorized Binder calls used UID 2000 / boundarylab_probe; the service and both probe domains were nonpermissive in the loaded SELinux policy.

Receipt-derived poster of the real Google Cloud Linux compiler log showing HOST_OS=linux and a successful incremental native build; select to open the evidence replay

Animated evidence replay — not a live recording. Derived from retained commands and results. Static poster · Replay transcript and provenance · Original execution evidence

Watch the 28-second recorded-evidence replay

Animated evidence replay — not a live recording. Receipt-derived progression from Linux host and source build to Android boot, Binder checks and teardown

Animated evidence replay — not a live recording. Collapse this panel to return to the static view. Read the transcript.

Actual service execution

The AOSP component is a headless native Binder service. Its useful evidence is the work it executed and the callers it rejected.

Authorized caller, UID 2000: submitted one generated byte (0x00); the service returned the expected SHA-256 digest.

{"case":"known_job_succeeded","passed":true,"detail":"6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d"}

Recorded request, caller identity and returned digest

Unauthorized caller, UID 9999: received the typed DENIED result.

I/BoundaryLabProbe( 4371): {"case":"denied","passed":true,"detail":"DENIED"}

Recorded denied-client identity and response

Separate native engine execution: all 61 assertion cases passed under the recorded su identity.

{"summary":"PASS","checks":61}

Original native command and complete stdout · Source baseline build/boot receipts · Supporting boot-capture archive

Explanatory pipeline from the real Linux/KVM server through source build and Cuttlefish to native Binder service execution and evidence export

Execution pipeline diagram. Actual Soong API update/freeze → native build → image build → runtime receipts.

The added AOSP components are a native C++ facade, frozen AIDL V1, a dedicated system_ext Binder daemon, init definitions and SELinux rules. This profile supports generated SHA-256 work; file jobs return UNSUPPORTED. The Java framework, system_server and kernel are unchanged. Layer ownership and source

Open the results, cost and recorded-run timeline charts

Recorded AOSP proof results, with operator checks, harness observations and native assertions shown as separate layers

Receipt-derived results. The 61 native assertions used permissive su; the three BoundaryLab domains were nonpermissive. Short restart and quiescent FD observations do not establish performance or soak. Underlying results.

Historical infrastructure estimate compared with the authorized budget

Estimated infrastructure US$6.17; US$11.44 including egress allowance and tax/FX reserve. Final invoice unavailable. Server and both disks were verified deleted at 22:41:46 UTC on 30 October 2026. Cost calculation and teardown receipts.

Receipt-derived timeline of the recorded baseline, custom builds, runtime attempts and teardown

Historical execution timeline. Five failed runtime attempts and their exact corrections remain preserved. All visuals and sources.

A useful example: inspection attachments that can be checked

FieldPack helps a recipient catch changed or missing attachments before working from the wrong files. It demonstrates process isolation, bounded work and explicit recovery when a worker disappears.

An inspector selects attachments in the native Android or Flutter client. A separate Android application broker hashes them; the client explicitly exports a SHA-256 manifest. The recipient receives the manifest and attachments separately, then verifies a local directory through a separate desktop JVM host or the Python reference.

Native Android — actual exportFlutter — actual export
Actual installed native FieldPack client after successfully exporting its manifest on Android API 36 Actual installed Flutter FieldPack client after successfully exporting its manifest on Android API 36

Both clients exported the same 299-byte manifest. Separate JVM and Python recipient implementations agreed on all five outcomes: matching, changed, truncated, missing and unsupported symlink—10 JVM and 10 Python cases across the two exports. Original handoff results · Observed broker-loss defect and verified fix

Explanatory architecture showing the Android application broker, Flutter plugin, desktop JVM host and separate generated-only native AOSP profile

Architecture diagram. FieldPack uses the application broker; the native AOSP profile is a separate integration. File/job contract · Wire contract.

Try FieldPack locally

Requires Git and Python 3.10+ on macOS or Linux/POSIX. Uses only the standard library; after cloning, the reference demo runs offline.

git clone https://github.com/oudaykhaled/boundarylab.git
cd boundarylab
python3 examples/fieldpack/demo.py

The demo creates a manifest from three owned fixtures, verifies copied files, changes a byte, removes an attachment and rejects an unsupported format. Its expected final marker is PASS: all expected outcomes and exit codes observed. This single-process reference runs independently of the recorded AOSP image. Walkthrough and custom files

Use BoundaryLab in another project

Reuse the existing bounded SHA-256 engine and FieldPack codec without including this checkout's Gradle source projects. The core is a JVM 17 JAR; the Android SDK is an API 30+ AAR that talks to a separately installed broker. Flutter consumes the same AAR. Local Maven coordinates are dev.boundarylab:boundarylab-core:0.1.0-SNAPSHOT and dev.boundarylab:boundarylab-android:0.1.0-SNAPSHOT; this is local/private distribution, with no Maven Central or pub.dev release claimed.

The library guide covers publication, independent JVM and Android consumers, Flutter setup, and a custom broker package. Approved Android clients and broker must share signing identity and declare the broker's exact signature permission. The native OS host is a separate, generated-only custom-image integration; current source additions do not inherit the recorded image's execution results. Generated SHA-256 and FieldPack remain the available workloads; a substantive new capability requires its own design, implementation and evidence.

Explore or build an implementation

Goal Start here
Native Android application and broker Native client · Binder broker · Kotlin SDK
Flutter application and plugin Flutter consumer · Flutter SDK
Separate-process desktop host and CLI Desktop quickstart · Conformance results
Native AOSP source integration AOSP profile · Layer diagram
Pinned application toolchains and local check commands

JDK 17, Android SDK 36 / build-tools 35.0.0, Gradle 8.13, AGP 8.11.1 and Kotlin 2.2.21; Flutter 3.38.9 / Dart 3.10.8. Desktop file support needs a trusted local C compiler. Android installation minimum is API 30; actual local device evidence is API 36.

python3 scripts/verify-wrapper.py
python3 scripts/check.py reference
python3 scripts/check.py jvm
python3 scripts/check.py android
python3 scripts/check-flutter.py

These commands check/build applications; they do not install a device or provision AOSP infrastructure. The local Flutter receipts record the equivalent direct Dart analyzer used where the wrapper analyzer was incomplete; CI uses the complete pinned SDK.

Broker and both Android consumers must have matching signing certificates. Build them with the same local signing setup or use the matched three-APK CI bundle. The separately signed denial fixture is intentionally rejected. Build/runtime quality report

Evidence, scope and next work

The engineering prototype has actual app, desktop and AOSP execution evidence. 393 selected host cases and 31 physical-device cases passed at the recorded application source, with one hardlink fixture explicitly unavailable; those counts are separate from the AOSP proof above. Quality report · Current requirement evidence · AI acceptance audit

Work is bounded: 32 flat aliases, 128 MiB per file and pack, 64 KiB reads, 16 KiB manifest, fixed resource caps and one worker. Jobs and sessions are volatile; process loss requires a fresh epoch and explicit resubmission. Matching hashes establish byte consistency. Security and supported file profile

Open: compatibility evolution/old consumers, controlled performance and peak-resource measurement, the two-hour soak, fresh final-image reproduction and other declared roadmap acceptance. The baseline's incremental-build/sandbox history and failed custom attempts remain inspectable. No production release, commercial adoption or independent execution authenticity is claimed.

Architecture decisions · 40-task plan and status · 22-item role evidence matrix · Original animated proposal · Contributing · Evidence policy

Created and maintained by Ouday Khaled. Apache-2.0.

About

Bounded Android, Flutter and JVM middleware, with a source-built Android 16 native Binder proof on Linux/KVM.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages