mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-24 19:21:03 +00:00
Changes by ushie
This commit is contained in:
@@ -6,8 +6,8 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val BytecodePatchContext.userStateSwitchMethod by gettingFirstMutableMethodDeclaratively("key.user.state", "NA") {
|
||||
opcodes(Opcode.SPARSE_SWITCH)
|
||||
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMutableMethodDeclaratively {
|
||||
definingClass("CB11Details;"::endsWith)
|
||||
parameterTypes(
|
||||
@@ -20,10 +20,11 @@ internal val BytecodePatchContext.cb11ConstructorMethod by gettingFirstMutableMe
|
||||
"Z",
|
||||
"Ljava/lang/String;",
|
||||
"Ljava/lang/String;",
|
||||
"L"
|
||||
"L",
|
||||
)
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.getBottomBarMethod by gettingFirstMutableMethodDeclaratively {
|
||||
name("getBottombar")
|
||||
definingClass("HomeMenu;"::endsWith)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,13 @@ package app.revanced.patches.iconpackstudio.misc.pro
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val `Unlock pro` by creatingBytecodePatch {
|
||||
compatibleWith("ginlemon.iconpackstudio"("2.2 build 016"))
|
||||
|
||||
apply {
|
||||
checkProMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
checkProMethod.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
package app.revanced.patches.memegenerator.detection.signature
|
||||
|
||||
import app.revanced.patcher.extensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
val signatureVerificationPatch = bytecodePatch(
|
||||
description = "Disables detection of incorrect signature.",
|
||||
) {
|
||||
|
||||
apply {
|
||||
verifySignatureMethod.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 p0, 0x1
|
||||
return p0
|
||||
""",
|
||||
)
|
||||
verifySignatureMethod.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,43 @@
|
||||
package app.revanced.patches.music.layout.buttons
|
||||
|
||||
import app.revanced.patcher.fingerprint
|
||||
import app.revanced.patcher.accessFlags
|
||||
import app.revanced.patcher.custom
|
||||
import app.revanced.patcher.definingClass
|
||||
import app.revanced.patcher.extensions.instructions
|
||||
import app.revanced.patcher.gettingFirstMethodDeclaratively
|
||||
import app.revanced.patcher.gettingFirstMutableMethodDeclaratively
|
||||
import app.revanced.patcher.immutableClassDef
|
||||
import app.revanced.patcher.instructions
|
||||
import app.revanced.patcher.invoke
|
||||
import app.revanced.patcher.literal
|
||||
import app.revanced.patcher.matchIndexed
|
||||
import app.revanced.patcher.method
|
||||
import app.revanced.patcher.opcodes
|
||||
import app.revanced.patcher.parameterTypes
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
import app.revanced.patcher.predicate
|
||||
import app.revanced.patcher.rememberMatchIndexed
|
||||
import app.revanced.patcher.returnType
|
||||
import app.revanced.patcher.unorderedAllOf
|
||||
import app.revanced.util.containsLiteralInstruction
|
||||
import app.revanced.util.literal
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal val mediaRouteButtonFingerprint = fingerprint {
|
||||
internal val BytecodePatchContext.mediaRouteButtonMethod by gettingFirstMutableMethodDeclaratively("MediaRouteButton") {
|
||||
accessFlags(AccessFlags.PRIVATE, AccessFlags.FINAL)
|
||||
returns("Z")
|
||||
strings("MediaRouteButton")
|
||||
returnType("Z")
|
||||
}
|
||||
|
||||
internal val playerOverlayChipFingerprint = fingerprint {
|
||||
internal val BytecodePatchContext.playerOverlayChipMethod by gettingFirstMutableMethodDeclaratively {
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returns("L")
|
||||
literal { playerOverlayChip }
|
||||
returnType("L")
|
||||
custom {
|
||||
instructions { literal { playerOverlayChip() } }
|
||||
}
|
||||
}
|
||||
|
||||
internal val BytecodePatchContext.historyMenuItemMethod by gettingFirstMutableMethodDeclaratively {
|
||||
definingClass {
|
||||
it.methods.count()
|
||||
methods.count()
|
||||
}
|
||||
accessFlags(AccessFlags.PUBLIC, AccessFlags.FINAL)
|
||||
returnType("V")
|
||||
parameterTypes("Landroid/view/Menu;")
|
||||
@@ -31,8 +46,8 @@ internal val BytecodePatchContext.historyMenuItemMethod by gettingFirstMutableMe
|
||||
Opcode.RETURN_VOID,
|
||||
)
|
||||
historyMenuItem()
|
||||
custom { _, classDef ->
|
||||
classDef.methods.count() == 5
|
||||
custom {
|
||||
immutableClassDef.methods.count() == 5 // TODO CONFIRM
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
package app.revanced.patches.myexpenses.misc.pro
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused", "ObjectPropertyName")
|
||||
val `Unlock pro` by creatingBytecodePatch {
|
||||
compatibleWith("org.totschnig.myexpenses"("3.4.9"))
|
||||
|
||||
apply {
|
||||
isEnabledMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
isEnabledMethod.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.photomath.misc.unlock.bookpoint
|
||||
|
||||
import app.revanced.patcher.extensions.replaceInstructions
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val enableBookpointPatch = bytecodePatch(
|
||||
@@ -9,12 +9,6 @@ val enableBookpointPatch = bytecodePatch(
|
||||
) {
|
||||
|
||||
apply {
|
||||
isBookpointEnabledMethod.replaceInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
isBookpointEnabledMethod.returnEarly(true) // TODO: CHECK IF THIS IS FINE IN REPLACEMENT OF replaceInstructions
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.revanced.patches.photomath.misc.unlock.plus
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.patches.photomath.detection.signature.signatureDetectionPatch
|
||||
import app.revanced.patches.photomath.misc.unlock.bookpoint.enableBookpointPatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused", "ObjectPropertyName")
|
||||
val `Unlock plus` by creatingBytecodePatch {
|
||||
@@ -12,12 +12,6 @@ val `Unlock plus` by creatingBytecodePatch {
|
||||
compatibleWith("com.microblink.photomath")
|
||||
|
||||
apply {
|
||||
isPlusUnlockedMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
isPlusUnlockedMethod.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.reddit.layout.premiumicon
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused", "ObjectPropertyName")
|
||||
val `Unlock Premium icons` by creatingBytecodePatch(
|
||||
@@ -10,12 +10,6 @@ val `Unlock Premium icons` by creatingBytecodePatch(
|
||||
compatibleWith("com.reddit.frontpage")
|
||||
|
||||
apply {
|
||||
hasPremiumIconAccessMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
hasPremiumIconAccessMethod.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package app.revanced.patches.tiktok.interaction.seekbar
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val `Show seekbar` by creatingBytecodePatch(
|
||||
@@ -13,13 +14,7 @@ val `Show seekbar` by creatingBytecodePatch(
|
||||
)
|
||||
|
||||
apply {
|
||||
shouldShowSeekBarMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
shouldShowSeekBarMethod.returnEarly(true)
|
||||
setSeekBarShowTypeMethod.apply {
|
||||
val typeRegister = implementation!!.registerCount - 1
|
||||
|
||||
|
||||
@@ -9,13 +9,14 @@ import app.revanced.patches.tiktok.shared.getEnterFromFingerprint
|
||||
import app.revanced.patches.tiktok.shared.onRenderFirstFrameFingerprint
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstructionOrThrow
|
||||
import app.revanced.util.returnEarly
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction11x
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Suppress("unused")
|
||||
val `Playback speed` by creatingBytecodePatch(
|
||||
description = "Enables the playback speed option for all videos and " +
|
||||
"retains the speed configurations in between videos.",
|
||||
"retains the speed configurations in between videos.",
|
||||
) {
|
||||
compatibleWith(
|
||||
"com.ss.android.ugc.trill"("36.5.4"),
|
||||
@@ -57,12 +58,6 @@ val `Playback speed` by creatingBytecodePatch(
|
||||
)
|
||||
|
||||
// Force enable the playback speed option for all videos.
|
||||
setSpeedMethod.classDef.methods.find { method -> method.returnType == "Z" }?.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
setSpeedMethod.classDef.methods.find { method -> method.returnType == "Z" }?.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.warnwetter.misc.promocode
|
||||
|
||||
import app.revanced.patcher.extensions.addInstructions
|
||||
import app.revanced.patcher.patch.creatingBytecodePatch
|
||||
import app.revanced.patches.warnwetter.misc.firebasegetcert.firebaseGetCertPatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val `Promo code unlock` by creatingBytecodePatch(
|
||||
@@ -13,12 +13,6 @@ val `Promo code unlock` by creatingBytecodePatch(
|
||||
compatibleWith("de.dwd.warnapp"("4.2.2"))
|
||||
|
||||
apply {
|
||||
promoCodeUnlockMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
const/4 v0, 0x1
|
||||
return v0
|
||||
""",
|
||||
)
|
||||
promoCodeUnlockMethod.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ val hideSeekbarPatch = bytecodePatch(
|
||||
settingsPatch,
|
||||
seekbarColorPatch,
|
||||
addResourcesPatch,
|
||||
versionCheckPatch
|
||||
versionCheckPatch,
|
||||
)
|
||||
|
||||
apply {
|
||||
@@ -48,14 +48,14 @@ val hideSeekbarPatch = bytecodePatch(
|
||||
return-void
|
||||
:hide_seekbar
|
||||
nop
|
||||
"""
|
||||
""",
|
||||
)
|
||||
|
||||
if (is_20_28_or_greater) {
|
||||
fullscreenLargeSeekbarFeatureFlagMethodMatch.let {
|
||||
it.method.insertLiteralOverride(
|
||||
it.instructionMatches.first().index,
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useFullscreenLargeSeekbar(Z)Z"
|
||||
"$EXTENSION_CLASS_DESCRIPTOR->useFullscreenLargeSeekbar(Z)Z",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user