Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9540e6443a | ||
|
|
74726598be | ||
|
|
96a1e1f6b9 | ||
|
|
104ca41fda | ||
|
|
5256b47f90 | ||
|
|
5d932b06a9 | ||
|
|
076f1c2479 | ||
|
|
48f0cecbe4 | ||
|
|
015ce16efc | ||
|
|
97c30af97d | ||
|
|
7727f37a18 | ||
|
|
1985bf307b |
@@ -1,3 +1,39 @@
|
|||||||
|
## [1.2.0](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.7...v1.2.0) (2026-09-01)
|
||||||
|
|
||||||
|
### ✨ New Features
|
||||||
|
|
||||||
|
* age verification ([7472659](https://git.krtss.de/StanPonomarev/twitter-patch/commit/74726598be4ceb147817e34ccb6cf435ece8f0bc))
|
||||||
|
|
||||||
|
## [1.1.7](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.6...v1.1.7) (2026-08-24)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* version check again ([104ca41](https://git.krtss.de/StanPonomarev/twitter-patch/commit/104ca41fda3ee3ee9215519e6266c37f87e86ffc))
|
||||||
|
|
||||||
|
## [1.1.6](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.5...v1.1.6) (2026-08-23)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* google update screen ([5d932b0](https://git.krtss.de/StanPonomarev/twitter-patch/commit/5d932b06a9e63659a98cbc9b36c4fe17807acc39))
|
||||||
|
|
||||||
|
## [1.1.5](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.4...v1.1.5) (2026-08-23)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* vending update screen ([48f0cec](https://git.krtss.de/StanPonomarev/twitter-patch/commit/48f0cecbe47d73ee06c15915d5c57694856b904e))
|
||||||
|
|
||||||
|
## [1.1.4](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.3...v1.1.4) (2026-08-22)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* more update required fixes ([97c30af](https://git.krtss.de/StanPonomarev/twitter-patch/commit/97c30af97d00e7f92b5c2801e9e744f00704758a))
|
||||||
|
|
||||||
|
## [1.1.3](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.2...v1.1.3) (2026-08-22)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* xchat shutting down the app ([1985bf3](https://git.krtss.de/StanPonomarev/twitter-patch/commit/1985bf307b4552655216079082757a53af00140b))
|
||||||
|
|
||||||
## [1.1.2](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.1...v1.1.2) (2026-08-22)
|
## [1.1.2](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.1...v1.1.2) (2026-08-22)
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ Patch bundle for X (Twitter), maintained by
|
|||||||
[Stan Ponomarev](https://git.krtss.de/StanPonomarev).
|
[Stan Ponomarev](https://git.krtss.de/StanPonomarev).
|
||||||
|
|
||||||
<!-- PATCHES_START -->
|
<!-- PATCHES_START -->
|
||||||
> **[v1.1.2](https://git.krtss.de/StanPonomarev/twitter-patch/releases/tag/v1.1.2)** • `main` • 2 patches total
|
> **[v1.2.0](https://git.krtss.de/StanPonomarev/twitter-patch/releases/tag/v1.2.0)** • `main` • 3 patches total
|
||||||
<details open>
|
<details open>
|
||||||
<summary>📦 X • 2 patches</summary>
|
<summary>📦 X • 3 patches</summary>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
**🎯 Supported versions:**
|
**🎯 Supported versions:**
|
||||||
@@ -17,6 +17,7 @@ Patch bundle for X (Twitter), maintained by
|
|||||||
| 💊 Patch | 📜 Description | ⚙️ Options |
|
| 💊 Patch | 📜 Description | ⚙️ Options |
|
||||||
|----------|----------------|-----------|
|
|----------|----------------|-----------|
|
||||||
| [Disable outdated version screen](#disable-outdated-version-screen) | Prevents X from blocking app access when it marks the client version as outdated. | |
|
| [Disable outdated version screen](#disable-outdated-version-screen) | Prevents X from blocking app access when it marks the client version as outdated. | |
|
||||||
|
| [Remove post age verification](#remove-post-age-verification) | Allows age-gated posts to be viewed without completing age verification. | |
|
||||||
| [Remove timeline Upgrade button](#remove-timeline-upgrade-button) | Removes the Premium Upgrade button from the timeline's top bar. | |
|
| [Remove timeline Upgrade button](#remove-timeline-upgrade-button) | Removes the Premium Upgrade button from the timeline's top bar. | |
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 1.1.2
|
version = 1.2.0
|
||||||
|
|||||||
+4
-4
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"created_at": "2026-08-22T08:27:42",
|
"created_at": "2026-09-01T20:43:32",
|
||||||
"description": "## [1.1.2](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.1...v1.1.2) (2026-08-22)\n\n### 🐛 Bug Fixes\n\n* manifest ([7062792](https://git.krtss.de/StanPonomarev/twitter-patch/commit/7062792215590cce79caa6e78354ee73375eaa79))",
|
"description": "## [1.2.0](https://git.krtss.de/StanPonomarev/twitter-patch/compare/v1.1.7...v1.2.0) (2026-09-01)\n\n### ✨ New Features\n\n* age verification ([7472659](https://git.krtss.de/StanPonomarev/twitter-patch/commit/74726598be4ceb147817e34ccb6cf435ece8f0bc))",
|
||||||
"download_url": "https://git.krtss.de/StanPonomarev/twitter-patch/releases/download/v1.1.2/patches-1.1.2.mpp",
|
"download_url": "https://git.krtss.de/StanPonomarev/twitter-patch/releases/download/v1.2.0/patches-1.2.0.mpp",
|
||||||
"signature_download_url": "",
|
"signature_download_url": "",
|
||||||
"version": "1.1.2"
|
"version": "1.2.0"
|
||||||
}
|
}
|
||||||
|
|||||||
+27
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"NOTE": "Do NOT manually edit this file. This file is automatically updated when semantic release (release.yml) runs. Manually editing this file can break your releases and break third party tools that use this file.",
|
"NOTE": "Do NOT manually edit this file. This file is automatically updated when semantic release (release.yml) runs. Manually editing this file can break your releases and break third party tools that use this file.",
|
||||||
"version": "1.1.2",
|
"version": "1.2.0",
|
||||||
"patches": [
|
"patches": [
|
||||||
{
|
{
|
||||||
"name": "Disable outdated version screen",
|
"name": "Disable outdated version screen",
|
||||||
@@ -30,6 +30,32 @@
|
|||||||
],
|
],
|
||||||
"options": []
|
"options": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Remove post age verification",
|
||||||
|
"description": "Allows age-gated posts to be viewed without completing age verification.",
|
||||||
|
"default": true,
|
||||||
|
"dependencies": [],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"packageName": "com.twitter.android",
|
||||||
|
"name": "X",
|
||||||
|
"description": null,
|
||||||
|
"apkFileType": "APKM",
|
||||||
|
"appIconColor": "#000000",
|
||||||
|
"signatures": null,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"version": "12.7.1-release.0",
|
||||||
|
"versionCodes": null,
|
||||||
|
"isExperimental": false,
|
||||||
|
"minSdk": 28,
|
||||||
|
"description": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"options": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Remove timeline Upgrade button",
|
"name": "Remove timeline Upgrade button",
|
||||||
"description": "Removes the Premium Upgrade button from the timeline's top bar.",
|
"description": "Removes the Premium Upgrade button from the timeline's top bar.",
|
||||||
|
|||||||
+5
-1
@@ -49,6 +49,7 @@ class MorphePatchIntegrationTest {
|
|||||||
"--exclusive",
|
"--exclusive",
|
||||||
"--enable=$OUTDATED_PATCH_NAME",
|
"--enable=$OUTDATED_PATCH_NAME",
|
||||||
"--enable=$UPGRADE_PATCH_NAME",
|
"--enable=$UPGRADE_PATCH_NAME",
|
||||||
|
"--enable=$POST_AGE_VERIFICATION_PATCH_NAME",
|
||||||
"--unsigned",
|
"--unsigned",
|
||||||
"--out=${patchedApk.absolutePathString()}",
|
"--out=${patchedApk.absolutePathString()}",
|
||||||
"--result-file=${resultFile.absolutePathString()}",
|
"--result-file=${resultFile.absolutePathString()}",
|
||||||
@@ -93,7 +94,9 @@ class MorphePatchIntegrationTest {
|
|||||||
val appliedPatchNames = result.getAsJsonArray("appliedPatches")
|
val appliedPatchNames = result.getAsJsonArray("appliedPatches")
|
||||||
.map { it.asJsonObject.get("name").asString }
|
.map { it.asJsonObject.get("name").asString }
|
||||||
assertTrue(
|
assertTrue(
|
||||||
appliedPatchNames.containsAll(listOf(OUTDATED_PATCH_NAME, UPGRADE_PATCH_NAME)),
|
appliedPatchNames.containsAll(
|
||||||
|
listOf(OUTDATED_PATCH_NAME, UPGRADE_PATCH_NAME, POST_AGE_VERIFICATION_PATCH_NAME)
|
||||||
|
),
|
||||||
"Expected patches were not applied: $appliedPatchNames"
|
"Expected patches were not applied: $appliedPatchNames"
|
||||||
)
|
)
|
||||||
assertTrue(result.getAsJsonArray("failedPatches").isEmpty, "Morphe reported failed patches")
|
assertTrue(result.getAsJsonArray("failedPatches").isEmpty, "Morphe reported failed patches")
|
||||||
@@ -148,6 +151,7 @@ class MorphePatchIntegrationTest {
|
|||||||
private companion object {
|
private companion object {
|
||||||
const val OUTDATED_PATCH_NAME = "Disable outdated version screen"
|
const val OUTDATED_PATCH_NAME = "Disable outdated version screen"
|
||||||
const val UPGRADE_PATCH_NAME = "Remove timeline Upgrade button"
|
const val UPGRADE_PATCH_NAME = "Remove timeline Upgrade button"
|
||||||
|
const val POST_AGE_VERIFICATION_PATCH_NAME = "Remove post age verification"
|
||||||
const val MORPHE_VERSION = "1.13.1"
|
const val MORPHE_VERSION = "1.13.1"
|
||||||
const val MORPHE_SHA256 = "a212531f68d3ada4b504bf9dac3e02460589f3bf8868ee66e1b4780152d3466b"
|
const val MORPHE_SHA256 = "a212531f68d3ada4b504bf9dac3e02460589f3bf8868ee66e1b4780152d3466b"
|
||||||
const val MORPHE_URL =
|
const val MORPHE_URL =
|
||||||
|
|||||||
@@ -57,6 +57,75 @@ private val shutdownStateFingerprint = Fingerprint(
|
|||||||
parameters = emptyList()
|
parameters = emptyList()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val appUpdateScreenRendererFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/twitter/clientshutdown/update/j;",
|
||||||
|
name = "<init>",
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf(
|
||||||
|
"Landroid/view/View;",
|
||||||
|
"Landroid/app/Activity;",
|
||||||
|
"Lcom/twitter/app/common/activity/b;",
|
||||||
|
"Lcom/twitter/subsystem/clientshutdown/api/c;"
|
||||||
|
),
|
||||||
|
strings = listOf("rootView", "activityFinisher", "eventLogHelper")
|
||||||
|
)
|
||||||
|
|
||||||
|
private val forceUpdateScreenRendererFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/x/forceupdate/g;",
|
||||||
|
name = "a",
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf(
|
||||||
|
"Lkotlin/jvm/functions/Function0;",
|
||||||
|
"Lkotlin/jvm/functions/Function1;",
|
||||||
|
"Landroidx/compose/ui/Modifier;",
|
||||||
|
"Landroidx/compose/runtime/Composer;",
|
||||||
|
"I"
|
||||||
|
),
|
||||||
|
strings = listOf("onUpdateClick", "onLearnMoreClick")
|
||||||
|
)
|
||||||
|
|
||||||
|
private val playCoreUpdateManagerFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/x/android/appupdate/b${'$'}a;",
|
||||||
|
name = "invokeSuspend",
|
||||||
|
returnType = "Ljava/lang/Object;",
|
||||||
|
parameters = listOf("Ljava/lang/Object;"),
|
||||||
|
strings = listOf("x_lite_in_app_update_enabled")
|
||||||
|
)
|
||||||
|
|
||||||
|
private val serverDrivenCoverRendererFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/x/urt/cover/ui/j;",
|
||||||
|
name = "a",
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf(
|
||||||
|
"Lcom/x/urt/cover/component/e;",
|
||||||
|
"Landroidx/compose/ui/Modifier;",
|
||||||
|
"Landroidx/compose/runtime/Composer;",
|
||||||
|
"I"
|
||||||
|
),
|
||||||
|
strings = listOf("component")
|
||||||
|
)
|
||||||
|
|
||||||
|
private val serverDrivenCoverLifecycleFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/x/urt/cover/component/a;",
|
||||||
|
name = "h",
|
||||||
|
returnType = "V",
|
||||||
|
parameters = emptyList(),
|
||||||
|
strings = listOf("impression")
|
||||||
|
)
|
||||||
|
|
||||||
|
private val brazeInAppMessageDisplayFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/braze/ui/inappmessage/BrazeInAppMessageManager;",
|
||||||
|
name = "displayInAppMessage${'$'}suspendImpl",
|
||||||
|
returnType = "Ljava/lang/Object;",
|
||||||
|
parameters = listOf(
|
||||||
|
"Lcom/braze/ui/inappmessage/BrazeInAppMessageManager;",
|
||||||
|
"Lcom/braze/models/inappmessage/IInAppMessage;",
|
||||||
|
"Z",
|
||||||
|
"Lkotlin/coroutines/Continuation;"
|
||||||
|
),
|
||||||
|
strings = listOf("In-app message is expired. Doing nothing. Expiration: ")
|
||||||
|
)
|
||||||
|
|
||||||
private const val APP_UPDATE_ACTIVITY = "com.twitter.clientshutdown.update.AppUpdateActivity"
|
private const val APP_UPDATE_ACTIVITY = "com.twitter.clientshutdown.update.AppUpdateActivity"
|
||||||
|
|
||||||
private val disableOutdatedVersionActivityPatch = resourcePatch {
|
private val disableOutdatedVersionActivityPatch = resourcePatch {
|
||||||
@@ -115,7 +184,10 @@ val disableOutdatedVersionScreenPatch = bytecodePatch(
|
|||||||
|
|
||||||
shutdownEntryPointDisablerFingerprint.method.addInstructions(
|
shutdownEntryPointDisablerFingerprint.method.addInstructions(
|
||||||
0,
|
0,
|
||||||
"return-void"
|
"""
|
||||||
|
invoke-virtual {p0}, Lcom/twitter/subsystem/clientshutdown/i;->c()V
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
outdatedVersionEnforcementFingerprint.method.addInstructions(
|
outdatedVersionEnforcementFingerprint.method.addInstructions(
|
||||||
0,
|
0,
|
||||||
@@ -132,5 +204,207 @@ val disableOutdatedVersionScreenPatch = bytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
appUpdateScreenRendererFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
new-instance v0, Lcom/twitter/subsystem/clientshutdown/a;
|
||||||
|
invoke-direct {v0, p2}, Lcom/twitter/subsystem/clientshutdown/a;-><init>(Landroid/content/Context;)V
|
||||||
|
const/4 v1, 0x2
|
||||||
|
const-string v2, "com.twitter.clientshutdown.update.AppUpdateActivityAlias"
|
||||||
|
invoke-virtual {v0, v1, v2}, Lcom/twitter/subsystem/clientshutdown/a;->b(ILjava/lang/String;)V
|
||||||
|
invoke-virtual {p2}, Landroid/app/Activity;->finish()V
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
forceUpdateScreenRendererFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"return-void"
|
||||||
|
)
|
||||||
|
|
||||||
|
playCoreUpdateManagerFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
serverDrivenCoverRendererFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
move-object/from16 v0, p0
|
||||||
|
invoke-interface {v0}, Lcom/x/urt/cover/component/e;->a()Lcom/x/models/timelines/instructions/cover/URTCover;
|
||||||
|
move-result-object v0
|
||||||
|
instance-of v1, v0, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}FullCover;
|
||||||
|
if-eqz v1, :check_outdated_half_cover
|
||||||
|
check-cast v0, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}FullCover;
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}FullCover;->getData()Lcom/x/models/timelines/instructions/cover/URTFullCover;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTFullCover;->getPrimaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v1
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
const-string v2, "This app is out of date."
|
||||||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-nez v1, :block_outdated_server_cover
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTFullCover;->getSecondaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v1
|
||||||
|
if-eqz v1, :check_outdated_full_cover_detail
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
const-string v2, "This app is out of date."
|
||||||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-nez v1, :block_outdated_server_cover
|
||||||
|
:check_outdated_full_cover_detail
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTFullCover;->getDetailText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v1
|
||||||
|
if-eqz v1, :outdated_server_cover_allowed
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
const-string v2, "This app is out of date."
|
||||||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-nez v1, :block_outdated_server_cover
|
||||||
|
goto :outdated_server_cover_allowed
|
||||||
|
:check_outdated_half_cover
|
||||||
|
instance-of v1, v0, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}HalfCover;
|
||||||
|
if-eqz v1, :outdated_server_cover_allowed
|
||||||
|
check-cast v0, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}HalfCover;
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}HalfCover;->getData()Lcom/x/models/timelines/instructions/cover/URTHalfCover;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTHalfCover;->getPrimaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v1
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
const-string v2, "This app is out of date."
|
||||||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-nez v1, :block_outdated_server_cover
|
||||||
|
invoke-virtual {v0}, Lcom/x/models/timelines/instructions/cover/URTHalfCover;->getSecondaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v1
|
||||||
|
if-eqz v1, :outdated_server_cover_allowed
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
const-string v2, "This app is out of date."
|
||||||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-eqz v1, :outdated_server_cover_allowed
|
||||||
|
:block_outdated_server_cover
|
||||||
|
return-void
|
||||||
|
:outdated_server_cover_allowed
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
serverDrivenCoverLifecycleFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
iget-object v0, p0, Lcom/x/urt/cover/component/a;->a:Lcom/x/urt/cover/component/b;
|
||||||
|
invoke-virtual {v0}, Lcom/x/urt/cover/component/b;->a()Lcom/x/models/timelines/instructions/cover/URTCover;
|
||||||
|
move-result-object v1
|
||||||
|
instance-of v2, v1, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}FullCover;
|
||||||
|
if-eqz v2, :check_retained_outdated_half_cover
|
||||||
|
check-cast v1, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}FullCover;
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}FullCover;->getData()Lcom/x/models/timelines/instructions/cover/URTFullCover;
|
||||||
|
move-result-object v1
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTFullCover;->getPrimaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v2
|
||||||
|
invoke-virtual {v2}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
const-string v3, "This app is out of date."
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v2
|
||||||
|
if-nez v2, :clear_retained_outdated_cover
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTFullCover;->getSecondaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v2
|
||||||
|
if-eqz v2, :check_retained_outdated_full_cover_detail
|
||||||
|
invoke-virtual {v2}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
const-string v3, "This app is out of date."
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v2
|
||||||
|
if-nez v2, :clear_retained_outdated_cover
|
||||||
|
:check_retained_outdated_full_cover_detail
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTFullCover;->getDetailText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v2
|
||||||
|
if-eqz v2, :retained_server_cover_allowed
|
||||||
|
invoke-virtual {v2}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
const-string v3, "This app is out of date."
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v2
|
||||||
|
if-nez v2, :clear_retained_outdated_cover
|
||||||
|
goto :retained_server_cover_allowed
|
||||||
|
:check_retained_outdated_half_cover
|
||||||
|
instance-of v2, v1, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}HalfCover;
|
||||||
|
if-eqz v2, :retained_server_cover_allowed
|
||||||
|
check-cast v1, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}HalfCover;
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTCover${'$'}HalfCover;->getData()Lcom/x/models/timelines/instructions/cover/URTHalfCover;
|
||||||
|
move-result-object v1
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTHalfCover;->getPrimaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v2
|
||||||
|
invoke-virtual {v2}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
const-string v3, "This app is out of date."
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v2
|
||||||
|
if-nez v2, :clear_retained_outdated_cover
|
||||||
|
invoke-virtual {v1}, Lcom/x/models/timelines/instructions/cover/URTHalfCover;->getSecondaryText()Lcom/x/models/text/RichText;
|
||||||
|
move-result-object v2
|
||||||
|
if-eqz v2, :retained_server_cover_allowed
|
||||||
|
invoke-virtual {v2}, Lcom/x/models/text/RichText;->getText()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
const-string v3, "This app is out of date."
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v2
|
||||||
|
if-eqz v2, :retained_server_cover_allowed
|
||||||
|
:clear_retained_outdated_cover
|
||||||
|
iget-object v1, v0, Lcom/x/urt/cover/component/b;->c:Lcom/x/urt/cover/component/e${'$'}a;
|
||||||
|
iget-object v1, v1, Lcom/x/urt/cover/component/e${'$'}a;->a:Lcom/twitter/tipjar/ui/screen/c;
|
||||||
|
invoke-virtual {v1}, Lcom/twitter/tipjar/ui/screen/c;->invoke()Ljava/lang/Object;
|
||||||
|
return-void
|
||||||
|
:retained_server_cover_allowed
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
brazeInAppMessageDisplayFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
move-object/from16 v0, p1
|
||||||
|
instance-of v1, v0, Lcom/braze/models/inappmessage/InAppMessageImmersiveBase;
|
||||||
|
if-eqz v1, :check_braze_outdated_message_body
|
||||||
|
move-object v1, v0
|
||||||
|
check-cast v1, Lcom/braze/models/inappmessage/InAppMessageImmersiveBase;
|
||||||
|
invoke-virtual {v1}, Lcom/braze/models/inappmessage/InAppMessageImmersiveBase;->getHeader()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
if-eqz v1, :check_braze_outdated_message_body
|
||||||
|
const-string v2, "This app is out of date."
|
||||||
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-nez v1, :block_braze_outdated_message
|
||||||
|
:check_braze_outdated_message_body
|
||||||
|
instance-of v1, v0, Lcom/braze/models/inappmessage/InAppMessageBase;
|
||||||
|
if-eqz v1, :braze_in_app_message_allowed
|
||||||
|
check-cast v0, Lcom/braze/models/inappmessage/InAppMessageBase;
|
||||||
|
invoke-virtual {v0}, Lcom/braze/models/inappmessage/InAppMessageBase;->getMessage()Ljava/lang/String;
|
||||||
|
move-result-object v0
|
||||||
|
if-eqz v0, :braze_in_app_message_allowed
|
||||||
|
const-string v1, "This app is out of date."
|
||||||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v1
|
||||||
|
if-nez v1, :block_braze_outdated_message
|
||||||
|
const-string v1, "current app version is unsupported"
|
||||||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :braze_in_app_message_allowed
|
||||||
|
:block_braze_outdated_message
|
||||||
|
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
|
||||||
|
return-object v0
|
||||||
|
:braze_in_app_message_allowed
|
||||||
|
"""
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package app.twitter.patches
|
||||||
|
|
||||||
|
import app.morphe.patcher.Fingerprint
|
||||||
|
import app.morphe.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.morphe.patcher.patch.bytecodePatch
|
||||||
|
import app.twitter.patches.shared.Constants.COMPATIBILITY_X
|
||||||
|
|
||||||
|
private val postAgeVerificationActionFingerprint = Fingerprint(
|
||||||
|
definingClass = "Lcom/twitter/model/mediavisibility/c${'$'}b;",
|
||||||
|
name = "a",
|
||||||
|
returnType = "Lcom/twitter/model/mediavisibility/c;",
|
||||||
|
parameters = listOf("Ljava/lang/String;")
|
||||||
|
)
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
|
val removePostAgeVerificationPatch = bytecodePatch(
|
||||||
|
name = "Remove post age verification",
|
||||||
|
description = "Allows age-gated posts to be viewed without completing age verification.",
|
||||||
|
default = true
|
||||||
|
) {
|
||||||
|
compatibleWith(COMPATIBILITY_X)
|
||||||
|
|
||||||
|
execute {
|
||||||
|
postAgeVerificationActionFingerprint.method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user