feat(gelderlander): disable forced and flexible Play updates #22
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #16.
Feature description
A patched De Gelderlander can't be updated through Play, because the signature differs. Today the app can:
System.exit(1)when that flow is cancelled;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
l32readscacheDir/CONFIG_FALLBACK.l32.b(String)returns the JSON pathversion.android.<"24">.required.ih3(anchor"com.kubusapp.dynamicconfig.DynamicConfigLoaderImpl").Decision
ec4.a(String currentVersion): booleancompares against BuildConfig.VERSION_NAME throughec4.c(String required, String current): Z.ec4.csplits both strings on '.' and compares the parts withInteger.parseIntin a loop.jc7$i(anchor"com.kubusapp.view.MainViewModel$forceUpdate$1"). It posts the result to LiveDatajc7.forceUpdate.UI (
eo0, the base activity of MainActivity)f0()observesforceUpdate.X(boolean)callsappUpdateManager.getAppUpdateInfo().b0(info, force):h0(1001, info, 1);h0(1002, info, 0), only whenclientVersionStalenessDays >= 14.onActivityResult: requestCode 1001 with a non-OK result callsfinish()and thenSystem.exit(1).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=".onResumeauto-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
ec4.areturn false. This removes the forced path and theSystem.exit.eo0.X(orb0) return-void at index 0. Otherwise the flexible prompt remains.ec4.con its shape ((String,String)Z, a split on '.',Integer.parseInt) and findec4.aas its caller, or fingerprintaon its call to thel32helper.Risk
Same as Volkskrant: the patch hides the prompt but doesn't keep an old app compatible with the backend.
Done when
Applied: <patch>on 9.21.1.docs/apps/gelderlander.mdhas a "Forced update" section.