appstore: fix verification
- Commit
a25ca628f17cde54bd4905867de5719fcb1e750f- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-23 00:08 UTC (3 months ago)
- Parents
41af8b3
Diff
appstore/src/main/java/com/vayunmathur/appstore/MainActivity.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/MainActivity.kt b/appstore/src/main/java/com/vayunmathur/appstore/MainActivity.ktindex 9f0cae0d5a..a515275630 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/MainActivity.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/MainActivity.kt@@ -197,12 +197,20 @@ private fun AppTabs( HomePage( viewModel = viewModel, onAppClick = onAppClick,- onOpenUpdates = { scope.launch { pagerState.animateScrollToPage(2) } },+ onOpenUpdates = { scope.launch { pagerState.animateScrollToPage(PAGE_UPDATES) } }, onOpenSources = onOpenSources, ) }, PagerTab(stringResource(R.string.nav_search), { IconSearch() }) {- SearchPage(viewModel = viewModel, onAppClick = onAppClick)+ // settledPage, not currentPage: currentPage flips to the nearest page part-way+ // through a swipe or an animated jump, and search grabbing focus at that moment+ // pulls the pager onto itself — so going home -> updates would land on search+ // with the keyboard up.+ SearchPage(+ viewModel = viewModel,+ onAppClick = onAppClick,+ isActive = pagerState.settledPage == PAGE_SEARCH,+ ) }, PagerTab(stringResource(R.string.nav_updates), { IconDownload() }) { UpdatesPage(viewModel = viewModel, onAppClick = onAppClick)@@ -213,3 +221,6 @@ private fun AppTabs( ) TabbedPagerScaffold(tabs = tabs, pagerState = pagerState, tabStyle = TabStyle.BottomNav) }++private const val PAGE_SEARCH = 1+private const val PAGE_UPDATES = 2
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 5e633f2416..aee0c7fe69 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/AppModels.kt@@ -22,9 +22,34 @@ enum class AppSource { * verify-then-commit path with those values, plus the new min-version gate. See * [com.vayunmathur.appstore.data.accrescent.AccrescentRepository]. */- ACCRESCENT+ ACCRESCENT;++ companion object {+ /**+ * Precedence when more than one source offers the same package, most preferred first.+ *+ * GrapheneOS outranks Play deliberately: Play lists the Sandboxed Google Play+ * components too, but only the build GrapheneOS re-hosts is the one the OS's gmscompat+ * layer expects, so a Play-delivered Vending or GMS is the wrong artifact for the+ * device even though it would install. Below that the order is a provenance+ * preference rather than a security ranking (see+ * [com.vayunmathur.appstore.data.security.TrustProfile]): catalogue rows carry a+ * publisher key and a hash a download can be checked against, and Modern Apps rows are+ * signed with this store's own key.+ */+ val PRIORITY: List<AppSource> =+ listOf(GRAPHENEOS, MODERN_APPS, FDROID, ACCRESCENT, PLAYSTORE)+ } } +/**+ * Rank of this source in [AppSource.PRIORITY]; lower wins. A source missing from the list+ * sorts last rather than first, so forgetting to place a new one cannot silently promote it+ * above every other source.+ */+val AppSource.priority: Int+ get() = AppSource.PRIORITY.indexOf(this).takeIf { it >= 0 } ?: AppSource.PRIORITY.size+ data class UnifiedApp( val packageName: String, val source: AppSource,
appstore/src/main/java/com/vayunmathur/appstore/data/UpdateCheckWorker.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/UpdateCheckWorker.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/UpdateCheckWorker.ktindex cdeb2d387e..fc63581bdd 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/UpdateCheckWorker.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/UpdateCheckWorker.kt@@ -72,9 +72,16 @@ class UpdateCheckWorker( val installed = installedRepo.apps.value val fromCatalog = catalog.updatesFor(installed) - // Only Play can answer for packages the offline catalogues have never heard of.+ // Only Play can answer for packages the offline catalogues have never heard of — except+ // the Sandboxed Google Play components, which Play also hosts but must never update+ // here: only the builds GrapheneOS re-hosts are the ones this device can use. val index = catalog.packageIndex.value- val unknown = installed.filter { it.packageName !in index }.map { it.packageName }+ val unknown = installed+ .filter {+ it.packageName !in index &&+ it.packageName !in SandboxedGooglePlay.PACKAGES+ }+ .map { it.packageName } val remote = play.details(unknown).associateBy { it.packageName } val fromPlay = installed.mapNotNull { inst -> remote[inst.packageName]?.takeIf { it.versionCode > inst.versionCode }@@ -99,7 +106,11 @@ class UpdateCheckWorker( details.copy(versionCode = update.versionCode, versionName = update.versionName) } - val updates = (fromCatalog + fromPlay + fromAccrescent).distinctBy { it.packageName }+ // The surviving row's source decides which download-and-verify path the update takes,+ // so it has to be the same precedence the rest of the store uses.+ val updates = (fromCatalog + fromPlay + fromAccrescent)+ .sortedBy { it.source.priority }+ .distinctBy { it.packageName } val settings = SettingsRepository(context, scope) val autoInstall = settings.readAutoInstallUpdates()@@ -112,9 +123,17 @@ class UpdateCheckWorker( } // Only nag about the updates we could not apply on our own. val remaining = updates.filterNot { canSilentlyUpdate(it.packageName) }- notifyIfChanged(remaining.map { it.packageName }.toSortedSet(), remaining.size)+ notifyIfChanged(+ remaining.map { it.packageName }.toSortedSet(),+ remaining.size,+ needsConfirmation = true,+ ) } else {- notifyIfChanged(updates.map { it.packageName }.toSortedSet(), updates.size)+ notifyIfChanged(+ updates.map { it.packageName }.toSortedSet(),+ updates.size,+ needsConfirmation = false,+ ) } accrescent.shutdown()@@ -130,10 +149,14 @@ class UpdateCheckWorker( * * Without this, a daily check on a phone with one perpetually-stale app would post the * same notification every day until the user turned notifications off.+ *+ * [needsConfirmation] distinguishes updates left over from an auto-install run, which the OS+ * will not let us apply unattended, from an ordinary "updates are waiting" nudge. It is part+ * of the de-dupe signature so toggling the setting re-posts with the matching wording. */- private fun notifyIfChanged(packages: Set<String>, count: Int) {+ private fun notifyIfChanged(packages: Set<String>, count: Int, needsConfirmation: Boolean) { val prefs = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE)- val signature = packages.joinToString(",")+ val signature = packages.joinToString(",") + "|$needsConfirmation" if (prefs.getString(KEY_LAST_NOTIFIED, "") == signature) return prefs.edit { putString(KEY_LAST_NOTIFIED, signature) } @@ -149,6 +172,10 @@ class UpdateCheckWorker( } createChannel()+ val body = context.getString(+ if (needsConfirmation) R.string.updates_confirm_notification_body+ else R.string.updates_notification_body+ ) val open = PendingIntent.getActivity( context, 0,@@ -159,9 +186,15 @@ class UpdateCheckWorker( val notification = NotificationCompat.Builder(context, CHANNEL_ID) .setSmallIcon(android.R.drawable.stat_sys_download_done) .setContentTitle(- context.resources.getQuantityString(R.plurals.updates_count, count, count)+ context.resources.getQuantityString(+ if (needsConfirmation) R.plurals.updates_confirm_count+ else R.plurals.updates_count,+ count,+ count,+ ) )- .setContentText(context.getString(R.string.updates_notification_body))+ .setContentText(body)+ .setStyle(NotificationCompat.BigTextStyle().bigText(body)) .setContentIntent(open) .setAutoCancel(true) .setPriority(NotificationCompat.PRIORITY_LOW)
appstore/src/main/java/com/vayunmathur/appstore/data/security/ApkCertificates.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/security/ApkCertificates.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/security/ApkCertificates.ktindex 93c32f8efe..a03586fe7e 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/security/ApkCertificates.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/security/ApkCertificates.kt@@ -27,6 +27,22 @@ object ApkCertificates { fun apkSigners(context: Context, apk: File): Set<String> = fingerprints(signaturesOf(archiveInfo(context, apk), contentsOnly = true)) + /**+ * Fingerprints an APK may sign *for*: the certificates that signed its bytes plus any+ * rotated ancestors it carries proof of lineage to.+ *+ * A source publishes an app's *identity* certificate, which under v3 key rotation stays+ * the original while the bytes carry the current one. An expected signer must therefore be+ * matched against this set, not [apkSigners] — otherwise a legitimately rotated build+ * looks like a substituted one. This is the same lineage Android itself accepts when it+ * applies the update.+ *+ * Takes an already-parsed [archiveInfo] rather than the file, since parsing re-verifies the+ * whole archive and the install path has done that already.+ */+ fun signerLineage(info: PackageInfo?): Set<String> =+ fingerprints(signaturesOf(info, contentsOnly = false))+ /** * Fingerprints currently trusted for an installed [packageName]. Includes rotated * ancestors (`signingCertificateHistory`) so an app that has legitimately rotated its
appstore/src/main/java/com/vayunmathur/appstore/data/security/InstallVerifier.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/security/InstallVerifier.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/security/InstallVerifier.ktindex 8e5be73406..2a395c2e06 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/security/InstallVerifier.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/security/InstallVerifier.kt@@ -12,8 +12,9 @@ import java.io.File data class InstallRequirement( val expectedPackage: String, /**- * Certificate fingerprints the APK must be signed by. Non-empty means authoritative:- * a mismatch is a hard failure. Empty means the source could not tell us.+ * Certificate fingerprints the APK must be signed by, or prove rotation lineage to.+ * Non-empty means authoritative: a mismatch is a hard failure. Empty means the source+ * could not tell us. */ val requiredSigners: Set<String> = emptySet(), /**@@ -76,7 +77,7 @@ sealed class VerificationResult { * turns a cryptic `INSTALL_FAILED_UPDATE_INCOMPATIBLE` into a stated key mismatch, and * catches it before the bytes reach the system installer; * - a published SHA-256 must match;- * - a published signer set must intersect the APK's actual signers;+ * - a published signer set must intersect the APK's signing lineage; * - with none of the above available, the result is [VerificationResult.Unverified] and * the caller may proceed with a visible warning. */@@ -137,6 +138,10 @@ object InstallVerifier { } val actualSigners = signerSets.first() + // The stamp check and the required-signer check below both read the base APK, since a+ // config split carries neither a stamp nor a rotation lineage of its own.+ val base = baseApk(parsed, requirement.expectedPackage) ?: parsed.first()+ val checks = mutableListOf<String>() // Rollback guard (Accrescent): the base APK's version code must be at least the@@ -190,7 +195,13 @@ object InstallVerifier { if (requirement.requiredSigners.isNotEmpty()) { val required = requirement.requiredSigners.map { it.lowercase() }.toSet()- if (actualSigners.none { it in required }) {+ // Match the app's identity, not just the bytes: a source publishes the original+ // certificate, so an app that has rotated its signing key presents a current+ // certificate the source never listed. Accepting the proven rotation lineage keeps+ // a substituted APK out while letting a rotated one through, which is the same+ // call Android makes when it applies the update.+ val lineage = actualSigners + ApkCertificates.signerLineage(base.second)+ if (lineage.none { it in required }) { val origin = requirement.signerOrigin.ifBlank { "the source" } return VerificationResult.Rejected("it is not signed by the key $origin expects") }@@ -201,8 +212,7 @@ object InstallVerifier { // Checked on the base APK — splits do not carry their own stamp. var stampToPin: String? = null if (requirement.requireStamp || requirement.pinnedStamp != null) {- val base = baseApk(parsed, requirement.expectedPackage) ?: files.first()- val stamp = SourceStamp.of(base)+ val stamp = SourceStamp.of(base.first) if (stamp == null) { if (requirement.requireStamp) { return VerificationResult.Rejected("it carries no publisher stamp to check")@@ -233,11 +243,11 @@ object InstallVerifier { return VerificationResult.Verified(checks.joinToString("; "), stampToPin) } - /** The file whose manifest declares [packageName] without a split name. */+ /** The file, and its parsed manifest, declaring [packageName] without a split name. */ private fun baseApk( parsed: List<Pair<File, android.content.pm.PackageInfo?>>, packageName: String,- ): File? = parsed.firstOrNull { (_, info) ->+ ): Pair<File, android.content.pm.PackageInfo?>? = parsed.firstOrNull { (_, info) -> info?.packageName == packageName && info.splitNames.isNullOrEmpty()- }?.first+ } }
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 da03cfc319..db04181872 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/AppComponents.kt@@ -212,6 +212,7 @@ fun AppTile( app: UnifiedApp, modifier: Modifier = Modifier, isInstalled: Boolean = false,+ stage: InstallStage? = null, installedIcon: Drawable? = null, onClick: () -> Unit = {}, ) {@@ -234,14 +235,16 @@ fun AppTile( // Two lines' worth whatever the name's length, so tiles stay aligned. modifier = Modifier.heightIn(min = 32.dp), )- if (isInstalled) {- Text(+ // An in-flight install replaces the rating line rather than adding a third one, so a+ // tile mid-install stays roughly the height of its neighbours.+ when {+ stage != null -> StageProgress(stage)+ isInstalled -> Text( stringResource(R.string.installed), style = MaterialTheme.typography.labelSmall, color = MaterialTheme.colorScheme.primary, )- } else {- RatingLabel(app)+ else -> RatingLabel(app) } } }@@ -269,6 +272,7 @@ fun AppCarousel( installedIcons: Map<String, Drawable>, onAppClick: (UnifiedApp) -> Unit, modifier: Modifier = Modifier,+ stages: Map<String, InstallStage> = emptyMap(), ) { LazyRow( modifier = modifier.fillMaxWidth(),@@ -279,6 +283,7 @@ fun AppCarousel( AppTile( app = app, isInstalled = app.packageName in installedPackages,+ stage = stages[app.packageName], installedIcon = installedIcons[app.packageName], onClick = { onAppClick(app) }, )
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 1babfe5b95..97697ea259 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/HomePage.kt@@ -153,6 +153,7 @@ fun HomeScreen( installedPackages = state.installedPackages, installedIcons = state.installedIcons, onAppClick = onAppClick,+ stages = state.stages, ) } SectionLayout.LIST -> items(
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 1791bacc90..139fb45983 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/ui/SearchPage.kt@@ -36,15 +36,21 @@ import com.vayunmathur.library.ui.Text /** Binds [AppStoreViewModel] to the stateless [SearchScreen]. */ @Composable-fun SearchPage(viewModel: AppStoreViewModel, onAppClick: (UnifiedApp) -> Unit) {+fun SearchPage(+ viewModel: AppStoreViewModel,+ onAppClick: (UnifiedApp) -> Unit,+ isActive: Boolean = true,+) { val state by viewModel.search.collectAsState() // Opening the search tab is a request to type. Only on a fresh one, though — coming- // back from an app's page should not throw the keyboard over the results.+ // back from an app's page should not throw the keyboard over the results. And only when+ // this page is the one the user is actually on: a pager composes its neighbours, so+ // focusing while merely adjacent would drag the pager onto search mid-swipe. SearchScreen( state = state, actions = viewModel, onAppClick = onAppClick,- autoFocus = state.query.isBlank(),+ autoFocus = isActive && state.query.isBlank(), ) }
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 fa90c936a1..dad637d46c 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/util/AppStoreViewModel.kt@@ -24,6 +24,7 @@ import com.vayunmathur.appstore.data.installer.InstallCoordinator import com.vayunmathur.appstore.data.installer.InstallStage import com.vayunmathur.appstore.data.play.PlayAuthState import com.vayunmathur.appstore.data.play.PlayRepository+import com.vayunmathur.appstore.data.priority import com.vayunmathur.appstore.data.security.ApkCertificates import com.vayunmathur.appstore.data.security.VerificationResult import com.vayunmathur.library.util.AppMessages@@ -147,6 +148,9 @@ class AppStoreViewModel( ) { catalogUpdates, playUpdates, accrescentUpdates, installed -> val installedVersions = installed.associate { it.packageName to it.versionCode } (catalogUpdates + playUpdates + accrescentUpdates)+ // The surviving row's source decides which download-and-verify path the update+ // takes, so it has to be the same precedence search and the library use.+ .sortedBy { it.source.priority } .distinctBy { it.packageName } // Re-check against what is on the device rather than trusting the lists. // _playUpdates is a snapshot from the last network check, so without this a@@ -470,7 +474,6 @@ class AppStoreViewModel( id = SandboxedGooglePlay.SECTION_ID, title = context.getString(R.string.section_sandboxed_google_play), apps = sandboxed,- layout = SectionLayout.LIST, subtitle = context.getString(R.string.section_sandboxed_google_play_subtitle), ) )@@ -578,16 +581,19 @@ class AppStoreViewModel( } /**- * Combine catalogue and Play hits, one row per package.+ * Combine catalogue, Play and Accrescent hits, one row per package. *- * Where both offer a package the catalogue entry wins. That is a provenance- * preference, not a security ranking (see- * [com.vayunmathur.appstore.data.security.TrustProfile]): the F-Droid and Modern Apps- * rows carry a publisher key and a hash this app can check the download against,- * which is simply more to show on the detail page than a Play listing has.+ * Where several sources offer a package, [AppSource.PRIORITY] decides which row survives —+ * notably keeping the GrapheneOS row for the Sandboxed Google Play components rather than+ * Play's listing of the same three packages. Sorting is stable, so each source's own+ * relevance ordering is preserved within its rank, and [rank] re-sorts the result anyway. */ private fun merge(vararg lists: List<UnifiedApp>): List<UnifiedApp> =- lists.asSequence().flatten().distinctBy { it.packageName }.toList()+ lists.asSequence()+ .flatten()+ .sortedBy { it.source.priority }+ .distinctBy { it.packageName }+ .toList() /** Exact hits first, then name prefixes, then everything else alphabetically. */ private fun rank(apps: List<UnifiedApp>, query: String): List<UnifiedApp> {@@ -611,6 +617,16 @@ class AppStoreViewModel( detailJob?.cancel() _selectedApp.value = app detailJob = viewModelScope.launch {+ // Play lists the Sandboxed Google Play components too, so a search hit for one can+ // arrive carrying AppSource.PLAYSTORE. Describe it from GrapheneOS regardless: that+ // is the row an install would actually use, and the Play build is the wrong+ // artifact for the device even though Play would happily deliver it. Prefer the+ // cached row — the stand-in carries no version, size, signer or hash, and on a cold+ // start nothing has enriched it yet.+ sandboxedGooglePlayRow(app.packageName)?.let { sandboxed ->+ _selectedApp.value = catalog.byPackage(app.packageName) ?: sandboxed+ return@launch+ } // The catalogue row wins whenever there is one, even if the user tapped a Play // tile for the same package. It is the row an install would actually use — it // carries the signer and hash an authenticated index published — so showing@@ -645,6 +661,10 @@ class AppStoreViewModel( /** Open a package the store only knows by name, e.g. from a `market://` link. */ fun selectPackage(packageName: String) { viewModelScope.launch {+ sandboxedGooglePlayRow(packageName)?.let {+ selectApp(it)+ return@launch+ } val known = catalog.byPackage(packageName) if (known != null) { selectApp(known)@@ -667,6 +687,15 @@ class AppStoreViewModel( _selectedApp.value = null } + /**+ * The GrapheneOS row for a Sandboxed Google Play component, or null for any other package.+ *+ * Carries whatever [loadHome] enriched the stand-in with, so this is the best row the store+ * holds for GSF, GMS or Vending.+ */+ private fun sandboxedGooglePlayRow(packageName: String): UnifiedApp? =+ _sandboxedGooglePlay.value.firstOrNull { it.packageName == packageName }+ // --- Actions ---------------------------------------------------------------------- override fun install(app: UnifiedApp) {@@ -764,10 +793,16 @@ class AppStoreViewModel( // Only ask Play about packages neither offline source lists — for the rest the // catalogue already answered, and Play would just re-answer it over the network.+ // The Sandboxed Google Play components are held back too: Play hosts newer builds+ // of all three, but only GrapheneOS's are the ones this device can use, so no+ // update is better than the wrong one until its release metadata is synced. val index = catalog.packageIndex.value val installed = installedRepo.apps.value val playCandidates = installed- .filter { it.packageName !in index }+ .filter {+ it.packageName !in index &&+ it.packageName !in SandboxedGooglePlay.PACKAGES+ } .map { it.packageName } val remote = play.details(playCandidates).associateBy { it.packageName }
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 2ed599c543..54221e273c 100644--- a/appstore/src/main/res/values/strings.xml+++ b/appstore/src/main/res/values/strings.xml@@ -71,6 +71,7 @@ <string name="updates_checking">Checking for updates…</string> <string name="updates_last_checked">Last checked %1$s</string> <string name="updates_notification_body">Open the App Store to review and install them.</string>+ <string name="updates_confirm_notification_body">Android only lets the App Store update apps it installed itself, so these need a tap from you. Open the App Store to install them.</string> <string name="updates_channel_name">App updates</string> <string name="updates_channel_description">Tells you when apps you installed here have a newer version.</string> <string name="setting_auto_install_updates_title">Automatically install updates</string>@@ -79,6 +80,10 @@ <item quantity="one">%1$d update available</item> <item quantity="other">%1$d updates available</item> </plurals>+ <plurals name="updates_confirm_count">+ <item quantity="one">%1$d update needs your confirmation</item>+ <item quantity="other">%1$d updates need your confirmation</item>+ </plurals> <plurals name="updates_installing"> <item quantity="one">Installing %1$d update…</item> <item quantity="other">Installing %1$d updates…</item>