various fixes
- Commit
bf0f619f10d34144bc3715d1bf2d2605649f6113- Author
- vayun-mathur <[email protected]>
- When
- 2026-09-09 04:20 UTC (2 months ago)
- Parents
1a49dda
Diff
.github/dependabot.yml
diff --git a/.github/dependabot.yml b/.github/dependabot.ymlnew file mode 100644index 0000000000..aca9bd1be0--- /dev/null+++ b/.github/dependabot.yml@@ -0,0 +1,118 @@+# Automated dependency monitoring (SUPPLY_CHAIN_RISKS.md 6.4).+#+# Scheduling note: this repo has 100+ Gradle modules and 9 independent Cargo+# workspace roots. Ungrouped weekly updates would open dozens of PRs a week, so+# every ecosystem is monthly and every ecosystem collapses its minor/patch bumps+# into a single grouped PR. Major bumps stay ungrouped (they need individual+# review) and are capped by open-pull-requests-limit.+#+# Dependabot *security* alerts are not affected by this schedule - they are+# raised as soon as an advisory lands, independently of the interval below.++version: 2++updates:+ # ---- Gradle / JVM ----------------------------------------------------+ # Nearly every module resolves its versions through the single version+ # catalog at gradle/libs.versions.toml, so the root directory covers the+ # whole app tree. build-logic is a separate included build (it has its own+ # settings.gradle.kts) and has to be listed explicitly.+ - package-ecosystem: "gradle"+ directories:+ - "/"+ - "/build-logic"+ schedule:+ interval: "monthly"+ day: "monday"+ time: "06:00"+ timezone: "Etc/UTC"+ open-pull-requests-limit: 5+ commit-message:+ prefix: "deps"+ labels:+ - "dependencies"+ - "gradle"+ groups:+ gradle-minor-patch:+ patterns:+ - "*"+ update-types:+ - "minor"+ - "patch"++ # ---- Cargo -----------------------------------------------------------+ # One entry per committed Cargo.lock, i.e. per independent workspace root.+ # The repo root workspace covers all the app-level src/main/rust members and+ # the vendored third_party/betocore crates (path dependencies, which+ # Dependabot ignores). The rest are detached roots:+ # - code/src/main/rust, games/voxels/src/main/rust: separate lockfiles+ # - library/tilecodec/src/main/rust: excluded from the root workspace on+ # purpose (see the comment in the root Cargo.toml)+ # - scripts/maps/*: host-side build tools, not shipped in any APK+ # third_party/betocore/*/fuzz are vendored fuzz harnesses and are all+ # deliberately left out: nothing they pull in is linked into a shipped .so,+ # so a libfuzzer-sys advisory would reach reviewers as product risk when it+ # is not. Two different situations sit behind that one decision:+ # - np_adv/fuzz parses and is a detached workspace root with its own+ # 115-package lockfile, so it genuinely could be added here. It is+ # excluded on the merits above, not because it cannot be.+ # - the other four still fail `cargo metadata` at manifest parse: they+ # inherit arbitrary / derive_fuzztest / libfuzzer-sys via+ # `workspace = true` and none of those three is defined in the root+ # [workspace.dependencies]. Their committed Cargo.locks make them look+ # addable and they are not - each of the four predates the+ # derive_fuzztest dependency and has no entry for it, so a lock would+ # not satisfy its own manifest even once that manifest parses.+ #+ # Reviewer note: a `jni` 0.22 PR should not be merged as-is. The root+ # Cargo.toml documents that the 0.21 -> 0.22 API change touches all 31 native+ # entry points and is deliberately deferred.+ - package-ecosystem: "cargo"+ directories:+ - "/"+ - "/code/src/main/rust"+ - "/games/voxels/src/main/rust"+ - "/library/tilecodec/src/main/rust"+ - "/scripts/maps/gtfs_ingest"+ - "/scripts/maps/mamaps_build"+ - "/scripts/maps/osm_ingest"+ - "/scripts/maps/tile_build"+ - "/scripts/maps/wikidesc"+ schedule:+ interval: "monthly"+ day: "monday"+ time: "06:00"+ timezone: "Etc/UTC"+ open-pull-requests-limit: 5+ commit-message:+ prefix: "deps"+ labels:+ - "dependencies"+ - "rust"+ groups:+ cargo-minor-patch:+ patterns:+ - "*"+ update-types:+ - "minor"+ - "patch"++ # ---- GitHub Actions --------------------------------------------------+ # Covers every workflow under .github/workflows.+ - package-ecosystem: "github-actions"+ directory: "/"+ schedule:+ interval: "monthly"+ day: "monday"+ time: "06:00"+ timezone: "Etc/UTC"+ open-pull-requests-limit: 2+ commit-message:+ prefix: "deps"+ labels:+ - "dependencies"+ - "github-actions"+ groups:+ github-actions-all:+ patterns:+ - "*"
.github/workflows/android.yml
diff --git a/.github/workflows/android.yml b/.github/workflows/android.ymlindex 377f15e7e7..aa8b0e767a 100644--- a/.github/workflows/android.yml+++ b/.github/workflows/android.yml@@ -3,11 +3,11 @@ name: "๐ Publish Next Release" on: workflow_dispatch: +# Only the non-secret keystore filename is workflow-scoped. The signing secrets are+# scoped to the single step that consumes them so they are not in the environment of+# third-party actions. env: ks_filename: release_keystore.jks- ks_store_pass: ${{ secrets.KS_STORE_PASS }}- ks_alias: ${{ secrets.KS_ALIAS }}- ks_alias_pass: ${{ secrets.KS_ALIAS_PASS }} jobs: release:@@ -17,14 +17,14 @@ jobs: steps: - name: Checkout Code- uses: actions/checkout@v4+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: fetch-depth: 0 lfs: true submodules: recursive - name: Set Up JDK 21- uses: actions/setup-java@v4+ uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1 with: distribution: 'zulu' java-version: '21'@@ -223,7 +223,15 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add .+ # Stage only what the earlier steps write: the two root gradle files sed'd by+ # "Clean Project Files", the per-module build.gradle.kts version injection, and+ # the generated Play/F-Droid listings. Never `git add .` - that also picks up the+ # decoded keystore, which this commit is reachable from once the tag is pushed.+ git add -- settings.gradle.kts build.gradle.kts+ for dir in ${{ env.module_dirs }}; do+ git add -- "$dir/build.gradle.kts" "$dir/src/main/play/listings/en-US"+ done+ VERSION_NAME="${{ steps.version_info.outputs.version_name }}" git commit -m "chore: prepare release $VERSION_NAME" || echo "No changes to commit"@@ -232,8 +240,11 @@ jobs: - name: Install Rust Toolchain 1.97.0 run: | set -e- TOOLCHAIN=$(grep -h 'channel =' pdf/src/main/rust/rust-toolchain.toml | head -1 | cut -d'"' -f2)- TOOLCHAIN=${TOOLCHAIN:-1.97.0}+ TOOLCHAIN=$(grep -h 'channel =' rust-toolchain.toml | head -1 | cut -d'"' -f2)+ if [ -z "$TOOLCHAIN" ]; then+ echo "Error: could not read channel from rust-toolchain.toml" >&2+ exit 1+ fi echo "Installing Rust toolchain $TOOLCHAIN + aarch64-linux-android" rustup toolchain install $TOOLCHAIN --no-self-update --profile minimal rustup target add aarch64-linux-android --toolchain $TOOLCHAIN@@ -243,6 +254,10 @@ jobs: rustup target list --installed --toolchain $TOOLCHAIN - name: Build and Sign APKs+ env:+ ks_store_pass: ${{ secrets.KS_STORE_PASS }}+ ks_alias: ${{ secrets.KS_ALIAS }}+ ks_alias_pass: ${{ secrets.KS_ALIAS_PASS }} run: | # Always build release APKs for every app module. ./gradlew assembleRelease \@@ -253,14 +268,19 @@ jobs: -Pandroid.enableResourceOptimizations=true \ -Pandroid.enableR8.fullMode=true \ -PRELEASE_STORE_FILE="${{ github.workspace }}/${{ env.ks_filename }}" \- -PRELEASE_STORE_PASSWORD="${{ env.ks_store_pass }}" \- -PRELEASE_KEY_ALIAS="${{ env.ks_alias }}" \- -PRELEASE_KEY_PASSWORD="${{ env.ks_alias_pass }}"+ -PRELEASE_STORE_PASSWORD="$ks_store_pass" \+ -PRELEASE_KEY_ALIAS="$ks_alias" \+ -PRELEASE_KEY_PASSWORD="$ks_alias_pass" # Consolidate all generated APKs into one directory mkdir -p distribution_apks find . -path "*/build/outputs/apk/release/*.apk" -exec cp {} distribution_apks/ \; + # Signing is done - get the key off disk before any third-party action runs.+ # The `if: always()` Cleanup Keystore step below stays as a backstop for the+ # case where the build fails before reaching this point.+ rm -f "${{ env.ks_filename }}"+ - name: Push Tag Only if: success() run: |@@ -269,7 +289,7 @@ jobs: - name: Create GitHub Release if: success()- uses: softprops/action-gh-release@v2+ uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2.6.2 with: tag_name: "${{ steps.version_info.outputs.version_name }}" name: "Release ${{ steps.version_info.outputs.version_name }}"
.github/workflows/cargo-deny.yml
diff --git a/.github/workflows/cargo-deny.yml b/.github/workflows/cargo-deny.ymlnew file mode 100644index 0000000000..cfaa7b90c6--- /dev/null+++ b/.github/workflows/cargo-deny.yml@@ -0,0 +1,96 @@+name: "๐ Cargo Deny"++# Automated dependency monitoring for the Rust side of the tree+# (SUPPLY_CHAIN_RISKS.md 6.4). Complements .github/dependabot.yml: Dependabot+# proposes upgrades, this reports advisories/bans/sources on what is committed.+#+# The schedule matters as much as the PR trigger - an advisory can land against+# an unchanged lockfile, which no pull_request run would ever catch.++on:+ pull_request:+ branches:+ - main+ paths:+ - "**/Cargo.toml"+ - "**/Cargo.lock"+ - "deny.toml"+ - ".github/workflows/cargo-deny.yml"+ push:+ branches:+ - main+ paths:+ - "**/Cargo.toml"+ - "**/Cargo.lock"+ - "deny.toml"+ - ".github/workflows/cargo-deny.yml"+ schedule:+ # Mondays 05:00 UTC.+ - cron: "0 5 * * 1"+ workflow_dispatch:++# Read-only. This workflow needs no secrets and writes nothing.+permissions:+ contents: read++concurrency:+ group: cargo-deny-${{ github.ref }}+ cancel-in-progress: true++jobs:+ cargo-deny:+ runs-on: ubuntu-latest+ permissions:+ contents: read++ strategy:+ fail-fast: false+ matrix:+ # One entry per committed Cargo.lock, i.e. per independent workspace+ # root. Kept in sync with the cargo `directories` list in+ # .github/dependabot.yml.+ root:+ - "."+ - "code/src/main/rust"+ - "games/voxels/src/main/rust"+ - "library/tilecodec/src/main/rust"+ - "scripts/maps/gtfs_ingest"+ - "scripts/maps/mamaps_build"+ - "scripts/maps/osm_ingest"+ - "scripts/maps/tile_build"+ - "scripts/maps/wikidesc"++ name: "cargo-deny (${{ matrix.root }})"++ steps:+ - name: Checkout Code+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0+ with:+ persist-credentials: false++ # cargo-deny only reads Cargo.toml/Cargo.lock, it never compiles the+ # crates, so the runner's default toolchain is enough - the pinned+ # 1.97.0 android toolchain is not needed here.+ - name: Install cargo-deny+ uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8+ with:+ tool: cargo-deny++ - name: Check advisories, bans and sources+ run: |+ cargo deny \+ --manifest-path "${{ matrix.root }}/Cargo.toml" \+ --config deny.toml \+ check advisories bans sources++ # Separate step from the one above only so a licence failure is+ # attributable at a glance; it is equally blocking. The allow list in+ # deny.toml is the verified minimal set for the committed lockfiles, so a+ # failure here means a genuinely new licence arrived and needs a human+ # decision.+ - name: Check licenses+ run: |+ cargo deny \+ --manifest-path "${{ matrix.root }}/Cargo.toml" \+ --config deny.toml \+ check licenses
.github/workflows/issue_labeler.yml
diff --git a/.github/workflows/issue_labeler.yml b/.github/workflows/issue_labeler.ymlindex 0a014bf78f..6e98eaa9a1 100644--- a/.github/workflows/issue_labeler.yml+++ b/.github/workflows/issue_labeler.yml@@ -10,7 +10,7 @@ jobs: issues: write steps: - name: Extract App Name and Label- uses: actions/github-script@v7+ uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 with: script: | const body = context.payload.issue.body;
.github/workflows/pr-compile-check.yml
diff --git a/.github/workflows/pr-compile-check.yml b/.github/workflows/pr-compile-check.ymlindex 24f087dd4f..f7829e54fd 100644--- a/.github/workflows/pr-compile-check.yml+++ b/.github/workflows/pr-compile-check.yml@@ -13,12 +13,12 @@ jobs: steps: - name: Checkout Code- uses: actions/checkout@v4+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: lfs: true - name: Set Up JDK 17- uses: actions/setup-java@v4+ uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1 with: distribution: 'zulu' java-version: '17'
.gitignore
diff --git a/.gitignore b/.gitignoreindex 7c929d0a64..310a78ff6f 100644--- a/.gitignore+++ b/.gitignore@@ -78,6 +78,4 @@ planet_out/ waterh_analysis renpho_analysis -# Map comparator emulator screenshots (local only, not committed)-mapcompare/screenshots/ .aider*
CONTRIBUTING.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex cbc7220a92..30c9540d53 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -321,7 +321,9 @@ app is themed with. Reach for the helper that names the interaction: | `Modifier.animateItem(...)` | `itemMotion()` | `library.ui` | | a press-shape `animateIntAsState` | `pressedShape(pressed)` | `library.ui` | | a hand-rolled entrance | `Modifier.staggeredEntrance(index, arriving)` | `library.ui` |-| a shared element across a nav change | `sharedText` / `sharedContainer` / `SharedEditableText` / `MorphPage()` | `library.util` |+| a shared element across a nav change | `sharedText` / `sharedContainer` / `sharedCrop` / `SharedEditableText` / `MorphPage()` | `library.util` |+| a card that becomes a much bigger thing | `sharedCrop` โ crops its contents instead of reflowing (`sharedContainer`) or scaling (`sharedText`) them | `library.util` |+| a hand-rolled exit for chrome the user navigates away from | `Modifier.dropsAway()` / `Modifier.sinksBelow()` / `Modifier.expandFromLine()` | `library.util` | Imperative one-off motion on `androidx.compose.animation.core.Animatable` is **not** flagged โ a game board wave or a camera capture flash is genuinely bespoke, and wrapping it would be a
SUPPLY_CHAIN_RISKS.md
diff --git a/SUPPLY_CHAIN_RISKS.md b/SUPPLY_CHAIN_RISKS.mdindex b0748f0157..9dc4ecfbbf 100644--- a/SUPPLY_CHAIN_RISKS.md+++ b/SUPPLY_CHAIN_RISKS.md@@ -1,201 +1,945 @@ # Supply Chain Risks -This document enumerates critical external dependencies for the Modern-Apps monorepo (27 apps + `library/`, `sdk/`, `third_party/`). It covers runtime server dependencies and build-time library dependencies that could break apps if abandoned, shut down, or changed.+This document records the current state of everything external that this repository depends on:+the code and artifacts that enter its builds and shipped APKs, and the network services its apps+contact at run time. Each entry states what the dependency is, the risk as it stands, and what+would mitigate it. -## Assumptions+## Scope and limits -- **Self-hosted infrastructure is assumed indefinite**: `api.vayunmathur.com`, `data.vayunmathur.com`, `findfamily.cc` and any subdomains are excluded from the risk list. These services host self-owned data (e.g. the `openassistant`/`photos` ML models permanently hosted at `data.vayunmathur.com/models`, map pmtiles/zone downloads on `data.vayunmathur.com`, E2EE relays) and proxy a few third-party secrets (Duffel, Google Places/Ratings) to keep F-Droid builds reproducible. Only the *transitive third-party* upstreams (Duffel, Google Maps Platform) are listed โ the proxy/DB itself is not a supply-chain risk.-- Offline apps require only Maven Central / Google Maven at build time.+Covered:++- **The build and artifact supply chain** โ dependency declaration and resolution, artifact+ integrity, the CI and release pipeline, scripts that fetch or compile remote code, vendored+ third-party source, and model-weight provenance.+- **The servers the apps talk to** โ both the runtime hosts contacted from user devices (ยง11) and+ the build-time and data-prep hosts contacted from a developer machine or CI runner (ยง12). Several+ hosts appear in both roles; the two are kept separate throughout because the trust model and the+ blast radius differ.++Not covered: application logic, permissions posture, and data handling beyond where it bears+directly on a third-party dependency.++### Verification status++**Nothing in this document has been validated by a build.** No Gradle task ran, and no shell script+was syntax-checked. `cargo metadata --offline --no-deps` was run against the vendored fuzz manifests+(ยง4.1) and is the only build-tool invocation behind any claim here; there was no full `cargo build`.+Everything else is a static read of the tree.++Two specifics worth knowing before relying on a "clean" signal:++- Shell scripts cannot be checked in this environment. `bash -n` is unavailable, shellcheck is not+ installed, and no diagnostics provider is registered for `.sh` โ so an empty diagnostics result on+ a shell file means *nothing was checked*, not *nothing is wrong*.+- Nothing JVM-side can be compiled locally. CI can compile it (ยง6.6), but no change described here+ has been through that path yet.++This matters most for the recently changed build inputs. The following are correct by inspection+and unverified by execution:++- Kotlin Gradle Plugin at 2.4.0, and the single `protobufVersion` key at 4.35.0 now backing+ `protobuf-java`, `protobuf-javalite` and `protoc`.+- The version-catalog accessors added for the Android Auto and `androidx.test` coordinates that are+ now declared through `libs.versions.toml`.+- The NDK version refactor onto `build-logic/src/main/kotlin/NdkVersion.kt`.+- Every shell script referenced below, including the pinning and checksum logic in+ `scripts/maps/extract_pmtiles.sh` and `scripts/download-ca-bundle.sh`.++Treat "the build tolerates this" anywhere in this document as an inference, not an observation.++### Limits of the audit++These bound what the rest of the document can claim.++- The Gradle dependency graph was not resolved. Everything here reflects *declared* coordinates.+ Transitive dependencies are not inventoried โ notably, `io.grpc:grpc-okhttp` pulls okhttp and okio+ into `:appstore` transitively, and those versions are not established here.+- No vulnerability or advisory scanning result is reported here. Nothing below asserts that a+ dependency is or is not affected by a known CVE. `cargo-deny` runs in CI (ยง6.4) for the Rust side;+ there is no equivalent for the JVM side.+- Maintainer counts, release cadence, and abandonment status were not verified upstream. Where a+ library is described, the description is limited to what is observable in the tree.+- The `personal/*` modules are gitignored and absent from this checkout, so their dependencies and+ hosts are outside this inventory.+- The host inventory has its own, sharper limits โ see ยง11.5.++## Summary++The build side is in reasonable shape and the runtime side is not.++The Rust/Cargo half of the build is well controlled: committed lockfiles with per-package checksums,+no git dependencies, no source replacement, locked builds, and `cargo-deny` on a schedule. The model+pipeline is comparably controlled โ every weight pins an upstream revision and verifies a SHA-256.+CI pins every third-party action to a commit SHA, scopes signing secrets to the one step that needs+them, and gets the keystore off disk before any third-party code runs.++One build-integrity gap dominates: Gradle resolves every dependency with no artifact verification+whatsoever (ยง1.1).++The runtime picture is worse than the build picture. One app transports credentials over a socket+with no TLS, another accepts any certificate presented by an arbitrary mail server, live payment and+OAuth credentials are compiled into shipped APKs, and one developer-run generator downloads and+executes JavaScript from a mutable upstream branch. These are set out in full below.++---++## Highest-severity findings++The four items in this section outrank everything else in this document. Three are runtime; one is+in a build script.++**WhatsApp traffic runs over a plain TCP socket.** `WhatsAppSocket.kt` opens a bare+`java.net.Socket` to `g.whatsapp.net:443` and runs Noise_XX over it, with no TLS wrapper. Noise does+supply confidentiality for the payload, but the transport carries no system trust, no hostname+verification, and no certificate chain validation โ server authentication rests entirely on the+custom verification inside the handshake. This is the sole transport for the primary WhatsApp+client, so there is no fallback path with better properties. The file's own header records that+whether the mobile edge expects raw Noise-over-TCP or a TLS wrap is an unresolved live-validation+question.++**The email client accepts any server certificate.**+`email/src/main/java/com/vayunmathur/email/network/imap/TrustAll.kt:25` implements+`checkServerTrusted` as an empty body, so every certificate validates. The user's IMAP/SMTP password+is sent immediately after the connection is established. Separately, `ImapClient.kt` swallows a+STARTTLS failure and continues to log in over the plaintext socket. Two of the six bundled provider+presets (`smtp-mail.outlook.com:587`, `smtp.mail.me.com:587`) start plaintext by design, so the+downgrade path is reachable with stock configuration.++**Live third-party credentials are compiled into shipped APKs.** A Stripe publishable *live* key is+a string literal at `fooddelivery/src/main/java/com/vayunmathur/fooddelivery/MainActivity.kt:82`. A+Lyft OAuth client secret is a string literal at+`taxi/src/main/java/com/vayunmathur/taxi/network/lyft/LyftAuth.kt:55`, and `:taxi` has+`BOOKING_LIVE = true`, so real charges are possible. A Tidal `client_id;client_secret` pair sits+base64-encoded at `musicbrainz/.../tidal/TidalAuth.kt:67-68`. Alongside these are a WhatsApp+`CLIENT_TOKEN` plus registration salt and public key, Google BotGuard api-key and request-key+constants in `:youpipe`, and two public OAuth client ids. A secret in an APK is a published secret:+these must be treated as disclosed and rotated, and the flows that need a confidential client moved+behind a service that can hold one.++**`generate_shields_lists.py` executes unpinned remote code.** `scripts/generate_shields_lists.py`+downloads uBlock Origin scriptlet sources from+`raw.githubusercontent.com/gorhill/uBlock/master/src` โ a mutable branch, no commit pin, no digest โ+writes them into a temporary directory alongside a generated `dump.mjs`, and runs+`node dump.mjs` over them with `check=True` (`:222-228`). Anything landing on uBO's `master`+executes on the developer machine on the next run of the generator. That machine is also where+release signing happens.++---++## 1. Build integrity (Gradle)++### 1.1 No artifact verification โ High++There is no `gradle/verification-metadata.xml`, no dependency lockfiles, and no `dependencyLocking`+or `dependencyVerification` configuration anywhere in the build. The Gradle wrapper's+`distributionSha256Sum` is the only artifact integrity check in the entire build.++This is specifically *not* a version-drift risk. Every coordinate in the build is exactly pinned:+there are no dynamic versions, no version ranges, and no `-SNAPSHOT` dependencies. Pinning fixes+which artifact is requested; it does not constrain what bytes arrive. An artifact that is+substituted or republished at an already-pinned coordinate is consumed without complaint.++The exposure is not confined to library bytes sitting on a compile classpath. The build resolves+four *executables* from Maven and runs them during the build (ยง7.3), so the same missing check+applies to code the build actually executes.++Mitigation: generate `gradle/verification-metadata.xml` with checksum (ideally signature)+verification enabled. This is the single highest-value change available on the JVM side.++Generating it is not a mechanical step and should not be treated as one.+`--write-verification-metadata` records whatever is already in the local Gradle cache, so running it+on a warm cache pins the current bytes without ever establishing that those bytes are the right+ones. Doing this properly means resolving into a clean cache and reconciling the resulting digests+against upstream before committing them.++### 1.2 Wrapper distribution is verified โ control in place++`gradle/wrapper/gradle-wrapper.properties` pins Gradle 9.6.1 from `services.gradle.org` with+`distributionSha256Sum` set and `validateDistributionUrl=true`.++The residual gap is narrow but worth stating precisely: `gradle-wrapper.jar` is committed to the+repository and is the one committed binary in the tree. The pinned checksum covers the distribution+zip that the jar downloads, not the jar itself.++Mitigation: keep the checksum pinned on every wrapper upgrade. Validate the committed jar against+the upstream release when it changes.++---++## 2. Repositories++`dependencyResolutionManagement` in `settings.gradle.kts` sets+`repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)`, so no module can introduce its own+repository โ all resolution goes through the repositories declared centrally. `mavenLocal()` is not+present anywhere, so no artifact in a developer's local cache can outrank a declared remote.++Beyond the standard Google and Maven Central set, one custom repository is declared:+`https://build-artifacts.signal.org/libraries/maven/`, content-filtered to `includeGroup("org.signal")`.++### 2.1 Signal artifacts come from a vendor-run repository โ Medium++`libsignal-android` 0.101.0 and `ringrtc-android` 2.71.0 are consumed by `:communicate` from+`build-artifacts.signal.org`. There is no Central mirror, so availability and integrity both rest+on a single vendor-operated host โ and with no artifact verification configured (ยง1.1), nothing+validates what that host returns.++`libsignal` is deliberately held at 0.101.0 for MRENCLAVE reasons, so it cannot be upgraded freely+in response to an upstream advisory. That constraint is a property of the protocol, not an+oversight, but it does mean the usual "upgrade to fix" response is unavailable here.++Mitigation: cover these coordinates in verification metadata as part of ยง1.1. Mirror the artifacts+if build availability matters.++---++## 3. JVM / Android dependency surface++Dependencies are centralised in `gradle/libs.versions.toml`: 60 versions, 105 libraries, 7 plugins,+all exactly pinned. Every dependency coordinate in the tree takes its group, name and version from+the catalog. Two are still finished off as strings in module build files because they append a+classifier the catalog cannot express: the OS-classified `protoc` executable in `:communicate` and+`protoc-gen-grpc-kotlin`'s `:jdk8@jar` in `:appstore`.++### 3.1 Prerelease toolchain and libraries โ Medium++Eighteen catalog version entries resolve to alpha or beta releases, among them the Android Gradle+Plugin at `9.4.0-alpha04` (with `lint` tracking it at `32.4.0-alpha04`), `material3`+`1.5.0-alpha27`, `camerax` `1.7.0-alpha02`, `credentials` `1.7.0-alpha02`, `biometric`+`1.4.0-alpha07`, `webkit` `1.17.0-alpha03`, and `media3` `1.11.0-beta01`. Prerelease artifacts can be+withdrawn or republished, receive no stability guarantee, and are generally not covered by upstream+security backports.++AGP is the one that matters most, because it is the build tool rather than a library: an alpha AGP+is the component with the widest reach over what gets produced.++Mitigation: move the toolchain, and AGP in particular, to stable releases before any release branch+is cut.++### 3.2 Deprecated annotation libraries โ Low++`com.google.code.findbugs:jsr305` 3.0.2 is consumed by `:youpipe:extractor`, and+`javax.annotation:javax.annotation-api` 1.3.2 by `:appstore` as `compileOnly`. Both are long+deprecated. Both supply compile-time annotations only, so the practical exposure is small.++Neither can be removed independently. `javax.annotation-api` exists because grpc-java generated+stubs reference `@javax.annotation.Generated`. `jsr305` is required by the vendored NewPipe+Extractor source, so dropping it means editing vendored third-party code (ยง9).++Mitigation: revisit `jsr305` if and when the vendored extractor is refreshed.++### 3.3 Third-party libraries on sensitive paths โ Medium++These are called out for where they sit rather than for any known defect. Descriptions are limited+to what is observable in the tree; publisher activity and maintenance status were not verified.++| Library | Version | Consumers | Why it is called out |+|---|---|---|---|+| `io.github.dokar3:quickjs-kt` | 1.0.5 | `:youpipe` | Published under a personal `io.github.dokar3` namespace, and evaluates JavaScript on the YouTube extraction path โ a code-execution dependency from a single-account publisher. |+| `net.zetetic:sqlcipher-android` | 4.18.0 | `:library:room` โ `:passwords`, `:notes` | Provides encrypted-database support. Declared `api(...)` at `library/room/build.gradle.kts:14`, so it propagates onto dependents' compile classpaths rather than staying an implementation detail. |+| `com.auroraoss:gplayapi` | 3.6.4 | `:appstore` | Small community organisation on the Play install path. Its host surface is in ยง11.1. |+| `org.brotli:dec` | 0.1.2 | 5 modules incl. `:library:network`, `:youpipe:extractor` | Decompression of network-sourced input, pinned at a 0.1.x version. |++Mitigation: cover all of these under artifact verification (ยง1.1).++On narrowing sqlcipher from `api` to `implementation`: the reason recorded next to the declaration+โ that the inline `buildDatabase` body exposes a `net.zetetic` type โ does not hold. `buildDatabase`+delegates to a non-inline overload and names no SQLCipher type; `SQLCipherDriver` appears only in+the private `openRoomDatabase` (`SqlCipher.kt:138`), and no public signature exposes a `net.zetetic`+type.++The actual blocker is one consumer. `health/src/main/java/com/vayunmathur/health/util/FoodDatabase.kt:19`+imports `net.zetetic.database.sqlcipher.SQLiteDatabase` while `health/build.gradle.kts` declares no+sqlcipher dependency of its own โ it rides the `api` leak. The other 21 `:library:room` consumers do+not. So the narrowing is a two-line change: add `implementation(libs.sqlcipher.android)` to `:health`+and drop `api` to `implementation` in `:library:room`. It needs a build to confirm, and none can be+run locally (see Verification status). --- -## Server Dependencies+## 4. Native code (Rust / Cargo) -### A. Purpose-Aligned Dependencies (server IS the feature)+This is the strongest-controlled area of the build. -These services are the raison d'รชtre of the feature. If the service itself ceases to exist, the feature's purpose also ceases. The risk is existential to the product category, not an avoidable implementation choice. Most are also reverse-engineered/unofficial, so breakage from API changes is expected.+- The root `Cargo.lock` is committed and covers 440 packages. All 398 external packages carry a+ registry source and a SHA-256 checksum.+- There are no git dependencies and no `[patch]` or `[replace]` sections, so no crate is resolved+ from an arbitrary remote or silently swapped.+- There is no `.cargo/config.toml`, so no registry redirection is configured.+- `rust-toolchain.toml` pins the toolchain to 1.97.0, and CI reads its channel from that file.+- Builds run with `--locked`, so a build fails rather than silently updating the lockfile.+- Nine independent workspace roots each have a committed lockfile, including+ `third_party/betocore/np_adv/fuzz`, whose manifest spells out the `[workspace.dependencies]` keys+ that upstream's unvendored `nearby/Cargo.toml` would otherwise supply. -| App | External Service | Endpoints / Evidence | Why Inherent | Impact if Gone | Source Files |-|---|---|---|---|---|---|-| `youpipe`, `education` | **YouTube** | `https://www.youtube.com/watch?v=`, `*.googlevideo.com`, SABR streaming, `sabr_po_token.js` | Product is a YouTube client; YouTube is the content source | No playback. Breaks on anti-bot changes (common, requires extractor updates) | `youpipe/src/main/java/com/vayunmathur/youpipe/util/Extractor.kt`, `MyDownloader.kt`, `youpipe/extractor/src/main/java/org/schabi/newpipe/extractor/` (vendored NewPipe Extractor) |-| `messages` (gmessages) | **Google Messages for Web** | `https://messages.google.com/web/authentication`, `https://instantmessaging-pa.googleapis.com`, `https://instantmessaging-pa.clients6.google.com`, API key `AIzaSyCA...`, UA `Chrome/146.0.0.0` | Purpose is aggregating user's Google Messages account | QR pairing / long-poll fails; requires UA / PbLite RPC bump | `messages/src/main/java/com/vayunmathur/messages/gmessages/Constants.kt`, `RpcClient.kt`, `PairFlow.kt` |-| `messages` (gvoice) | **Google Voice (unofficial web API)** | `clients6.google.com/voice/v1/...`, `signaler-pa.clients6.google.com`, `waa-pa.clients6.google.com`, Origin `https://voice.google.com` | Purpose is aggregating Google Voice | SMS/calls/history stops on Voice web change | `messages/src/main/java/com/vayunmathur/messages/gvoice/Constants.kt`, `GVoiceRpcClient.kt` |-| `messages` (whatsapp) | **WhatsApp Web + media CDN** | `wss://web.whatsapp.com/ws/chat`, `s.whatsapp.net`, `*.whatsapp.net`, `mmg.whatsapp.net` | Purpose is aggregating WhatsApp | Noise `XX_25519_AESGCM_SHA256` handshake breaks, media upload fails | `messages/src/main/java/com/vayunmathur/messages/whatsapp/WhatsAppProtocol.kt`, `WhatsAppWebSocket.kt` |-| `messages` (signal) | **Signal** | `wss://chat.signal.org/v1/websocket/`, `chat.signal.org/v1/devices/capabilities`, Signal CDN attachments, `signal-root.crt.der` | Purpose is aggregating Signal | Sealed sender / ratchet / attachment upload breaks | `messages/src/main/java/com/vayunmathur/messages/signal/SignalClient.kt` |-| `messages` (meta) | **Messenger / Instagram (Lightspeed/MQTT)** | Facebook MQTT, `www.messenger.com`, Mercury upload, `LS_RESP`, `ORCA_TYPING` | Purpose is aggregating Messenger/IG | MQTT `versionId` mismatch rejected, login token expiry | `messages/src/main/java/com/vayunmathur/messages/meta/MetaClient.kt`, `MetaMqttClient.kt`, `MetaBootstrap.kt` |-| `messages` (telegram) | **Telegram MTProto DCs** | Telegram data centers, MTProto | Purpose is aggregating Telegram | DC migration / flood wait / auth key invalidation | `messages/src/main/java/com/vayunmathur/messages/telegram/TelegramClient.kt`, `mtproto/` |-| `email` | **Per-provider IMAP/SMTP + OAuth** | Gmail `imap.gmail.com:993` / `smtp.gmail.com:465`, Outlook `outlook.office365.com:993` / `smtp-mail.outlook.com:587` + `https://login.microsoftonline.com/common/oauth2/v2.0/authorize`, Yahoo, iCloud `imap.mail.me.com`, Fastmail, generic custom | Purpose is connecting to user's own email provider; provider IS the mailbox | That provider's account stops syncing. Microsoft identity outage blocks Outlook token refresh | `email/src/main/java/com/vayunmathur/email/data/ProviderPresets.kt`, `OutlookOAuth.kt` |-| `everysync` | **Google Contacts/Calendar, Google Health, iCloud CalDAV/CardDAV, Generic DAV** | `https://accounts.google.com/o/oauth2/v2/auth`, `oauth2.googleapis.com/token`, `www.googleapis.com/carddav/v1`, `apidata.googleusercontent.com/caldav/v2`, `health.googleapis.com/v4/.../dataPoints`, `caldav.icloud.com`, `contacts.icloud.com`, generic `/.well-known/caldav` discovery via `DavClient.kt` PROPFIND/REPORT | Purpose is syncing user's external calendars/contacts/health from those providers. Generic DAV servers are user-provided (not third-party) | Google/iCloud sync stops; Health backfill (steps, HR, sleep etc) halts | `everysync/src/main/java/com/vayunmathur/everysync/auth/OAuthConfig.kt`, `provider/impl/GoogleProvider.kt`, `remote/GoogleHealthClient.kt`, `provider/impl/DavProviders.kt`, `remote/DavClient.kt` |-| `travel` | **Duffel (Flights + Stays) via self-hosted proxy** | `https://api.vayunmathur.com/api/travel/*` proxying Duffel token server-side: `/places`, `/flights`, `/flights-async`, `/offers`, `/airlines`, `/aircraft`, `/orders`, `/orders/{id}/pay`, etc. Stays: `https://api.vayunmathur.com/api/stays/*` `/search`, `/rates`, `/quote`, `/bookings` | Purpose is flight + hotel search/booking; Duffel is the inventory aggregator. Proxy itself is assumed indefinite, but upstream Duffel is third-party | Flight/hotel search, pricing, seat maps, booking, trips hub fails. Reference data (airlines/cities) cached partially | `travel/src/main/java/com/vayunmathur/travel/network/TravelApi.kt`, `StaysApi.kt` |-| `musicbrainz` | **MusicBrainz WS/2** | `https://musicbrainz.org/ws/2/{artist,release-group,release,recording}`, 1 req/sec limit, identifying User-Agent required | Product is a MusicBrainz browser; MusicBrainz is the catalogue | No search or browsing at all. The app has no other catalogue source | `musicbrainz/src/main/java/com/vayunmathur/musicbrainz/api/MusicBrainzApi.kt` |-| `musicbrainz` | **YouTube** | `*.googlevideo.com` progressive audio, resolved through the vendored NewPipe fork in `:youpipe:extractor` | MusicBrainz catalogues music but hosts none; YouTube is the audio source | Downloads fail; browsing and the on-device library scan still work. Breaks on anti-bot changes, same as `youpipe` | `musicbrainz/src/main/java/com/vayunmathur/musicbrainz/download/AudioResolver.kt`, `MbDownloader.kt` |+### 4.1 Four vendored fuzz harnesses do not parse โ Low -Mitigation for purpose-aligned: pin UA versions (`Chrome/146`, Sec-CH-UA), isolate per-bridge circuit breaker, implement extractor/protocol version checks in CI, surface degraded state per account.+`third_party/betocore/*/fuzz`, other than `np_adv/fuzz`, still inherit `arbitrary`,+`derive_fuzztest` and `libfuzzer-sys` via `workspace = true` against a root+`[workspace.dependencies]` that does not define them, so `cargo metadata` fails on each. Their+committed lockfiles predate the `derive_fuzztest` dependency and have no entry for it. They are+fuzzing harnesses, ship in no APK, and are excluded from both Dependabot and `cargo-deny` for that+reason. -### B. Replaceable / Infrastructure Dependencies (implementation choice, could be self-hosted or swapped)+Mitigation: repair the manifests the way `np_adv/fuzz` was, or delete the harnesses if they are not+run. -These servers provide data/functionality that is NOT intrinsically tied to a single vendor. We currently depend on a community/FOSS provider or CDN, but could mirror, self-host, or swap with modest engineering.+---++## 5. NDK and cross-compilation -| App | External Service | Endpoints / Evidence | Why Replaceable | Impact if Gone | Alternative |-|---|---|---|---|---|---|-| `weather` | **Open-Meteo Stack (FOSS, keyless)** | `https://api.open-meteo.com/v1/forecast`, `geocoding-api.open-meteo.com/v1/search`, `air-quality-api.open-meteo.com/v1/air-quality`, `map-tiles.open-meteo.com/data_spatial/<model>/latest.json` + `.om` tiles `.../YYYY/MM/DD/HHMMZ/...om` decoded by `libweather_om.so` (vendored C/Rust in `third_party/om-file-format-sys`) | Weather data is commodity; Open-Meteo is one FOSS provider among many. API is keyless and opensource, self-hostable | Forecast, city search, air-quality, weather map shading fails. `WeatherCacheStore` mitigates partially | Self-host Open-Meteo `om-file-format` + DWD ICON model, or swap to PirateWeather, OpenWeather, NOAA GFS direct |-| `maps` ratings + live traffic | **Google Places + traffic via self-hosted proxy (transitive)** | `https://api.vayunmathur.com/maps/traffic` (live traffic tiles, `OfflineRouter.kt`), `place_match`, `place_rating` wrapping Google Places (`Reviews.kt`) | Ratings/traffic proxy holds secret; Google is upstream. **Routing is fully offline** via `offlinerouter.so` (C++ `maps/src/main/cpp/`, `OfflineRouter.findRouteNative`) + self-hosted `v4.pmtiles` + the routing packs fetched on first launch + `admin0.fgb/admin1.fgb` + GTFS โ no online routing endpoint is called | Place ratings + live-traffic overlay fail; turn-by-turn routing continues fully offline | Ratings could be OSM/Wikidata; self-host a traffic source. (Online routing already removed in favor of the offline router) |-| `maps` basemap (vector) | **Protomaps v4 + basemaps-assets now self-hosted โ ** | `https://data.vayunmathur.com/v4.pmtiles` (137 GB, was `https://demo-bucket.protomaps.com/v4.pmtiles`), styling sprites `https://data.vayunmathur.com/basemaps-assets/sprites/v4/light` + fonts `fonts/{fontstack}/{range}.pbf` (`style.json:3541-3542`, 1044 objects), plus a one-time fetch of nine routing/POI packs (`metadata.bin`, `road_names.bin`, `nodes.bin`, `edges.bin`, `lanes.bin`, `intermediate.bin`, `poi_index.bin`, `poi_names.bin`, `world.transit`) via `InitialDownloadChecker` (`maps/src/main/java/com/vayunmathur/maps/MainActivity.kt:85-97`) | Self-hosted on R2 bucket `maps` custom domain `data.vayunmathur.com` (Cloudflare, direct Range, free egress, `immutable` cache). PMTiles streams via HTTP Range by MapLibre; disk cache `MapTileCache.kt:36-39` SHA-256(URL+Range) 24h refresh + offline stale-serve with `.origin` migration marker. Attribution `Protomaps ยฉ OSM` preserved (`style.json` attribution, ODbL/BSD allowed) | If R2 down: previously-cached tilecache still serves; the nine routing packs are already on disk so navigation continues | Already vendored at `data.vayunmathur.com` โ zero external vector dependency. APK only hits own domain for vector tiles |-| `findfamily` / `photos` / `weather` / `taxi` / `fooddelivery` | **CARTO raster basemap CDN (third-party)** | `https://basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}@2x.png` and `light_all/...` (`library/map/src/main/java/com/vayunmathur/library/map/TileSource.kt:26,32`), consumed through `RasterMap.kt` | Raster XYZ tiles are a commodity; any OSM raster source has the same URL shape. Attribution is `ยฉ OpenStreetMap ยฉ CARTO` | These five apps' map views show blank tiles. `maps` itself is unaffected โ it uses the self-hosted vector basemap | Point `TileSource` at self-hosted raster tiles rendered from the existing `v4.pmtiles`, or reuse the vector basemap via MapLibre |-| `youpipe` extras | **SponsorBlock / DeArrow (community)** โ data APIs now self-hosted | Segment + branding data served from `https://api.vayunmathur.com/api/skipSegments` and `/api/branding` (a local mirror of the SponsorBlock DB, no runtime call to ajay.app). DeArrow now self-hosted renderer `GET /api/dearrow/thumbnail?videoID=&time=` (`handlers/dearrow.rs`, own yt-dlp + ffmpeg impl inspired by `ajayyy/DeArrowThumbnailCache`) | Crowdsourced, best-effort extras, not core YouTube | Sponsor skips + DeArrow titles/branding + thumbnail frames now continue from local even if ajay.app is down | โ **Fully self-hosted** โ SponsorBlock DB mirrored into `sponsorblock.db` (`sb_build.sh` rsyncs public dumps; served by `handlers/sponsorblock.rs`). DeArrow thumbnail proxy + render at `/api/dearrow/thumbnail` (`dearrow.rs`), clients rewired in `Extractor.kt:167` `DEARROW_THUMB_MIRROR` and `Wikidata.kt:10` `BASE_URL`. Wikidata proxy `GET /api/wikidata/items/:id` (`wikidata.rs`) โ 73 server tests green |-| `maps` / `travel` / `photos` / `weather` | **MapLibre rendering + Wikidata enrichment** | `org.maplibre.compose:maplibre-compose:0.13.0` โ `libmaplibre.so`, self-hosted Wikidata `https://api.vayunmathur.com/api/wikidata/items/{id}` (`Wikidata.kt:10`) | Map renderer is FOSS community project (vs Mapbox), Wikidata is enrichment only (now also proxied/self-cached at `wikidata_cache/`) | Map rendering would need fork/mirror if MapLibre artifacts gone; Wikidata fail is graceful null | Vendor MapLibre AAR, or switch to OpenGL self-render; Wikidata proxy keeps attribution |-| `musicbrainz` extras | **Cover Art Archive / LRCLIB (community)** | `https://coverartarchive.org/release/{id}/front-500` and `/release-group/...` (redirects to `ia*.us.archive.org`, hence `TrustBundle.STANDARD`), `https://lrclib.net/api/get` | Artwork and lyrics are decoration on the download, not the feature. Both are optional and switchable off in settings | Downloads still succeed, just without embedded cover art or lyrics. Browsing shows placeholder tiles | Mirror covers on `data.vayunmathur.com`, or fall back to the artwork embedded in the source stream |+The build does not use `cargo-ndk`. `build-logic/src/main/kotlin/RustNative.kt` implements Android+cross-compilation directly. The NDK version is single-sourced as `NDK_VERSION` in+`build-logic/src/main/kotlin/NdkVersion.kt` and consumed by AGP's `ndkVersion` in the app and wear+convention plugins and by the Rust toolchain paths, so the version string exists in one place. -`health` **no longer requests `android.permission.INTERNET` at all** โ it is the first app here with no network access whatsoever. Its nutrition database ships inside the APK as a brotli-compressed columnar asset (`scripts/generate_food_db.py` โ `health/src/main/assets/food.bin.br`, 10.9 MB for 465,000 products), which `FoodDatabase.kt` turns into a SQLite/FTS5 database on first launch. Upstream is the **Open Food Facts** daily CSV export (ODbL v1.0, attributed in-app) โ a build-host dependency, not a runtime one: if it vanished the shipped database keeps working and only stops being refreshable. The older `/api/food/search` and `/api/food/data/:id` endpoints remain up for previously-shipped builds.+The residual risk is that the constant names an NDK that must actually be installed on the build+host; a mismatch surfaces as a link failure rather than a version error. This is unverified by any+build (see Verification status). -`speech` **no longer downloads anything**:+--- -- **Speech-to-text** is `whisper-base` in `speech/src/main/assets/whisper-base/whisper_base.maml` (70.6 MiB int8), run on **`:library:ml`** by `WhisperEngine.kt`. It replaced two int8 ONNX exports totalling 76.9 MB on `onnxruntime-android`, which had replaced a 117 MB runtime download of the ncnn conversion from `data.vayunmathur.com/models/whisper-tiny/`. It was `whisper-tiny` until the swap to `base`, which roughly halves word error. Upstream is now the **fp32 checkpoint**, `openai/whisper-base` (Apache-2.0) pinned to revision `e37978b9`, a **build-host** dependency only, pinned by SHA-256 and rebuilt byte-for-byte by `scripts/ml/fetch_whisper.py`. Reading the checkpoint rather than the ONNX export is what lets `maml_convert.quantise_per_channel` quantise **per output channel** where onnxruntime quantised per tensor: measured over the encoder output, mean absolute error against fp32 is 0.029 against the export's 0.110, four times closer. The log-mel front end stays in Kotlin (`WhisperFeatures.kt`, pinned against HuggingFace by `WhisperFeaturesTest`); the KV-cached decode loop moved out of Kotlin into tested Rust (`post::whisper`).-- **Text-to-speech** is **Supertonic 3** bundled in `speech/src/main/assets/supertonic/`, run on `:library:ml` - our own Vulkan compute runtime - by `SupertonicTtsService.kt`. It replaced Piper (VITS), whose voices were a **1,834 MB** runtime download across 42 SHA-256-pinned archives from `data.vayunmathur.com/models/piper/`, each needing a per-language espeak-ng dictionary generated on the build machine. One bundle of four networks now covers 31 languages and 10 voices; the `:library:downloadservice` and DataStore dependencies went with it, along with `scripts/speech/fetch_piper_model.sh`, `generate_piper_dict.py` and `generate_wordlist.py`. Reads stream out of the APK through a file descriptor, which is why `noCompress += "maml"` is load-bearing rather than an optimisation.+## 6. CI and release pipeline - Two things about this one are unlike every other model here. **Its licence is use-restricted**: Supertonic 3 is **OpenRAIL**, the first such licence in this tree - everything else is Apache-2.0, MIT, ODbL or InsightFace's non-commercial research terms. And because it is bundled rather than downloaded, the restriction ships in the APK rather than being fetched by a user who went looking for it. It is a **build-host** dependency and no runtime dependency at all: upstream is **`Supertone/supertonic-3`** on HuggingFace, pinned to revision `3cadd1ee` with all four ONNX SHA-256s in `scripts/ml/fetch_supertonic.py`, which fetches it and drives both converters. The ONNX is not vendored - it is 398 MB against the 189 MiB of fp16 `.maml` it becomes, and nothing reads it at run time. The `.maml` are not committed either, for the reason `/.gitignore` gives, so `fetch_supertonic.py` is the only record of where the weights came from and the only way to rebuild them.+Four workflows: `android.yml` (release), `pr-compile-check.yml`, `cargo-deny.yml`, and+`issue_labeler.yml`. - Two independent checks guard a bad rebuild, and they fail for different reasons: the pinned file SHA-256s catch a re-export or a truncated download, and each converter's layer-table digest in `maml_convert.EXPECTED_DIGEST` catches an export whose *structure* moved - which is what would make the hardcoded Rust forward passes read the right shapes holding the wrong numbers. Neither checks the numbers; `scripts/ml/onnx_parity.py` does, and its correlations against onnxruntime are recorded in the README beside the assets.+### 6.1 Third-party action pinning โ control in place - The bundle is **107 MiB**, not the 198 MB the fp32 export folds to at fp16: every ungrouped `1 x 1` convolution in the sampler, the vocoder and the duration predictor is stored as int8 with one fp16 scale per output channel. That is 92% of the sampler's parameters and 87% of the vocoder's. The text encoder stays fp16 - quantising it cost more correlation than the other three combined and saved 6.6 MB of 198, so it was measured and reverted. With whisper-base's 71.6 MiB, `:speech` ships 179.2 MiB of assets and links no third-party inference runtime at all.+Every third-party action across all four workflows is pinned to a full commit SHA with the tag in a+trailing comment: `actions/checkout`, `actions/setup-java`, `actions/github-script`,+`softprops/action-gh-release`, and `taiki-e/install-action`. A repointed upstream tag therefore+cannot change what runs. - The language coverage is a deliberate regression as well as a gain: 42 languages became 31. TTS was **lost** for Chinese, Hebrew, Thai, Bengali, Telugu, Malayalam, Marathi, Urdu, Serbian, Norwegian, Catalan, Georgian, Kurdish, Luxembourgish, Nepali and Swahili, and **gained** for Estonian, Croatian, Lithuanian, Latvian and Slovenian. The dropped languages are absent from the engine's advertised voice list, so a user is never offered one that would be silent.+Mitigation: keep the SHA form on every bump. The `github-actions` Dependabot ecosystem (ยง6.4)+proposes them. -So a clean install both transcribes and speaks with no network at all.+### 6.2 Signing key handling โ control in place -**There is no third-party inference runtime left in the tree.** `com.microsoft.onnxruntime:onnxruntime-android` and its reduced rebuild `io.github.vayun-mathur:onnxruntime-reduced-android` are gone from `libs.versions.toml`, and with them the last of the `.so`-shaped AI dependencies that ncnn started. Both `:speech` and `:photos` were on the **reduced** build, so what actually left each APK is 10,466,856 bytes of arm64 native code - about 3.6 MiB deflated - against the 797 KB `libmodelrunner.so` that was already in both. Every model in every app now runs on `:library:ml` reading `.maml` weights.+In `android.yml`, workflow-level `env:` holds only the non-secret keystore filename. `KS_STORE_PASS`,+`KS_ALIAS` and `KS_ALIAS_PASS` are step-level `env:` on the single "Build and Sign APKs" step, so+they are not in the environment of any other step. That step deletes the decoded keystore+immediately after collecting the APKs โ before `softprops/action-gh-release` runs โ and an+`if: always()` cleanup step is a backstop for a build that fails earlier. -Measured release APKs, before and after: `:photos` 59.0 MiB to **53.8 MiB**, `:speech` 188.1 MiB to **181.8 MiB**. The weights dominate both numbers and barely moved - TinyCLIP's 24,281,512-byte ONNX became a 23,734,912-byte `.maml`, whisper's two graphs' 76,894,612 bytes became 74,058,272 - so the saving is the runtime, as expected. Neither APK contains an `onnxruntime` entry or a `.onnx` asset.+The release commit stages explicit paths (`settings.gradle.kts`, `build.gradle.kts`, and each+detected module's `build.gradle.kts` and generated listing directory) rather than `git add .`, so+the decoded keystore cannot be captured into a commit that the pushed tag is reachable from. -The reduced build is worth remembering as a shape of dependency to avoid rather than merely as bytes saved. It was **our own rebuild** of upstream with `--include_ops_by_config` against an operator list generated from the very models it ran โ so re-exporting a model meant regenerating the AAR by hand, and a model with an operator outside the configured set failed at *session creation* rather than at inference. Nothing in `.maml` has that coupling: the container carries ordered tensors and the forward pass is Rust in `nets/`.+The job holds `contents: write`. `pr-compile-check.yml` and `cargo-deny.yml` are `contents: read`;+`issue_labeler.yml` is `issues: write`. -It also came out **more accurate**, not less, because reading each model's fp32 source and quantising per output channel beats onnxruntime's per-tensor dynamic quantisation. Measured against fp32: whisper-base's encoder output is 0.029 mean absolute error against the export's 0.110, and TinyCLIP's text embedding is 0.9994 cosine against 0.9829.+### 6.3 Rust version check โ control in place -`photos` **semantic search no longer needs a second app**.+The "Install Rust Toolchain" step greps the repository-root `rust-toolchain.toml` for its channel+and exits non-zero if the value is empty, so CI tracks the real pin instead of falling back to a+hardcoded version. -`photos` **semantic search no longer needs a second app**. It previously delegated image/text embedding to the OpenAssistant app over IPC, so search only worked if OpenAssistant was installed, recent enough, and had finished a ~452 MB SigLIP2 download. It now runs **TinyCLIP-ViT-8M/16 Text-3M** in-process from `photos/src/main/assets/clip/tinyclip.maml` (22.6 MiB int8) on **`:library:ml`**, with the CLIP BPE table in `clip/bpe_simple_vocab_16e6.txt`. Upstream is **`onnx-community/TinyCLIP-ViT-8M-16-Text-3M-YFCC15M-ONNX`** (MIT, an ONNX export of `wkcn/TinyCLIP-ViT-8M-16-Text-3M-YFCC15M`) pinned to revision `9463a9c5` - a **build-host** dependency only, pinned by SHA-256 and rebuilt byte-for-byte by `scripts/ml/fetch_tinyclip.py`, with provenance in `photos/src/main/assets/clip/README.md`. Until that script existed this was the only bundled model in the tree with no pinned upstream digest and no fetch recipe. The `.maml` is converted from the repo's **fp32** `onnx/model.onnx` rather than the int8 export the app used to run: that export quantised the 49,408-row token table per *tensor* with a uint8 zero point of 226, which `conv_int8.comp` cannot represent and requantising cannot recover. Cosine against fp32 is now 0.9999 for an image and 0.9994 for a query, against the int8 export's 0.9985 and 0.9829. The trade-off accepted here is accuracy in absolute terms: TinyCLIP-8M scores 41.1% zero-shot ImageNet-1k against SigLIP2-base's high-70s, so single-concept queries are noticeably weaker than the IPC path it replaced.+### 6.4 Dependency monitoring โ control in place, JVM half missing -`camera` and `photos` **no longer bundle two unattributable models**. Both `erdnet.{param,bin}` (portrait segmentation) and `u2netp.ncnn.{param,bin}` (subject segmentation) were added in a single commit (`72dde80df`, "make apps smaller") with no upstream URL, no license and no conversion recipe, and neither was ever listed here. They are replaced by fp16 `.maml` weights converted from **Apache-2.0** ONNX exports, run on `:library:ml` โ our own Vulkan compute runtime โ rather than on ncnn:+`.github/dependabot.yml` covers three ecosystems: `gradle` (root plus the `build-logic` included+build), `cargo` (nine workspace roots), and `github-actions`. All are monthly with minor/patch bumps+grouped into one PR per ecosystem and major bumps left ungrouped. Dependabot security alerts are+independent of that schedule. -- `camera/src/main/assets/selfie_segmentation.maml` (211 KB, was 1.63 MB) from **`onnx-community/mediapipe_selfie_segmentation`**. A deliberate model *change*, not a port: erdnet was Caffe-derived from nihui's ncnn demo family and had no obtainable ONNX, so it could not be attributed or rebuilt at all. Bokeh masks therefore differ from before.-- `photos/src/main/assets/u2netp.maml` (2.15 MB, was 2.26 MB) from **`BritishWerewolf/U-2-Netp`**. The same network re-sourced โ the ncnn model's op inventory (Convolution 119, Pooling 33, Interp 38) matches the ONNX exactly.+`.github/workflows/cargo-deny.yml` runs `cargo deny check advisories bans sources` and+`check licenses` against `deny.toml`, per workspace root in a matrix, on pull request, on push to+`main`, on a Monday cron, and on dispatch. The cron matters: an advisory can land against an+unchanged lockfile, which no `pull_request` run would ever see. -Both are **build-host** dependencies only, pinned by upstream revision *and* file SHA-256 in `scripts/ml/fetch_and_convert.sh`, with provenance in a `README.md` beside each asset and the source ONNX SHA-256 baked into each `.maml` header. If either vanished, shipped builds keep working. The ONNX itself is not vendored: it is twice the size and nothing reads it at run time.+The gap is that this is Rust-only. Nothing scans the JVM dependency surface for advisories โ+Dependabot proposes JVM upgrades but no equivalent of `cargo-deny` reports on what is committed+today. -The trade-off accepted is **GPU-only**: `:library:ml` needs Vulkan 1.1 plus `VK_KHR_shader_float16_int8`, which was promoted to core only in Vulkan 1.2 and so is optional at the 1.1 floor minSdk 31 guarantees. On a device without it, portrait bokeh, auto-select-subject, OCR, speech synthesis, translation and the chess AI turn off rather than falling back to CPU.+Mitigation: add a JVM advisory scan (OWASP dependency-check or equivalent) to CI. -**ncnn is gone from the tree.** `:translate` was its last consumer, and SMaLL-100 now runs on `:library:ml` too, so `libncnn_android.so` is in no APK here and the self-built `com.github.vayun-mathur:ncnn-android` AAR โ a JitPack fork of a third-party runtime, built from a local checkout and resolved through `mavenLocal()` โ has left the supply chain entirely. `mavenLocal()` went with it: it existed only so a freshly built ncnn resolved ahead of a rate-limited JitPack, and a local repository ahead of the remotes means any coordinate in `~/.m2` silently outranks the pinned one. The JitPack declaration stays, scoped to `com.github.*`, for `com.github.luben:zstd-jni`.+### 6.5 Release APK upload uses a shell script with an ambient token โ Low -**Stockfish is gone too, and with it the last personal JitPack fork.** `games/chess` played against `com.github.vayun-mathur:Stockfish-Library` โ a prebuilt AAR from a personal GitHub repo, driven over raw UCI text, with an 86 MB NNUE bundled as an APK asset. It now plays against **Maia3-5M** on `:library:ml`: an encoder-only transformer that predicts *human* moves at a requested rating, one forward pass per move and no search. Upstream is **`UofTCSSLab/Maia3-5M`**, a **build-host** dependency pinned by HF revision and checkpoint SHA-256 in `scripts/ml/fetch_maia.py`.+`release.sh:165-168` uploads every built APK and a generated `index.json` with+`gh release create ... --draft`, using whatever credential the local `gh` CLI holds. This is the+manual counterpart to the `android.yml` release job and runs on a developer machine with a personal+token rather than a scoped `GITHUB_TOKEN`. -Three things improve at once. The remaining JitPack coordinate is a third-party library (`zstd-jni`) rather than a personal fork, so no build here depends on a repo one person can delete. The APK loses **~79 MB**: the 86 MB NNUE is replaced by a 6.8 MiB int8 `.maml`. And the AI plays better chess in the sense that matters for a casual app โ Stockfish at `Skill Level 0` blundered in ways no beginner does, where Maia at 1100 blunders the way an 1100 does.+Mitigation: prefer the workflow path for real releases; keep `release.sh` for dry runs. -The int8 was chosen on measured **move agreement** rather than on the per-tensor cosine gate, because a cosine says nothing about whether a chess model still picks the same move: `scripts/ml/maia_quant_eval.py` puts int8 at 99.0โ99.5% agreement with fp32 across the four difficulties with no disagreement wider than fp16 rounding, and rejects int4 at 87โ91% with 14โ29 genuine changes of mind at any group size.+### 6.6 The PR check does not exercise the release toolchain โ Medium -The port also removed the only two tagged-memory faults this tree has seen, both inside `libncnn_android.so`, and cut the translation model's download from **1.14 GB across seven files to 320 MB across two** โ ncnn could not quantise the 131M-parameter embedding, so the shipped model was fp16 and carried it twice; the `.maml` is int8 per output channel and carries it once, because it is tied. Upstream is **`alirezamsh/small100`** (MIT), a **build-host** dependency pinned by revision and file SHA-256 in `scripts/ml/fetch_small100.py`. Nothing about the model is built locally any more.+`pr-compile-check.yml` is the only workflow that compiles application code on a pull request, and it+diverges from the release job in two ways that matter. -Notably **offline after first launch**: `astronomy`, `calendar`, `clock`, `contacts` (only `libphonenumber` locally), `files`, `notes` (Room + Ink), `things`, `camera` (on-device MediaPipe Selfie Segmentation on `:library:ml`), `pdf` (Rust `libpdf_render.so`), `music` (Media3 ExoPlayer + local scan), `games/*`, `passwords` (biometric + KeePass), `library/*`, `health` (including food search, which ships its database in the APK).+**It runs a different JDK.** `pr-compile-check.yml:20-24` sets up JDK 17; `android.yml:26-30` sets up+JDK 21. For routine code changes the gap is harmless. For a toolchain change โ an AGP major, a+Kotlin realignment โ the JDK is precisely the variable that bites, because toolchain resolution and+Kotlin `jvmTarget` behaviour differ across the two. A green PR check on that class of diff does not+establish that the release job still builds.++**It compiles and nothing else.** The PR check runs `./gradlew :compileDevKotlin` only, and the+release job runs `assembleRelease` with `-x lint -x test`. So neither workflow ever runs `lint` or+the test suite: the repo's own lint rules (including the build-failing ones) and every unit test are+verified only by whoever remembers to run them locally.++This bounds what CI can be relied on to catch, including for the unverified changes listed under+Verification status.++Mitigation: align the PR check's JDK with the release job's, and run `lint` and `test` somewhere in+CI rather than excluding them from the one job that could. --- -## Library / Build Dependencies+## 7. Build-time and script downloads++The hosts these scripts contact are inventoried in ยง12.++### 7.1 `go-pmtiles` โ control in place, with a stated caveat++`scripts/maps/extract_pmtiles.sh` pins `go-pmtiles` to v1.31.2, installs it project-local under the+gitignored `tmp/tools` (no `sudo`, no write to a system path), and verifies a per-platform SHA-256+before extracting.++The script is explicit that the digests are weaker than they look, and that statement should be+preserved rather than rounded up: upstream publishes no `checksums.txt` for v1.31.2, so the four+digests were computed from downloaded artifacts. They establish **immutability** (a later silent+re-upload or a MITM is caught) and not **authenticity** (if an artifact was already bad when+measured, the bad one is now pinned).++Two residual gaps: an OS/arch pair not in the `case` list falls through to an empty+`PMTILES_SHA256` and installs with only a printed warning, and the macOS path extracts with+`unzip -o` without a traversal guard.++Mitigation: fail rather than warn when no digest is available for the host platform, and re-derive+the digests from an upstream-published manifest if protomaps ever ships one.++### 7.2 TLS trust anchors are pin-gated โ control in place, with residual gaps++`scripts/download-ca-bundle.sh` produces the 20 DER trust anchors under+`library/network/src/main/assets/ca/`, which are what the apps pin against at run time (ยง11.4). It+fetches the Mozilla bundle from `curl.se/ca/cacert.pem`, falls back to direct vendor URLs+(`letsencrypt.org`, `pki.goog`, `cacerts.digicert.com`, `www.amazontrust.com`) for roots the bundle+drops, converts everything inside a temporary directory, and moves a `.der` into the asset directory+**only** when its SHA-256 matches a `PINS` entry. An unpinned label is never written. `--clean`+pruning is skipped entirely if the run had any failure or rejection, and the script exits non-zero+if either counter is non-zero โ so a partial run cannot silently ship a short trust set.++Three residual gaps: -### Build Infrastructure+- The pins are digests of the `.der` files **as committed**. They prove the shipped anchor set+ cannot change without a reviewable edit to both the asset and its pin in the same diff; they do+ not independently establish that a given anchor is the authentic upstream root. The+ authenticity question is answered by review of that diff, not by the script.+- `godaddy-root-g2.der` is committed PEM-encoded despite its extension, so a freshly converted DER+ can never match its pin and that anchor will always be rejected until the asset is re-encoded.+- The fallback URLs are fetched over TLS validated by the *host* trust store, which is the ordinary+ bootstrap circularity for this kind of script rather than a defect in it. -- **Maven repositories**: `google()` (filtered), `mavenCentral()`, `gradlePluginPortal()` in `build-logic/settings`, plus **`https://jitpack.io`** in root `settings.gradle.kts`, scoped to `com.github.*`. JitPack now serves **no personal forks at all**, only `com.github.luben:zstd-jni`: `ncnn-android` is gone with ncnn itself (โ above), `Stockfish-Library` is gone with Stockfish (โ above), and `mavenLocal()` โ which existed only to resolve the former โ is gone with it. `nanojson` was vendored to `:third_party:nanojson` (โ mitigation #2). JitPack is still a reproducible-build SPOF, but now only for a third-party library rather than for a repo one person can delete.-- **Launch icon generator**: `build-logic/src/main/kotlin/LauncherIconGen.kt` downloads `https://raw.githubusercontent.com/google/material-design-icons/819d786.../symbols/android/{icon}/...24px.xml` at build time, cached under `~/.gradle/material-symbols-cache`. Build needs GitHub availability on first (uncached) build. โ ๏ธ Not yet mitigated.-- **Alpha toolchain**: `agp = 9.4.0-alpha04`, `composeBom = 2026.06.01` (future-dated), `navigation3 = 1.2.0-alpha05`, `material3 = 1.5.0-alpha23`, `biometric = 1.4.0-alpha07`, `camerax = 1.7.0-alpha02`, `datastore = 1.3.0-alpha09`. โ ๏ธ Stable release branch should pin stable versions (not yet done).-- **Version drift**: `okhttp 4.12.0` (2y old, 5.x exists) โ ๏ธ still pinned. `ktor` fully removed (`:messages` migrated to `:library:network` โ ) and `mediapipe tasks-vision` unified at `0.10.35` (camera inline `0.10.14` removed โ ).-- **Vendored third_party**: `third_party/nanojson/` (vendored `TeamNewPipe/nanojson`, was JitPack โ โ mitigation #2), `third_party/om-file-format-sys/` (C + Rust bindings for `open-meteo/om-file-format` GPL-2.0-only) patched for reproducible `readdir` sort, `maps/src/main/cpp/sqlite3.c` amalgamation (SQLite NDK workaround), `youpipe/extractor/` full NewPipe Extractor GPLv3. The two unattributable `RapidAI/RapidOCR` ncnn conversions that were in `library/ocr/src/main/assets/` are **gone**: PP-OCRv5 detection and recognition are now `.maml`, converted from PaddlePaddle's own Apache-2.0 ONNX exports and each SHA-256-pinned in `scripts/ml/fetch_and_convert.sh`.+Mitigation: re-encode `godaddy-root-g2.der`. Continue reviewing any change to a `.der` or its pin as+a security-relevant diff. -All versions in `gradle/libs.versions.toml`. Rust versions unified in root `/Cargo.toml` (workspace resolver 2, mirrors Gradle catalog) โ see `/scripts/rust-deps-count.sh`.+### 7.3 Four build-time executables resolved from Maven and run unverified โ High -## Rust Dependencies โ Post-Slimming Audit (armv8-only)+The build downloads four executable artifacts from Maven and runs them during compilation: -Counting model matters: `Cargo.lock` includes cfg(windows)/cfg(wasm)/cfg(wasi) crates even if they never compile for `aarch64-linux-android`. Use `cargo tree --target aarch64-linux-android --edges normal` to measure what actually goes into the shipped `.so`.+| Artifact | Version | Resolved by |+|---|---|---|+| `com.google.protobuf:protoc` (OS-classified `@exe`) | 4.35.0 | `:communicate`, via a custom `protocBinary` configuration |+| `com.google.protobuf:protoc` | 4.35.0 | `:appstore`, `:youpipe:extractor` |+| `io.grpc:protoc-gen-grpc-java` | 1.69.0 | `:appstore` |+| `io.grpc:protoc-gen-grpc-kotlin` (`:jdk8@jar`) | 1.4.1 | `:appstore` | -**Workspace lock**: 318 โ **239 total, unique 217** packages (down 79 total).-**Filtered compile graph**: `cargo tree --workspace --target aarch64-linux-android --edges normal` = **429 lines, unique 188** crates.-Per-crate normal filtered lines:-- `astronomy_engine` 38, `photos_fx` 38, `office_engine` 45, `weather_om` 79, `camera_stitch` 75, `passwords_kdbx` 141, `e2ee_pqc` 71, `pdf_render` 242-Summed old per-crate locks (before workspace) = 712 total (641 excluding voxels) โ 239 root now (single source).+The `:communicate` case additionally marks the download executable with `setExecutable(true)` before+invoking it. All four resolve from Maven Central, all are exactly pinned, and โ because there is no+verification metadata and no lockfile (ยง1.1) โ nothing checks their bytes before they execute. -**Banned crates check (normal armv8 edges)**: `windows-sys`, `walkdir`, `same-file`, `winapi-util`, `bindgen`, `clang-sys`, `prettyplease`, `regex` = **0 in normal graph** (verified by `scripts/rust-deps-count.sh`). Remaining 6 `windows-*` in unfiltered lock (`windows-core/link/result/strings/implement/interface`) are only cfg(windows) feature flags via `jana-time-zone-haiku`/`chrono` `windows-link` feature โ not compiled code, but Cargo.lock still lists them because `Cargo.lock` includes all cfg. `cargo tree --edges normal --target` shows 0.+This is rated above the other consequences of ยง1.1 because a substituted library must still be+called by application code to matter, whereas a substituted compiler plugin runs on the build+machine by construction, with that machine's credentials. -**Cuts implemented (no feature loss, no cross-app merging, stdlib preferred per user request):**-- `third_party/om-file-format-sys`: Removed build-dep `bindgen 0.72` (was pulling clang-sys, cexpr, libloading, aho-corasick, regex, prettyplease, bitflags, itertools, cfg-if, etc ~20 crates). Pre-generated bindings to `src/bindings_android.rs` (NDK 29 aarch64-linux-android) + `src/bindings_host.rs` (aarch64-apple-darwin host for `cargo test`), selected via `#[cfg(target_os=\"android\")]`. `build.rs` only uses `cc` now.-- `jni`: **was** a local fork at `third_party/jni-android` (0.21.1 with `combine`, `walkdir` and `windows-sys` stripped). Removed in favour of upstream `jni 0.21.1` from crates.io โ the fork was ~20 hand-maintained files pinned three years behind upstream with no route to security fixes, which is the larger liability. Cost of un-forking: 16 lock entries, 10 of them `windows-*` crates behind `cfg(windows)` that never compile for Android. Upstream 0.22 would drop those again (it uses `windows-link`) but is a breaking API change across all 31 native entry points; see the note in the root `Cargo.toml`.-- `pdf/rust-toolchain.toml`: Dropped `x86_64-linux-android` target โ now armv8-only `aarch64-linux-android` (matches RustNative.kt `rustAbis = listOf(\"arm64-v8a\" -> \"aarch64-linux-android\")` already was armv8-only).-- `weather`: Dropped `ureq 2.12` โ it pulled `base64`, `flate2`, `log`, `once_cell`, `rustls 0.23.42 -> ring 0.17.14 -> untrusted 0.9 + windows-sys 0.52, rustls-pki-types/zeroize, rustls-webpki 0.103 -> webpki-roots 0.26->1.0, url 2.5 -> form_urlencoded, idna 1.1 -> idna_adapter, icu_* collections/locale/normalizer/properties/provider, litemap, smallvec, utf8_iter, etc = ~90 crates). Rewrote `weather/src/main/rust/src/lib.rs` from `HttpRangeBackend` doing `ureq` Range GET + OnceLock Agent LRU 12 to `SliceBackend(&[u8])` reading from passed slice (via `omfiles` `InMemoryBackend` trait `count/get_bytes/prefetch_data`). Added `OmTilesNative.decodeRegionBytes(ByteArray, ...)` in `/weather/src/main/java/com/vayunmathur/weather/map/OmTilesNative.kt` and refactored `WeatherMapPage.kt` to fetch `.om` via `NetworkClient.performRequestBytes` (HttpURLConnection stdlib, armv8-only) with 64KB block caching now in Kotlin OkHttp layer.-- `camera`: Dropped `image 0.25 jpeg` โ it pulled `bytemuck 1.25, byteorder-lite 0.2, bitflags 2.x, zune-core 0.5 + zune-jpeg 0.5 (plus moxcms 0.7 + pxfm 0.1 behind default features vs jpeg only it still pulled zune deps). Single usage was `Rgba::from_jpeg` via `image::load_from_memory.to_rgba8()`. Now uses `jpeg-decoder 0.3.2` (already in pdf, minimal pure Rust) directly in `imgbuf.rs::from_jpeg`, with L8/RGB24/CMYK32 handling matching pdf's `decode_jpeg_rgba`. Encode uses `jpeg-encoder 0.6.1` (no transitive) via `Camera::encode_jpeg` using `jpeg_encoder::Encoder` with quality param.-- `photos_fx`: Dropped `rayon 1.12` โ was pulling `rayon-core 1.13 + crossbeam-deque 0.8 + crossbeam-epoch 0.9 + crossbeam-utils 0.8 + either 1.13` (6 crates) just for `par_chunks_mut(w)` in `blur.rs` gaussian 2-pass, motion, radial, mask. Rewrote with plain loops + stdlib (prefer standard library). Parallelism preserved via naive std `thread::scope` split if wanted, but now sequential exact (keeps feature), could add `std::thread::scope` later if Perf needed without extra crates.-- `camera` still uses `rayon` for stitch feature pyramid? Candidate for `std::thread::scope` rewrite if requested โ keeping for now because bundle adjustment uses DMatrix math and perf matters, but not feature-reducing.-- `passwords_kdbx`: uses `serde_json` for `Vec<BTreeMap<String,String>>` โ candidate for manual JSON encoder std-only (single function). Preserved for now because `serde` is also used elsewhere heavily (CRDT signed exact JSON field order `id,parent,left,kind,payload,deleted,lamport,dev,name,attrLamport,attrDev` with skip_serializing_if exact match to Kotlin kotlinx `encodeDefaults false`). Passwords JSON leniency allows std rewrite without risk; could be done as manual encoder to drop zmij, serde_json, serde_derive chain. Kept for now to avoid risk but counted as candidate.-- `games/voxels`: has its own workspace lock (outside the root workspace); it takes `jni` from crates.io like everything else.+Mitigation: prioritise these four coordinates when adding verification metadata under ยง1.1. -**Remaining heavy justified libraries (per no-feature-loss):**-- `nalgebra 0.33.3` โ DMatrix zeros 2nร9, Matrix3::new, Vector3, SVD try_inverse lu solve, rodrigues_to_mat for panorama bundle adjustment โ cannot be replaced with glam.-- `openjp2 0.6.1` โ JPEG2000 decoding in PDF (complex C-ffi + ops).-- `lopdf 0.36` โ safe PDF parsing, no feature removal.-- `fips203 0.4.3, fips204 0.4.6` โ ML-KEM-768/ML-DSA-65 PQC (FIPS 203/204).-- `keepass 0.13` โ KDBX4 save, well-audited.+### 7.4 Remote source compiled from commit-pinned revisions โ control in place -**Remaining duplicate versions (attack surface but unavoidable unless upstream updates):**-- `getrandom` 0.2.17 vs 0.3.4 vs 0.4.3 โ due to `keepass 0.13 -> uuid 1.24 -> getrandom 0.4.3 (js/wasm backend with cfg(wasm32-unknown-unknown) js-sys/wasm-bindgen/wit-bindgen/r-efi/wasip2 correctly excluded from normal android graph but present in lock)`, `rand_core 0.6 -> getrandom 0.2 + 0.3`, `paste 0.1`, `unicode-properties -> getrandom 0.4.3`. Normal android graph only `getrandom` compiles the `android` backend, but lock still lists wasm/js deps. We unified to `getrandom 0.2.15` single version in workspace dependencies attempt, but transitive keeps 0.3/0.4 via direct deps โ could be unified via `[patch.crates-io]` `getrandom = "0.2.15"` but would break keepass which needs 0.4 API? Kept as-is with note, normal graph excludes js.-- `syn` 2.0.119 vs 3.0.3 โ from main Rust crates vs transitive (serde_derive 2.x vs jiff serde proc macro maybe).-- `thiserror` 1.0.69 vs 2.0.19 โ jni fork uses 1.0.69 (upstream not yet bumped), keepass uses 2.0.19. Unified attempt but keepass must stay 2.x. Could patch jni to 2.0.19 but it still uses 1.x API.+`scripts/geocoder_gen.sh` compiles simdjson and zstd from single-header sources fetched from+`raw.githubusercontent.com`, pinned to commit SHAs (`SIMDJSON_REV` b4242d3b / v3.11.0, `ZSTD_REV`+63779c79 / v1.5.5). The header records how to bump them, including that `git ls-remote ... '^{}'` is+required to peel zstd's annotated tags to a commit โ a bare tag ref returns the tag object, which is+not a content ref. -**Audit scripts:**-- `scripts/rust-deps-count.sh` โ groups counts: root total vs unique, filtered normal graph vs all, per-crate normal, banned platform check, heavy justification.+A `raw.githubusercontent.com` URL carrying a commit SHA is content-addressed, so no separate digest+is needed. The residual trust is in GitHub serving the correct object for that SHA, plus TLS. -### High-Risk External Libraries (single maintainer, abandoned, or proprietary CDN)+### 7.5 Launcher icon fetch โ Low integrity risk, Medium availability risk -| Library | Version | Used By | Why High Risk | File |-|---|---|---|---|---|-| `com.github.luben:zstd-jni` via JitPack | โ | see `libs.versions.toml` | The only remaining JitPack coordinate. Third-party rather than a personal fork, so lower risk than `Stockfish-Library` was | `settings.gradle.kts` |-| `jitpack.io` itself | โ | above | Supply chain SPOF | `settings.gradle.kts` |-| `io.github.dokar3:quickjs-kt` | `1.0.5` | `youpipe` | Single maintainer (dokar3), JS eval for YouTube signature decipher โ critical path | `youpipe/build.gradle.kts`, `libs.versions.toml:8` |-| `org.linguafranca.pwdb:KeePassJava2-dom` | `2.2.4` | `passwords` | Single maintainer, last release 2021, security-sensitive KDBX parsing | `passwords/build.gradle.kts`, `libs.versions.toml:82` |-| `org.wololo:flatgeobuf` | `3.29.0` | `maps` | Niche geo format, single maintainer | `maps/build.gradle.kts`, `libs.versions.toml:13` |-| `com.google.code.findbugs:jsr305` + `javax.annotation-api:1.3.2` | `3.0.2` / `1.3.2` | `extractor` | Deprecated 7+ years, replaced by JetBrains annotations | `libs.versions.toml:5,114` |-| `org.mozilla:rhino` + `rhino-engine` | `1.8.1` pinned | `extractor` | Pinned old because `1.9.0` requires minSdk 26 comment in `libs.versions.toml:2`; Mozilla but old | `libs.versions.toml:3,107` |+`LauncherIconGen.kt` fetches Material Symbols sources from `raw.githubusercontent.com`, pinned to+the full commit SHA `819d78680a849ceef4c78f863d8753e3160b7c89`, which is also the SHA used by the+second, separate fetch of the same upstream in `android.yml:174` for Play/F-Droid listing icons.+Results are cached under `$GRADLE_USER_HOME/material-symbols-cache/<ref>/`, and a cache hit skips+the download. -### Medium-Risk (small org / community, but active)+On integrity the pin is doing real work: a full commit SHA makes the request content-addressed, so+the risk is low. The response carries no digest of its own, leaving trust resting on the commit SHA+plus TLS. -| Library | Version | Used By | Notes | File |-|---|---|---|---|---|-| `org.brotli:dec` | `0.1.2` | `extractor` | Google JVM port, low activity | `libs.versions.toml:9` |-| `org.maplibre.compose:maplibre-compose` | `0.13.0` โ `libmaplibre.so` native | `maps`, `weather`, `findfamily`, `photos` | Community-maintained FOSS renderer, better than Mapbox but smaller than Google Maps | `libs.versions.toml:78` |-| `com.google.mediapipe:tasks-vision` | `0.10.35` (unified) | `camera` (face), vision segmentation | Native lib size; inline `0.10.14` drift resolved | `camera/build.gradle.kts:124`, `libs.versions.toml` |-| `net.zetetic:sqlcipher-android` | `4.18.0` | `library:room` โ `passwords`, `notes` | Small company, adds ~2MB `.so`, encrypted DB. `4.18.0` is the first release with `SQLCipherDriver` (an `androidx.sqlite.SQLiteDriver`), which is what lets encrypted databases work on Room 3 at all: Room 3 removed `openHelperFactory(...)` | `library/room/build.gradle.kts`, `libs.versions.toml:117` |-| `io.coil-kt:coil-compose` + `coil-svg` + `coil-video` | `2.7.0` | `photos`, `maps`, `email`, `travel`, `education`, `pdf` | <3 maintainers, but widely adopted image loader | `libs.versions.toml:50` |-| `com.google.zxing:core` | `3.5.4` | `messages` (QR), `library:ocr`, `pdf` | Old, community fork `zxing-cpp` preferred | `libs.versions.toml:83` |-| `com.google.ai.edge.litertlm:litertlm-android` | `0.14.0` experimental | `openassistant` | Google AI Edge experimental, GPU backend `libLiteRtTopKOpenClSampler.so`, requires `kotlinx-coroutines 1.11.0` conflict win | `openassistant/build.gradle.kts`, `libs.versions.toml:30` |+Availability is the sharper edge. The fetch is reached from 72 `launcherIcon` blocks across the app+modules, and a failure throws `GradleException` โ so on a cold cache without GitHub reachability the+build fails outright rather than degrading. The `android.yml` copy is softer: it warns and continues+without an icon. -### Vendored Assets (compiled in, no runtime fetch)+Mitigation: vendor the icon sources to remove the build-time network dependency entirely, or record+a digest per fetched file and pre-seed the cache in CI. -| Asset | Source | Licence | Notes | File |-|---|---|---|---|---|-| POI sprite sheet, entries 1-53 | `protomaps/basemaps-assets` `sprites/v4/light@2x` | BSD-3-Clause | Vendored unchanged from upstream; also mirrored at `data.vayunmathur.com/basemaps-assets/`. Compiled into `libmap_renderer.so`, never fetched at runtime | `library/map/src/main/rust/assets/sprites/sprites@2x.{png,json}` |-| POI sprite sheet, entries 54-57 (`fuel`, `hotel`, `bank`, `atm`) | `mapbox/maki` glyphs on a badge lifted from the Protomaps sheet | **CC0 1.0** (public domain, no attribution required) | Protomaps' style draws none of these four kinds, so no upstream sheet has ever carried an icon for them โ but the `maps` app has offered Gas, Hotels and ATM chips all along. Regenerate with `analysis/spritepack/pack.py` | same as above |+---++## 8. Model weights++Eleven model weights are fetched by the scripts under `scripts/ml/`, and **all eleven pin an+upstream revision and verify a SHA-256**. This is the strongest provenance control in the+repository.++Six are fetched directly by `fetch_and_convert.sh`, each from a `huggingface.co/.../resolve/<commit>/`+URL with a pinned file digest, then converted to `.maml`:++| Asset | Model |+|---|---|+| `camera/src/main/assets/selfie_segmentation.maml` | MediaPipe Selfie Segmentation |+| `photos/src/main/assets/u2netp.maml` | Uยฒ-Net portable (saliency) |+| `photos/src/main/assets/scrfd_500m.maml` | SCRFD 500M (face detection) |+| `photos/src/main/assets/w600k_mbf.maml` | MobileFaceNet (face embedding) |+| `library/ocr/src/main/assets/ppocr_det.maml` | PP-OCRv5 mobile (text detection) |+| `library/ocr/src/main/assets/ppocr_rec.maml` | PP-OCRv5 mobile latin (text recognition) |++Five more come through `huggingface_hub.snapshot_download`, each with an explicit `revision=` and a+per-file digest table: `fetch_maia.py` (`:games:chess`), `fetch_nllb600.py` (`:translate`),+`fetch_supertonic.py` and `fetch_whisper.py` (`:speech`), and `fetch_tinyclip.py` (`:photos`).++`fetch_and_convert.sh` downloads into a `mktemp -d` scratch directory that is removed on exit, and+on a digest mismatch it reports and skips the model without invoking the converter โ so a failed+verification cannot overwrite a committed asset. -### Low Risk / Platform (Google/JetBrains) โ Not Critical+Beyond the digests, `maml_convert.py` pins a digest over the whole ordered layer table, so an+upstream re-export that reorders or re-pads a layer fails at conversion rather than shipping a net+that infers nonsense. That digest covers *structure*, not weight values; `scripts/ml/onnx_parity.py`+is the numeric check. -Well-maintained: `androidx.*` (`core-ktx 1.19.0`, `lifecycle 2.11.0`, `room3 3.0.2`, `sqlite 2.7.0`, `work 2.11.2`, `datastore`, `camera`, `webkit`, `browser 1.9.0`, `biometric`, `glance`, `exifinterface`, `credentials`, `autofill`), `composeBom 2026.06.01`, `material3 1.5.0-alpha23`, `material 1.14.0`, `foundation 1.12.0-beta02`, `ink 1.1.0-alpha04`, `navigation3`, `media3-exoplayer 1.11.0-beta01`, `okhttp 4.12.0` + `okio 3.17.0`, `kotlin 2.4.0` + `coroutines 1.11.0` + `serialization-json 1.11.0` + `datetime 0.8.0`, `ksp 2.3.10`, `protobuf 4.36.0-RC1` / `protobuf-javalite 4.35.0`, `libphonenumber 9.0.34`, `fhir-model 1.0.0-beta02`, `health/connect-client 1.2.0-alpha04`, etc.+### 8.1 Two model provenance gaps โ Medium++- The SMaLL-100 provenance scripts are deleted but still referenced.+- `music_detector.sound_model` has its provenance recorded nowhere โ no fetch script, no upstream+ revision, no digest.++Mitigation: record provenance for `music_detector.sound_model` in the form the other eleven use, and+either restore or remove the SMaLL-100 references.++### 8.2 `HF_TOKEN` is sent implicitly โ Low++`huggingface_hub` attaches `HF_TOKEN` from the environment when it is set, so the five+`snapshot_download` scripts authenticate to `huggingface.co` whenever a developer happens to have a+token exported, whether or not the repository requires one.++Mitigation: pass `token=False` where anonymous access suffices. --- -## Transitive Dependencies Behind Self-Hosted Proxy (for awareness)+## 9. Vendored third-party source++| Vendored source | Upstream revision recorded |+|---|---|+| `third_party/betocore` | Yes โ upstream commit recorded |+| `youpipe/extractor` (NewPipe Extractor) | No |+| `third_party/om-file-format-sys` | No | -Even assuming `api.vayunmathur.com` stays up, its upstreams are third-party:+### 9.1 Two vendored trees have no recorded upstream revision โ Medium -- **Duffel API** (flights + stays) โ proxied token held server-side, no secret in APK. See `travel/network/TravelApi.kt`, `StaysApi.kt`.-- **Google Maps Platform** (Place Details/Ratings only) โ proxied via `place_match`, `place_rating`. See `Reviews.kt`. Live traffic tiles come via `api.vayunmathur.com/maps/traffic` (`OfflineRouter.kt`). **Routing is no longer proxied** โ it runs entirely on-device via `offlinerouter.so` (`OfflineRouter.findRouteNative`), so there is no Google Routes dependency.+Without a recorded upstream commit there is no way to diff the vendored copy against upstream, apply+an upstream security fix with confidence, or establish what local modifications exist. This matters+most for `youpipe/extractor`, which parses untrusted remote input from YouTube (ยง11.1) and is also+what forces `jsr305` to stay in the catalog (ยง3.2). -If those upstreams shut, our proxy returns errors โ same UX as purpose-aligned but fixable by swapping provider behind same proxy endpoint.+Mitigation: record the upstream commit for both, in the form `third_party/betocore` already uses. --- -## Offline-First Guarantee+## 10. Release signing key++### 10.1 `release_keystore.jks` is committed to the repository โ High, pending confirmation++A 2500-byte `release_keystore.jks` is tracked in git at the repository root, under the exact+filename the release workflow signs with. It is the only keystore in the tree.++CI overwrites this file from a secret before signing, which strongly suggests the committed file is+a development key rather than the production one. That has not been confirmed, and the distinction+is the entire risk: if the committed key is the production signing key, it is disclosed to everyone+with repository access and every APK signed with it is compromised.++Mitigation: confirm what the committed keystore actually is. If it is not a throwaway development+key, treat it as disclosed โ rotate it and follow key-compromise procedure. Either way, remove it+from version control and have CI supply the keystore entirely from secrets, so no file at that path+is ever tracked.++---++## 11. Runtime servers the apps depend on++Hosts contacted from a user's device. Build-time hosts are in ยง12; several organisations appear in+both, and the two roles are not interchangeable.++First-party infrastructure (`vayunmathur.com`, `findfamily.cc`) is out of scope for this inventory+and is omitted throughout.++`UNCERTAIN` markings below are load-bearing. They mean the host was inferred from a string, a+comment, or a single capture rather than confirmed from a request site, and they should not be+promoted to fact without re-checking.++### 11.1 Hosts by app++**`:appstore`**++| Host | Purpose | Notes |+|---|---|---|+| `f-droid.org/repo` | Signed index, APKs, icons | HTTPS; fails closed on signature failure; cache survives; toggleable; cert pinned |+| `verification.f-droid.org/verified.json` | Reproducible-build badge | Best-effort, cosmetic |+| `apps.grapheneos.org` | Sandboxed Play index + APKs | signify ed25519 pin. **No mirror, not toggleable** |+| `repo.accrescent.app` | Signed allowlist / trust anchor | Pinned key. **No fallback, fails closed** |+| `appstore-api.accrescent.app:443` (gRPC) | Listings, download URLs | TLS **deliberately unpinned**; browse soft-fails; sends device attributes |+| Accrescent split CDN | APK bytes | Host supplied by the server โ **not statically known** |+| `auroraoss.com/api/auth` | Anonymous Play accounts | **Sends a full device fingerprint and receives a Google authToken**; spoofs the Aurora UA to evade Cloudflare. `FALLBACK_DISPENSERS` has exactly one entry โ the same URL โ so it is a **SPOF** |+| Play API hosts (`android.clients.google.com` and siblings) | Play protocol via the `gplayapi` AAR | authToken + `X-DFE-*`. **UNCERTAIN** โ read from strings inside the AAR |+| Play APK CDN | APK bytes | **Does not use the pinned SSL factory** that its sibling downloaders use. Range-resume |+| `play-lh.googleusercontent.com` | Listing imagery | **UNCERTAIN / dynamic** |++`play.google.com` and `f-droid.org` also appear as inbound deep links in the manifest, and+`github.com/vayun-mathur/Modern-Apps` as a dead cache key and displayed link. Neither is a+dependency.++**`:maps`**++| Host | Purpose | Notes |+|---|---|---|+| `api.transitous.org/api/v1/stoptimes` | Transit departures | **Volunteer-run.** Good fallback behaviour, but the UA `Modern-Apps-Maps/1.0` is not contactable, and `OfflineRouter.kt:562-569` fires one call per journey stop, concurrently |+| `www.google.com/search?tbm=map` | POI discovery and search | Keyless, ToS-hostile scrape. A spoofed Chrome UA, Referer and warmed cookies **are** the credential. 15 category terms per viewport; search is online-only |+| `www.google.com/maps/vt/pb=` | Traffic tiles | **UNCERTAIN** โ the file states it is a no-op on phone |+| `maps.googleapis.com/.../SingleImageSearch` | Street View lookup | Fired on **every** place selection |+| `www.google.com/maps/photometa/v1`, `streetviewpixels-pa.googleapis.com/v1/tile` | Street View metadata and tiles | Full tile grid fetched concurrently |+| `www.google.com/maps?cid=` | Reviews | Hidden WebView DOM scrape, 10โ45 s per place |+| `*.googleusercontent.com` | Photos and avatars | |+| `http://localhost:<ephemeral>/traffic/{z}/{x}/{y}` | Local traffic tile server | **PLAINTEXT**, unauthenticated, `Access-Control-Allow-Origin: *`. Loopback-bound, which is itself a deliberate narrowing of an earlier bind |++`openstreetmap.org` and `github.com/protomaps/basemaps` are attribution only. `maps.app.goo.gl` /+`goo.gl` are deep links, and are a real dependency only if the app resolves shorteners itself โ+**UNCERTAIN**. The manifest accepts `scheme="http"`.++**`:musicbrainz`**++| Host | Purpose | Notes |+|---|---|---|+| `musicbrainz.org/ws/2` | Metadata | Non-profit. Correctly rate-gated at 1100 ms with an identifying UA. Hard-fails the screen |+| `coverartarchive.org` | Cover art | Non-profit. **Not rate-gated and no identifying UA** |+| `archive.org`, `ia*.us.archive.org` | Cover art redirect targets | |+| `api.tidal.com/v1` | Catalogue and playback | Bearer OAuth |+| `auth.tidal.com/v1/oauth2` | Tidal auth | **Hardcoded shared `client_id;client_secret`**, base64-encoded at `TidalAuth.kt:67-68` |+| `sp-*-{cf,fa}.audio.tidal.com` | Audio CDN | The reason `TrustBundle.MUSICBRAINZ` exists |+| `lrclib.net` | Lyrics | **Volunteer-run**, ungated, two calls per track |++**`:youpipe`**++| Host | Purpose | Notes |+|---|---|---|+| `www.youtube.com/youtubei/v1/*` | InnerTube API | No fallback host |+| `www.youtube.com/sw.js`, `/results` | Client version discovery | Real three-tier fallback |+| `youtubei.googleapis.com` | InnerTube alternate | **UNCERTAIN** |+| `music.youtube.com` | Music surface | |+| `suggestqueries.google.com` | Search suggestions | **Partial query sent to Google per keystroke** |+| `api.pipepipe.dev/decoder/*` | Stream-URL deobfuscation | **Third-party community service that sees every stream URL the user plays**, and so learns what each user watches. The local fallback is null by default. The highest-risk runtime third party in the tree |+| `jnn-pa.googleapis.com` | BotGuard / PoToken | **Hardcoded api-key and request-key** at `LocalDomPoTokenGenerator.kt:287-288` |+| BotGuard interpreter URL | Attestation | **Host chosen by YouTube**, and the JS is eval'd in a WebView |+| `*.googlevideo.com` | Media | Dynamic |+| `/feeds/videos.xml` | Channel feeds | **UNCERTAIN** |++The 30-host Invidious/Piped list is string-only recognition and is never contacted.+`dearrow-thumb.ajay.app` appears in a comment only.++**`:communicate`** โ the largest runtime surface.++*Signal.* `wss://chat.signal.org:443/v1/websocket/` (two sockets) is a **SPOF**. `/v2/directory/auth`+resolves to `cdsi.signal.org`, whose host lives inside libsignal (**UNCERTAIN**).+`/v4/attachments/form/upload` returns a **server-supplied CDN3 URL that is used without scheme or+host validation** (`SignalAttachmentUpload.kt:104`). `/v2/calling/relays` returns+**server-supplied `turn:`/`stun:` hosts, including bare IPs**. The bundled Signal roots are a+**union with the system CAs โ additive, not pinning**.++*WhatsApp.* `g.whatsapp.net:443` over a raw socket with no TLS โ see Highest-severity findings; sole+transport and a **SPOF**. `v.whatsapp.net/v2/*` carries the OTP, 2FA PIN, key bundle and device+fingerprint, impersonates the official client, and uses a **hardcoded salt and public key**+(`WhatsAppRegistrationConstants.kt:26-27,54-55`). `graph.whatsapp.com/graphql` uses a **hardcoded+`CLIENT_TOKEN`**. The media host is **server-supplied** via `media_conn`, and its **scheme is+unverified** (ยง11.5).++*Google Voice.* `clients6.google.com/voice/v1/voiceclient/` uses **no OAuth โ it replays the browser+cookie jar plus a SAPISIDHASH**, is a **SPOF**, and **logs every response body, including the SIP+password**. `voice.google.com` is loaded in a WebView that monkey-patches `fetch`/`XHR`, uses+`addJavascriptInterface`, and has an unscoped fallback injection.+`wss://web.voice.telephony.goog/websocket` uses RFC 2069 MD5 digest auth and logs frames.+`web.c.pbx.voice.sip.google.com` is derived from a **single HAR capture**.+`stun:stun.l.google.com:19302` is **plaintext UDP and the only ICE server โ no TURN**.++*MMS.* The download URL is taken **unvalidated from an inbound WAP-push PDU**+(`MmsDeliverReceiver.kt:63`), and real MMSCs are usually `http://`.++Verified absent from `:communicate`: RCS, all push (60 s Google Voice polling instead), any bridge,+any community endpoint.++**`:email`**++Six provider preset pairs, two of which start plaintext (`smtp-mail.outlook.com:587`,+`smtp.mail.me.com:587`). `login.microsoftonline.com/.../{authorize,token}` uses a hardcoded PKCE+`client_id`, **hard-fails โ a SPOF for every Outlook account** โ and **logs access and refresh+tokens**. The arbitrary user-supplied IMAP/SMTP host is reached through the empty+`checkServerTrusted` described in Highest-severity findings. There is **no autoconfig or ISPDB+lookup at all**; the in-app help links are display-only.++**`:everysync`**++`accounts.google.com/o/oauth2/v2/auth` (hardcoded `client_id`), `oauth2.googleapis.com/token`+(**SPOF**), `www.googleapis.com/oauth2/v3/userinfo`, Google CardDAV/CalDAV+(`apidata.googleusercontent.com/caldav/v2/...`), `health.googleapis.com/v4/...`, and+`caldav.icloud.com` + `contacts.icloud.com` over Basic auth, plus `.well-known/{caldav,carddav}`+discovery. `DavLoginScreen.kt:61-66` performs **no scheme validation**, so an `http://` server URL+sends the password in the clear. A stale comment references a Withings/Samsung proxy that does not+exist.++**`:euicc`**++A user-supplied SM-DP+ host and `/gsma/rsp2/es9plus/*`. `es9p.rs:154` **accepts `http://` verbatim+from a scanned QR code or a typed activation code**. There is **no SM-DS discovery**.+`rsp.truphone.com` is a test fixture, not a dependency.++**`:weather`**++`api.open-meteo.com/v1/forecast`, `geocoding-api.open-meteo.com/v1/search`,+`air-quality-api.open-meteo.com/v1/air-quality`, and `map-tiles.open-meteo.com` (both `latest.json`+and 64 KB HTTP Range reads of `*.om` from Rust). All keyless HTTPS. **Open-Meteo is free and+donation-funded, and is a single organisational SPOF for the entire app.** `api.weather.gov` is+verified absent.++**`:networklocation`**++**No third-party positioning host.** Beacon resolution is fully on-device: the `BeaconCache`+(in-memory + Room) first, then the offline WPSDB stores, and nothing beyond that. Beacons+absent from both are dropped from the solve. MLS, beacondb, OpenCelliD, WiGLE, Apple `gs-loc`+and Google geolocation are all absent from the tree.++The app still holds `INTERNET`, used solely by `:library:downloadservice` to fetch the offline+databases. `wifi.wpsdb`, `cells.wpsdb` and `geocoder.geodb` are **downloaded on demand, not+bundled** (they are far too large to ship in the APK). Until they arrive every lookup misses,+and with no online fallback the provider now reports **no position at all** rather than+degrading to a remote service โ a deliberate trade of availability for not talking to anyone.+The stores are built by an out-of-repo `wtfps-experiment/store.py`, so their **provenance is+unresolved โ UNCERTAIN**, and that is now the app's only meaningful supply-chain exposure.++**`:passwords`**++`wss://cable.ua5v.com/...` is the **Google-operated** FIDO caBLE tunnel. It sees ciphertext only,+which is the point of the design, but `DEFAULT_ID = 0` is hardcoded, making it a **hard-fail SPOF+for cross-device passkeys** with Apple's `cable.auth.com` sitting unused one array index away. The+`cable.<base32>.*` entries are self-declared **UNVERIFIED** and dormant. Disproven: no HIBP, no+favicon fetch, no remote KDBX sync (the vault is a local SAF URI).++**`:taxi`**++`api.lyft.com` with **`BOOKING_LIVE = true`, so real charges are possible**, a **hardcoded OAuth+client id and secret**, a pinned app-version string that is a time bomb, and **SPOF** status.+`api.stripe.com` needs an explicit system-CA factory. `payments.braintree-api.com/graphql` is+reached at a **URL read out of the Lyft-supplied client token**. `cn-geo1.uber.com` is+non-functional by the authors' own admission. `m.uber.com` runs through a JS bridge and **logs+GraphQL variables and 4000 characters of each response to logcat**; Uber quotes are unimplemented+and the store listing overstates what works.++**`:fooddelivery`**++`api.deliverycollective.com` (~50 endpoints) is a real third-party aggregator and a **SPOF for the+whole app**. `api.stripe.com` is reached with the **hardcoded `pk_live_` key** described in+Highest-severity findings.++**`:education`**++`www.youtube.com/watch?v=` via the vendored NewPipe extractor, plus `*.googlevideo.com`. A+chronic-breakage SPOF with graceful fallback. **ExoPlayer fetches media outside `NetworkClient`, so+it bypasses the pinned trust bundle.** The curriculum is bundled JSON; there is no content API.++**`:backup`**++An **unvalidated `http://` WebDAV URL** (`BackendFactory.kt:16-20`) sends **HTTP Basic credentials+in the clear**, and the password is also **stored unencrypted** (`BackupConfig.kt:66`). A local SAF+folder is an equally supported alternative.++**`:web`**++Seven user-selectable search engines (DuckDuckGo default), Safe Browsing opted in (host+**UNCERTAIN**), `<origin>/favicon.ico` as a PWA fallback, and `market://`. Global+`cleartextTrafficPermitted="true"` plus user CAs is defensible for a browser and is **well mitigated+in-app**: `ShieldsRequestFilter.kt:54-62` and `LanPolicy.kt:48-63` fail **closed** on DNS failure and+require *all* resolved addresses to be private (a DNS-rebinding defence), and HTTPS upgrade is+applied. Verified absent: DoH, a suggestions endpoint, a runtime filter updater, any third-party+favicon service, and hardcoded DNS IPs.++**`:vpn`**++**Zero hardcoded hosts, zero DNS IPs, zero default endpoints.** Everything comes from a+user-imported `.conf`. Network security config cleartext is false. The only literals are RFC1918+fallbacks, MTU 1280, and port 51820.++### 11.2 Apps with no third-party runtime host++- `:updater` โ HTTPS *enforced* by a hard `HttpsURLConnection` cast and no redirects.+- `:translate` โ first-run 617 MB NLLB download, SHA-256 pinned, no Hugging Face fallback.+- `:openassistant` โ on-device, 24 local IPC tools.+- `:calculator` โ a currency tab is the sole reason it holds `INTERNET`.+- `:travel` โ one proxy fronting Duffel; every call currently throws, which makes it a **SPOF for a+ money-handling app**.+- `:office`, `:games:voxels` โ one E2EE relay each, no STUN/TURN.+- `:cast` / `:cast:tv` โ LAN only, ephemeral TLS pinned by fingerprint, no STUN/TURN. The "100%+ offline" claim is accurate.+- `:share` โ LAN TCP plus mDNS/BLE.+- `:photos` โ holds `INTERNET` but has no host of its own; models ship in the APK.+- `:music` โ **no `INTERNET` permission**; no radio, lyrics or artwork APIs.+- `:nowplaying` โ `SongMatcher` is a stub; no AcoustID, no Shazam.+- `:speech` โ models bundled.+- Fully offline: astronomy, clock, code, contacts, calendar, health, keyboard, launcher, logviewer,+ measure, things, tuner, setupwizard, camera (which *removes* `INTERNET`), and every game except+ voxels.++### 11.3 Cross-cutting patterns++**Plaintext or unauthenticated transport**, worst first: the WhatsApp raw socket; the empty+`checkServerTrusted` and STARTTLS downgrade in `:email`; `stun.l.google.com` over plaintext UDP; the+unvalidated `http://` WebDAV URL in `:backup`; the unvalidated DAV URL in `:everysync`; the+`http://` activation code accepted by `:euicc`; the MMS content-location taken from an inbound PDU;+the loopback traffic tile server in `:maps`; and `:web`'s global cleartext allowance, which is+deliberate and mitigated.++**Volunteer or community-run services carrying production traffic**: `api.transitous.org` (hit at+both runtime *and* as a 10 GB build-time mirror, ยง12), `api.pipepipe.dev`, `lrclib.net`,+`coverartarchive.org`, Open-Meteo, and โ build-side โ gorhill/uBlock and the Brave filter lists.+None of these has a commercial support relationship, and several are hit without rate-gating or a+contactable UA.++**Single points of failure**: `chat.signal.org`, `g.whatsapp.net`, `v.whatsapp.net`,+`clients6.google.com`, `stun.l.google.com`, `api.pipepipe.dev`, Open-Meteo, `api.lyft.com`,+`api.deliverycollective.com`, `cable.ua5v.com`, `auroraoss.com`,+`login.microsoftonline.com`, `oauth2.googleapis.com`, `apps.grapheneos.org`, `repo.accrescent.app`.++**Hardcoded credentials shipped in APKs**: Lyft client id and secret; a Stripe `pk_live_` key; a+Tidal `client_id;client_secret`; a WhatsApp client token plus registration salt and public key;+Google BotGuard api-key and request-key; and two public OAuth client ids. See Highest-severity+findings.++### 11.4 Shared network-library controls++- `:library:network`'s manifest sets `cleartextTrafficPermitted="false"` for **every consumer**.+ Only `:web` and `:email` override it (`:vpn`'s override is a no-op).+- There is **no `<pin-set>` anywhere**. Pinning is code-side, via `TrustBundle` over the 20 DER roots+ under `library/network/src/main/assets/ca/`, which are pin-gated at generation time (ยง7.2).+- **Manifest-merge `INTERNET` leak**: `:notes`, `:flashcards`, `:files`, `:pdf` and `:translate`+ ship with `INTERNET` without declaring it, which makes several `metadata_data/*.md` claims wrong.+- `InitialDownloader.kt:323` uses a raw `HttpURLConnection`, **bypassing the CA bundle**.+- Six modules consume `:library:map`: maps, findfamily, weather, photos, taxi, fooddelivery.+ `:library:image` has no fixed host.+- CARTO is confirmed removed โ `library/map/build.gradle.kts` drops `:library:image` because there+ is no raster path, and the "bundled CARTO map" is a `screenshotTest` PNG.++### 11.5 Limits of the host inventory++These bound ยง11 and ยง12 specifically, on top of the audit limits in the Scope section.++1. **The WhatsApp media scheme is unverified.** `WhatsAppClient.kt:1100-3639` was not read, so+ whether the `media_conn`-supplied media host is contacted over TLS is not established.+2. **The `NetworkClient.init(` consumer table is incomplete.** Only `:findfamily` and `:passwords`+ are verified; the rest is comment-sourced. Two traps: `:library` is a dependency of every app,+ and `initWithFactory` (`NetworkClient.kt:163`) is a second entry point that a search for `init(`+ misses.+3. **The inventory is closed over *hardcoded* hosts only.** Hosts that are real but not statically+ enumerable are named by role, not by name: `:library:image` targets, the Play and Accrescent+ CDNs, `*.googlevideo.com`, WhatsApp media, Signal CDN3 and TURN, Duffel logos, the Hugging Face+ LFS CDN, and the two unbounded build-time registry host sets (ยง12).+4. **Not read line by line**: roughly 12 `:vpn` packet and UI files, the `scripts/maps` crate `.rs`+ bodies, `library/ui/odf/`, and the `library/ml` examples.+5. The inventory was built by directory-walking and targeted reads across roughly 15 parallel+ searches, without a grep tool. Coverage is high but is not a mechanical sweep.++---++## 12. Build-time and data-prep hosts++Contacted from a developer machine or a CI runner, never from a user device. Where a risk is written+up above, this section only names the host.++**Toolchain and dependency resolution.** `services.gradle.org` (SHA-256 verified, ยง1.2);+`dl.google.com`, `repo.maven.apache.org` and `plugins.gradle.org` (no verification metadata, ยง1.1);+`build-artifacts.signal.org` (ยง2.1); `crates.io` (`--locked`, ยง4); `static.rust-lang.org`;+`proxy.golang.org`, `sum.golang.org` and `github.com` for the unblockjam Go tools (hash-pinned);+`cdn.azul.com` for the JDK; Ubuntu apt mirrors; `github.com` for Actions; and `api.github.com`,+including the `gh release create` upload in `release.sh` (ยง6.5).++**`raw.githubusercontent.com` โ five consumers.**++| Consumer | Pinning |+|---|---|+| Material Symbols (`LauncherIconGen.kt`, plus the second site at `android.yml:174`) | Full commit SHA (ยง7.5) |+| simdjson and zstd (`scripts/geocoder_gen.sh`) | Full commit SHAs (ยง7.4) |+| brave/adblock-resources | **`master` โ mutable, unpinned** |+| gorhill/uBlock | **`master` โ mutable, unpinned, and executed** (Highest-severity findings) |+| unicode-org/cldr | **`main` โ mutable, unpinned** |++**TLS trust anchors.** `curl.se/ca/cacert.pem`, with `letsencrypt.org`, `pki.goog`,+`cacerts.digicert.com` and `www.amazontrust.com` as per-root fallbacks. Pin-gated (ยง7.2).++**Model weights.** `huggingface.co` โ six direct fetches plus five `snapshot_download` repos, all+revision-pinned and digest-verified (ยง8). The LFS CDN behind it is dynamic.++**Map and geospatial data.**++- `download.geofabrik.de` โ OSM extracts.+- `demo-bucket.protomaps.com` โ the original upstream basemap; a size mismatch is a warning only,+ and upstream is reported dead.+- `github.com` and `api.github.com` โ go-pmtiles, pinned and checksummed (ยง7.1).+- `naciscdn.org` โ **the only source for two shipped layers**, extracted with `unzip -o` and no+ traversal guard. A **SPOF** for those layers.+- `api.transitous.org/gtfs/` โ roughly 2250 zip files, about 10 GB, soft-fail, **zero checksums**.+ Same volunteer-run organisation the runtime hits (ยง11.1).+- `codeload.github.com` at `refs/heads/main` โ mutable.+- **An unbounded set of GTFS agency hosts.** Third-party API keys transit these, and an `http://`+ entry in the agency list would be fetched in plaintext.+- Cloudflare R2 upload, using `R2_*` / `AWS_*` credentials from a sourced `.env`.++**Other data prep.**++- `static.openfoodfacts.org` โ roughly 1.2 GB into a `:health` asset, **no checksum**, redirecting+ to an unnamed S3 bucket.+- `unicode.org` โ emoji data.+- The Brave filter-list catalog โ **a second unbounded host set**, since the list of lists is read+ from upstream rather than hardcoded.+- `calendar.google.com` โ `tools/holidaygen/HolidayGen.kt` issues roughly **13,700 sequential,+ unthrottled GETs** with a spoofed `Mozilla/5.0 (holidaygen)` UA. The build file's "Thunderbird"+ comment describes a different source and is wrong.++**Cleared.** `wikidesc` reads a local dump and deliberately avoids the API.+`scripts/networklocation` is an OSM geocoder, not a Wi-Fi harvester. Also clear: the other three+maps crates, the chess/voxels/pipes/wordmaker generators, the install scripts, both `third_party`+`build.rs` files, and the remaining build-logic. The only plaintext URL anywhere in build scope is+`http://tdc-www.harvard.edu/...` in an inert docstring.++--- -After initial model download (openassistant), the one-time routing/POI pack fetch (maps) and one TTS voice download (speech), these apps work airplane-mode: `astronomy`, `calendar`, `clock`, `contacts`, `files`, `notes`, `things`, `camera`, `pdf`, `music`, `games`, `passwords`, `health` core (Health Connect), `speech` (STT bundled; TTS after one voice download), `photos` (semantic search bundled), `library` modules (`ocr` det/rec, `ink`, `biometric`, `room`).+## 13. Absent risks worth recording++These were checked and are not present, or are present by decision. They are listed so future audits+need not re-derive them.++- No git hooks.+- No git submodules.+- No Gradle init scripts.+- No `curl | sh` style pipe-to-shell installers anywhere in the tree.+- No dynamic, range, or `-SNAPSHOT` dependency versions.+- No `mavenLocal()`, and no per-module repositories (`FAIL_ON_PROJECT_REPOS`).+- One committed binary only: `gradle/wrapper/gradle-wrapper.jar`.+- CI installs build prerequisites with `apt-get` and no version constraints. This is deliberate:+ pinning apt versions breaks the build on every GitHub runner-image roll, which costs more than the+ reproducibility it buys.
appstore/build.gradle.kts
diff --git a/appstore/build.gradle.kts b/appstore/build.gradle.ktsindex 8baadc9d7e..db542290d5 100644--- a/appstore/build.gradle.kts+++ b/appstore/build.gradle.kts@@ -71,7 +71,6 @@ dependencies { implementation(libs.grpc.stub) implementation(libs.grpc.kotlin.stub) implementation(libs.protobuf.javalite)- implementation(libs.protobuf.kotlin.lite) // grpc-java generated stubs reference @javax.annotation.Generated, absent on Android. compileOnly(libs.javax.annotation.api) // ed25519 verification of Accrescent's signify-signed repodata allowlist runs in@@ -80,7 +79,7 @@ dependencies { protobuf { protoc {- artifact = "com.google.protobuf:protoc:${libs.versions.protobufJavalite.get()}"+ artifact = libs.protobuf.protoc.get().toString() } plugins { create("grpc") {@@ -93,6 +92,8 @@ protobuf { generateProtoTasks { all().forEach { task -> task.builtins {+ // `create`, not `named` as in :youpipe:extractor: on the Android variant path the+ // plugin does not pre-register the java builtin, so it has to be added here. create("java") { option("lite") } } task.plugins {
appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.ktindex 93cf40d8ee..cbefd5365f 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt@@ -44,6 +44,8 @@ import com.vayunmathur.library.ui.IconStar import com.vayunmathur.library.ui.LinearProgressIndicator import com.vayunmathur.library.ui.MaterialTheme import com.vayunmathur.library.ui.Text+import com.vayunmathur.library.util.sharedContainer+import com.vayunmathur.library.util.sharedCrop import java.util.Locale /**@@ -151,11 +153,18 @@ fun AppRow( stage: InstallStage? = null, installedIcon: Drawable? = null, versionLabel: String? = null,+ /**+ * Non-null makes this row the origin of the [sharedCrop] container transform into the app's+ * detail page. Null for a row that is a second copy of an app already shown elsewhere on+ * screen - the morph cannot choose between two origins for one destination.+ */+ sharedKey: Any? = null, onClick: () -> Unit = {}, trailing: @Composable (() -> Unit)? = null, ) { Column( modifier+ .then(if (sharedKey == null) Modifier else Modifier.sharedCrop(sharedKey)) .fillMaxWidth() .clickable(onClick = onClick) .padding(horizontal = 16.dp, vertical = 10.dp),@@ -225,10 +234,17 @@ fun AppTile( isInstalled: Boolean = false, stage: InstallStage? = null, installedIcon: Drawable? = null,+ /** As [AppRow]: null for a tile whose app is already an origin elsewhere on screen. */+ sharedKey: Any? = null, onClick: () -> Unit = {}, ) { Column( modifier+ // Deliberately [sharedContainer] where [AppRow] uses [sharedCrop]: a tile centres its+ // icon in 96dp and the detail header puts it hard left in a full-width row, so the two+ // ends are not congruent at their top-left and a crop would jump the icon across. A+ // reflow absorbs that. Do not "tidy" this into matching AppRow.+ .then(if (sharedKey == null) Modifier else Modifier.sharedContainer(sharedKey)) .width(96.dp) .clip(RoundedCornerShape(12.dp)) .clickable(onClick = onClick)@@ -284,6 +300,8 @@ fun AppCarousel( onAppClick: (UnifiedApp) -> Unit, modifier: Modifier = Modifier, stages: Map<String, InstallStage> = emptyMap(),+ /** Per-app, because only the caller knows which copy of an app owns the morph. */+ sharedKey: (UnifiedApp) -> Any? = { null }, ) { LazyRow( modifier = modifier.fillMaxWidth(),@@ -297,6 +315,7 @@ fun AppCarousel( stage = stages[app.packageName], installedIcon = installedIcons[app.packageName], onClick = { onAppClick(app) },+ sharedKey = sharedKey(app), ) } }
appstore/src/main/java/com/vayunmathur/appstore/ui/AppDetailPage.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/AppDetailPage.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/AppDetailPage.ktindex 7f5201790f..13dea7266a 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/AppDetailPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/AppDetailPage.kt@@ -63,7 +63,7 @@ import com.vayunmathur.library.ui.R as UiR import com.vayunmathur.library.ui.Text import com.vayunmathur.library.ui.TextButton import com.vayunmathur.library.ui.appBarScrollBehavior-import com.vayunmathur.library.util.sharedContainer+import com.vayunmathur.library.util.sharedCrop /** Binds [AppStoreViewModel] to the stateless [AppDetailScreen]. */ @Composable@@ -144,7 +144,7 @@ private fun Header(state: AppDetailUiState) { val app = state.app ?: return Row( Modifier- .sharedContainer("appstore-app-${app.packageName}")+ .sharedCrop("appstore-app-${app.packageName}") .fillMaxWidth() .padding(start = 16.dp, end = 16.dp, top = 8.dp), verticalAlignment = Alignment.CenterVertically,
appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.ktindex 97697ea259..9d6438c93e 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.kt@@ -17,6 +17,7 @@ import androidx.compose.foundation.lazy.items import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue+import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.pluralStringResource@@ -26,6 +27,7 @@ import androidx.compose.ui.unit.dp import com.vayunmathur.appstore.R import com.vayunmathur.appstore.data.SandboxedGooglePlay import com.vayunmathur.appstore.data.UnifiedApp+import com.vayunmathur.appstore.util.AppSection import com.vayunmathur.appstore.util.AppStoreViewModel import com.vayunmathur.appstore.util.HomeActions import com.vayunmathur.appstore.util.HomeUiState@@ -94,6 +96,23 @@ fun HomeScreen( }, scrollBehavior = appBarScrollBehavior(), ) { padding ->+ // A package can legitimately sit in several sections at once - a new release is also a+ // top download - but one detail page cannot morph from two origins. The first section+ // listing a package owns the morph; later copies of it open without one.+ val morphOwner = remember(state.sections) {+ buildMap<String, String> {+ state.sections.forEach { section ->+ section.apps.forEach { putIfAbsent(it.packageName, section.id) }+ }+ }+ }+ fun sharedKeyFor(section: AppSection, app: UnifiedApp): Any? =+ if (morphOwner[app.packageName] == section.id) {+ "appstore-app-${app.packageName}"+ } else {+ null+ }+ LazyColumn( Modifier.fillMaxSize().padding(padding), contentPadding = PaddingValues(bottom = 24.dp),@@ -154,6 +173,7 @@ fun HomeScreen( installedIcons = state.installedIcons, onAppClick = onAppClick, stages = state.stages,+ sharedKey = { sharedKeyFor(section, it) }, ) } SectionLayout.LIST -> items(@@ -166,6 +186,7 @@ fun HomeScreen( stage = state.stages[app.packageName], installedIcon = state.installedIcons[app.packageName], onClick = { onAppClick(app) },+ sharedKey = sharedKeyFor(section, app), ) } }
appstore/src/main/java/com/vayunmathur/appstore/ui/LibraryPage.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/LibraryPage.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/LibraryPage.ktindex d0e1bb84d4..5193d731c6 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/LibraryPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/LibraryPage.kt@@ -27,7 +27,6 @@ import com.vayunmathur.library.ui.FilterChip import com.vayunmathur.library.ui.IconPackage import com.vayunmathur.library.ui.Text import com.vayunmathur.library.ui.appBarScrollBehavior-import com.vayunmathur.library.util.sharedContainer /** Binds [AppStoreViewModel] to the stateless [LibraryScreen]. */ @Composable@@ -89,10 +88,10 @@ fun LibraryScreen( items(state.apps, key = { it.packageName }) { app -> AppRow( app = app,- modifier = Modifier.sharedContainer("appstore-app-${app.packageName}"), isInstalled = true, installedIcon = state.installedIcons[app.packageName], onClick = { onAppClick(app) },+ sharedKey = "appstore-app-${app.packageName}", ) } }
appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.ktindex 139fb45983..dced97c64c 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt@@ -133,6 +133,9 @@ fun SearchScreen( stage = state.stages[app.packageName], installedIcon = state.installedIcons[app.packageName], onClick = { onAppClick(app) },+ // Unambiguous despite the source in the item key: results are+ // deduplicated by package before they get here.+ sharedKey = "appstore-app-${app.packageName}", ) } }
appstore/src/main/java/com/vayunmathur/appstore/ui/UpdatesPage.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/UpdatesPage.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/UpdatesPage.ktindex 6818431e30..0a3bfc4108 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/UpdatesPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/UpdatesPage.kt@@ -161,6 +161,10 @@ fun UpdatesScreen( Text(stringResource(R.string.action_update)) } },+ // Library keys the same app with the same key, but the tabs are a+ // pager that only composes the settled page, so the two are never+ // origins at the same time.+ sharedKey = "appstore-app-${app.packageName}", ) } }
build-logic/src/main/kotlin/NdkVersion.kt
diff --git a/build-logic/src/main/kotlin/NdkVersion.kt b/build-logic/src/main/kotlin/NdkVersion.ktnew file mode 100644index 0000000000..8e077bf3c8--- /dev/null+++ b/build-logic/src/main/kotlin/NdkVersion.kt@@ -0,0 +1,8 @@+/**+ * The single NDK version used by every module that compiles native code.+ *+ * AGP's `ndkVersion` (apps, wear) and the Rust cross-compile toolchain paths in+ * [rustNativeLib] must name the same installed NDK, or cargo links against a different+ * toolchain than the one AGP builds the rest of the app with.+ */+const val NDK_VERSION = "29.0.14206865"
build-logic/src/main/kotlin/RustNative.kt
diff --git a/build-logic/src/main/kotlin/RustNative.kt b/build-logic/src/main/kotlin/RustNative.ktindex 1192f4e628..eb96571052 100644--- a/build-logic/src/main/kotlin/RustNative.kt+++ b/build-logic/src/main/kotlin/RustNative.kt@@ -62,7 +62,6 @@ fun Project.rustNativeLib( maxParallelUsages.set(1) } - val ndkVersionForRust = "29.0.14206865" val androidApiLevel = 31 fun resolveSdkDir(): String =@@ -74,7 +73,7 @@ fun Project.rustNativeLib( ?: error("Android SDK not found (set ANDROID_HOME or sdk.dir in local.properties)") val cargoBin = "${System.getProperty("user.home")}/.cargo/bin"- val ndkRoot = "${resolveSdkDir()}/ndk/$ndkVersionForRust"+ val ndkRoot = "${resolveSdkDir()}/ndk/$NDK_VERSION" val hostTag = when { OperatingSystem.current().isMacOsX -> "darwin-x86_64" OperatingSystem.current().isLinux -> "linux-x86_64"
build-logic/src/main/kotlin/common-conventions-app.gradle.kts
diff --git a/build-logic/src/main/kotlin/common-conventions-app.gradle.kts b/build-logic/src/main/kotlin/common-conventions-app.gradle.ktsindex eeac1c0409..932019a554 100644--- a/build-logic/src/main/kotlin/common-conventions-app.gradle.kts+++ b/build-logic/src/main/kotlin/common-conventions-app.gradle.kts@@ -178,7 +178,7 @@ configure<com.android.build.api.dsl.ApplicationExtension> { // real res source directory.) sourceSets.getByName("main").res.directories.add(File(rootDir, "build-logic/shared-res").absolutePath) - ndkVersion = "29.0.14206865"+ ndkVersion = NDK_VERSION defaultConfig { minSdk = 31
build-logic/src/main/kotlin/common-conventions-wear.gradle.kts
diff --git a/build-logic/src/main/kotlin/common-conventions-wear.gradle.kts b/build-logic/src/main/kotlin/common-conventions-wear.gradle.ktsindex 42a329197c..3b19bfcd01 100644--- a/build-logic/src/main/kotlin/common-conventions-wear.gradle.kts+++ b/build-logic/src/main/kotlin/common-conventions-wear.gradle.kts@@ -45,7 +45,7 @@ configure<com.android.build.api.dsl.ApplicationExtension> { generateLocaleConfig = true } - ndkVersion = "29.0.14206865"+ ndkVersion = NDK_VERSION defaultConfig { minSdk = 30
build.gradle.kts
diff --git a/build.gradle.kts b/build.gradle.ktsindex ae551c70d1..4895bc0294 100644--- a/build.gradle.kts+++ b/build.gradle.kts@@ -5,6 +5,7 @@ plugins { alias(libs.plugins.android.library) apply false alias(libs.plugins.kotlin.serialization) apply false alias(libs.plugins.ksp) apply false+ alias(libs.plugins.protobuf) apply false } // Repairs corrupted translations contributed via Weblate where the <xliff:g> markup
calendar/src/main/java/com/vayunmathur/calendar/MainActivity.kt
diff --git a/calendar/src/main/java/com/vayunmathur/calendar/MainActivity.kt b/calendar/src/main/java/com/vayunmathur/calendar/MainActivity.ktindex 88250aba9c..ab906dc6da 100644--- a/calendar/src/main/java/com/vayunmathur/calendar/MainActivity.kt+++ b/calendar/src/main/java/com/vayunmathur/calendar/MainActivity.kt@@ -206,7 +206,15 @@ sealed interface Route: NavKey { val location: String? = null, val beginTime: Long? = null, val endTime: Long? = null,- val allDay: Boolean? = null+ val allDay: Boolean? = null,+ /**+ * The instance the user opened, when they arrived here from its detail screen.+ *+ * The title morph needs it: a title is keyed per *instance* so that a recurring event+ * showing several times on the grid still has one origin per key, while everything else+ * about an edit is keyed per event. Null when the edit was not reached from a detail screen.+ */+ val instanceId: Long? = null, ): Route { @Serializable data class DatePickerDialog(val key: String, val initialDate: LocalDate, val minDate: LocalDate? = null): Route
calendar/src/main/java/com/vayunmathur/calendar/ui/EditEventScreen.kt
diff --git a/calendar/src/main/java/com/vayunmathur/calendar/ui/EditEventScreen.kt b/calendar/src/main/java/com/vayunmathur/calendar/ui/EditEventScreen.ktindex d0ecfd8094..b62465e664 100644--- a/calendar/src/main/java/com/vayunmathur/calendar/ui/EditEventScreen.kt+++ b/calendar/src/main/java/com/vayunmathur/calendar/ui/EditEventScreen.kt@@ -269,7 +269,16 @@ fun EditEventScreen(viewModel: CalendarViewModel, editRoute: Route.EditEvent, ba }, scrollBehavior = appBarScrollBehavior(), ) {- OutlinedTextField(title, { title = it }, Modifier.fillMaxWidth().padding(8.dp), label = { Text(stringResource(R.string.label_title)) })+ // The detail screen's title morphs into this field. Keyed on the instance, matching the+ // detail side - the grid keys per instance so a recurring event has one origin per key.+ // Null when the edit was not reached from a detail screen.+ LabeledTextField(+ value = title,+
Diff truncated.