feat(volkskrant): disable the forced update dialog #21

Closed
opened 2026-10-10 12:22:24 +02:00 by midas · 0 comments
Owner

Part of #16.

Feature description

A patched de Volkskrant is signed with Morphe's key, so Play can't update it. When DPG raises the minimum supported version, the app shows a dialog that can't be dismissed and only links to the Play Store. That blocks the patched app until a new tested version is patched.

Add a patch (e.g. Disable forced update) that never shows this dialog.

Findings (7.52.0, unobfuscated)

Backend

  • Retrofit SupportedVersionsApi calls @GET("/supported-versions/v1/android"). The response DTO is {required: {version, message?}}.
  • ForceUpdateRemoteDataSource.getMinVersion fetches it.
  • ForceUpdateLocalDataSource caches the value in UserPreferencesDataSource under key "force_update_required_version". Offline, the cached value is used.

Decision

  • nl.persgroep.edition.force.update.data.ForceUpdateRepositoryImpl.isForceUpdateRequired(Ljava/lang/String;)Z returns SemanticVersion(required) > SemanticVersion(appVersion).
  • It returns false when either version is missing. Log strings: "Could not determine force update as app version is null" / "...required version is null".
  • Both the cached and the fresh path go through it.

Chain

  1. RequireForceUpdateUseCase.invoke
  2. ForceUpdateViewModel.checkForUpdate(). It runs in the constructor, and again on resume after 8 hours via RefreshOnResumeFromBackgroundEffect.
  3. MutableStateFlow<Boolean> forceUpdateRequiredState
  4. ForceUpdateDialogKt.ForceUpdateDialog(...), shown from MainActivity. It is a Material AlertDialog with an empty onDismissRequest; its only button opens the store.

Separate from Play

The Play in-app update API is not involved here (see #23).

Approach

  • Make isForceUpdateRequired return false: const/4 p1, 0x0 + return p1. p1 is the String parameter, so it is free to overwrite.
  • Fingerprint: the class name, signature (String)Z, and the log strings above.

Risk

The patch hides the dialog; it doesn't make an old app compatible. If DPG shuts down an old API version, parts of the app can still break. Document this in the patch description or the docs.

Done when

  • Build passes; Applied: <patch> on 7.52.0.
  • Verified with a forced condition: temporarily write a high force_update_required_version to the app's prefs on a test install, after asking.
  • docs/apps/volkskrant.md has a "Forced update" section.
Part of #16. ## Feature description A patched de Volkskrant is signed with Morphe's key, so Play can't update it. When DPG raises the minimum supported version, the app shows a dialog that can't be dismissed and only links to the Play Store. That blocks the patched app until a new tested version is patched. Add a patch (e.g. **Disable forced update**) that never shows this dialog. ## Findings (7.52.0, unobfuscated) ### Backend - Retrofit `SupportedVersionsApi` calls `@GET("/supported-versions/v1/android")`. The response DTO is `{required: {version, message?}}`. - `ForceUpdateRemoteDataSource.getMinVersion` fetches it. - `ForceUpdateLocalDataSource` caches the value in `UserPreferencesDataSource` under key `"force_update_required_version"`. Offline, the cached value is used. ### Decision - `nl.persgroep.edition.force.update.data.ForceUpdateRepositoryImpl.isForceUpdateRequired(Ljava/lang/String;)Z` returns `SemanticVersion(required) > SemanticVersion(appVersion)`. - It returns false when either version is missing. Log strings: "Could not determine force update as app version is null" / "...required version is null". - Both the cached and the fresh path go through it. ### Chain 1. `RequireForceUpdateUseCase.invoke` 2. `ForceUpdateViewModel.checkForUpdate()`. It runs in the constructor, and again on resume after 8 hours via `RefreshOnResumeFromBackgroundEffect`. 3. `MutableStateFlow<Boolean> forceUpdateRequiredState` 4. `ForceUpdateDialogKt.ForceUpdateDialog(...)`, shown from `MainActivity`. It is a Material `AlertDialog` with an empty `onDismissRequest`; its only button opens the store. ### Separate from Play The Play in-app update API is not involved here (see #23). ## Approach - Make `isForceUpdateRequired` return false: `const/4 p1, 0x0` + `return p1`. `p1` is the `String` parameter, so it is free to overwrite. - Fingerprint: the class name, signature `(String)Z`, and the log strings above. ## Risk The patch hides the dialog; it doesn't make an old app compatible. If DPG shuts down an old API version, parts of the app can still break. Document this in the patch description or the docs. ## Done when - [ ] Build passes; `Applied: <patch>` on 7.52.0. - [ ] Verified with a forced condition: temporarily write a high `force_update_required_version` to the app's prefs on a test install, after asking. - [ ] `docs/apps/volkskrant.md` has a "Forced update" section.
midas closed this issue 2026-10-10 21:00:13 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
midas/midas-patches#21
No description provided.