feat(gelderlander): disable forced and flexible Play updates #22

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

Part of #16.

Feature description

A patched De Gelderlander can't be updated through Play, because the signature differs. Today the app can:

  • launch Play's IMMEDIATE update flow when a backend minimum version is higher than the installed version;
  • kill itself with System.exit(1) when that flow is cancelled;
  • launch a FLEXIBLE update prompt once an update has been available for 14 or more days.

Add a patch (same name as the Volkskrant one, e.g. Disable forced update) that stops all of this.

Findings (9.21.1, obfuscated: use the anchors)

Minimum version

  • The minimum version comes from a cached JSON config file, not from remote config.
    • l32 reads cacheDir/CONFIG_FALLBACK.
    • l32.b(String) returns the JSON path version.android.<"24">.required.
    • Anchors: "CONFIG_FALLBACK", "android", "required".
  • The file is written by ih3 (anchor "com.kubusapp.dynamicconfig.DynamicConfigLoaderImpl").

Decision

  • ec4.a(String currentVersion): boolean compares against BuildConfig.VERSION_NAME through ec4.c(String required, String current): Z.
    • ec4.c splits both strings on '.' and compares the parts with Integer.parseInt in a loop.
  • The only caller is jc7$i (anchor "com.kubusapp.view.MainViewModel$forceUpdate$1"). It posts the result to LiveData jc7.forceUpdate.

UI (eo0, the base activity of MainActivity)

  1. f0() observes forceUpdate.
  2. X(boolean) calls appUpdateManager.getAppUpdateInfo().
  3. b0(info, force):
    • force and an IMMEDIATE intent available: h0(1001, info, 1);
    • otherwise FLEXIBLE h0(1002, info, 0), only when clientVersionStalenessDays >= 14.
  4. onActivityResult: requestCode 1001 with a non-OK result calls finish() and then System.exit(1).
  5. i0(true), used when the Play task fails, shows a non-cancelable AlertDialog (force_update_needed) whose OK button opens "https://play.google.com/store/apps/details?id=".
  6. onResume auto-completes a downloaded flexible update (install status 11).

Anchors: the Play Store URL string, request codes 1001/1002, Play Core InstallState, and the Kotlin metadata names "forceUpdate", "appUpdateManager", "installStateUpdatedListener".

Approach

  • Make ec4.a return false. This removes the forced path and the System.exit.
  • Also make eo0.X (or b0) return-void at index 0. Otherwise the flexible prompt remains.
  • Fingerprint ec4.c on its shape ((String,String)Z, a split on '.', Integer.parseInt) and find ec4.a as its caller, or fingerprint a on its call to the l32 helper.

Risk

Same as Volkskrant: the patch hides the prompt but doesn't keep an old app compatible with the backend.

Done when

  • Build passes; Applied: <patch> on 9.21.1.
  • Device check (after asking): normal start, no Play update sheet.
  • docs/apps/gelderlander.md has a "Forced update" section.
Part of #16. ## Feature description A patched De Gelderlander can't be updated through Play, because the signature differs. Today the app can: - launch Play's IMMEDIATE update flow when a backend minimum version is higher than the installed version; - kill itself with `System.exit(1)` when that flow is cancelled; - launch a FLEXIBLE update prompt once an update has been available for 14 or more days. Add a patch (same name as the Volkskrant one, e.g. **Disable forced update**) that stops all of this. ## Findings (9.21.1, obfuscated: use the anchors) ### Minimum version - The minimum version comes from a cached JSON config file, not from remote config. - `l32` reads `cacheDir/CONFIG_FALLBACK`. - `l32.b(String)` returns the JSON path `version.android.<"24">.required`. - Anchors: "CONFIG_FALLBACK", "android", "required". - The file is written by `ih3` (anchor `"com.kubusapp.dynamicconfig.DynamicConfigLoaderImpl"`). ### Decision - `ec4.a(String currentVersion): boolean` compares against BuildConfig.VERSION_NAME through `ec4.c(String required, String current): Z`. - `ec4.c` splits both strings on '.' and compares the parts with `Integer.parseInt` in a loop. - The only caller is `jc7$i` (anchor `"com.kubusapp.view.MainViewModel$forceUpdate$1"`). It posts the result to LiveData `jc7.forceUpdate`. ### UI (`eo0`, the base activity of MainActivity) 1. `f0()` observes `forceUpdate`. 2. `X(boolean)` calls `appUpdateManager.getAppUpdateInfo()`. 3. `b0(info, force)`: - force and an IMMEDIATE intent available: `h0(1001, info, 1)`; - otherwise FLEXIBLE `h0(1002, info, 0)`, only when `clientVersionStalenessDays >= 14`. 4. `onActivityResult`: requestCode 1001 with a non-OK result calls `finish()` and then `System.exit(1)`. 5. `i0(true)`, used when the Play task fails, shows a non-cancelable AlertDialog (`force_update_needed`) whose OK button opens `"https://play.google.com/store/apps/details?id="`. 6. `onResume` auto-completes a downloaded flexible update (install status 11). Anchors: the Play Store URL string, request codes 1001/1002, Play Core `InstallState`, and the Kotlin metadata names "forceUpdate", "appUpdateManager", "installStateUpdatedListener". ## Approach - Make `ec4.a` return false. This removes the forced path and the `System.exit`. - Also make `eo0.X` (or `b0`) return-void at index 0. Otherwise the flexible prompt remains. - Fingerprint `ec4.c` on its shape (`(String,String)Z`, a split on '.', `Integer.parseInt`) and find `ec4.a` as its caller, or fingerprint `a` on its call to the `l32` helper. ## Risk Same as Volkskrant: the patch hides the prompt but doesn't keep an old app compatible with the backend. ## Done when - [ ] Build passes; `Applied: <patch>` on 9.21.1. - [ ] Device check (after asking): normal start, no Play update sheet. - [ ] `docs/apps/gelderlander.md` has a "Forced update" section.
midas closed this issue 2026-10-10 17:01:05 +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#22
No description provided.