mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-21 18:03:56 +00:00
Compare commits
37 Commits
v2.187.0-d
...
v2.188.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49f778aca1 | ||
|
|
2b14cc6270 | ||
|
|
2d20ed857c | ||
|
|
eb20cc477f | ||
|
|
d002eaaca6 | ||
|
|
aef68134b5 | ||
|
|
5deaa6476f | ||
|
|
78d831fc63 | ||
|
|
46809c3819 | ||
|
|
8f559ca170 | ||
|
|
48ea11f571 | ||
|
|
2ff3400ef1 | ||
|
|
bc8ce81bbc | ||
|
|
7c131bfe1b | ||
|
|
f1e063ee76 | ||
|
|
3cd5f573b1 | ||
|
|
9eaf98e4a1 | ||
|
|
d56308539b | ||
|
|
68c4d965cd | ||
|
|
d10b5cf56e | ||
|
|
92223607fe | ||
|
|
21beefa7e6 | ||
|
|
fec613eb13 | ||
|
|
b007aa3827 | ||
|
|
8cd293310a | ||
|
|
9e8c4e61a5 | ||
|
|
9725870e6a | ||
|
|
204284f5d3 | ||
|
|
70cffa4466 | ||
|
|
4f885b15c0 | ||
|
|
28c541078b | ||
|
|
4d031cb029 | ||
|
|
1ea6f27d7d | ||
|
|
636e9dc446 | ||
|
|
dbcff623c8 | ||
|
|
e93adc15c2 | ||
|
|
244473cd4f |
130
CHANGELOG.md
130
CHANGELOG.md
@@ -1,3 +1,133 @@
|
|||||||
|
# [2.188.0-dev.15](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.14...v2.188.0-dev.15) (2023-08-14)
|
||||||
|
|
||||||
|
# [2.188.0-dev.14](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.13...v2.188.0-dev.14) (2023-08-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* allow using `PreferenceScreen` outside of current module ([fe94013](https://github.com/ReVanced/revanced-patches/commit/fe94013a2235953b32fed6e0710a252698a264b3))
|
||||||
|
|
||||||
|
# [2.188.0-dev.13](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.12...v2.188.0-dev.13) (2023-08-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - External downloads:** Recommend Seal instead of PowerTube ([#2803](https://github.com/ReVanced/revanced-patches/issues/2803)) ([082e067](https://github.com/ReVanced/revanced-patches/commit/082e067338026d05046ed5f398a1261aa20d3cb3))
|
||||||
|
|
||||||
|
# [2.188.0-dev.12](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.11...v2.188.0-dev.12) (2023-08-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Add `Override certificate pinning` patch ([#2781](https://github.com/ReVanced/revanced-patches/issues/2781)) ([94ed738](https://github.com/ReVanced/revanced-patches/commit/94ed738515aa6e1a1d346b85b54805e68e36f94c))
|
||||||
|
|
||||||
|
# [2.188.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.10...v2.188.0-dev.11) (2023-08-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Client spoof:** Remove exception from option ([9c69f87](https://github.com/ReVanced/revanced-patches/commit/9c69f876902496c101eac295e581c15e02bfaf29))
|
||||||
|
|
||||||
|
# [2.188.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.9...v2.188.0-dev.10) (2023-08-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Tasker:** Remove `Unlock trial` patch ([8354a87](https://github.com/ReVanced/revanced-patches/commit/8354a879cfc6028820e2bb0e01d6f607e145c0f6))
|
||||||
|
|
||||||
|
# [2.188.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.8...v2.188.0-dev.9) (2023-08-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Hide video action buttons:** Hide individual action buttons ([#2723](https://github.com/ReVanced/revanced-patches/issues/2723)) ([220f694](https://github.com/ReVanced/revanced-patches/commit/220f694b12e7ed013753c8215d181936ab2205c3))
|
||||||
|
|
||||||
|
# [2.188.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.7...v2.188.0-dev.8) (2023-08-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Change package name:** Append `.revanced` to package name by default ([#2750](https://github.com/ReVanced/revanced-patches/issues/2750)) ([e83e62f](https://github.com/ReVanced/revanced-patches/commit/e83e62fc2400caf1c5179d25e0ac4fbd51ddba00))
|
||||||
|
|
||||||
|
# [2.188.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.6...v2.188.0-dev.7) (2023-08-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Debug:** Logging of layout proto buffer strings ([#2759](https://github.com/ReVanced/revanced-patches/issues/2759)) ([189f719](https://github.com/ReVanced/revanced-patches/commit/189f719720551f36c6e006c45558fe5ae46ca4f8))
|
||||||
|
|
||||||
|
# [2.188.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.5...v2.188.0-dev.6) (2023-08-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Client spoof:** Adjust spoof signature settings description ([#2760](https://github.com/ReVanced/revanced-patches/issues/2760)) ([f71d893](https://github.com/ReVanced/revanced-patches/commit/f71d8937663fdbfc93d8e3ce1cdb47e1667554f0))
|
||||||
|
|
||||||
|
# [2.188.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.4...v2.188.0-dev.5) (2023-08-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube Music:** Add `Permanent repeat` patch ([#2722](https://github.com/ReVanced/revanced-patches/issues/2722)) ([506d49c](https://github.com/ReVanced/revanced-patches/commit/506d49c82a68faee25aede8194e7884191c0f271))
|
||||||
|
|
||||||
|
# [2.188.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.3...v2.188.0-dev.4) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* improve wording ([26f9b05](https://github.com/ReVanced/revanced-patches/commit/26f9b0514fda9434b2a36d2f9e5ad6a4f5bb94bd))
|
||||||
|
* **Tiktok - Show seekbar:** Bump compatibility ([#2737](https://github.com/ReVanced/revanced-patches/issues/2737)) ([08413bd](https://github.com/ReVanced/revanced-patches/commit/08413bdc97aef892f7372c585d1d792eb95e30f4))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Lightroom:** Add `Disable mandatory login` patch ([#2738](https://github.com/ReVanced/revanced-patches/issues/2738)) ([896a713](https://github.com/ReVanced/revanced-patches/commit/896a71308f1084d7f941c5b59610e40ea5d53009))
|
||||||
|
* **Lightroom:** Add `Unlock premium` patch ([#2740](https://github.com/ReVanced/revanced-patches/issues/2740)) ([e18a9bc](https://github.com/ReVanced/revanced-patches/commit/e18a9bcb50705d374ccbf03cd6ab9a140a2f23ec))
|
||||||
|
* **YouTube Music:** Add `Permanent Shuffle` patch ([#2730](https://github.com/ReVanced/revanced-patches/issues/2730)) ([86a271c](https://github.com/ReVanced/revanced-patches/commit/86a271cd7cc3d1d2a11ff9ebe962574368b93f4f))
|
||||||
|
|
||||||
|
# [2.188.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.2...v2.188.0-dev.3) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove newline ([545388b](https://github.com/ReVanced/revanced-patches/commit/545388b3b21cabb485c4d2025756c48984548d6b))
|
||||||
|
|
||||||
|
# [2.188.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.1...v2.188.0-dev.2) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Reddit is Fun - Spoof client:** Use a more convincing user agent ([236a18f](https://github.com/ReVanced/revanced-patches/commit/236a18f9356cede156417c0d55a876d25a98cd4d))
|
||||||
|
|
||||||
|
# [2.188.0-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.187.0...v2.188.0-dev.1) (2023-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Nova Launcher:** Remove `Unlock prime` patch ([bbde91c](https://github.com/ReVanced/revanced-patches/commit/bbde91cf9df4b410a34147bbe5f359e39a71ad4c))
|
||||||
|
|
||||||
|
# [2.187.0](https://github.com/ReVanced/revanced-patches/compare/v2.186.0...v2.187.0) (2023-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Remove version numbers from individual patches ([#2709](https://github.com/ReVanced/revanced-patches/issues/2709)) ([7a828ea](https://github.com/ReVanced/revanced-patches/commit/7a828ea8826864505fac9b2bdb3a1261d9f4dc35))
|
||||||
|
* **Sync for Reddit - Change OAuth client id:** Disable piracy detection ([cd103dd](https://github.com/ReVanced/revanced-patches/commit/cd103dd9b8ff2667246d4abaf75577f28bf1a11b))
|
||||||
|
* Use clearer descriptions ([8dbb0e2](https://github.com/ReVanced/revanced-patches/commit/8dbb0e212e8ceeb0381a3509e45afca095ddee53))
|
||||||
|
* **YouTube - Spoof app version:** Fix grammar in description ([#2711](https://github.com/ReVanced/revanced-patches/issues/2711)) ([dd249e6](https://github.com/ReVanced/revanced-patches/commit/dd249e62243e57733a6ff4d3a17d30db0e08a84d))
|
||||||
|
* **YouTube - Spoof App Version:** Remove 17.30.35 target (version no longer works correctly) ([#2703](https://github.com/ReVanced/revanced-patches/issues/2703)) ([210108b](https://github.com/ReVanced/revanced-patches/commit/210108bd8f86f583f5cd5d5538480b76d51d7776))
|
||||||
|
* **YouTube - Theme:** only set splash screen color if background colors are set ([f058db4](https://github.com/ReVanced/revanced-patches/commit/f058db4ba4300400ac92b4a9790708eb8bde7092))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Joey for Reddit:** Add `Change OAuth client id` patch ([1bac47d](https://github.com/ReVanced/revanced-patches/commit/1bac47df889b5221bef1c03e652f894be8d39385))
|
||||||
|
* **Joey for Reddit:** Add `Disable ads` patch ([ad7e147](https://github.com/ReVanced/revanced-patches/commit/ad7e14771208dcab08fd6dc29403b1a4cf602111))
|
||||||
|
* **Reddit is Fun - Spoof client:** Spoof the user agent ([b9aaf61](https://github.com/ReVanced/revanced-patches/commit/b9aaf610ad9f1f45a72265a3782d2cf996020139))
|
||||||
|
* **Sync for Reddit:** add `Disable Sync for Lemmy bottom sheet` patch ([56b535b](https://github.com/ReVanced/revanced-patches/commit/56b535b2a136d4b0afbddf2c8e251889c2555056))
|
||||||
|
* **YouTube - Hide layout components:** Hide `chips shelf` ([#2699](https://github.com/ReVanced/revanced-patches/issues/2699)) ([8e6058b](https://github.com/ReVanced/revanced-patches/commit/8e6058b62350b3d14d79e6fe52b0ad781b66b5de))
|
||||||
|
* **YouTube:** add `Player Flyout Menu` patch ([#2295](https://github.com/ReVanced/revanced-patches/issues/2295)) ([aea0af0](https://github.com/ReVanced/revanced-patches/commit/aea0af059784ae4820a0e73ff91f97bbc3ebc4c7))
|
||||||
|
|
||||||
# [2.187.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.9...v2.187.0-dev.10) (2023-08-02)
|
# [2.187.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.187.0-dev.9...v2.187.0-dev.10) (2023-08-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,17 +4,15 @@ plugins {
|
|||||||
|
|
||||||
group = "app.revanced"
|
group = "app.revanced"
|
||||||
|
|
||||||
val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
|
||||||
val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
google()
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||||
credentials {
|
credentials {
|
||||||
username = githubUsername
|
username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
||||||
password = githubPassword
|
password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Required for FlexVer-Java
|
// Required for FlexVer-Java
|
||||||
@@ -27,15 +25,15 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:12.0.0")
|
implementation("app.revanced:revanced-patcher:13.0.0")
|
||||||
implementation("app.revanced:multidexlib2:2.5.3-a3836654")
|
implementation("com.android.tools.smali:smali:3.0.3")
|
||||||
// Required for meta
|
// Required because build fails without it.
|
||||||
|
// TODO: Find a way to remove this dependency.
|
||||||
|
implementation("com.google.guava:guava:32.1.2-jre")
|
||||||
|
// Used in JsonGenerator.
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
// Required for FlexVer-Java
|
|
||||||
implementation("com.unascribed:flexver-java:1.0.2")
|
|
||||||
|
|
||||||
// A dependency to the Android library unfortunately fails the build,
|
// A dependency to the Android library unfortunately fails the build,
|
||||||
// which is why this is required for the patch change-oauth-client-id
|
// which is why this is required for the patch change-oauth-client-id.
|
||||||
compileOnly(project("dummy"))
|
compileOnly(project("dummy"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 = 2.187.0-dev.10
|
version = 2.188.0-dev.15
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -7,10 +7,10 @@ import app.revanced.patcher.patch.PatchResultError
|
|||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import org.jf.dexlib2.util.MethodUtil
|
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||||
import org.w3c.dom.Node
|
import org.w3c.dom.Node
|
||||||
|
|
||||||
// TODO: populate this to all patches
|
// TODO: populate this to all patches
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.util.patch.*
|
import app.revanced.util.patch.*
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package app.revanced.patches.all.misc.network.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.*
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.all.misc.debugging.patch.EnableAndroidDebuggingPatch
|
||||||
|
import org.w3c.dom.Element
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("Override certificate pinning")
|
||||||
|
@Description("Overrides certificate pinning, allowing to inspect traffic via a proxy.")
|
||||||
|
@DependsOn([EnableAndroidDebuggingPatch::class])
|
||||||
|
class OverrideCertificatePinningPatch : ResourcePatch {
|
||||||
|
|
||||||
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
val resXmlDirectory = context["res/xml"]
|
||||||
|
|
||||||
|
// Add android:networkSecurityConfig="@xml/network_security_config" and the "networkSecurityConfig" attribute if it does not exist.
|
||||||
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
|
val document = editor.file
|
||||||
|
val applicationNode = document.getElementsByTagName("application").item(0) as Element
|
||||||
|
|
||||||
|
if (!applicationNode.hasAttribute("networkSecurityConfig")) {
|
||||||
|
document.createAttribute("android:networkSecurityConfig")
|
||||||
|
.apply { value = "@xml/network_security_config" }.let(applicationNode.attributes::setNamedItem)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// In case the file does not exist create the "network_security_config.xml" file.
|
||||||
|
File(resXmlDirectory, "network_security_config.xml").apply {
|
||||||
|
if (!exists()) {
|
||||||
|
createNewFile()
|
||||||
|
writeText(
|
||||||
|
"""
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
<base-config cleartextTrafficPermitted="true">
|
||||||
|
<trust-anchors>
|
||||||
|
<certificates src="system" />
|
||||||
|
<certificates
|
||||||
|
src="user"
|
||||||
|
overridePins="true" />
|
||||||
|
</trust-anchors>
|
||||||
|
</base-config>
|
||||||
|
<debug-overrides>
|
||||||
|
<trust-anchors>
|
||||||
|
<certificates src="system" />
|
||||||
|
<certificates
|
||||||
|
src="user"
|
||||||
|
overridePins="true" />
|
||||||
|
</trust-anchors>
|
||||||
|
</debug-overrides>
|
||||||
|
</network-security-config>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
// If the file already exists.
|
||||||
|
readText().let { text ->
|
||||||
|
if (!text.contains("<certificates src=\"user\" />")) {
|
||||||
|
writeText(
|
||||||
|
text.replace(
|
||||||
|
"<trust-anchors>",
|
||||||
|
"<trust-anchors>\n<certificates src=\"user\" overridePins=\"true\" />\n<certificates src=\"system\" />"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,39 +9,43 @@ import org.w3c.dom.Element
|
|||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
@Name("Change package name")
|
@Name("Change package name")
|
||||||
@Description("Changes the package name.")
|
@Description("Changes the package name. Appends \".revanced\" to the package name by default.")
|
||||||
class ChangePackageNamePatch : ResourcePatch {
|
class ChangePackageNamePatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
packageName?.let { packageName ->
|
val packageNameToUse = packageName ?: getDefaultPackageName(context)
|
||||||
val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$")
|
|
||||||
if (!packageName.matches(packageNameRegex))
|
|
||||||
return PatchResultError("Invalid package name")
|
|
||||||
|
|
||||||
var originalPackageName: String
|
val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$")
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
if (!packageNameToUse.matches(packageNameRegex))
|
||||||
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
return PatchResultError("Invalid package name")
|
||||||
originalPackageName = manifest.getAttribute("package")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!originalPackageName.matches(packageNameRegex))
|
val originalPackageName = getOriginalPackageName(context)
|
||||||
return PatchResultError("Failed to get the original package name")
|
|
||||||
|
|
||||||
context["AndroidManifest.xml"].apply {
|
context["AndroidManifest.xml"].apply {
|
||||||
readText().replace(originalPackageName, packageName).let(::writeText)
|
readText().replace(originalPackageName, packageNameToUse).let(::writeText)
|
||||||
}
|
}
|
||||||
|
|
||||||
} ?: return PatchResultError("No package name provided")
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun getDefaultPackageName(context: ResourceContext): String {
|
||||||
|
val originalPackageName = getOriginalPackageName(context)
|
||||||
|
return "$originalPackageName.revanced"
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getOriginalPackageName(context: ResourceContext): String {
|
||||||
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
|
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
||||||
|
return manifest.getAttribute("package")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
companion object : OptionsContainer() {
|
companion object : OptionsContainer() {
|
||||||
var packageName: String? by option(
|
var packageName: String? by option(
|
||||||
PatchOption.StringOption(
|
PatchOption.StringOption(
|
||||||
key = "packageName",
|
key = "packageName",
|
||||||
default = null,
|
default = null,
|
||||||
title = "Package name",
|
title = "Package name",
|
||||||
description = "The name of the package to rename of the app.",
|
description = "The name of the package to rename the app to.",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
|||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.all.screencapture.removerestriction.resource.patch.RemoveCaptureRestrictionResourcePatch
|
import app.revanced.patches.all.screencapture.removerestriction.resource.patch.RemoveCaptureRestrictionResourcePatch
|
||||||
import app.revanced.util.patch.*
|
import app.revanced.util.patch.*
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
@Name("Remove screen capture restriction")
|
@Name("Remove screen capture restriction")
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.util.patch.*
|
import app.revanced.util.patch.*
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ProUnlockFingerprint : MethodFingerprint(
|
object ProUnlockFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
|
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
|
||||||
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Pro unlock")
|
@Name("Pro unlock")
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
||||||
object BootStateFingerprint : MethodFingerprint(
|
object BootStateFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
||||||
object CreateKeyFingerprint : MethodFingerprint(
|
object CreateKeyFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.finanzonline.detection.root.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint
|
import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Remove device restrictions")
|
@Name("Remove device restrictions")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root.fingerprints
|
package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.idaustria.detection.signature.fingerprints
|
package app.revanced.patches.idaustria.detection.signature.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object SpoofSignatureFingerprint : MethodFingerprint(
|
object SpoofSignatureFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ShowAdFingerprint : MethodFingerprint(
|
object ShowAdFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
|
||||||
abstract class MediaAdFingerprint(
|
abstract class MediaAdFingerprint(
|
||||||
returnType: String? = "Z",
|
returnType: String? = "Z",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
||||||
"V",
|
"V",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ShoppingAdFingerprint : MediaAdFingerprint(
|
object ShoppingAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.Gene
|
|||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.MediaAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.MediaAdFingerprint
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.PaidPartnershipAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.PaidPartnershipAdFingerprint
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.ShoppingAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.ShoppingAdFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Hide timeline ads")
|
@Name("Hide timeline ads")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.irplus.ad.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IrplusAdsFingerprint : MethodFingerprint(
|
object IrplusAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.adobe.lrmobile",)])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class DisableMandatoryLoginCompatibility
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.fingerprint
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object IsLoggedInFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.IF_NE,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.GOTO
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.lightroom.misc.login.annotations.DisableMandatoryLoginCompatibility
|
||||||
|
import app.revanced.patches.lightroom.misc.login.fingerprint.IsLoggedInFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Disable mandatory login")
|
||||||
|
@DisableMandatoryLoginCompatibility
|
||||||
|
class DisableMandatoryLoginPatch : BytecodePatch(listOf(IsLoggedInFingerprint)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
IsLoggedInFingerprint.result?.mutableMethod?.apply {
|
||||||
|
val index = implementation!!.instructions.lastIndex - 1
|
||||||
|
// Set isLoggedIn = true.
|
||||||
|
replaceInstruction(index, "const/4 v0, 0x1")
|
||||||
|
} ?: throw IsLoggedInFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.adobe.lrmobile")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class UnlockPremiumCompatibility
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.fingerprint
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object HasPurchasedFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Z",
|
||||||
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
|
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.CONST_4,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.lightroom.misc.premium.annotations.UnlockPremiumCompatibility
|
||||||
|
import app.revanced.patches.lightroom.misc.premium.fingerprint.HasPurchasedFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Unlock premium")
|
||||||
|
@Description("Unlocks premium features.")
|
||||||
|
@UnlockPremiumCompatibility
|
||||||
|
class UnlockPremiumPatch : BytecodePatch(listOf(HasPurchasedFingerprint)) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
// Set hasPremium = true.
|
||||||
|
HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1")
|
||||||
|
?: throw HasPurchasedFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.memegenerator.detection.license.fingerprint
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object LicenseValidationFingerprint : MethodFingerprint(
|
object LicenseValidationFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.memegenerator.detection.signature.fingerprint
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2)
|
@FuzzyPatternScanMethod(2)
|
||||||
object VerifySignatureFingerprint : MethodFingerprint(
|
object VerifySignatureFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.memegenerator.misc.pro.fingerprint
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object IsFreeVersionFingerprint : MethodFingerprint(
|
object IsFreeVersionFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/Boolean;",
|
returnType = "Ljava/lang/Boolean;",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.messenger.ads.inbox.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object LoadInboxAdsFingerprint : MethodFingerprint(
|
object LoadInboxAdsFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.messenger.inputfield.fingerprints
|
package app.revanced.patches.messenger.inputfield.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.dexbacked.value.DexBackedStringEncodedValue
|
import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue
|
||||||
|
|
||||||
object SendTypingIndicatorFingerprint : MethodFingerprint(
|
object SendTypingIndicatorFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.messenger.inputfield.fingerprints
|
package app.revanced.patches.messenger.inputfield.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.messenger.inputfield.fingerprints.SwitchMessangeInputEmojiButtonFingerprint
|
import app.revanced.patches.messenger.inputfield.fingerprints.SwitchMessangeInputEmojiButtonFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Disable switching emoji to sticker in message input field")
|
@Name("Disable switching emoji to sticker in message input field")
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.moneymanager.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object UnlockProFingerprint : MethodFingerprint(
|
object UnlockProFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.ad.video.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
|
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.ad.video.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.music.audio.codecs.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.music.audio.codecs.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import app.revanced.patcher.util.smali.toInstruction
|
|||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
|
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
|
||||||
import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint
|
import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Codecs unlock")
|
@Name("Codecs unlock")
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object AudioOnlyEnablerFingerprint: MethodFingerprint(
|
object AudioOnlyEnablerFingerprint: MethodFingerprint(
|
||||||
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentrepeat.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object RepeatTrackFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
listOf("L", "L"),
|
||||||
|
listOf(
|
||||||
|
Opcode.CHECK_CAST,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IF_NEZ
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentrepeat.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
|
import app.revanced.patches.music.interaction.permanentrepeat.fingerprints.RepeatTrackFingerprint
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("Permanent repeat")
|
||||||
|
@Description("Permanently remember your repeating preference even if the playlist ends or another track is played.")
|
||||||
|
@MusicCompatibility
|
||||||
|
class PermanentRepeatPatch : BytecodePatch(
|
||||||
|
listOf(RepeatTrackFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
RepeatTrackFingerprint.result?.let {
|
||||||
|
val startIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
|
val repeatIndex = startIndex + 3
|
||||||
|
|
||||||
|
it.mutableMethod.apply {
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
startIndex,
|
||||||
|
"goto :repeat",
|
||||||
|
ExternalLabel("repeat", getInstruction(repeatIndex))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: return RepeatTrackFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentshuffle.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
object DisableShuffleFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
listOf(),
|
||||||
|
listOf(
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.IGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentshuffle.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
|
import app.revanced.patches.music.interaction.permanentshuffle.fingerprints.DisableShuffleFingerprint
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("Permanent shuffle")
|
||||||
|
@Description("Permanently remember your shuffle preference " +
|
||||||
|
"even if the playlist ends or another track is played.")
|
||||||
|
@MusicCompatibility
|
||||||
|
class PermanentShuffleTogglePatch : BytecodePatch(
|
||||||
|
listOf(DisableShuffleFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
DisableShuffleFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||||
|
?: return DisableShuffleFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.compactheader.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object CompactHeaderConstructorFingerprint : MethodFingerprint(
|
object CompactHeaderConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
|
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction11x
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
@Name("Compact header")
|
@Name("Compact header")
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.premium.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object HideGetPremiumFingerprint : MethodFingerprint(
|
object HideGetPremiumFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.music.layout.premium.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.music.layout.upgradebutton.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.util.smali.toInstructions
|
import app.revanced.patcher.util.smali.toInstructions
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction22t
|
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22t
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.music.misc.androidauto.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object CheckCertificateFingerprint : MethodFingerprint(
|
object CheckCertificateFingerprint : MethodFingerprint(
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.music.misc.microg.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
||||||
"I",
|
"I",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.music.misc.microg.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.music.premium.backgroundplay.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.nfctoolsse.misc.pro.fingerprints
|
package app.revanced.patches.nfctoolsse.misc.pro.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IsLicenseRegisteredFingerprint : MethodFingerprint(
|
object IsLicenseRegisteredFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
package app.revanced.patches.nova.prime.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility(
|
|
||||||
[
|
|
||||||
Package("com.teslacoilsw.launcher")
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class UnlockPrimeCompatibility
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package app.revanced.patches.nova.prime.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
object UnlockPrimeFingerprint : MethodFingerprint(
|
|
||||||
"V",
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.IPUT_OBJECT,
|
|
||||||
Opcode.CONST_STRING,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
|
||||||
Opcode.MOVE_RESULT
|
|
||||||
),
|
|
||||||
strings = listOf("1")
|
|
||||||
)
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
package app.revanced.patches.nova.prime.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.nova.prime.annotations.UnlockPrimeCompatibility
|
|
||||||
import app.revanced.patches.nova.prime.fingerprints.UnlockPrimeFingerprint
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Unlock prime")
|
|
||||||
@Description("Unlocks Nova Prime and all functions of the app.")
|
|
||||||
@UnlockPrimeCompatibility
|
|
||||||
class UnlockPrimePatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
UnlockPrimeFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
private companion object {
|
|
||||||
// Any value except 0 unlocks prime, but 512 is needed for a protection mechanism
|
|
||||||
// which would reset the preferences if the value on disk had changed after a restart.
|
|
||||||
const val PRIME_STATUS: Int = 512
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
|
||||||
UnlockPrimeFingerprint.result?.apply {
|
|
||||||
val insertIndex = scanResult.patternScanResult!!.endIndex + 1
|
|
||||||
|
|
||||||
val primeStatusRegister =
|
|
||||||
(mutableMethod.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
|
||||||
|
|
||||||
mutableMethod.addInstruction(
|
|
||||||
insertIndex,
|
|
||||||
"""
|
|
||||||
const/16 v$primeStatusRegister, $PRIME_STATUS
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
} ?: return UnlockPrimeFingerprint.toErrorResult()
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.photomath.detection.signature.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object CheckSignatureFingerprint : MethodFingerprint(
|
object CheckSignatureFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import app.revanced.patcher.patch.BytecodePatch
|
|||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patches.photomath.detection.signature.fingerprints.CheckSignatureFingerprint
|
import app.revanced.patches.photomath.detection.signature.fingerprints.CheckSignatureFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Description("Disables detection of incorrect signature.")
|
@Description("Disables detection of incorrect signature.")
|
||||||
class SignatureDetectionPatch : BytecodePatch(
|
class SignatureDetectionPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.photomath.misc.unlockplus.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IsPlusUnlockedFingerprint : MethodFingerprint(
|
object IsPlusUnlockedFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.pixiv.ads.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
|
||||||
object IsNotPremiumFingerprint : MethodFingerprint(
|
object IsNotPremiumFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.reddit.ad.general.fingerprints
|
package app.revanced.patches.reddit.ad.general.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object NewAdPostFingerprint : MethodFingerprint(
|
object NewAdPostFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(Opcode.INVOKE_VIRTUAL),
|
opcodes = listOf(Opcode.INVOKE_VIRTUAL),
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ import app.revanced.patches.reddit.ad.comments.patch.HideCommentAdsPatch
|
|||||||
import app.revanced.patches.reddit.ad.general.annotations.HideAdsCompatibility
|
import app.revanced.patches.reddit.ad.general.annotations.HideAdsCompatibility
|
||||||
import app.revanced.patches.reddit.ad.general.fingerprints.AdPostFingerprint
|
import app.revanced.patches.reddit.ad.general.fingerprints.AdPostFingerprint
|
||||||
import app.revanced.patches.reddit.ad.general.fingerprints.NewAdPostFingerprint
|
import app.revanced.patches.reddit.ad.general.fingerprints.NewAdPostFingerprint
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Hide ads")
|
@Name("Hide ads")
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ abstract class AbstractSpoofClientPatch(
|
|||||||
|
|
||||||
val error = """
|
val error = """
|
||||||
In order to use this patch, you need to provide a client ID.
|
In order to use this patch, you need to provide a client ID.
|
||||||
You can do this by creating a file at ${it.absolutePath} with the client ID as its content.
|
You can do that by creating a file at ${it.absolutePath} with the client ID as its content.
|
||||||
Alternatively, you can provide the client ID using patch options.
|
Alternatively, you can provide the client ID using patch options.
|
||||||
|
|
||||||
You can get your client ID from https://www.reddit.com/prefs/apps.
|
You can get your client ID from https://www.reddit.com/prefs/apps.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
|||||||
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint
|
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.GetAuthorizationUrlFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint
|
import app.revanced.patches.reddit.customclients.baconreader.api.fingerprints.RequestTokenFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
|
||||||
@SpoofClientAnnotation
|
@SpoofClientAnnotation
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import app.revanced.patches.reddit.customclients.AbstractSpoofClientPatch
|
|||||||
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
||||||
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint
|
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.GetHttpBasicAuthHeaderFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
|
import app.revanced.patches.reddit.customclients.infinityforreddit.api.fingerprints.LoginActivityOnCreateFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@SpoofClientAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Spoofs the client in order to allow logging in. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints
|
package app.revanced.patches.reddit.customclients.joeyforreddit.ads.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IsAdFreeUserFingerprint : MethodFingerprint(
|
object IsAdFreeUserFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints
|
package app.revanced.patches.reddit.customclients.joeyforreddit.api.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object GetClientIdFingerprint : MethodFingerprint(
|
object GetClientIdFingerprint : MethodFingerprint(
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.reddit.customclients.joeyforreddit.detection.piracy
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object PiracyDetectionFingerprint : MethodFingerprint(
|
object PiracyDetectionFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object GetUserAgentFingerprint : MethodFingerprint(
|
object GetUserAgentFingerprint : MethodFingerprint(
|
||||||
"Ljava/lang/String;",
|
"Ljava/lang/String;",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
|||||||
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint
|
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BasicAuthorizationFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint
|
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.BuildAuthorizationStringFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.GetUserAgentFingerprint
|
import app.revanced.patches.reddit.customclients.redditisfun.api.fingerprints.GetUserAgentFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@SpoofClientAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Spoofs the client in order to allow logging in. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
@@ -58,15 +58,16 @@ class SpoofClientPatch : AbstractSpoofClientPatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult {
|
override fun List<MethodFingerprintResult>.patchUserAgent(context: BytecodeContext): PatchResult {
|
||||||
// Use a random number as the user agent string.
|
// Use a random user agent.
|
||||||
val randomUserAgent = (0..100000).random()
|
val randomName = (0..100000).random()
|
||||||
|
val userAgent = "android:app.revanced.$randomName:v1.0.0 (by /u/revanced)"
|
||||||
|
|
||||||
first().mutableMethod.addInstructions(
|
first().mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const-string v0, "$randomUserAgent"
|
const-string v0, "$userAgent"
|
||||||
return-object v0
|
return-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints
|
|||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetLoggedOutBearerTokenFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.GetRefreshTokenFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint
|
import app.revanced.patches.reddit.customclients.relayforreddit.api.fingerprints.LoginActivityClientIdFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@SpoofClientAnnotation
|
@SpoofClientAnnotation
|
||||||
@Description("Spoofs the client in order to allow logging in. " +
|
@Description("Spoofs the client in order to allow logging in. " +
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.reddit.customclients.syncforreddit.ads.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IsAdsEnabledFingerprint : MethodFingerprint(
|
object IsAdsEnabledFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import app.revanced.patches.reddit.customclients.SpoofClientAnnotation
|
|||||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetAuthorizationStringFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
import app.revanced.patches.reddit.customclients.syncforreddit.api.fingerprints.GetBearerTokenFingerprint
|
||||||
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
import app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy.patch.DisablePiracyDetectionPatch
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.reference.StringReference
|
import com.android.tools.smali.dexlib2.iface.reference.StringReference
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@SpoofClientAnnotation
|
@SpoofClientAnnotation
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package app.revanced.patches.reddit.customclients.syncforreddit.detection.piracy
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
|
||||||
object PiracyDetectionFingerprint : MethodFingerprint(
|
object PiracyDetectionFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.shared.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object WatchWhileActivityFingerprint : MethodFingerprint(
|
object WatchWhileActivityFingerprint : MethodFingerprint(
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint.RegisterResolver
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint.RegisterResolver
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import org.jf.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
|
||||||
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
||||||
abstract class AbstractIntegrationsPatch(
|
abstract class AbstractIntegrationsPatch(
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package app.revanced.patches.shared.misc.fix.verticalscroll.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object CanScrollVerticallyFingerprint : MethodFingerprint(
|
object CanScrollVerticallyFingerprint : MethodFingerprint(
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
|||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patches.shared.misc.fix.verticalscroll.annotations.VerticalScrollCompatibility
|
import app.revanced.patches.shared.misc.fix.verticalscroll.annotations.VerticalScrollCompatibility
|
||||||
import app.revanced.patches.shared.misc.fix.verticalscroll.fingerprints.CanScrollVerticallyFingerprint
|
import app.revanced.patches.shared.misc.fix.verticalscroll.fingerprints.CanScrollVerticallyFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Description("Fixes issues with refreshing the feed when the first component is of type EmptyComponent.")
|
@Description("Fixes issues with refreshing the feed when the first component is of type EmptyComponent.")
|
||||||
@VerticalScrollCompatibility
|
@VerticalScrollCompatibility
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.w3c.dom.Element
|
|||||||
* @param tag The tag of the preference.
|
* @param tag The tag of the preference.
|
||||||
* @param summary The summary of the preference.
|
* @param summary The summary of the preference.
|
||||||
*/
|
*/
|
||||||
internal abstract class BasePreference(
|
abstract class BasePreference(
|
||||||
val key: String?,
|
val key: String?,
|
||||||
val title: StringResource,
|
val title: StringResource,
|
||||||
val summary: StringResource? = null,
|
val summary: StringResource? = null,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.w3c.dom.Element
|
|||||||
* @param name The name of the resource.
|
* @param name The name of the resource.
|
||||||
* @param tag The tag of the resource.
|
* @param tag The tag of the resource.
|
||||||
*/
|
*/
|
||||||
internal abstract class BaseResource(
|
abstract class BaseResource(
|
||||||
val name: String,
|
val name: String,
|
||||||
val tag: String
|
val tag: String
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.w3c.dom.Document
|
|||||||
* @param summary The summary of the preference.
|
* @param summary The summary of the preference.
|
||||||
* @param default The default value of the preference.
|
* @param default The default value of the preference.
|
||||||
*/
|
*/
|
||||||
internal abstract class DefaultBasePreference<T>(
|
abstract class DefaultBasePreference<T>(
|
||||||
key: String?,
|
key: String?,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
summary: StringResource? = null,
|
summary: StringResource? = null,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.w3c.dom.Document
|
|||||||
* @param name The name of the array resource.
|
* @param name The name of the array resource.
|
||||||
* @param items The items of the array resource.
|
* @param items The items of the array resource.
|
||||||
*/
|
*/
|
||||||
internal class ArrayResource(
|
class ArrayResource(
|
||||||
name: String,
|
name: String,
|
||||||
val items: List<StringResource>
|
val items: List<StringResource>
|
||||||
) : BaseResource(name, "string-array") {
|
) : BaseResource(name, "string-array") {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.w3c.dom.Document
|
|||||||
* @param summary The summary of the list preference.
|
* @param summary The summary of the list preference.
|
||||||
* @param default The default entry value of the list preference.
|
* @param default The default entry value of the list preference.
|
||||||
*/
|
*/
|
||||||
internal class ListPreference(
|
class ListPreference(
|
||||||
key: String,
|
key: String,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
val entries: ArrayResource,
|
val entries: ArrayResource,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.w3c.dom.Element
|
|||||||
* @param title The title of the preference.
|
* @param title The title of the preference.
|
||||||
* @param summary The summary of the text preference.
|
* @param summary The summary of the text preference.
|
||||||
*/
|
*/
|
||||||
internal class NonInteractivePreference(
|
class NonInteractivePreference(
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
summary: StringResource,
|
summary: StringResource,
|
||||||
) : BasePreference(null, title, summary, "Preference") {
|
) : BasePreference(null, title, summary, "Preference") {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import org.w3c.dom.Document
|
|||||||
* @param summary The summary of the text preference.
|
* @param summary The summary of the text preference.
|
||||||
* @param intent The intent of the preference.
|
* @param intent The intent of the preference.
|
||||||
*/
|
*/
|
||||||
internal class Preference(
|
class Preference(
|
||||||
key: String,
|
key: String,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
summary: StringResource,
|
summary: StringResource,
|
||||||
@@ -33,7 +33,7 @@ internal class Preference(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class Intent(
|
class Intent(
|
||||||
internal val targetPackage: String,
|
internal val targetPackage: String,
|
||||||
internal val data: String,
|
internal val data: String,
|
||||||
internal val targetClass: String
|
internal val targetClass: String
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import org.w3c.dom.Document
|
|||||||
* @param title The title of the preference.
|
* @param title The title of the preference.
|
||||||
* @param preferences Child preferences of this category.
|
* @param preferences Child preferences of this category.
|
||||||
*/
|
*/
|
||||||
internal open class PreferenceCategory(
|
open class PreferenceCategory(
|
||||||
key: String,
|
key: String,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
var preferences: List<BasePreference>,
|
var preferences: List<BasePreference>,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.w3c.dom.Document
|
|||||||
* @param preferences Child preferences of this screen.
|
* @param preferences Child preferences of this screen.
|
||||||
* @param summary The summary of the text preference.
|
* @param summary The summary of the text preference.
|
||||||
*/
|
*/
|
||||||
internal open class PreferenceScreen(
|
open class PreferenceScreen(
|
||||||
key: String,
|
key: String,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
var preferences: List<BasePreference>,
|
var preferences: List<BasePreference>,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import org.w3c.dom.Document
|
|||||||
* @param value The value of the string.
|
* @param value The value of the string.
|
||||||
* @param formatted If the string is formatted. If false, the attribute will be set.
|
* @param formatted If the string is formatted. If false, the attribute will be set.
|
||||||
*/
|
*/
|
||||||
internal class StringResource(
|
class StringResource(
|
||||||
name: String,
|
name: String,
|
||||||
val value: String,
|
val value: String,
|
||||||
val formatted: Boolean = true
|
val formatted: Boolean = true
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import org.w3c.dom.Element
|
|||||||
* @param userDialogMessage The message to show in a dialog when the user toggles the preference.
|
* @param userDialogMessage The message to show in a dialog when the user toggles the preference.
|
||||||
* @param default The default value of the switch.
|
* @param default The default value of the switch.
|
||||||
*/
|
*/
|
||||||
internal class SwitchPreference(
|
class SwitchPreference(
|
||||||
key: String, title: StringResource,
|
key: String, title: StringResource,
|
||||||
val summaryOn: StringResource,
|
val summaryOn: StringResource,
|
||||||
val summaryOff: StringResource,
|
val summaryOff: StringResource,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.w3c.dom.Document
|
|||||||
* @param summary The summary of the text preference.
|
* @param summary The summary of the text preference.
|
||||||
* @param default The default value of the text preference.
|
* @param default The default value of the text preference.
|
||||||
*/
|
*/
|
||||||
internal class TextPreference(
|
class TextPreference(
|
||||||
key: String?,
|
key: String?,
|
||||||
title: StringResource,
|
title: StringResource,
|
||||||
summary: StringResource?,
|
summary: StringResource?,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
|
|||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
|
|
||||||
internal abstract class AbstractPreferenceScreen(
|
abstract class AbstractPreferenceScreen(
|
||||||
private val root: MutableList<Screen> = mutableListOf()
|
private val root: MutableList<Screen> = mutableListOf()
|
||||||
) : Closeable {
|
) : Closeable {
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user