mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-04-30 22:54:40 +02:00
chore: merge branch dev
to main
(#2732)
This commit is contained in:
commit
4a3ad1a7d0
200
CHANGELOG.md
200
CHANGELOG.md
@ -1,3 +1,203 @@
|
|||||||
|
# [2.188.0-dev.28](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.27...v2.188.0-dev.28) (2023-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Add `Enable tablet layout` patch ([3ac68b3](https://github.com/ReVanced/revanced-patches/commit/3ac68b3c6ef0d568780855003217fc3e904d789b))
|
||||||
|
|
||||||
|
# [2.188.0-dev.27](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.26...v2.188.0-dev.27) (2023-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube Music - Exclusive audio playback:** Support latest version ([bfa379a](https://github.com/ReVanced/revanced-patches/commit/bfa379a398bce8d635043eb2d4f81c4ed7440101))
|
||||||
|
|
||||||
|
# [2.188.0-dev.26](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.25...v2.188.0-dev.26) (2023-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Support version `18.32.39` ([7b503e2](https://github.com/ReVanced/revanced-patches/commit/7b503e2336dd4d330b651bf7c168d95a38e8c777))
|
||||||
|
|
||||||
|
# [2.188.0-dev.25](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.24...v2.188.0-dev.25) (2023-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Add `Custom player overlay opacity` patch ([#2721](https://github.com/ReVanced/revanced-patches/issues/2721)) ([2622b00](https://github.com/ReVanced/revanced-patches/commit/2622b008ab78b15aa3c28a13b38e63041f29c9ea))
|
||||||
|
|
||||||
|
# [2.188.0-dev.24](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.23...v2.188.0-dev.24) (2023-08-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Exclude `Custom branding` patch by default ([d6de957](https://github.com/ReVanced/revanced-patches/commit/d6de957f4efce11d9a709d4c8f500b039166fc2f))
|
||||||
|
|
||||||
|
# [2.188.0-dev.23](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.22...v2.188.0-dev.23) (2023-08-25)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Strava:** Add `Subscription features` patch ([#2872](https://github.com/ReVanced/revanced-patches/issues/2872)) ([387eb29](https://github.com/ReVanced/revanced-patches/commit/387eb29e7ed45169c89a03513af64104d0082f28))
|
||||||
|
|
||||||
|
# [2.188.0-dev.22](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.21...v2.188.0-dev.22) (2023-08-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* Publicize resource utility functions ([20aff26](https://github.com/ReVanced/revanced-patches/commit/20aff26784296517257ea19d66ffd3bdfe6b06fa))
|
||||||
|
* Use an extension property to create new exception when failing to resolve a fingerprint ([47eac14](https://github.com/ReVanced/revanced-patches/commit/47eac14f039dc466c1957470d82255bfa2c06ff0))
|
||||||
|
|
||||||
|
# [2.188.0-dev.21](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.20...v2.188.0-dev.21) (2023-08-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Duolingo:** Add `Unlock Duolingo Super` patch ([#2862](https://github.com/ReVanced/revanced-patches/issues/2862)) ([61a7533](https://github.com/ReVanced/revanced-patches/commit/61a7533136f38d7a308e31c9f250baad00515d6a))
|
||||||
|
|
||||||
|
# [2.188.0-dev.20](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.19...v2.188.0-dev.20) (2023-08-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Enable android debugging:** Update patch description ([#2869](https://github.com/ReVanced/revanced-patches/issues/2869)) ([d9f0d08](https://github.com/ReVanced/revanced-patches/commit/d9f0d08498662e7aa18edb5201a5d60f3738e4e4))
|
||||||
|
|
||||||
|
# [2.188.0-dev.19](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.18...v2.188.0-dev.19) (2023-08-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Solid Explorer:** Add `Remove file size limit` patch ([01c617d](https://github.com/ReVanced/revanced-patches/commit/01c617d94e58b30bbffb3426fcfa55b8979962bd))
|
||||||
|
|
||||||
|
# [2.188.0-dev.18](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.17...v2.188.0-dev.18) (2023-08-23)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Support version `18.29.38` ([c1b9eef](https://github.com/ReVanced/revanced-patches/commit/c1b9eefa280b980d08a571e1ce205dc71ccde3b6))
|
||||||
|
|
||||||
|
# [2.188.0-dev.17](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.16...v2.188.0-dev.17) (2023-08-21)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube:** Add `Alternative thumbnails` patch ([#2834](https://github.com/ReVanced/revanced-patches/issues/2834)) ([8a4277c](https://github.com/ReVanced/revanced-patches/commit/8a4277c486d995f57cde3a56274979c4a7b42bf6))
|
||||||
|
|
||||||
|
# [2.188.0-dev.16](https://github.com/ReVanced/revanced-patches/compare/v2.188.0-dev.15...v2.188.0-dev.16) (2023-08-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube Music - Remove upgrade button:** Remove the correct navigation bar item ([fd3813f](https://github.com/ReVanced/revanced-patches/commit/fd3813f66ededdae1e52bf021a3de9d818f65096))
|
||||||
|
|
||||||
|
# [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)
|
# [2.187.0](https://github.com/ReVanced/revanced-patches/compare/v2.186.0...v2.187.0) (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:14.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
|
version = 2.188.0-dev.28
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,25 +1,26 @@
|
|||||||
package app.revanced.extensions
|
package app.revanced.extensions
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchException
|
||||||
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
|
|
||||||
/**
|
/**
|
||||||
* Convert a [MethodFingerprint] to a [PatchResultError].
|
* The [PatchException] of failing to resolve a [MethodFingerprint].
|
||||||
*
|
*
|
||||||
* @return A [PatchResultError] for the [MethodFingerprint].
|
* @return The [PatchException].
|
||||||
*/
|
*/
|
||||||
internal fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name")
|
val MethodFingerprint.exception
|
||||||
|
get() = PatchException("Failed to resolve $name")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
||||||
@ -27,27 +28,27 @@ internal fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to res
|
|||||||
* @param method The [Method] to find.
|
* @param method The [Method] to find.
|
||||||
* @return The [MutableMethod].
|
* @return The [MutableMethod].
|
||||||
*/
|
*/
|
||||||
internal fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
|
fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
|
||||||
MethodUtil.methodSignaturesMatch(it, method)
|
MethodUtil.methodSignaturesMatch(it, method)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* apply a transform to all methods of the class
|
* apply a transform to all methods of the class.
|
||||||
*
|
*
|
||||||
* @param transform the transformation function. original method goes in, transformed method goes out
|
* @param transform the transformation function. original method goes in, transformed method goes out.
|
||||||
*/
|
*/
|
||||||
internal fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
|
fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
|
||||||
val transformedMethods = methods.map { it.transform() }
|
val transformedMethods = methods.map { it.transform() }
|
||||||
methods.clear()
|
methods.clear()
|
||||||
methods.addAll(transformedMethods)
|
methods.addAll(transformedMethods)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun Node.doRecursively(action: (Node) -> Unit) {
|
fun Node.doRecursively(action: (Node) -> Unit) {
|
||||||
action(this)
|
action(this)
|
||||||
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun MutableMethod.injectHideViewCall(
|
fun MutableMethod.injectHideViewCall(
|
||||||
insertIndex: Int,
|
insertIndex: Int,
|
||||||
viewRegister: Int,
|
viewRegister: Int,
|
||||||
classDescriptor: String,
|
classDescriptor: String,
|
||||||
@ -57,7 +58,13 @@ internal fun MutableMethod.injectHideViewCall(
|
|||||||
"invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V"
|
"invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V"
|
||||||
)
|
)
|
||||||
|
|
||||||
internal fun Method.findIndexForIdResource(resourceName: String): Int {
|
/**
|
||||||
|
* Find the index of the first constant instruction with the id of the given resource name.
|
||||||
|
*
|
||||||
|
* @param resourceName the name of the resource to find the id for.
|
||||||
|
* @return the index of the first constant instruction with the id of the given resource name, or -1 if not found.
|
||||||
|
*/
|
||||||
|
fun Method.findIndexForIdResource(resourceName: String): Int {
|
||||||
fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single {
|
fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single {
|
||||||
it.type == "id" && it.name == resourceName
|
it.type == "id" && it.name == resourceName
|
||||||
}.id
|
}.id
|
||||||
@ -66,6 +73,8 @@ internal fun Method.findIndexForIdResource(resourceName: String): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Find the index of the first constant instruction with the given value.
|
||||||
|
*
|
||||||
* @return the first constant instruction with the value, or -1 if not found.
|
* @return the first constant instruction with the value, or -1 if not found.
|
||||||
*/
|
*/
|
||||||
fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int {
|
fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int {
|
||||||
@ -77,8 +86,23 @@ fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Check if the method contains a constant with the given value.
|
||||||
|
*
|
||||||
* @return if the method contains a constant with the given value.
|
* @return if the method contains a constant with the given value.
|
||||||
*/
|
*/
|
||||||
fun Method.containsConstantInstructionValue(constantValue: Long): Boolean {
|
fun Method.containsConstantInstructionValue(constantValue: Long): Boolean {
|
||||||
return indexOfFirstConstantInstructionValue(constantValue) >= 0
|
return indexOfFirstConstantInstructionValue(constantValue) >= 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Traverse the class hierarchy starting from the given root class.
|
||||||
|
*
|
||||||
|
* @param targetClass the class to start traversing the class hierarchy from.
|
||||||
|
* @param callback function that is called for every class in the hierarchy.
|
||||||
|
*/
|
||||||
|
fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
|
||||||
|
callback(targetClass)
|
||||||
|
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
|
||||||
|
traverseClassHierarchy(it, callback)
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,6 @@ import app.revanced.patcher.extensions.PatchExtensions.description
|
|||||||
import app.revanced.patcher.extensions.PatchExtensions.include
|
import app.revanced.patcher.extensions.PatchExtensions.include
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.options
|
import app.revanced.patcher.extensions.PatchExtensions.options
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.version
|
|
||||||
import app.revanced.patcher.patch.PatchOption
|
import app.revanced.patcher.patch.PatchOption
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@ -17,7 +16,6 @@ internal class JsonGenerator : PatchesFileGenerator {
|
|||||||
JsonPatch(
|
JsonPatch(
|
||||||
it.patchName,
|
it.patchName,
|
||||||
it.description ?: "This patch has no description.",
|
it.description ?: "This patch has no description.",
|
||||||
it.version ?: "0.0.0",
|
|
||||||
!it.include,
|
!it.include,
|
||||||
it.options?.map { option ->
|
it.options?.map { option ->
|
||||||
JsonPatch.Option(
|
JsonPatch.Option(
|
||||||
@ -48,7 +46,6 @@ internal class JsonGenerator : PatchesFileGenerator {
|
|||||||
private class JsonPatch(
|
private class JsonPatch(
|
||||||
val name: String,
|
val name: String,
|
||||||
val description: String,
|
val description: String,
|
||||||
val version: String,
|
|
||||||
val excluded: Boolean,
|
val excluded: Boolean,
|
||||||
val options: Array<Option>,
|
val options: Array<Option>,
|
||||||
val dependencies: Array<String>,
|
val dependencies: Array<String>,
|
||||||
|
@ -1,25 +1,22 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.data.Context
|
import app.revanced.patcher.PatchBundleLoader
|
||||||
import app.revanced.patcher.patch.Patch
|
import app.revanced.patcher.patch.PatchClass
|
||||||
import app.revanced.patcher.util.patch.PatchBundle
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal typealias PatchBundlePatches = List<Class<out Patch<Context>>>
|
internal typealias PatchBundlePatches = List<PatchClass>
|
||||||
|
|
||||||
internal interface PatchesFileGenerator {
|
internal interface PatchesFileGenerator {
|
||||||
fun generate(bundle: PatchBundlePatches)
|
fun generate(bundle: PatchBundlePatches)
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun main(args: Array<String>) = PatchBundle.Jar(
|
fun main(args: Array<String>) = PatchBundleLoader.Jar(
|
||||||
File("build/libs/").listFiles()!!.first {
|
File("build/libs/").listFiles { it -> it.name.endsWith(".jar") }!!.first()
|
||||||
it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar")
|
).also { loader ->
|
||||||
}.absolutePath
|
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
||||||
).loadPatches().also {
|
|
||||||
if (it.isEmpty()) throw IllegalStateException("No patches found")
|
|
||||||
}.let { bundle ->
|
}.let { bundle ->
|
||||||
arrayOf(JsonGenerator()).forEach { it.generate(bundle) }
|
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,8 @@
|
|||||||
package app.revanced.patches.all.activity.exportAll.patch
|
package app.revanced.patches.all.activity.exportall.patch
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
|
||||||
@ -12,7 +10,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
@Name("Export all activities")
|
@Name("Export all activities")
|
||||||
@Description("Makes all app activities exportable.")
|
@Description("Makes all app activities exportable.")
|
||||||
class ExportAllActivitiesPatch : ResourcePatch {
|
class ExportAllActivitiesPatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
val document = editor.file
|
val document = editor.file
|
||||||
val activities = document.getElementsByTagName("activity")
|
val activities = document.getElementsByTagName("activity")
|
||||||
@ -33,8 +31,6 @@ class ExportAllActivitiesPatch : ResourcePatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
@ -6,16 +6,16 @@ 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)
|
||||||
@Name("Spoof wifi connection")
|
@Name("Spoof wifi connection")
|
||||||
@Description("Spoofs an existing Wi-Fi connection.")
|
@Description("Spoofs an existing Wi-Fi connection.")
|
||||||
@RequiresIntegrations
|
@RequiresIntegrations
|
||||||
internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
||||||
|
@ -3,8 +3,6 @@ package app.revanced.patches.all.interaction.gestures.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
|
||||||
@ -12,7 +10,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
@Name("Predictive back gesture")
|
@Name("Predictive back gesture")
|
||||||
@Description("Enables the predictive back gesture introduced on Android 13.")
|
@Description("Enables the predictive back gesture introduced on Android 13.")
|
||||||
class PredictiveBackGesturePatch : ResourcePatch {
|
class PredictiveBackGesturePatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
val document = editor.file
|
val document = editor.file
|
||||||
|
|
||||||
@ -25,8 +23,6 @@ class PredictiveBackGesturePatch : ResourcePatch {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
|
@ -9,9 +9,9 @@ import org.w3c.dom.Element
|
|||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
@Name("Enable android debugging")
|
@Name("Enable android debugging")
|
||||||
@Description("Enables Android debugging capabilities.")
|
@Description("Enables Android debugging capabilities. This can slow down the app.")
|
||||||
class EnableAndroidDebuggingPatch : ResourcePatch {
|
class EnableAndroidDebuggingPatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||||
val applicationNode = dom
|
val applicationNode = dom
|
||||||
.file
|
.file
|
||||||
@ -21,8 +21,6 @@ class EnableAndroidDebuggingPatch : ResourcePatch {
|
|||||||
// set application as debuggable
|
// set application as debuggable
|
||||||
applicationNode.setAttribute("android:debuggable", "true")
|
applicationNode.setAttribute("android:debuggable", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
package app.revanced.patches.all.misc.network.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
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) {
|
||||||
|
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\" />"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,30 +9,32 @@ 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) {
|
||||||
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
|
throw PatchException("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")
|
private fun getDefaultPackageName(context: ResourceContext): String {
|
||||||
|
val originalPackageName = getOriginalPackageName(context)
|
||||||
|
return "$originalPackageName.revanced"
|
||||||
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
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() {
|
||||||
@ -41,7 +43,7 @@ class ChangePackageNamePatch : ResourcePatch {
|
|||||||
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.",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -7,17 +7,20 @@ 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.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.AbstractTransformInstructionsPatch
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import app.revanced.util.patch.IMethodCall
|
||||||
import org.jf.dexlib2.iface.Method
|
import app.revanced.util.patch.Instruction35cInfo
|
||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
import app.revanced.util.patch.filterMapInstruction35c
|
||||||
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
@Name("Remove screen capture restriction")
|
@Name("Remove screen capture restriction")
|
||||||
@Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.")
|
@Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.")
|
||||||
@DependsOn([RemoveCaptureRestrictionResourcePatch::class])
|
@DependsOn([RemoveCaptureRestrictionResourcePatch::class])
|
||||||
@RequiresIntegrations
|
@RequiresIntegrations
|
||||||
internal class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
enum class MethodCall(
|
enum class MethodCall(
|
||||||
override val definedClassName: String,
|
override val definedClassName: String,
|
||||||
|
@ -2,14 +2,12 @@ package app.revanced.patches.all.screencapture.removerestriction.resource.patch
|
|||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
@Description("Sets allowAudioPlaybackCapture in manifest to true.")
|
@Description("Sets allowAudioPlaybackCapture in manifest to true.")
|
||||||
internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch {
|
internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext) {
|
||||||
// create an xml editor instance
|
// create an xml editor instance
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||||
// get the application node
|
// get the application node
|
||||||
@ -21,7 +19,5 @@ internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch {
|
|||||||
// set allowAudioPlaybackCapture attribute to true
|
// set allowAudioPlaybackCapture attribute to true
|
||||||
applicationNode.setAttribute("android:allowAudioPlaybackCapture", "true")
|
applicationNode.setAttribute("android:allowAudioPlaybackCapture", "true")
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,17 +5,19 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.patch.annotations.Patch
|
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.AbstractTransformInstructionsPatch
|
||||||
import org.jf.dexlib2.iface.ClassDef
|
import app.revanced.util.patch.IMethodCall
|
||||||
import org.jf.dexlib2.iface.Method
|
import app.revanced.util.patch.Instruction35cInfo
|
||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
import app.revanced.util.patch.filterMapInstruction35c
|
||||||
import java.util.*
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(false)
|
||||||
@Name("Remove screenshot restriction")
|
@Name("Remove screenshot restriction")
|
||||||
@Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.")
|
@Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.")
|
||||||
@RequiresIntegrations
|
@RequiresIntegrations
|
||||||
internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
|
@ -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(
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro.patch
|
package app.revanced.patches.backdrops.misc.pro.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.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")
|
||||||
@ -21,7 +19,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
class ProUnlockPatch : BytecodePatch(
|
class ProUnlockPatch : BytecodePatch(
|
||||||
listOf(ProUnlockFingerprint)
|
listOf(ProUnlockFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
ProUnlockFingerprint.result?.let { result ->
|
ProUnlockFingerprint.result?.let { result ->
|
||||||
val registerIndex = result.scanResult.patternScanResult!!.endIndex - 1
|
val registerIndex = result.scanResult.patternScanResult!!.endIndex - 1
|
||||||
|
|
||||||
@ -35,8 +33,6 @@ class ProUnlockPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
} ?: return ProUnlockFingerprint.toErrorResult()
|
} ?: throw ProUnlockFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.candylinkvpn.patch
|
package app.revanced.patches.candylinkvpn.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility
|
import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility
|
||||||
import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
|
import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
|
||||||
@ -19,15 +17,13 @@ import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerpr
|
|||||||
class UnlockProPatch : BytecodePatch(
|
class UnlockProPatch : BytecodePatch(
|
||||||
listOf(IsPremiumPurchasedFingerprint)
|
listOf(IsPremiumPurchasedFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
|
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const/4 v0, 0x1
|
const/4 v0, 0x1
|
||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
) ?: return IsPremiumPurchasedFingerprint.toErrorResult()
|
) ?: throw IsPremiumPurchasedFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.duolingo.unlocksuper.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 IsUserSuperMethodFingerprint : MethodFingerprint(
|
||||||
|
returnType = "Ljava/lang/Object",
|
||||||
|
parameters = listOf("Ljava/lang/Object"),
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
strings = listOf("user"),
|
||||||
|
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
||||||
|
)
|
@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.duolingo.unlocksuper.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 UserSerializationMethodFingerprint : MethodFingerprint(
|
||||||
|
returnType = "V",
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
strings = listOf(
|
||||||
|
"betaStatus",
|
||||||
|
"coachOutfit",
|
||||||
|
"globalAmbassadorStatus",
|
||||||
|
),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.MOVE_FROM16,
|
||||||
|
Opcode.IPUT_BOOLEAN,
|
||||||
|
),
|
||||||
|
)
|
@ -0,0 +1,64 @@
|
|||||||
|
package app.revanced.patches.duolingo.unlocksuper.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchException
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
|
import app.revanced.patches.duolingo.unlocksuper.fingerprints.IsUserSuperMethodFingerprint
|
||||||
|
import app.revanced.patches.duolingo.unlocksuper.fingerprints.UserSerializationMethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22c
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("Unlock Duolingo Super")
|
||||||
|
@Description("Unlocks Duolingo Super features.")
|
||||||
|
@Compatibility([Package("com.duolingo")])
|
||||||
|
class UnlockDuolingoSuperPatch : BytecodePatch(
|
||||||
|
listOf(UserSerializationMethodFingerprint, IsUserSuperMethodFingerprint)
|
||||||
|
) {
|
||||||
|
|
||||||
|
/* First find the reference to the isUserSuper field, then patch the instruction that assigns it to false.
|
||||||
|
* This strategy is used because the method that sets the isUserSuper field is difficult to fingerprint reliably.
|
||||||
|
*/
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
// Find the reference to the isUserSuper field.
|
||||||
|
val isUserSuperReference = IsUserSuperMethodFingerprint
|
||||||
|
.result
|
||||||
|
?.mutableMethod
|
||||||
|
?.getInstructions()
|
||||||
|
?.filterIsInstance<BuilderInstruction22c>()
|
||||||
|
?.firstOrNull { it.opcode == Opcode.IGET_BOOLEAN }
|
||||||
|
?.reference
|
||||||
|
?: throw IsUserSuperMethodFingerprint.exception
|
||||||
|
|
||||||
|
// Patch the instruction that assigns isUserSuper to true.
|
||||||
|
UserSerializationMethodFingerprint
|
||||||
|
.result
|
||||||
|
?.mutableMethod
|
||||||
|
?.apply {
|
||||||
|
replaceInstructions(
|
||||||
|
indexOfReference(isUserSuperReference) - 1,
|
||||||
|
"const/4 v2, 0x1"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
?: throw UserSerializationMethodFingerprint.exception
|
||||||
|
}
|
||||||
|
|
||||||
|
private companion object {
|
||||||
|
private fun MutableMethod.indexOfReference(reference: Reference) = getInstructions()
|
||||||
|
.filterIsInstance<BuilderInstruction22c>()
|
||||||
|
.filter { it.opcode == Opcode.IPUT_BOOLEAN }.indexOfFirst { it.reference == reference }.let {
|
||||||
|
if (it == -1) throw PatchException("Could not find index of instruction with supplied reference.")
|
||||||
|
else it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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(
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.patch
|
package app.revanced.patches.finanzonline.detection.bootloader.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
|
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
|
||||||
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint
|
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint
|
||||||
@ -21,7 +19,7 @@ import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionC
|
|||||||
class BootloaderDetectionPatch : BytecodePatch(
|
class BootloaderDetectionPatch : BytecodePatch(
|
||||||
listOf(CreateKeyFingerprint, BootStateFingerprint)
|
listOf(CreateKeyFingerprint, BootStateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint ->
|
arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint ->
|
||||||
fingerprint.result?.mutableMethod?.addInstructions(
|
fingerprint.result?.mutableMethod?.addInstructions(
|
||||||
0,
|
0,
|
||||||
@ -29,9 +27,7 @@ class BootloaderDetectionPatch : BytecodePatch(
|
|||||||
const/4 v0, 0x1
|
const/4 v0, 0x1
|
||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
) ?: return fingerprint.toErrorResult()
|
) ?: throw fingerprint.exception
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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(
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.root.patch
|
package app.revanced.patches.finanzonline.detection.root.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint
|
import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
|
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
|
||||||
@ -19,15 +17,13 @@ import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionC
|
|||||||
class RootDetectionPatch : BytecodePatch(
|
class RootDetectionPatch : BytecodePatch(
|
||||||
listOf(RootDetectionFingerprint)
|
listOf(RootDetectionFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
RootDetectionFingerprint.result?.mutableMethod?.addInstructions(
|
RootDetectionFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
||||||
return-object v0
|
return-object v0
|
||||||
"""
|
"""
|
||||||
) ?: return RootDetectionFingerprint.toErrorResult()
|
) ?: throw RootDetectionFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.googlerecorder.restrictions.patch
|
package app.revanced.patches.googlerecorder.restrictions.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
@ -10,11 +10,9 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.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")
|
||||||
@ -23,7 +21,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|||||||
class RemoveDeviceRestrictions : BytecodePatch(
|
class RemoveDeviceRestrictions : BytecodePatch(
|
||||||
listOf(OnApplicationCreateFingerprint)
|
listOf(OnApplicationCreateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
OnApplicationCreateFingerprint.result?.let {
|
OnApplicationCreateFingerprint.result?.let {
|
||||||
val featureStringIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
val featureStringIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
||||||
|
|
||||||
@ -36,8 +34,6 @@ class RemoveDeviceRestrictions : BytecodePatch(
|
|||||||
// Override "isPixelDevice()" to return true.
|
// Override "isPixelDevice()" to return true.
|
||||||
addInstruction(featureStringIndex, "const/4 v$featureAvailableRegister, 0x1")
|
addInstruction(featureStringIndex, "const/4 v$featureAvailableRegister, 0x1")
|
||||||
}
|
}
|
||||||
} ?: return OnApplicationCreateFingerprint.toErrorResult()
|
} ?: throw OnApplicationCreateFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility
|
import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility
|
||||||
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
|
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
|
||||||
@ -20,7 +18,7 @@ class HexEditorAdsPatch : BytecodePatch(
|
|||||||
PrimaryAdsFingerprint
|
PrimaryAdsFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = PrimaryAdsFingerprint.result!!.mutableMethod
|
val method = PrimaryAdsFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
method.replaceInstructions(
|
method.replaceInstructions(
|
||||||
@ -30,7 +28,5 @@ class HexEditorAdsPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompatibility
|
import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompatibility
|
||||||
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
||||||
@ -20,7 +18,7 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
CheckProFingerprint
|
CheckProFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = CheckProFingerprint.result!!.mutableMethod
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
0,
|
0,
|
||||||
@ -29,7 +27,5 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint
|
import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
||||||
@ -18,8 +16,6 @@ import app.revanced.patches.idaustria.detection.shared.annotations.DetectionComp
|
|||||||
class RootDetectionPatch : BytecodePatch(
|
class RootDetectionPatch : BytecodePatch(
|
||||||
listOf(RootDetectionFingerprint)
|
listOf(RootDetectionFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) =
|
||||||
RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
||||||
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
||||||
@ -32,7 +30,7 @@ class SpoofSignaturePatch : BytecodePatch(
|
|||||||
"bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}"
|
"bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions(
|
SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
@ -40,6 +38,5 @@ class SpoofSignaturePatch : BytecodePatch(
|
|||||||
return-object v0
|
return-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.inshorts.ad.patch
|
package app.revanced.patches.inshorts.ad.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility
|
import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility
|
||||||
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
||||||
@ -19,7 +17,7 @@ import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
|||||||
class HideAdsPatch : BytecodePatch(
|
class HideAdsPatch : BytecodePatch(
|
||||||
listOf(InshortsAdsFingerprint)
|
listOf(InshortsAdsFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
InshortsAdsFingerprint.result?.let { result ->
|
InshortsAdsFingerprint.result?.let { result ->
|
||||||
result.apply {
|
result.apply {
|
||||||
mutableMethod.addInstruction(
|
mutableMethod.addInstruction(
|
||||||
@ -29,8 +27,6 @@ class HideAdsPatch : BytecodePatch(
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: return InshortsAdsFingerprint.toErrorResult()
|
} ?: throw InshortsAdsFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.patch
|
package app.revanced.patches.instagram.patches.ads.timeline.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.*
|
import app.revanced.patcher.annotation.*
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
@ -8,8 +8,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint
|
||||||
@ -18,8 +16,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")
|
||||||
@ -32,19 +30,19 @@ class HideTimelineAdsPatch : BytecodePatch(
|
|||||||
PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes.
|
PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes.
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
// region Resolve required methods to check for ads.
|
// region Resolve required methods to check for ads.
|
||||||
|
|
||||||
ShowAdFingerprint.result ?: return ShowAdFingerprint.toErrorResult()
|
ShowAdFingerprint.result ?: throw ShowAdFingerprint.exception
|
||||||
|
|
||||||
PaidPartnershipAdFingerprint.result ?: return PaidPartnershipAdFingerprint.toErrorResult()
|
PaidPartnershipAdFingerprint.result ?: throw PaidPartnershipAdFingerprint.exception
|
||||||
|
|
||||||
MediaFingerprint.result?.let {
|
MediaFingerprint.result?.let {
|
||||||
GenericMediaAdFingerprint.resolve(context, it.classDef)
|
GenericMediaAdFingerprint.resolve(context, it.classDef)
|
||||||
ShoppingAdFingerprint.resolve(context, it.classDef)
|
ShoppingAdFingerprint.resolve(context, it.classDef)
|
||||||
|
|
||||||
return@let
|
return@let
|
||||||
} ?: return MediaFingerprint.toErrorResult()
|
} ?: throw MediaFingerprint.exception
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@ -99,7 +97,5 @@ class HideTimelineAdsPatch : BytecodePatch(
|
|||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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",
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.irplus.ad.annotations.IrplusAdsCompatibility
|
import app.revanced.patches.irplus.ad.annotations.IrplusAdsCompatibility
|
||||||
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
||||||
@ -19,13 +17,11 @@ import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
|||||||
class IrplusAdsPatch : BytecodePatch(
|
class IrplusAdsPatch : BytecodePatch(
|
||||||
listOf(IrplusAdsFingerprint)
|
listOf(IrplusAdsFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
// By overwriting the second parameter of the method,
|
// By overwriting the second parameter of the method,
|
||||||
// the view which holds the advertisement is removed.
|
// the view which holds the advertisement is removed.
|
||||||
method.addInstruction(0, "const/4 p2, 0x0")
|
method.addInstruction(0, "const/4 p2, 0x0")
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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,23 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
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.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) {
|
||||||
|
IsLoggedInFingerprint.result?.mutableMethod?.apply {
|
||||||
|
val index = implementation!!.instructions.lastIndex - 1
|
||||||
|
// Set isLoggedIn = true.
|
||||||
|
replaceInstruction(index, "const/4 v0, 0x1")
|
||||||
|
} ?: throw IsLoggedInFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
@ -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,23 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
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.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) {
|
||||||
|
// Set hasPremium = true.
|
||||||
|
HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1")
|
||||||
|
?: throw HasPurchasedFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
@ -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",
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
package app.revanced.patches.memegenerator.detection.license.patch
|
package app.revanced.patches.memegenerator.detection.license.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint
|
import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint
|
||||||
|
|
||||||
@Description("Disables Firebase license validation.")
|
@Description("Disables Firebase license validation.")
|
||||||
class LicenseValidationPatch : BytecodePatch(
|
class LicenseValidationPatch : BytecodePatch(
|
||||||
listOf(LicenseValidationFingerprint)
|
listOf(LicenseValidationFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
LicenseValidationFingerprint.result?.apply {
|
LicenseValidationFingerprint.result?.apply {
|
||||||
mutableMethod.replaceInstructions(
|
mutableMethod.replaceInstructions(
|
||||||
0,
|
0,
|
||||||
@ -22,8 +20,6 @@ class LicenseValidationPatch : BytecodePatch(
|
|||||||
return p0
|
return p0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: throw LicenseValidationFingerprint.toErrorResult()
|
} ?: throw LicenseValidationFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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(
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
package app.revanced.patches.memegenerator.detection.signature.patch
|
package app.revanced.patches.memegenerator.detection.signature.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patches.memegenerator.detection.signature.fingerprint.VerifySignatureFingerprint
|
import app.revanced.patches.memegenerator.detection.signature.fingerprint.VerifySignatureFingerprint
|
||||||
|
|
||||||
@Description("Disables detection of incorrect signature.")
|
@Description("Disables detection of incorrect signature.")
|
||||||
class SignatureVerificationPatch : BytecodePatch(
|
class SignatureVerificationPatch : BytecodePatch(
|
||||||
listOf(VerifySignatureFingerprint)
|
listOf(VerifySignatureFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
VerifySignatureFingerprint.result?.apply {
|
VerifySignatureFingerprint.result?.apply {
|
||||||
mutableMethod.replaceInstructions(
|
mutableMethod.replaceInstructions(
|
||||||
0,
|
0,
|
||||||
@ -22,8 +20,6 @@ class SignatureVerificationPatch : BytecodePatch(
|
|||||||
return p0
|
return p0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: throw VerifySignatureFingerprint.toErrorResult()
|
} ?: throw VerifySignatureFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;",
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.memegenerator.misc.pro.patch
|
package app.revanced.patches.memegenerator.misc.pro.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.memegenerator.detection.license.patch.LicenseValidationPatch
|
import app.revanced.patches.memegenerator.detection.license.patch.LicenseValidationPatch
|
||||||
@ -28,7 +26,7 @@ class UnlockProVersionPatch : BytecodePatch(
|
|||||||
IsFreeVersionFingerprint
|
IsFreeVersionFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
IsFreeVersionFingerprint.result?.apply {
|
IsFreeVersionFingerprint.result?.apply {
|
||||||
mutableMethod.replaceInstructions(0,
|
mutableMethod.replaceInstructions(0,
|
||||||
"""
|
"""
|
||||||
@ -36,8 +34,6 @@ class UnlockProVersionPatch : BytecodePatch(
|
|||||||
return-object p0
|
return-object p0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: throw IsFreeVersionFingerprint.toErrorResult()
|
} ?: throw IsFreeVersionFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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,12 +1,10 @@
|
|||||||
package app.revanced.patches.messenger.ads.inbox.patch
|
package app.revanced.patches.messenger.ads.inbox.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.*
|
import app.revanced.patcher.annotation.*
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerprint
|
import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerprint
|
||||||
|
|
||||||
@ -17,12 +15,10 @@ import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerp
|
|||||||
class HideInboxAdsPatch : BytecodePatch(
|
class HideInboxAdsPatch : BytecodePatch(
|
||||||
listOf(LoadInboxAdsFingerprint)
|
listOf(LoadInboxAdsFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
LoadInboxAdsFingerprint.result?.mutableMethod?.apply {
|
LoadInboxAdsFingerprint.result?.mutableMethod?.apply {
|
||||||
this.replaceInstruction(0, "return-void")
|
this.replaceInstruction(0, "return-void")
|
||||||
} ?: return LoadInboxAdsFingerprint.toErrorResult()
|
} ?: throw LoadInboxAdsFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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",
|
||||||
|
@ -1,23 +1,21 @@
|
|||||||
package app.revanced.patches.messenger.inputfield.patch
|
package app.revanced.patches.messenger.inputfield.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.*
|
import app.revanced.patcher.annotation.*
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.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")
|
||||||
@Description("Disables switching from emoji to sticker search mode in message input field")
|
@Description("Disables switching from emoji to sticker search mode in message input field")
|
||||||
@Compatibility([Package("com.facebook.orca")])
|
@Compatibility([Package("com.facebook.orca")])
|
||||||
class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) {
|
class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
SwitchMessangeInputEmojiButtonFingerprint.result?.let {
|
SwitchMessangeInputEmojiButtonFingerprint.result?.let {
|
||||||
val setStringIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
val setStringIndex = it.scanResult.patternScanResult!!.startIndex + 2
|
||||||
|
|
||||||
@ -29,8 +27,6 @@ class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(S
|
|||||||
"const-string v$targetRegister, \"expression\""
|
"const-string v$targetRegister, \"expression\""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: throw SwitchMessangeInputEmojiButtonFingerprint.toErrorResult()
|
} ?: throw SwitchMessangeInputEmojiButtonFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.messenger.inputfield.patch
|
package app.revanced.patches.messenger.inputfield.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
@ -8,8 +8,6 @@ import app.revanced.patcher.annotation.Package
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicatorFingerprint
|
import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicatorFingerprint
|
||||||
|
|
||||||
@ -18,10 +16,8 @@ import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicato
|
|||||||
@Description("Disables the indicator while typing a message")
|
@Description("Disables the indicator while typing a message")
|
||||||
@Compatibility([Package("com.facebook.orca")])
|
@Compatibility([Package("com.facebook.orca")])
|
||||||
class DisableTypingIndicator : BytecodePatch(listOf(SendTypingIndicatorFingerprint)) {
|
class DisableTypingIndicator : BytecodePatch(listOf(SendTypingIndicatorFingerprint)) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
SendTypingIndicatorFingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void")
|
SendTypingIndicatorFingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void")
|
||||||
?: throw SendTypingIndicatorFingerprint.toErrorResult()
|
?: throw SendTypingIndicatorFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.moneymanager.annotations.UnlockProCompatibility
|
import app.revanced.patches.moneymanager.annotations.UnlockProCompatibility
|
||||||
import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint
|
import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint
|
||||||
@ -18,7 +16,7 @@ import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint
|
|||||||
class UnlockProPatch : BytecodePatch(
|
class UnlockProPatch : BytecodePatch(
|
||||||
listOf(UnlockProFingerprint)
|
listOf(UnlockProFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
UnlockProFingerprint.result!!.mutableMethod.addInstructions(
|
UnlockProFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
@ -26,6 +24,5 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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(
|
||||||
|
@ -6,8 +6,6 @@ import app.revanced.patcher.data.BytecodeContext
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
|
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
|
||||||
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
|
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
|
||||||
@ -20,7 +18,7 @@ import app.revanced.patches.music.annotations.MusicCompatibility
|
|||||||
class MusicVideoAdsPatch : BytecodePatch(
|
class MusicVideoAdsPatch : BytecodePatch(
|
||||||
listOf(ShowMusicVideoAdsConstructorFingerprint)
|
listOf(ShowMusicVideoAdsConstructorFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
|
ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
|
||||||
|
|
||||||
val result = ShowMusicVideoAdsFingerprint.result!!
|
val result = ShowMusicVideoAdsFingerprint.result!!
|
||||||
@ -31,7 +29,5 @@ class MusicVideoAdsPatch : BytecodePatch(
|
|||||||
const/4 p1, 0x0
|
const/4 p1, 0x0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
||||||
|
@ -3,16 +3,13 @@ package app.revanced.patches.music.audio.codecs.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.data.toMethodWalker
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.smali.toInstruction
|
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")
|
||||||
@ -23,7 +20,7 @@ class CodecsUnlockPatch : BytecodePatch(
|
|||||||
CodecsLockFingerprint, AllCodecsReferenceFingerprint
|
CodecsLockFingerprint, AllCodecsReferenceFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val codecsLockResult = CodecsLockFingerprint.result!!
|
val codecsLockResult = CodecsLockFingerprint.result!!
|
||||||
|
|
||||||
val implementation = codecsLockResult.mutableMethod.implementation!!
|
val implementation = codecsLockResult.mutableMethod.implementation!!
|
||||||
@ -48,7 +45,5 @@ class CodecsUnlockPatch : BytecodePatch(
|
|||||||
instructionIndex,
|
instructionIndex,
|
||||||
"invoke-static {}, ${allCodecsMethod.definingClass}->${allCodecsMethod.name}()Ljava/util/Set;".toInstruction()
|
"invoke-static {}, ${allCodecsMethod.definingClass}->${allCodecsMethod.name}()Ljava/util/Set;".toInstruction()
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,17 +2,14 @@ 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 AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
|
||||||
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"Z",
|
||||||
Opcode.IGET_OBJECT,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
Opcode.INVOKE_INTERFACE,
|
listOf(),
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
listOf(
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
@ -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.
|
||||||
|
@ -1,29 +1,31 @@
|
|||||||
package app.revanced.patches.music.audio.exclusiveaudio.patch
|
package app.revanced.patches.music.audio.exclusiveaudio.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
|
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AllowExclusiveAudioPlaybackFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("Exclusive audio playback")
|
@Name("Exclusive audio playback")
|
||||||
@Description("Enables the option to play music without video.")
|
@Description("Enables the option to play audio without video.")
|
||||||
@MusicCompatibility
|
@MusicCompatibility
|
||||||
class ExclusiveAudioPatch : BytecodePatch(
|
class ExclusiveAudioPatch : BytecodePatch(
|
||||||
listOf(AudioOnlyEnablerFingerprint)
|
listOf(AllowExclusiveAudioPlaybackFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
|
AllowExclusiveAudioPlaybackFingerprint.result?.mutableMethod?.apply {
|
||||||
method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1")
|
addInstructions(
|
||||||
method.addInstruction("return v0")
|
0,
|
||||||
|
"""
|
||||||
return PatchResultSuccess()
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
} ?: throw AllowExclusiveAudioPlaybackFingerprint.exception
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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,36 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentrepeat.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
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.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) {
|
||||||
|
RepeatTrackFingerprint.result?.let {
|
||||||
|
val startIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
|
val repeatIndex = startIndex + 3
|
||||||
|
|
||||||
|
it.mutableMethod.apply {
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
startIndex,
|
||||||
|
"goto :repeat",
|
||||||
|
ExternalLabel("repeat", getInstruction(repeatIndex))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: throw RepeatTrackFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
@ -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,25 @@
|
|||||||
|
package app.revanced.patches.music.interaction.permanentshuffle.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.exception
|
||||||
|
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.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) {
|
||||||
|
DisableShuffleFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||||
|
?: throw DisableShuffleFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
@ -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(
|
||||||
|
@ -5,12 +5,10 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.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")
|
||||||
@ -19,7 +17,7 @@ import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
|||||||
class CompactHeaderPatch : BytecodePatch(
|
class CompactHeaderPatch : BytecodePatch(
|
||||||
listOf(CompactHeaderConstructorFingerprint)
|
listOf(CompactHeaderConstructorFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val result = CompactHeaderConstructorFingerprint.result!!
|
val result = CompactHeaderConstructorFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
@ -31,7 +29,5 @@ class CompactHeaderPatch : BytecodePatch(
|
|||||||
invoke-virtual {v${register}, v2}, Landroid/view/View;->setVisibility(I)V
|
invoke-virtual {v${register}, v2}, Landroid/view/View;->setVisibility(I)V
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
||||||
@ -18,14 +16,12 @@ import app.revanced.patches.music.layout.minimizedplayback.fingerprints.Minimize
|
|||||||
class MinimizedPlaybackPatch : BytecodePatch(
|
class MinimizedPlaybackPatch : BytecodePatch(
|
||||||
listOf(MinimizedPlaybackManagerFingerprint)
|
listOf(MinimizedPlaybackManagerFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstruction(
|
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstruction(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
return-void
|
return-void
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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(
|
||||||
|
@ -7,8 +7,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
|
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
|
||||||
@ -21,7 +19,7 @@ import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumPare
|
|||||||
class HideGetPremiumPatch : BytecodePatch(
|
class HideGetPremiumPatch : BytecodePatch(
|
||||||
listOf(HideGetPremiumParentFingerprint)
|
listOf(HideGetPremiumParentFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val parentResult = HideGetPremiumParentFingerprint.result!!
|
val parentResult = HideGetPremiumParentFingerprint.result!!
|
||||||
HideGetPremiumFingerprint.resolve(context, parentResult.classDef)
|
HideGetPremiumFingerprint.resolve(context, parentResult.classDef)
|
||||||
|
|
||||||
@ -43,7 +41,5 @@ class HideGetPremiumPatch : BytecodePatch(
|
|||||||
const/16 v0, 0x8
|
const/16 v0, 0x8
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
||||||
|
@ -5,26 +5,24 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.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
|
||||||
@Name("Upgrade button remover")
|
@Name("Remove upgrade button")
|
||||||
@Description("Removes the upgrade tab from the pivot bar.")
|
@Description("Removes the upgrade tab from the pivot bar.")
|
||||||
@MusicCompatibility
|
@MusicCompatibility
|
||||||
class RemoveUpgradeButtonPatch : BytecodePatch(
|
class RemoveUpgradeButtonPatch : BytecodePatch(
|
||||||
listOf(PivotBarConstructorFingerprint)
|
listOf(PivotBarConstructorFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val result = PivotBarConstructorFingerprint.result!!
|
val result = PivotBarConstructorFingerprint.result!!
|
||||||
val implementation = result.mutableMethod.implementation!!
|
val implementation = result.mutableMethod.implementation!!
|
||||||
|
|
||||||
@ -36,7 +34,7 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
val instructionList = """
|
val instructionList = """
|
||||||
invoke-interface { v0 }, Ljava/util/List;->size()I
|
invoke-interface { v0 }, Ljava/util/List;->size()I
|
||||||
move-result v1
|
move-result v1
|
||||||
const/4 v2, 0x3
|
const/4 v2, 0x4
|
||||||
invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
invoke-interface {v0, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
||||||
iput-object v0, v$register, $pivotBarElementFieldRef
|
iput-object v0, v$register, $pivotBarElementFieldRef
|
||||||
""".toInstructions().toMutableList()
|
""".toInstructions().toMutableList()
|
||||||
@ -69,6 +67,5 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
implementation.addInstructions(
|
implementation.addInstructions(
|
||||||
endIndex, instructionList
|
endIndex, instructionList
|
||||||
)
|
)
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.music.misc.androidauto.patch
|
package app.revanced.patches.music.misc.androidauto.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint
|
import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint
|
||||||
@ -19,7 +17,7 @@ import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificate
|
|||||||
class BypassCertificateChecksPatch : BytecodePatch(
|
class BypassCertificateChecksPatch : BytecodePatch(
|
||||||
listOf(CheckCertificateFingerprint)
|
listOf(CheckCertificateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
CheckCertificateFingerprint.result?.apply {
|
CheckCertificateFingerprint.result?.apply {
|
||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
0, """
|
0, """
|
||||||
@ -27,8 +25,6 @@ class BypassCertificateChecksPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: return CheckCertificateFingerprint.toErrorResult()
|
} ?: throw CheckCertificateFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
||||||
|
@ -4,7 +4,6 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
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
|
||||||
@ -37,27 +36,25 @@ class MicroGBytecodePatch : BytecodePatch(
|
|||||||
// - "com.google.android.gms.phenotype.PACKAGE_NAME",
|
// - "com.google.android.gms.phenotype.PACKAGE_NAME",
|
||||||
// - "com.google.android.gms.phenotype.UPDATE",
|
// - "com.google.android.gms.phenotype.UPDATE",
|
||||||
// - "com.google.android.gms.phenotype",
|
// - "com.google.android.gms.phenotype",
|
||||||
override fun execute(context: BytecodeContext) =
|
override fun execute(context: BytecodeContext) = MicroGBytecodeHelper.patchBytecode(
|
||||||
// apply common microG patch
|
context,
|
||||||
MicroGBytecodeHelper.patchBytecode(
|
arrayOf(
|
||||||
context,
|
MicroGBytecodeHelper.packageNameTransform(
|
||||||
arrayOf(
|
Constants.PACKAGE_NAME,
|
||||||
MicroGBytecodeHelper.packageNameTransform(
|
Constants.REVANCED_PACKAGE_NAME
|
||||||
Constants.PACKAGE_NAME,
|
|
||||||
Constants.REVANCED_PACKAGE_NAME
|
|
||||||
)
|
|
||||||
),
|
|
||||||
MicroGBytecodeHelper.PrimeMethodTransformationData(
|
|
||||||
PrimeFingerprint,
|
|
||||||
MUSIC_PACKAGE_NAME,
|
|
||||||
REVANCED_MUSIC_PACKAGE_NAME
|
|
||||||
),
|
|
||||||
listOf(
|
|
||||||
ServiceCheckFingerprint,
|
|
||||||
GooglePlayUtilityFingerprint,
|
|
||||||
CastDynamiteModuleFingerprint,
|
|
||||||
CastDynamiteModuleV2Fingerprint,
|
|
||||||
CastContextFetchFingerprint
|
|
||||||
)
|
)
|
||||||
).let { PatchResultSuccess() }
|
),
|
||||||
|
MicroGBytecodeHelper.PrimeMethodTransformationData(
|
||||||
|
PrimeFingerprint,
|
||||||
|
MUSIC_PACKAGE_NAME,
|
||||||
|
REVANCED_MUSIC_PACKAGE_NAME
|
||||||
|
),
|
||||||
|
listOf(
|
||||||
|
ServiceCheckFingerprint,
|
||||||
|
GooglePlayUtilityFingerprint,
|
||||||
|
CastDynamiteModuleFingerprint,
|
||||||
|
CastDynamiteModuleV2Fingerprint,
|
||||||
|
CastContextFetchFingerprint
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,6 @@ package app.revanced.patches.music.misc.microg.patch.resource
|
|||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
|
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
|
||||||
@ -15,7 +13,7 @@ import app.revanced.util.microg.MicroGResourceHelper
|
|||||||
|
|
||||||
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
|
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
|
||||||
class MicroGResourcePatch : ResourcePatch {
|
class MicroGResourcePatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext) {
|
||||||
// update manifest
|
// update manifest
|
||||||
MicroGResourceHelper.patchManifest(
|
MicroGResourceHelper.patchManifest(
|
||||||
context,
|
context,
|
||||||
@ -30,6 +28,5 @@ class MicroGResourcePatch : ResourcePatch {
|
|||||||
SPOOFED_PACKAGE_NAME,
|
SPOOFED_PACKAGE_NAME,
|
||||||
SPOOFED_PACKAGE_SIGNATURE
|
SPOOFED_PACKAGE_SIGNATURE
|
||||||
)
|
)
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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.
|
||||||
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||||
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
|
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
|
||||||
@ -18,7 +16,7 @@ import app.revanced.patches.music.premium.backgroundplay.fingerprints.Background
|
|||||||
class BackgroundPlayPatch : BytecodePatch(
|
class BackgroundPlayPatch : BytecodePatch(
|
||||||
listOf(BackgroundPlaybackDisableFingerprint)
|
listOf(BackgroundPlaybackDisableFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
|
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
@ -26,7 +24,5 @@ class BackgroundPlayPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,8 +5,6 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.myexpenses.misc.pro.annotations.UnlockProCompatibility
|
import app.revanced.patches.myexpenses.misc.pro.annotations.UnlockProCompatibility
|
||||||
import app.revanced.patches.myexpenses.misc.pro.fingerprints.IsEnabledFingerprint
|
import app.revanced.patches.myexpenses.misc.pro.fingerprints.IsEnabledFingerprint
|
||||||
@ -20,7 +18,7 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
IsEnabledFingerprint
|
IsEnabledFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = IsEnabledFingerprint.result!!.mutableMethod
|
val method = IsEnabledFingerprint.result!!.mutableMethod
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
0,
|
0,
|
||||||
@ -29,7 +27,5 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ package app.revanced.patches.netguard.broadcasts.removerestriction.resource.patc
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.netguard.broadcasts.removerestriction.resource.annotations.RemoveBroadcastsRestrictionCompatibility
|
import app.revanced.patches.netguard.broadcasts.removerestriction.resource.annotations.RemoveBroadcastsRestrictionCompatibility
|
||||||
@ -15,7 +13,7 @@ import org.w3c.dom.Element
|
|||||||
@Description("Enables starting/stopping NetGuard via broadcasts.")
|
@Description("Enables starting/stopping NetGuard via broadcasts.")
|
||||||
@RemoveBroadcastsRestrictionCompatibility
|
@RemoveBroadcastsRestrictionCompatibility
|
||||||
class RemoveBroadcastsRestrictionPatch : ResourcePatch {
|
class RemoveBroadcastsRestrictionPatch : ResourcePatch {
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||||
val applicationNode = dom
|
val applicationNode = dom
|
||||||
.file
|
.file
|
||||||
@ -32,7 +30,5 @@ class RemoveBroadcastsRestrictionPatch : ResourcePatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,13 +1,11 @@
|
|||||||
package app.revanced.patches.nfctoolsse.misc.pro.patch
|
package app.revanced.patches.nfctoolsse.misc.pro.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patch.annotations.Patch
|
||||||
import app.revanced.patches.nfctoolsse.misc.pro.annotations.UnlockProCompatibility
|
import app.revanced.patches.nfctoolsse.misc.pro.annotations.UnlockProCompatibility
|
||||||
import app.revanced.patches.nfctoolsse.misc.pro.fingerprints.IsLicenseRegisteredFingerprint
|
import app.revanced.patches.nfctoolsse.misc.pro.fingerprints.IsLicenseRegisteredFingerprint
|
||||||
@ -22,7 +20,7 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
IsLicenseRegisteredFingerprint
|
IsLicenseRegisteredFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext) {
|
||||||
IsLicenseRegisteredFingerprint.result?.mutableMethod?.apply {
|
IsLicenseRegisteredFingerprint.result?.mutableMethod?.apply {
|
||||||
addInstructions(
|
addInstructions(
|
||||||
0,
|
0,
|
||||||
@ -31,9 +29,7 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
} ?: return IsLicenseRegisteredFingerprint.toErrorResult()
|
} ?: throw IsLicenseRegisteredFingerprint.exception
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -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")
|
|
||||||
)
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user