Modern Apps git

← Modern-Apps.git

appstore: add IzzyOnDroid as opt-in reproducible-only source (#492)

Commit
83d45e7cf10853401db9b17677e603efab6ed76b
Author
vayun-mathur <[email protected]>
When
2026-10-28 03:34 UTC (1 month ago)
Parents
0fc486c

Diff

appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.ktindex ad80de1410..58521a060e 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.kt@@ -8,6 +8,14 @@ enum class AppSource {     FDROID,     PLAYSTORE, +    /**+     * IzzyOnDroid (apt.izzysoft.de/fdroid/repo). Ships the developers' own signed+     * binaries (not source-built), so only apps whose advertised version an+     * independent verification builder rebuilt bit-for-bit are listed — see+     * [com.vayunmathur.appstore.data.IzzyReproducibleBuilds]. Off by default.+     */+    IZZY,+     /**      * Accrescent (accrescent.app). Listings and per-device split download URLs come from      * Accrescent's gRPC API (appstore-api.accrescent.app); the trust anchor is a separate@@ -43,12 +51,12 @@ enum class AppSource {          * signed with this store's own key.          */         val PRIORITY: List<AppSource> =-            listOf(MODERN_APPS, PROPRIETARY, FDROID, ACCRESCENT, PLAYSTORE)+            listOf(MODERN_APPS, PROPRIETARY, FDROID, IZZY, ACCRESCENT, PLAYSTORE)          /**          * Sources the user may switch off, in the order the sources screen lists them.          */-        val TOGGLEABLE: List<AppSource> = listOf(MODERN_APPS, PROPRIETARY, FDROID, PLAYSTORE, ACCRESCENT)+        val TOGGLEABLE: List<AppSource> = listOf(MODERN_APPS, PROPRIETARY, FDROID, IZZY, PLAYSTORE, ACCRESCENT)     } } @@ -76,8 +84,11 @@ data class UnifiedApp(     val targetSdk: Int? = null,     /**      * True when this exact version (packageName + versionCode) was independently-     * reproduced bit-for-bit by F-Droid's verification server. F-Droid only; a badge,-     * not a gate — apps are listed regardless. See [com.vayunmathur.appstore.data.ReproducibleBuilds].+     * reproduced bit-for-bit: by F-Droid's verification server for F-Droid rows, or+     * by an rbtlog verification builder for IzzyOnDroid rows (where it is also the+     * admission gate — see [com.vayunmathur.appstore.data.IzzyReproducibleBuilds]).+     * A badge, not a gate, for F-Droid — apps are listed regardless. See+     * [com.vayunmathur.appstore.data.ReproducibleBuilds].      */     val reproducible: Boolean = false,     val license: String? = null,@@ -199,12 +210,15 @@ data class RepoDescriptor( /**  * The only repositories this store will talk to.  *- * Third-party F-Droid-format repos (IzzyOnDroid and friends) are deliberately not+ * Third-party F-Droid-format repos beyond what's listed here are deliberately not  * supported and cannot be added: they republish binaries built by the upstream developer  * rather than building from source, so an app from one carries the developer's release  * pipeline *and* the mirror operator in its trusted set, with no published source to- * check the binary against. The f-droid.org archive is excluded for a different reason:- * it exists to serve superseded versions, which is the opposite of what we want.+ * check the binary against. IzzyOnDroid is the controlled exception: it is only listed+ * with its reproducible-builds gate (see [IZZY]), so every app offered from it has had+ * its binary independently rebuilt from published source. The f-droid.org archive is+ * excluded for a different reason: it exists to serve superseded versions, which is+ * the opposite of what we want.  *  * [PROPRIETARY] is the deliberate exception to the no-mirror rule: it is operated by  * the same party that ships this store (not a third party), serves only an explicit@@ -242,7 +256,16 @@ object DefaultRepos {         supportsReproducibilityFeed = false,     ) -    val ALL: List<RepoDescriptor> = listOf(FDROID, MODERN_APPS, PROPRIETARY)+    val IZZY = RepoDescriptor(+        url = "https://apt.izzysoft.de/fdroid/repo",+        displayName = "IzzyOnDroid",+        pinnedFingerprint =+            "3bf0d6abfeae2f401707b6d966be743bf0eee49c2561b9ba39073711f628937a",+        source = AppSource.IZZY,+        supportsReproducibilityFeed = false,+    )++    val ALL: List<RepoDescriptor> = listOf(FDROID, MODERN_APPS, PROPRIETARY, IZZY)      /** Cache key written by the retired GitHub releases provider. */     const val LEGACY_MODERN_APPS_REPO_KEY = "https://github.com/vayun-mathur/Modern-Apps"
appstore/src/main/java/com/vayunmathur/appstore/data/CatalogRepository.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/CatalogRepository.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/CatalogRepository.ktindex 7eb0a87752..ed0c08600c 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/CatalogRepository.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/CatalogRepository.kt@@ -11,7 +11,7 @@ import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.withContext  /** Which source a sync run is currently working on, for a progress line. */-enum class SyncStep { FDROID, MODERN_APPS, PROPRIETARY }+enum class SyncStep { FDROID, MODERN_APPS, PROPRIETARY, IZZY }  /** What one sync run managed to do, per source. */ data class SyncReport(@@ -20,13 +20,16 @@ data class SyncReport(     val fdroidReproducible: Int = 0,     val modernCount: Int? = null,     val proprietaryCount: Int? = null,+    /** How many Izzy apps passed the reproducible-build gate this sync. */+    val izzyCount: Int? = null,     /** Sources the user has switched off, which this run skipped rather than attempted. */     val skipped: Set<AppSource> = emptySet(), ) {     val anyFailed: Boolean         get() = (AppSource.FDROID !in skipped && fdroidCount == null) ||             (AppSource.MODERN_APPS !in skipped && modernCount == null) ||-            (AppSource.PROPRIETARY !in skipped && proprietaryCount == null)+            (AppSource.PROPRIETARY !in skipped && proprietaryCount == null) ||+            (AppSource.IZZY !in skipped && izzyCount == null)      /** True when every offline source is switched off, so there was nothing to sync. */     val allSkipped: Boolean@@ -54,6 +57,7 @@ class CatalogRepository(     private val fdroidProvider = FDroidAppProvider(db, appContext, DefaultRepos.FDROID)     private val modernProvider = FDroidAppProvider(db, appContext, DefaultRepos.MODERN_APPS)     private val proprietaryProvider = FDroidAppProvider(db, appContext, DefaultRepos.PROPRIETARY)+    private val izzyProvider = FDroidAppProvider(db, appContext, DefaultRepos.IZZY)      /**      * Whether this device is a TV. Read once: the leanback feature set cannot change@@ -215,7 +219,10 @@ class CatalogRepository(      * every app in this repo is also on F-Droid, and the copy signed with this store's own      * key is the one that can be verified end to end. Proprietary goes between F-Droid      * and Modern Apps: its allowlist is curated to avoid F-Droid overlap, and nothing-     * outranks a first-party row.+     * outranks a first-party row. Izzy goes before F-Droid: an Izzy row means an+     * independent builder reproduced that exact binary, which is a stronger statement+     * than an F-Droid source build — but its developer-held signing key must not+     * displace a first-party row.      *      * Each source is independent: one failing leaves the other's rows updated and its own      * previous rows untouched, rather than aborting the whole run.@@ -230,6 +237,13 @@ class CatalogRepository(         ensureDefaultRepos()         purgeDisabled(enabled) +        val izzy = if (DefaultRepos.IZZY.source in enabled) {+            onProgress(SyncStep.IZZY)+            runCatching { izzyProvider.syncIntoDb() }.getOrNull()+        } else {+            null+        }+         val fdroid = if (DefaultRepos.FDROID.source in enabled) {             onProgress(SyncStep.FDROID)             runCatching { fdroidProvider.syncIntoDb() }.getOrNull()@@ -256,6 +270,7 @@ class CatalogRepository(             fdroidReproducible = fdroidProvider.lastReproducibleCount,             modernCount = modern,             proprietaryCount = proprietary,+            izzyCount = izzy,             skipped = DefaultRepos.ALL.mapNotNullTo(mutableSetOf()) {                 it.source.takeIf { source -> source !in enabled }             },
appstore/src/main/java/com/vayunmathur/appstore/data/FDroidAppProvider.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/FDroidAppProvider.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/FDroidAppProvider.ktindex b29b776751..ba2075681f 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/FDroidAppProvider.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/FDroidAppProvider.kt@@ -10,7 +10,10 @@ import kotlinx.coroutines.withContext  *  * The whole catalogue is imported (newest version of every app). For repositories that  * support it, F-Droid's reproducibility feed ([ReproducibleBuilds]) is consulted only to- * badge versions independently reproduced bit-for-bit. That feed is best-effort; signed-index+ * badge versions independently reproduced bit-for-bit. IzzyOnDroid is the exception:+ * it ships developers' own binaries, so its rbtlog feed ([IzzyReproducibleBuilds]) is+ * an admission gate — versions no independent builder reproduced are dropped, and a+ * failed feed fetch imports nothing. Either feed is best-effort; signed-index  * verification always fails closed, so unauthenticated hashes and signer keys never replace  * cached rows.  */@@ -27,12 +30,25 @@ class FDroidAppProvider(      /** Refresh [descriptor] and replace only that repository's cached rows. */     suspend fun syncIntoDb(): Int = withContext(Dispatchers.IO) {-        val result = try {+        var result = try {             fetchVerifiedIndex()         } catch (expected: Exception) {             Log.status(TAG, "sync of ${descriptor.displayName} failed", expected)             throw expected         }+        // Izzy ships developers' own binaries rather than source builds, so only+        // versions an independent builder reproduced bit-for-bit are listed at+        // all (issue #492). The feed callback above only badges; the gate is here.+        // A failed feed fetch imports nothing rather than everything unfiltered.+        if (descriptor.source == AppSource.IZZY) {+            val kept = result.apps.filter { it.reproducible }+            Log.status(+                TAG,+                "sync of ${descriptor.displayName}: kept ${kept.size} of " ++                    "${result.apps.size} apps with reproduced builds"+            )+            result = result.copy(apps = kept)+        }         Log.status(             TAG,             "sync of ${descriptor.displayName}: fetched ${result.apps.size} " +@@ -62,6 +78,13 @@ class FDroidAppProvider(         } else {             null         }+        // Izzy ships developers' own binaries, so unverified versions are dropped outright+        // rather than badged: a failed feed fetch then imports nothing, never everything.+        val izzyVerified = if (descriptor.source == AppSource.IZZY) {+            runCatching { IzzyReproducibleBuilds.fetch(appContext) }.getOrNull()+        } else {+            null+        }         var reproduced = 0         val result = FDroidRepository.fetchRepoIndex(             context = appContext,@@ -69,10 +92,16 @@ class FDroidAppProvider(             pinnedFingerprint = descriptor.pinnedFingerprint,             source = descriptor.source,         ) { pkg, versionCode ->-            val ok = descriptor.supportsReproducibilityFeed &&-                verified?.contains(pkg, versionCode) == true-            if (ok) reproduced++-            ok+            if (descriptor.source == AppSource.IZZY) {+                val ok = IzzyReproducibleBuilds.admits(izzyVerified, pkg, versionCode)+                if (ok) reproduced+++                ok+            } else {+                val ok = descriptor.supportsReproducibilityFeed &&+                    verified?.contains(pkg, versionCode) == true+                if (ok) reproduced+++                ok+            }         }         lastReproducibleCount = reproduced         return result
appstore/src/main/java/com/vayunmathur/appstore/data/IzzyVerification.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/IzzyVerification.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/IzzyVerification.ktnew file mode 100644index 0000000000..8d4d0b3aa5--- /dev/null+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/IzzyVerification.kt@@ -0,0 +1,136 @@+package com.vayunmathur.appstore.data++import android.content.Context+import android.util.JsonReader+import android.util.JsonToken+import kotlinx.coroutines.Dispatchers+import kotlinx.coroutines.withContext+import java.io.File++/**+ * The set of IzzyOnDroid builds independently reproduced bit-for-bit.+ *+ * IzzyOnDroid ships the developers' own signed binaries rather than building from+ * source, so the store cannot trust an Izzy listing the way it trusts an F-Droid one.+ * What it can check is whether an independent verification builder rebuilt that exact+ * version from its published source tag and got a bit-identical APK — which is what+ * [Izzy's rbtlog transparency log](https://codeberg.org/IzzyOnDroid/rbtlog) records.+ *+ * Shape: `{ "<64-hex-key>": [ { "appid": ..., "version_code": 132,+ * "reproducible": true, ... } ] }`. The per-builder `index.json` files are merged:+ * a version counts as reproduced when *any* trusted builder says so. Records are+ * keyed here by `"$packageName:$versionCode"` — the top-level keys are opaque+ * content hashes, not join keys.+ *+ * Unlike [ReproducibleBuilds] (F-Droid) this is a **gate**, not a badge: the Izzy+ * descriptor imports nothing whose advertised version has no `reproducible == true`+ * record, because without one the listing is an unchecked third-party binary.+ * Best-effort in the same way, though — a failed fetch means nothing from Izzy is+ * listed this sync, rather than listing everything unfiltered.+ */+object IzzyReproducibleBuilds {++    /**+     * Per-builder transparency-log indexes consulted for Izzy verdicts: IzzyOnDroid's+     * own builder first, then the independent builder Izzy points clients at+     * (see the builder list at the end of `rbtlog.dev`).+     */+    const val IZZY_INDEX_URL = "https://codeberg.org/IzzyOnDroid/rbtlog/raw/branch/izzy/log/index.json"+    const val INDEPENDENT_INDEX_URL = "https://codeberg.org/bg443/rbtlog/raw/branch/master/index.json"++    /** Keys are `"$packageName:$versionCode"`. */+    @JvmInline+    value class Verified(private val keys: Set<String>) {+        val size: Int get() = keys.size+        fun contains(packageName: String, versionCode: Long): Boolean =+            keys.contains("$packageName:$versionCode")+    }++    /**+     * Whether the advertised version may be listed: only with an explicit reproduced+     * verdict. A missing feed (null) admits nothing — the Izzy catalogue then imports+     * no rows rather than unfiltered ones.+     */+    fun admits(verified: Verified?, packageName: String, versionCode: Long): Boolean =+        verified?.contains(packageName, versionCode) == true++    suspend fun fetch(context: Context): Verified = withContext(Dispatchers.IO) {+        val keys = HashSet<String>(16_000)+        listOf(IZZY_INDEX_URL, INDEPENDENT_INDEX_URL).forEachIndexed { index, url ->+            val file = File(context.cacheDir, "izzy-verified-$index.json")+            try {+                FDroidRepository.downloadToFile(url, file)+                parseInto(file, keys)+            } catch (_: Exception) {+                // One builder's log failing must not veto the other's verdicts.+            } finally {+                file.delete()+            }+        }+        Verified(keys)+    }++    private fun parseInto(file: File, into: MutableSet<String>) {+        JsonReader(file.reader()).use { r ->+            r.isLenient = true+            r.beginObject()+            while (r.hasNext()) {+                r.nextName() // opaque content-hash key, not a join key+                if (r.peek() != JsonToken.BEGIN_ARRAY) {+                    r.skipValue()+                    continue+                }+                r.beginArray()+                while (r.hasNext()) {+                    readRecord(r, into)+                }+                r.endArray()+            }+            r.endObject()+        }+    }++    private fun readRecord(r: JsonReader, into: MutableSet<String>) {+        if (r.peek() != JsonToken.BEGIN_OBJECT) {+            r.skipValue()+            return+        }+        var appid: String? = null+        var versionCode: Long? = null+        var reproducible = false+        try {+            r.beginObject()+            while (r.hasNext()) {+                when (r.nextName()) {+                    "appid" -> appid = nextStringOrNull(r)+                    "version_code" -> versionCode = nextLongOrNull(r)+                    // The schema allows null (not yet attempted): only an explicit+                    // true counts, so a missing or failed rebuild never admits.+                    // A non-boolean must still be consumed, or the reader desyncs+                    // and every record after this one misparses.+                    "reproducible" -> reproducible = if (r.peek() == JsonToken.BOOLEAN) {+                        r.nextBoolean()+                    } else {+                        r.skipValue()+                        false+                    }+                    else -> r.skipValue()+                }+            }+            r.endObject()+        } catch (_: Exception) {+            // Best-effort resync: consume to the end of this record so one corrupt+            // entry cannot take down every record after it in the array.+            runCatching {+                while (r.peek() != JsonToken.END_OBJECT && r.peek() != JsonToken.END_DOCUMENT) {+                    r.skipValue()+                }+                if (r.peek() == JsonToken.END_OBJECT) r.endObject()+            }+            return+        }+        if (reproducible && appid != null && versionCode != null) {+            into.add("$appid:$versionCode")+        }+    }+}
appstore/src/main/java/com/vayunmathur/appstore/data/installer/InstallCoordinator.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/installer/InstallCoordinator.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/installer/InstallCoordinator.ktindex 995e5302f8..2d6cc90e64 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/installer/InstallCoordinator.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/installer/InstallCoordinator.kt@@ -239,7 +239,10 @@ class InstallCoordinator(                     requiredSigners = app.expectedSigners.toSet(),                     expectedSha256 = app.apkSha256                         ?.let { mapOf("${app.packageName}.apk" to it) } ?: emptyMap(),-                    signerOrigin = "F-Droid's signed app list",+                    signerOrigin = when (app.source) {+                        AppSource.IZZY -> "IzzyOnDroid's signed app list"+                        else -> "F-Droid's signed app list"+                    },                     requireTvCompatible = isTv,                 )             }
appstore/src/main/java/com/vayunmathur/appstore/data/security/TrustProfile.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/security/TrustProfile.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/security/TrustProfile.ktindex 3b4b4902f4..1af6dc0424 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/security/TrustProfile.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/security/TrustProfile.kt@@ -24,7 +24,7 @@ data class StoreRule(  *  * These live here rather than being repeated on each profile so that a profile card only  * ever describes what is *distinctive* about that source. If something is true of all- * three, it belongs in this list.+ * of them, it belongs in this list.  */ object StoreGuarantees { @@ -79,6 +79,14 @@ enum class TrustProfile {      */     FDROID, +    /**+     * IzzyOnDroid, from the one hard-pinned repository. Only versions an independent+     * verification builder rebuilt bit-for-bit from published source are listed at+     * all — reproducibility is the admission gate, since Izzy ships the developers'+     * own binaries rather than source builds.+     */+    IZZY,+     /** Google Play, via an anonymous account. */     PLAY, @@ -102,6 +110,7 @@ enum class TrustProfile {         get() = when (this) {             MODERN_APPS -> R.string.trust_modern_apps_title             FDROID -> R.string.source_chip_fdroid+            IZZY -> R.string.source_chip_izzy             PLAY -> R.string.trust_play_title             ACCRESCENT -> R.string.source_chip_accrescent             PROPRIETARY -> R.string.source_chip_proprietary@@ -113,6 +122,7 @@ enum class TrustProfile {         get() = when (this) {             MODERN_APPS -> R.string.trust_modern_apps_summary             FDROID -> R.string.trust_fdroid_summary+            IZZY -> R.string.trust_izzy_summary             PLAY -> R.string.trust_play_summary             ACCRESCENT -> R.string.trust_accrescent_summary             PROPRIETARY -> R.string.trust_proprietary_summary@@ -130,6 +140,11 @@ enum class TrustProfile {                 R.string.trust_fdroid_practice_rebuild,                 R.string.trust_fdroid_practice_antifeatures,             )+            IZZY -> listOf(+                R.string.trust_izzy_practice_binaries,+                R.string.trust_izzy_practice_reproduced,+                R.string.trust_izzy_practice_screened,+            )             PLAY -> listOf(                 R.string.trust_play_practice_identity,                 R.string.trust_play_practice_scanning,@@ -162,6 +177,12 @@ enum class TrustProfile {                 R.string.trust_fdroid_check_rebuilt,                 R.string.trust_fdroid_check_hash_and_key,             )+            IZZY -> listOf(+                R.string.trust_izzy_check_index_signed,+                R.string.trust_izzy_check_chained,+                R.string.trust_izzy_check_reproduced,+                R.string.trust_izzy_check_hash_and_key,+            )             PLAY -> listOf(                 R.string.trust_play_check_hash,                 R.string.trust_play_check_key,@@ -184,6 +205,7 @@ enum class TrustProfile {         get() = when (this) {             MODERN_APPS -> R.string.trust_modern_apps_limits             FDROID -> R.string.trust_fdroid_limits+            IZZY -> R.string.trust_izzy_limits             PLAY -> R.string.trust_play_limits             ACCRESCENT -> R.string.trust_accrescent_limits             PROPRIETARY -> R.string.trust_proprietary_limits@@ -195,6 +217,9 @@ enum class TrustProfile {             // The whole F-Droid catalogue is listed; whether a given version was reproduced             // is shown per-app as a badge (see UnifiedApp.reproducible).             AppSource.FDROID -> FDROID+            // Only reproduced Izzy versions are ever listed, so every Izzy row carries+            // the badge — the gate is the profile's distinctive fact, not the badge.+            AppSource.IZZY -> IZZY             AppSource.PLAYSTORE -> PLAY             // Accrescent apps are signed by their developers, not by Accrescent; trust is the             // ed25519-signed allowlist that pins each app's signing certificate + min version.
appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreCards.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreCards.kt b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreCards.ktindex 68c2d83d1b..9e37c28519 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreCards.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreCards.kt@@ -168,6 +168,7 @@ internal fun UnifiedApp.tvSourceLabel(): String = stringResource(     when (source) {         AppSource.MODERN_APPS -> R.string.source_chip_modern_apps         AppSource.FDROID -> R.string.source_chip_fdroid+        AppSource.IZZY -> R.string.source_chip_izzy         AppSource.PLAYSTORE -> R.string.source_chip_play         AppSource.ACCRESCENT -> R.string.source_chip_accrescent         AppSource.PROPRIETARY -> R.string.source_chip_proprietary
appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreOps.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreOps.kt b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreOps.ktindex 9217d30902..311428c1d4 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreOps.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreOps.kt@@ -18,6 +18,59 @@ import kotlinx.coroutines.launch // ---- Search hub + updates hub bodies ---- // Moved from TvStoreViewModel.kt (FileLength split); behavior identical. +/**+ * The offline catalogue rows that are all the same shape: recent builds with a title+ * and subtitle, no fallback. Modern Apps is not here — its home row falls back to an+ * A-Z slice when nothing is recent, so it stays inline in `loadHome`.+ */+internal suspend fun TvStoreViewModel.offlineRows(enabled: Set<AppSource>, limit: Int): List<TvSection> =+    buildList {+        for (row in OFFLINE_ROWS) {+            if (row.source in enabled) {+                catalog.recentlyUpdatedBySource(row.source, limit)+                    .takeIf { it.isNotEmpty() }?.let {+                        add(+                            TvSection(+                                id = row.sectionId,+                                title = context.getString(row.titleRes),+                                subtitle = context.getString(row.subtitleRes),+                                source = row.source,+                                apps = it,+                            )+                        )+                    }+            }+        }+    }++private data class OfflineRow(+    val source: AppSource,+    val sectionId: String,+    val titleRes: Int,+    val subtitleRes: Int,+)++private val OFFLINE_ROWS = listOf(+    OfflineRow(+        AppSource.PROPRIETARY,+        "proprietary-recent",+        R.string.section_proprietary_recent,+        R.string.section_proprietary_recent_subtitle,+    ),+    OfflineRow(+        AppSource.FDROID,+        "fdroid-recent",+        R.string.section_fdroid_recent,+        R.string.section_fdroid_recent_subtitle,+    ),+    OfflineRow(+        AppSource.IZZY,+        "izzy-recent",+        R.string.section_izzy_recent,+        R.string.section_izzy_recent_subtitle,+    ),+)+ /**  * Two-wave search: the on-disk catalogues answer instantly, then Accrescent's cached  * listings and Play's reply merge in. Mirrors the phone's `setSearchImpl`: the local
appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreSources.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreSources.kt b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreSources.ktindex e52d05dd60..2eb6330827 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreSources.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreSources.kt@@ -96,6 +96,7 @@ private data class TvSourceRow( private val SOURCES_IN_ORDER = listOf(     TvSourceRow(AppSource.MODERN_APPS, R.string.source_modern_apps, ModernAppsRepo.PROJECT_URL),     TvSourceRow(AppSource.FDROID, R.string.source_chip_fdroid, DefaultRepos.FDROID.url),+    TvSourceRow(AppSource.IZZY, R.string.source_chip_izzy, DefaultRepos.IZZY.url),     TvSourceRow(         AppSource.PROPRIETARY,         R.string.source_chip_proprietary,
appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreViewModel.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreViewModel.kt b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreViewModel.ktindex a02822eed5..e99be9ce54 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreViewModel.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/tv/TvStoreViewModel.kt@@ -341,12 +341,13 @@ class TvStoreViewModel(         val enabled = enabledSourcesFlow.value         val offlineSources = setOf(             DefaultRepos.FDROID.source, DefaultRepos.MODERN_APPS.source,-            DefaultRepos.PROPRIETARY.source,+            DefaultRepos.PROPRIETARY.source, DefaultRepos.IZZY.source,         )         if (enabled.intersect(offlineSources).isEmpty()) return         if (catalog.recentlyUpdatedBySource(AppSource.FDROID, 1).isNotEmpty() ||             catalog.recentlyUpdatedBySource(AppSource.MODERN_APPS, 1).isNotEmpty() ||-            catalog.recentlyUpdatedBySource(AppSource.PROPRIETARY, 1).isNotEmpty()+            catalog.recentlyUpdatedBySource(AppSource.PROPRIETARY, 1).isNotEmpty() ||+            catalog.recentlyUpdatedBySource(AppSource.IZZY, 1).isNotEmpty()         ) {             // The offline gate stays quiet, but Accrescent is network-backed: refresh its             // allowlist + listings on every cold start that reaches this far, same as the phone.@@ -358,6 +359,7 @@ class TvStoreViewModel(             statusMessageFlow.value = context.getString(                 when (step) {                     SyncStep.FDROID -> R.string.sync_step_fdroid+                    SyncStep.IZZY -> R.string.sync_step_izzy                     SyncStep.MODERN_APPS -> R.string.sync_step_modern_apps                     SyncStep.PROPRIETARY -> R.string.sync_step_proprietary                 },@@ -371,12 +373,14 @@ class TvStoreViewModel(                 !report.anyFailed -> context.getString(                     R.string.sync_done,                     (report.fdroidCount ?: 0) + (report.modernCount ?: 0) +-                        (report.proprietaryCount ?: 0),+                        (report.proprietaryCount ?: 0) + (report.izzyCount ?: 0),                 )                 report.fdroidCount == null && report.modernCount == null &&-                    report.proprietaryCount == null ->+                    report.proprietaryCount == null && report.izzyCount == null ->                     context.getString(R.string.sync_failed_all)                 report.fdroidCount == null -> context.getString(R.string.sync_failed_fdroid)+                report.izzyCount == null && AppSource.IZZY in enabled ->+                    context.getString(R.string.sync_failed_izzy)                 report.proprietaryCount == null ->                     context.getString(R.string.sync_failed_proprietary)                 else -> context.getString(R.string.sync_failed_modern_apps)@@ -439,22 +443,7 @@ class TvStoreViewModel(                             }                     }                 }-                if (AppSource.PROPRIETARY in enabled) {-                    catalog.recentlyUpdatedBySource(AppSource.PROPRIETARY, ROW_LIMIT)-                        .takeIf { it.isNotEmpty() }?.let {-                            add(-                                TvSection(-                                    id = "proprietary-recent",-                                    title = context.getString(R.string.section_proprietary_recent),-                                    subtitle = context.getString(-                                        R.string.section_proprietary_recent_subtitle-                                    ),-                                    source = AppSource.PROPRIETARY,-                                    apps = it,-                                )-                            )-                        }-                }+                addAll(offlineRows(enabled, ROW_LIMIT))                 if (AppSource.PLAYSTORE in enabled) {                     val clusters = play.homeClusters().filter { it.apps.isNotEmpty() }                         .take(CLUSTER_LIMIT)@@ -486,20 +475,6 @@ class TvStoreViewModel(                         }                     }                 }-                if (AppSource.FDROID in enabled) {-                    catalog.recentlyUpdatedBySource(AppSource.FDROID, ROW_LIMIT)-                        .takeIf { it.isNotEmpty() }?.let {-                            add(-                                TvSection(-                                    id = "fdroid-recent",-                                    title = context.getString(R.string.section_fdroid_recent),-                                    subtitle = context.getString(R.string.section_fdroid_recent_subtitle),-                                    source = AppSource.FDROID,-                                    apps = it,-                                )-                            )-                        }-                }                 if (AppSource.ACCRESCENT in enabled) {                     accrescentAppsFlow.value.take(ROW_LIMIT).takeIf { it.isNotEmpty() }?.let {                         add(
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 b37a1a1607..ce5d471657 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt@@ -44,7 +44,7 @@ import com.vayunmathur.library.util.sharedCrop import java.util.Locale  /**- * The app icon, from whichever of the three places actually has one.+ * The icon, from whichever of the places actually has one.  *  * A locally installed app has a real launcher icon in PackageManager, which beats  * re-downloading the listing's copy; a catalogue entry has a URL; a Play cluster row@@ -102,6 +102,7 @@ fun SourceChip(source: AppSource, modifier: Modifier = Modifier) {         when (source) {             AppSource.MODERN_APPS -> R.string.source_chip_modern_apps             AppSource.FDROID -> R.string.source_chip_fdroid+            AppSource.IZZY -> R.string.source_chip_izzy             AppSource.PLAYSTORE -> R.string.source_chip_play             AppSource.ACCRESCENT -> R.string.source_chip_accrescent             AppSource.PROPRIETARY -> R.string.source_chip_proprietary
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 4761f5fc39..d33300ff3d 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt@@ -172,6 +172,7 @@ internal fun SourceFilter.labelRes(): Int = when (this) {     SourceFilter.MODERN_APPS -> R.string.source_chip_modern_apps     SourceFilter.PROPRIETARY -> R.string.source_chip_proprietary     SourceFilter.FDROID -> R.string.source_chip_fdroid+    SourceFilter.IZZY -> R.string.source_chip_izzy     SourceFilter.PLAYSTORE -> R.string.source_chip_play     SourceFilter.ACCRESCENT -> R.string.source_chip_accrescent }
appstore/src/main/java/com/vayunmathur/appstore/ui/SourcesPage.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/ui/SourcesPage.kt b/appstore/src/main/java/com/vayunmathur/appstore/ui/SourcesPage.ktindex f979cbcf0c..1a41b56003 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/SourcesPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/SourcesPage.kt@@ -94,6 +94,12 @@ fun SourcesPage(                 enabled = AppSource.FDROID in enabledSources,                 onEnabledChange = { viewModel.setSourceEnabled(AppSource.FDROID, it) },             )+            SourceCard(+                title = stringResource(R.string.source_chip_izzy),+                subtitle = DefaultRepos.IZZY.url,+                enabled = AppSource.IZZY in enabledSources,+                onEnabledChange = { viewModel.setSourceEnabled(AppSource.IZZY, it) },+            )             SourceCard(                 title = stringResource(R.string.source_chip_proprietary),                 subtitle = DefaultRepos.PROPRIETARY.url,
appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreHomeOps.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreHomeOps.kt b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreHomeOps.ktindex 6998767975..ce381a5fae 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreHomeOps.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreHomeOps.kt@@ -27,8 +27,9 @@ internal suspend fun AppStoreViewModel.loadHome(enabled: Set<AppSource> = enable     isLoadingHomeFlow.value = true     val modernEnabled = AppSource.MODERN_APPS in enabled     val fdroidEnabled = AppSource.FDROID in enabled+    val izzyEnabled = AppSource.IZZY in enabled     val proprietaryEnabled = AppSource.PROPRIETARY in enabled-    if (modernEnabled || fdroidEnabled || proprietaryEnabled) {+    if (modernEnabled || fdroidEnabled || izzyEnabled || proprietaryEnabled) {         modernRecentFlow.value = if (modernEnabled) {             catalog.recentlyUpdatedBySource(AppSource.MODERN_APPS, RECENT_PER_SOURCE_LIMIT)         } else {@@ -39,6 +40,11 @@ internal suspend fun AppStoreViewModel.loadHome(enabled: Set<AppSource> = enable         } else {             emptyList()         }+        izzyRecentFlow.value = if (izzyEnabled) {+            catalog.recentlyUpdatedBySource(AppSource.IZZY, RECENT_PER_SOURCE_LIMIT)+        } else {+            emptyList()+        }         proprietaryRecentFlow.value = if (proprietaryEnabled) {             catalog.recentlyUpdatedBySource(AppSource.PROPRIETARY, RECENT_PER_SOURCE_LIMIT)         } else {@@ -47,10 +53,12 @@ internal suspend fun AppStoreViewModel.loadHome(enabled: Set<AppSource> = enable     } else {         modernRecentFlow.value = emptyList()         fdroidRecentFlow.value = emptyList()+        izzyRecentFlow.value = emptyList()         proprietaryRecentFlow.value = emptyList()     }     recentlyUpdatedFlow.value =-        modernRecentFlow.value + proprietaryRecentFlow.value + fdroidRecentFlow.value+        modernRecentFlow.value + proprietaryRecentFlow.value + fdroidRecentFlow.value ++            izzyRecentFlow.value      if (AppSource.PLAYSTORE !in enabled) {         isLoadingHomeFlow.value = false@@ -92,6 +100,7 @@ internal fun AppStoreViewModel.buildSections(     modernRecent: List<UnifiedApp>,     proprietaryRecent: List<UnifiedApp>,     fdroidRecent: List<UnifiedApp>,+    izzyRecent: List<UnifiedApp>,     playSections: List<AppSection>,     accrescent: List<UnifiedApp>,     categoryApps: List<UnifiedApp>,@@ -163,6 +172,16 @@ internal fun AppStoreViewModel.buildSections(             )         )     }+    if (izzyRecent.isNotEmpty()) {+        add(+            AppSection(+                id = "izzy-recent",+                title = context.getString(R.string.section_izzy_recent),+                apps = izzyRecent,+                subtitle = context.getString(R.string.section_izzy_recent_subtitle),+            )+        )+    } }  /**@@ -179,10 +198,11 @@ internal fun AppStoreViewModel.buildSections(  */ internal fun AppStoreViewModel.syncIfNeverSynced(enabled: Set<AppSource>) {     if (recentlyUpdatedFlow.value.isNotEmpty()) return-    // Nothing to fetch if all three offline sources are switched off; syncSources() would only+    // Nothing to fetch if all four offline sources are switched off; syncSources() would only     // report "all sources off" at someone who never asked for a sync.     val offlineSources = setOf(-        DefaultRepos.FDROID.source, DefaultRepos.MODERN_APPS.source, DefaultRepos.PROPRIETARY.source+        DefaultRepos.FDROID.source, DefaultRepos.MODERN_APPS.source, DefaultRepos.PROPRIETARY.source,+        DefaultRepos.IZZY.source,     )     if (enabled.intersect(offlineSources).isEmpty()) return     syncSources()@@ -212,6 +232,8 @@ fun AppStoreViewModel.openBrowse(section: AppSection) {                 catalog.allBySource(AppSource.PROPRIETARY)             section.id == "fdroid-recent" ->                 catalog.allBySource(AppSource.FDROID)+            section.id == "izzy-recent" ->+                catalog.allBySource(AppSource.IZZY)             section.id == "accrescent" ->                 accrescent.allListings()             else ->@@ -236,6 +258,7 @@ fun AppStoreViewModel.syncSources() {             statusMessageFlow.value = context.getString(                 when (step) {                     SyncStep.FDROID -> R.string.sync_step_fdroid+                    SyncStep.IZZY -> R.string.sync_step_izzy                     SyncStep.MODERN_APPS -> R.string.sync_step_modern_apps                     SyncStep.PROPRIETARY -> R.string.sync_step_proprietary                 }@@ -250,12 +273,14 @@ fun AppStoreViewModel.syncSources() {                 !report.anyFailed -> context.getString(                     R.string.sync_done,                     (report.fdroidCount ?: 0) + (report.modernCount ?: 0) +-                        (report.proprietaryCount ?: 0),+                        (report.proprietaryCount ?: 0) + (report.izzyCount ?: 0),                 )                 report.fdroidCount == null && report.modernCount == null &&-                    report.proprietaryCount == null ->+                    report.proprietaryCount == null && report.izzyCount == null ->                     context.getString(R.string.sync_failed_all)                 report.fdroidCount == null -> context.getString(R.string.sync_failed_fdroid)+                report.izzyCount == null && AppSource.IZZY in enabled ->+                    context.getString(R.string.sync_failed_izzy)                 report.proprietaryCount == null ->                     context.getString(R.string.sync_failed_proprietary)                 else -> context.getString(R.string.sync_failed_modern_apps)
appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreUiContract.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreUiContract.kt b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreUiContract.ktindex 8c29e0f441..9d6772486c 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreUiContract.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreUiContract.kt@@ -45,6 +45,7 @@ enum class SourceFilter(val source: AppSource?) {     MODERN_APPS(AppSource.MODERN_APPS),     PROPRIETARY(AppSource.PROPRIETARY),     FDROID(AppSource.FDROID),+    IZZY(AppSource.IZZY),     PLAYSTORE(AppSource.PLAYSTORE),     ACCRESCENT(AppSource.ACCRESCENT), }
appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.kt b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.ktindex 068307f02f..528528e52e 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.kt@@ -95,6 +95,7 @@ class AppStoreViewModel(     internal val modernRecentFlow = MutableStateFlow<List<UnifiedApp>>(emptyList())     internal val proprietaryRecentFlow = MutableStateFlow<List<UnifiedApp>>(emptyList())     internal val fdroidRecentFlow = MutableStateFlow<List<UnifiedApp>>(emptyList())+    internal val izzyRecentFlow = MutableStateFlow<List<UnifiedApp>>(emptyList())      /** Accrescent listings for the home carousel, from the gRPC listing API. */     internal val accrescentAppsFlow = MutableStateFlow<List<UnifiedApp>>(emptyList())@@ -208,8 +209,9 @@ class AppStoreViewModel(             modernRecentFlow,             proprietaryRecentFlow,             fdroidRecentFlow,-        ) { modernRecent, proprietaryRecent, fdroidRecent ->-            Triple(modernRecent, proprietaryRecent, fdroidRecent)+            izzyRecentFlow,+        ) { modernRecent, proprietaryRecent, fdroidRecent, izzyRecent ->+            RecentRows(modernRecent, proprietaryRecent, fdroidRecent, izzyRecent)         },         playSectionsFlow,         combine(@@ -217,10 +219,10 @@ class AppStoreViewModel(             selectedCategoryFlow,             accrescentAppsFlow,         ) { apps, category, accrescent -> Triple(apps, category, accrescent) },-    ) { modern, (modernRecent, proprietaryRecent, fdroidRecent), playSections,+    ) { modern, recent, playSections,         (categoryApps, category, accrescentApps) ->         buildSections(-            modern, modernRecent, proprietaryRecent, fdroidRecent,+            modern, recent.modern, recent.proprietary, recent.fdroid, recent.izzy,             playSections, accrescentApps, categoryApps, category,         )     }.stateIn(viewModelScope, SharingStarted.Eagerly, emptyList())@@ -628,6 +630,14 @@ class AppStoreViewModel(         val stages: Map<String, InstallStage> = emptyMap(),     ) +    /** Newest builds per offline repo, one home row each. */+    private data class RecentRows(+        val modern: List<UnifiedApp> = emptyList(),+        val proprietary: List<UnifiedApp> = emptyList(),+        val fdroid: List<UnifiedApp> = emptyList(),+        val izzy: List<UnifiedApp> = emptyList(),+    )+     private data class LibraryInputs(         val index: Map<String, com.vayunmathur.appstore.data.PackageIndexRow> = emptyMap(),         val playPackages: Set<String> = emptySet(),@@ -646,7 +656,7 @@ class AppStoreViewModel(     internal companion object {         internal const val SEARCH_DEBOUNCE_MS = 350L         internal const val INSTALL_SETTLE_MS = 1_500L-        /** Per-repo cap for the three home rows; the three lists stay additive. */+        /** Per-repo cap for the home rows; the lists stay additive. */         internal const val RECENT_PER_SOURCE_LIMIT = 20         internal const val CAROUSEL_LIMIT = 20         internal const val PLAY_CLUSTER_LIMIT = 4
appstore/src/main/res/values/strings.xml
diff --git a/appstore/src/main/res/values/strings.xml b/appstore/src/main/res/values/strings.xmlindex a92bf3145a..54923730f6 100644--- a/appstore/src/main/res/values/strings.xml+++ b/appstore/src/main/res/values/strings.xml@@ -24,6 +24,7 @@     <!-- Source chips. Factual labels; the sources are not ranked. -->     <string name="source_chip_modern_apps" translatable="false">Modern Apps</string>     <string name="source_chip_fdroid">F-Droid</string>+    <string name="source_chip_izzy">IzzyOnDroid</string>     <string name="source_chip_play">Play Store</string>     <string name="source_chip_accrescent">Accrescent</string>     <string name="source_chip_proprietary">Proprietary</string>@@ -44,6 +45,8 @@     <string name="section_proprietary_recent_subtitle">The newest builds from the Play mirror</string>     <string name="section_fdroid_recent">New on F-Droid</string>     <string name="section_fdroid_recent_subtitle">The newest builds on F-Droid</string>+    <string name="section_izzy_recent">New on IzzyOnDroid</string>+    <string name="section_izzy_recent_subtitle">The newest reproduced builds on IzzyOnDroid</string>     <string name="section_category_subtitle">Apps from the offline catalogue in this category</string>     <string name="section_accrescent">On Accrescent</string>     <string name="section_accrescent_subtitle">Developer-signed apps from Accrescent\'s signed app list</string>@@ -53,11 +56,13 @@     <string name="updates_banner_subtitle">Tap to review and install</string>     <string name="sync_in_progress">Syncing…</string>     <string name="sync_step_fdroid">Checking F-Droid builds…</string>+    <string name="sync_step_izzy">Checking IzzyOnDroid builds…</string>     <string name="sync_step_modern_apps">Checking Modern Apps…</string>     <string name="sync_step_proprietary">Checking proprietary mirror…</string>     <string name="sync_done">Catalogue updated — %1$d apps</string>     <string name="sync_failed_all">No source would sync. Your existing catalogue is unchanged.</string>     <string name="sync_failed_fdroid">F-Droid didn\'t sync. Its existing apps are unchanged.</string>+    <string name="sync_failed_izzy">IzzyOnDroid didn\'t sync. Its existing apps are unchanged.</string>     <string name="sync_failed_modern_apps">Modern Apps didn\'t sync. Its existing apps are unchanged.</string>     <string name="sync_failed_proprietary">The proprietary mirror didn\'t sync. Its existing apps are unchanged.</string>     <!-- Message after tapping Sync sources with every source switched off. -->@@ -181,11 +186,11 @@     <string name="store_rule_updates_stay_title">Updates stay with this store</string>     <string name="store_rule_updates_stay_detail">Nothing else on your phone can quietly replace an app you installed here.</string>     <string name="store_rule_fixed_sources_title">Sources are fixed</string>-    <string name="store_rule_fixed_sources_detail">The three sources below are built in and you cannot add more. Nothing above could be promised for a repo you added yourself.</string>+    <string name="store_rule_fixed_sources_detail">The sources below are built in and you cannot add more. Nothing above could be promised for a repo you added yourself.</string>      <!-- How each source is checked. Deliberately not a ranking. -->     <string name="trust_page_title">How apps are checked</string>-    <string name="trust_intro">The three sources here protect you in different ways, and none of them is simply the safest. Each card says what the source does itself, what this app checks on the download, and where that source is weaker than the others.</string>+    <string name="trust_intro">The sources here protect you in different ways, and none of them is simply the safest. Each card says what the source does itself, what this app checks on the download, and where that source is weaker than the others.</string>     <string name="trust_every_app">True of every app here</string>     <string name="trust_every_app_detail">These hold wherever the app came from. Each source adds its own on top.</string>     <string name="trust_heading_source_does">What the source does</string>@@ -217,6 +222,15 @@     <string name="trust_fdroid_check_rebuilt">Versions F-Droid\'s second build server reproduced bit-for-bit are badged as reproducible</string>     <string name="trust_fdroid_check_hash_and_key">The hash and the signing key both come from the signed list</string>     <string name="trust_fdroid_limits">F-Droid holds the signing key, not the developer, so its build servers can sign anything. Nobody checks what an app does, only that it matches its source. Updates wait to be rebuilt, which can take days or weeks, security fixes included.</string>+    <string name="trust_izzy_summary">Developer-built apps, listed only when an independent builder reproduced the exact version bit-for-bit from published source.</string>+    <string name="trust_izzy_practice_binaries">Apps are the developers\' own signed builds, taken from their release pages</string>+    <string name="trust_izzy_practice_reproduced">Independent verification builders rebuild each covered version from its published source tag and compare the result byte for byte</string>+    <string name="trust_izzy_practice_screened">Listings are screened and badged with the result, visible in this store as a reproducible badge</string>+    <string name="trust_izzy_check_index_signed">IzzyOnDroid\'s app list is signed, and checked against a key built into this store</string>+    <string name="trust_izzy_check_chained">Every entry in that list is chained back to the signature</string>+    <string name="trust_izzy_check_reproduced">Only versions an independent builder reproduced bit-for-bit are listed at all</string>+    <string name="trust_izzy_check_hash_and_key">The hash and the signing key both come from the signed list</string>+    <string name="trust_izzy_limits">The signing key belongs to the developer, so a reproduced build still trusts that developer\'s release pipeline — the rebuild only proves the binary matches the published source. Versions no builder has covered are not offered here. Nobody scans what an app does.</string>     <string name="trust_play_title">Google Play</string>     <string name="trust_play_summary">Reviewed, scanned and signed by Google, who verify who the developer is and can pull an app from every phone at once.</string>     <string name="trust_play_practice_identity">Developers have to prove who they are, with a real name and address on file</string>@@ -250,6 +264,7 @@     <string name="source_modern_apps" translatable="false">Modern Apps</string>     <string name="source_modern_apps_pin">Pinned to this app\'s own signing key</string>     <string name="source_fdroid_pin">Pinned to F-Droid\'s app list signing key</string>+    <string name="source_izzy_pin">Pinned to IzzyOnDroid\'s app list signing key</string>     <string name="source_play">Play Store (anonymous)</string>     <string name="source_play_pin">Nothing to pin: Google holds the signing key</string>     <string name="source_accrescent_pin">Pinned to Accrescent\'s repodata signing key (ed25519)</string>
appstore/src/test/java/com/vayunmathur/appstore/data/IzzyReproducibleGateTest.kt
diff --git a/appstore/src/test/java/com/vayunmathur/appstore/data/IzzyReproducibleGateTest.kt b/appstore/src/test/java/com/vayunmathur/appstore/data/IzzyReproducibleGateTest.ktnew file mode 100644index 0000000000..d22320036a--- /dev/null+++ b/appstore/src/test/java/com/vayunmathur/appstore/data/IzzyReproducibleGateTest.kt@@ -0,0 +1,56 @@+package com.vayunmathur.appstore.data++import kotlin.test.Test+import kotlin.test.assertEquals+import kotlin.test.assertFalse+import kotlin.test.assertTrue++/**+ * IzzyOnDroid lists only versions an independent verification builder reproduced+ * bit-for-bit (issue #492). The verdicts come from rbtlog's per-builder `index.json`+ * files — opaque content-hash keys mapping to build records — so the unit under test+ * is the admission rule, not the network fetch.+ */+class IzzyReproducibleGateTest {++    private fun verified(vararg keys: String) =+        IzzyReproducibleBuilds.Verified(keys.toSet())++    @Test+    fun `admits a version a builder reproduced`() {+        val feed = verified("com.example.app:42")++        assertTrue(IzzyReproducibleBuilds.admits(feed, "com.example.app", 42))+    }++    @Test+    fun `rejects a version no builder reproduced`() {+        val feed = verified("com.example.app:42")++        assertFalse(IzzyReproducibleBuilds.admits(feed, "com.example.app", 43))+        assertFalse(IzzyReproducibleBuilds.admits(feed, "com.example.other", 42))+    }++    @Test+    fun `rejects everything when the feed failed to load`() {+        // Fail-closed: a missing feed imports nothing, never everything unfiltered.+        assertFalse(IzzyReproducibleBuilds.admits(null, "com.example.app", 42))+        assertEquals(0, IzzyReproducibleBuilds.Verified(emptySet()).size)+    }++    @Test+    fun `a version code match is exact, not a prefix`() {+        val feed = verified("com.example.app:4")++        assertFalse(IzzyReproducibleBuilds.admits(feed, "com.example.app", 42))+    }++    @Test+    fun `verdicts from either builder admit`() {+        // Izzy's own builder and the independent one merge into one set.+        val feed = verified("com.example.a:1", "com.example.b:2")++        assertTrue(IzzyReproducibleBuilds.admits(feed, "com.example.a", 1))+        assertTrue(IzzyReproducibleBuilds.admits(feed, "com.example.b", 2))+    }+}