mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-23 10:41:03 +00:00
Compare commits
4 Commits
v4.16.0-de
...
v4.16.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fee2218303 | ||
|
|
1f0b4cdcb4 | ||
|
|
1fd30c1b44 | ||
|
|
fa94ddd510 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [4.16.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v4.16.0-dev.4...v4.16.0-dev.5) (2024-09-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **YouTube - Disable precise seeking gesture:** Hide "pull up" label that shows up when swiping ([#3668](https://github.com/ReVanced/revanced-patches/issues/3668)) ([3fa8af9](https://github.com/ReVanced/revanced-patches/commit/3fa8af9fe534b59ad093c36f1927f56f549a330d))
|
||||||
|
|
||||||
|
# [4.16.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v4.16.0-dev.3...v4.16.0-dev.4) (2024-09-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Soundcloud:** Support latest versions ([#3702](https://github.com/ReVanced/revanced-patches/issues/3702)) ([099ac5e](https://github.com/ReVanced/revanced-patches/commit/099ac5ea2cf55633a7c6a7e6f8e963599bcd5784))
|
||||||
|
|
||||||
# [4.16.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.16.0-dev.2...v4.16.0-dev.3) (2024-09-29)
|
# [4.16.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v4.16.0-dev.2...v4.16.0-dev.3) (2024-09-29)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 = 4.16.0-dev.3
|
version = 4.16.0-dev.5
|
||||||
|
|||||||
@@ -14,8 +14,4 @@ internal object InterceptFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT_OBJECT
|
Opcode.MOVE_RESULT_OBJECT
|
||||||
),
|
),
|
||||||
strings = listOf("SC-Mob-UserPlan", "Configuration"),
|
strings = listOf("SC-Mob-UserPlan", "Configuration"),
|
||||||
customFingerprint = { _, classDef ->
|
|
||||||
classDef.sourceFile == "ApiUserPlanInterceptor.java" ||
|
|
||||||
classDef.sourceFile == "ApiUserPlanInterceptor.kt"
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,4 @@ internal object UserConsumerPlanConstructorFingerprint : MethodFingerprint(
|
|||||||
returnType = "V",
|
returnType = "V",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
parameters = listOf("Ljava/lang/String;", "Z", "Ljava/lang/String;", "Ljava/util/List;", "Ljava/lang/String;", "Ljava/lang/String;"),
|
parameters = listOf("Ljava/lang/String;", "Z", "Ljava/lang/String;", "Ljava/util/List;", "Ljava/lang/String;", "Ljava/lang/String;"),
|
||||||
customFingerprint = { _, classDef ->
|
|
||||||
classDef.sourceFile == "UserConsumerPlan.kt"
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
@@ -7,6 +7,7 @@ internal object CreateTrackingApiFingerprint : MethodFingerprint(
|
|||||||
returnType = "L",
|
returnType = "L",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef, classDef ->
|
customFingerprint = { methodDef, classDef ->
|
||||||
classDef.sourceFile == "DefaultTrackingApiFactory.kt" && methodDef.name == "create"
|
methodDef.name == "create"
|
||||||
},
|
},
|
||||||
|
strings = listOf("backend", "boogaloo")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,7 +15,5 @@ internal object DownloadOperationsHeaderVerificationFingerprint : MethodFingerpr
|
|||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CONST_STRING
|
Opcode.CONST_STRING
|
||||||
),
|
),
|
||||||
customFingerprint = { _, classDef ->
|
strings = listOf("X-SC-Mime-Type", "X-SC-Preset", "X-SC-Quality")
|
||||||
classDef.sourceFile == "DownloadOperations.kt"
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
@@ -14,7 +14,4 @@ internal object DownloadOperationsURLBuilderFingerprint : MethodFingerprint(
|
|||||||
Opcode.SGET_OBJECT,
|
Opcode.SGET_OBJECT,
|
||||||
Opcode.FILLED_NEW_ARRAY
|
Opcode.FILLED_NEW_ARRAY
|
||||||
),
|
),
|
||||||
customFingerprint = { _, classDef ->
|
|
||||||
classDef.sourceFile == "DownloadOperations.kt"
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
@@ -3,12 +3,16 @@ package app.revanced.patches.soundcloud.shared.fingerprints
|
|||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
|
|
||||||
internal object FeatureConstructorFingerprint : MethodFingerprint(
|
internal object FeatureConstructorFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
parameters = listOf("Ljava/lang/String;", "Z", "Ljava/util/List;"),
|
parameters = listOf("Ljava/lang/String;", "Z", "Ljava/util/List;"),
|
||||||
customFingerprint = { _, classDef ->
|
opcodes = listOf(
|
||||||
classDef.sourceFile == "Feature.kt"
|
Opcode.SGET_OBJECT,
|
||||||
},
|
Opcode.CHECK_CAST,
|
||||||
|
Opcode.INVOKE_VIRTUAL
|
||||||
|
)
|
||||||
)
|
)
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
package app.revanced.patches.youtube.interaction.seekbar
|
package app.revanced.patches.youtube.interaction.seekbar
|
||||||
|
|
||||||
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.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.all.misc.resources.AddResourcesPatch
|
import app.revanced.patches.all.misc.resources.AddResourcesPatch
|
||||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||||
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.IsSwipingUpFingerprint
|
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.AllowSwipingUpGestureFingerprint
|
||||||
|
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.ShowSwipingUpGuideFingerprint
|
||||||
|
import app.revanced.patches.youtube.interaction.seekbar.fingerprints.SwipingUpGestureParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
import app.revanced.util.exception
|
import app.revanced.util.alsoResolve
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Disable precise seeking gesture",
|
name = "Disable precise seeking gesture",
|
||||||
@@ -52,11 +54,10 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object DisablePreciseSeekingGesturePatch : BytecodePatch(
|
object DisablePreciseSeekingGesturePatch : BytecodePatch(
|
||||||
setOf(IsSwipingUpFingerprint)
|
setOf(SwipingUpGestureParentFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/youtube/patches/DisablePreciseSeekingGesturePatch;->" +
|
"Lapp/revanced/integrations/youtube/patches/DisablePreciseSeekingGesturePatch;"
|
||||||
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
|
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
AddResourcesPatch(this::class)
|
AddResourcesPatch(this::class)
|
||||||
@@ -65,19 +66,37 @@ object DisablePreciseSeekingGesturePatch : BytecodePatch(
|
|||||||
SwitchPreference("revanced_disable_precise_seeking_gesture")
|
SwitchPreference("revanced_disable_precise_seeking_gesture")
|
||||||
)
|
)
|
||||||
|
|
||||||
IsSwipingUpFingerprint.result?.let {
|
AllowSwipingUpGestureFingerprint.alsoResolve(
|
||||||
val addMovementIndex = it.scanResult.patternScanResult!!.startIndex - 1
|
context,
|
||||||
|
SwipingUpGestureParentFingerprint
|
||||||
|
).mutableMethod.apply {
|
||||||
|
addInstructionsWithLabels(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->isGestureDisabled()Z
|
||||||
|
move-result v0
|
||||||
|
if-eqz v0, :disabled
|
||||||
|
return-void
|
||||||
|
""",
|
||||||
|
ExternalLabel("disabled", getInstruction(0))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
it.mutableMethod.apply {
|
ShowSwipingUpGuideFingerprint.alsoResolve(
|
||||||
val addMovementInstruction = getInstruction<FiveRegisterInstruction>(addMovementIndex)
|
context,
|
||||||
val trackerRegister = addMovementInstruction.registerC
|
SwipingUpGestureParentFingerprint
|
||||||
val eventRegister = addMovementInstruction.registerD
|
).mutableMethod.apply {
|
||||||
|
addInstructionsWithLabels(
|
||||||
replaceInstruction(
|
0,
|
||||||
addMovementIndex,
|
"""
|
||||||
"invoke-static {v$trackerRegister, v$eventRegister}, $INTEGRATIONS_METHOD_DESCRIPTOR"
|
invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->isGestureDisabled()Z
|
||||||
)
|
move-result v0
|
||||||
}
|
if-eqz v0, :disabled
|
||||||
} ?: throw IsSwipingUpFingerprint.exception
|
const/4 v0, 0x0
|
||||||
|
return v0
|
||||||
|
""",
|
||||||
|
ExternalLabel("disabled", getInstruction(0))
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves using the class found in [SwipingUpGestureParentFingerprint].
|
||||||
|
*/
|
||||||
|
internal object AllowSwipingUpGestureFingerprint : MethodFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf("L"),
|
||||||
|
)
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
internal object IsSwipingUpFingerprint : MethodFingerprint(
|
|
||||||
returnType = "Z",
|
|
||||||
parameters = listOf("Landroid/view/MotionEvent;", "J"),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IGET_OBJECT
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.util.patch.LiteralValueFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves using the class found in [SwipingUpGestureParentFingerprint].
|
||||||
|
*/
|
||||||
|
internal object ShowSwipingUpGuideFingerprint : LiteralValueFingerprint(
|
||||||
|
accessFlags = AccessFlags.FINAL.value,
|
||||||
|
returnType = "Z",
|
||||||
|
parameters = emptyList(),
|
||||||
|
literalSupplier = { 1L }
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.youtube.interaction.seekbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.util.patch.LiteralValueFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
internal object SwipingUpGestureParentFingerprint : LiteralValueFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
returnType = "Z",
|
||||||
|
parameters = listOf(),
|
||||||
|
literalSupplier = { 45379021 }
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user