Repository navigation
fix(kleinanzeigen): hide pur (#31), harden share-url fingerprint and bump version to 2026.39.0 (#43) - #46
fix(kleinanzeigen): hide pur (#31), harden share-url fingerprint and bump version to 2026.39.0 (#43)#46plant-saver3000 wants to merge 8 commits into
Conversation
|
Just tested with V2026.37.1 and it worked without problems, so I bumped the version to the latest one. |
|
Just tested with V2026.38.3 and it worked without problems, so I bumped the version to the latest one. |
|
Tested this branch against Kleinanzeigen 2026.37.1 and 2026.38.3. 37.1 works fine with all three patches. 38.3 crashes the app immediately on launch, and the cause is in Hide Ads crashes on 2026.38.3
So on 38.3 the patch injects The actual init method is unchanged: What worked for me: internal object LibertyInitFingerprint : Fingerprint(
strings = listOf("MicrosoftClarityService: Failed to initialize Microsoft Clarity SDK"),
custom = { method, _ -> method.returnType == "V" },
)The return-type guard matters as much as the new anchor: it turns exactly this failure mode into a patch-time error instead of an APK that installs fine and crashes on launch. Hide Pur matches more than one methodNot a crash, but worth tightening while you are in here. The settings builder is the only one taking the settings-and-help state as a parameter, and it gets renamed between releases while that package path does not:
custom = { method, _ ->
method.parameterTypes.any {
it.toString().startsWith("Lebk/ui/preferences/settings/settings_and_help/state/")
}
},The backward walk to the nearest Remove Tracking ParamsNo change needed. On 2026.38.3 the anchor strings all land in one class ( Also checkedNo With the two fingerprint changes above, all three patches work on 2026.38.3 here. Happy to open a PR against your branch with them if that is easier than folding them in yourself. |
|
@xnisayx Thanks a lot for the detailed review! I really appreciate it. Funnily enough, I've been working on the new version 2026.38.3 the last few hours (before reading your comment) and also realized the few things you've mentioned. With the help of Gemini I also got it figured out - maybe a bit of a different approach than you had, but it works on my end. So feel free to test it. Quick notes: Hide Ads crashes on 2026.38.3Correct, I think the URL should be even more stable across versions than the error message you've proposed. What do you think? Hide Pur matches more than one methodCorrect, I also just realized that Pur was still visible in 2026.38.3. Geminis idea was to target a second string |
|
If you’ve got time, would it perhaps be an option for you to make your fork available in such a way that we can integrate the patch directly into Morphe via your fork? Most of the patches currently available for Morphe come from the AI, or at least help out. So there’s no problem there. I don’t think there’s any point in submitting any more pull requests here, as docbt hasn’t been in touch or incorporated the code for months. |
Edit 2026-09-05:
The Hide-Pur patch stopped working for versions > 2026.30.0 as the developers completely changed the underlying technology of the settings menu. So I had to update the patch. I also bumped the version to the newest 2026.36.0.
Original message from 2026-07-27:
First things first:
Although I have a bit of experience in writing Python code, I'm very new to Kotlin, Patching APKs and the Morphe project in whole. So if there is any big mistake from my side, I apologize in advance.
But I really like the Morphe project and also your patches, so I wanted to contribute and give something back. As I'm not that familiar with APKs and Kotlin, I mainly use Claude AI to help me fixing the patches. Then I double checked the logic of the patches that Claude offered me and tested it thoroughly.
fix: resolve Pur visibility toggle by content instead of position
Fixes #31 (Pur still visible after patching). The previous fingerprint identified the target row by parameter shape (
>= 5 boolean params) and patched the firstIF_EQZinstruction found in the method — neither was actually tied to the Pur row specifically, so both broke silently once the compiled method signature shifted in a later app release.Rewrites the fingerprint to anchor on content instead of shape/position:
resourceLiteral(ResourceType.STRING, "ka_gbl_pur"), resolved from the APK's own resource table at patch time rather than hardcoded.setVisibility(I)Vcall belonging to the Pur row, not just the first one in the method (there are ~14, one per settings row).View.GONEinstead of intercepting the boolean flag that gates it, so it no longer depends on which register or branch opcode (IF_EQZ/IF_NEZ) the compiler happens to emit.refactor: harden share-url fingerprint against the same failure mode
Applies the same anchoring fix to
ShareUrlParamBuilderFingerprint, which previously locked onto an obfuscated class type name directly (Lebk/ui/vip/compose/content/e;). Now identifies the class by co-occurring string literals from the share-target switch statement, and explicitly throws if more than one method matches the target shape instead of silently taking the first match. "Remove Tracking parameters" stopped working for me in some newer versions, that's why I changed the design of the fingerprint to make it more robust.feat: bump supported Kleinanzeigen version to 2026.30.0
Closes #43 (support newer Kleinanzeigen versions — previously pinned to 2026.16.1). Hide Pur, Hide Ads, and Remove Tracking Params now all target 2026.30.0. Older
AppTargetentries were dropped rather than kept alongsidechore: bump app.morphe.patches to 1.3.0 and add morphe-patches-library
Needed for
resourceLiteral/resourceMappingPatch, used by the Hide Pur fix above. Bumpedapp.morphe.patches1.2.0 -> 1.3.0 (Kotlin 2.0.21 -> 2.2.0) and addedmorphe-patches-library1.2.0, the releaseconfirmed built against
morphe-patcher 1.3.3.Deliberately stayed on plugin 1.3.0 rather than 1.3.1+, which also bumps AGP 8.13.2 -> 9.1.0 — kept this change scoped to the Kotlin version bump only, since that's the only piece actually required here.
Re-ran the full Google News patch set against the updated toolchain to confirm the plugin bump doesn't regress anything outside this PR's scope — all patches there still build and match correctly.
I've verified the Kleinanzeigen patches against several versions between 2026.14.2 and the newest 2026.30.0. All the versions worked, so in the AppTarget we could also include various older versions if you like. I'm not sure what the practice is here. Only target the newest version? The 3 newest versions? Several versions? Feel free to give a suggestion.
Closes #31
Closes #43