build(Needs bump): Bump dependencies
This commit is contained in:
@@ -6,8 +6,6 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
@@ -26,7 +24,7 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
|
||||
class AudioAdsPatch : BytecodePatch(
|
||||
listOf(AudioAdsPresenterPlayFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Block playAds call
|
||||
with(AudioAdsPresenterPlayFingerprint.result!!) {
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
@@ -59,7 +57,5 @@ class AudioAdsPatch : BytecodePatch(
|
||||
default = true,
|
||||
)
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.ArrayResource
|
||||
@@ -28,8 +26,8 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
|
||||
class EmbeddedAdsPatch : BytecodePatch(
|
||||
listOf(CreateUsherClientFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = CreateUsherClientFingerprint.result ?: return PatchResultError("${CreateUsherClientFingerprint.name} not found")
|
||||
override fun execute(context: BytecodeContext) {
|
||||
val result = CreateUsherClientFingerprint.result ?: throw PatchException("${CreateUsherClientFingerprint.name} not found")
|
||||
|
||||
// Inject OkHttp3 application interceptor
|
||||
result.mutableMethod.addInstructions(
|
||||
@@ -70,7 +68,5 @@ class EmbeddedAdsPatch : BytecodePatch(
|
||||
|
||||
SettingsPatch.addString("revanced_embedded_ads_service_unavailable", "%s is unavailable. Ads may show. Try switching to another ad block service in settings.")
|
||||
SettingsPatch.addString("revanced_embedded_ads_service_failed", "%s server returned an error. Ads may show. Try switching to another ad block service in settings.")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
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.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
@@ -36,7 +34,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
GetReadyToShowAdFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
/* Amazon ads SDK */
|
||||
context.blockMethods(
|
||||
"Lcom/amazon/ads/video/player/AdsManagerImpl;",
|
||||
@@ -97,7 +95,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
""",
|
||||
ExternalLabel(skipLabelName, mutableMethod.getInstruction(0))
|
||||
)
|
||||
} ?: return CheckAdEligibilityLambdaFingerprint.toErrorResult()
|
||||
} ?: throw CheckAdEligibilityLambdaFingerprint.toErrorResult()
|
||||
|
||||
GetReadyToShowAdFingerprint.result?.apply {
|
||||
val adFormatDeclined = "Ltv/twitch/android/shared/display/ads/theatre/StreamDisplayAdsPresenter\$Action\$AdFormatDeclined;"
|
||||
@@ -112,7 +110,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
""",
|
||||
ExternalLabel(skipLabelName, mutableMethod.getInstruction(0))
|
||||
)
|
||||
} ?: return GetReadyToShowAdFingerprint.toErrorResult()
|
||||
} ?: throw GetReadyToShowAdFingerprint.toErrorResult()
|
||||
|
||||
// Spoof showAds JSON field
|
||||
ContentConfigShowAdsFingerprint.result?.apply {
|
||||
@@ -123,7 +121,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
} ?: return ContentConfigShowAdsFingerprint.toErrorResult()
|
||||
} ?: throw ContentConfigShowAdsFingerprint.toErrorResult()
|
||||
|
||||
SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences(
|
||||
SwitchPreference(
|
||||
@@ -143,7 +141,5 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
default = true
|
||||
)
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
+4
-8
@@ -8,8 +8,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
@@ -41,7 +39,7 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
if-eqz $register, :no_spoiler
|
||||
"""
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Spoiler mode: Force set hasModAccess member to true in constructor
|
||||
DeletedMessageClickableSpanCtorFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructionsWithLabels(
|
||||
@@ -53,11 +51,11 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_spoiler", getInstruction(implementation!!.instructions.lastIndex))
|
||||
)
|
||||
} ?: return DeletedMessageClickableSpanCtorFingerprint.toErrorResult()
|
||||
} ?: throw DeletedMessageClickableSpanCtorFingerprint.toErrorResult()
|
||||
|
||||
// Spoiler mode: Disable setHasModAccess setter
|
||||
SetHasModAccessFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||
?: return SetHasModAccessFingerprint.toErrorResult()
|
||||
?: throw SetHasModAccessFingerprint.toErrorResult()
|
||||
|
||||
// Cross-out mode: Reformat span of deleted message
|
||||
ChatUtilCreateDeletedSpanFingerprint.result?.mutableMethod?.apply {
|
||||
@@ -71,7 +69,7 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_reformat", getInstruction(0))
|
||||
)
|
||||
} ?: return ChatUtilCreateDeletedSpanFingerprint.toErrorResult()
|
||||
} ?: throw ChatUtilCreateDeletedSpanFingerprint.toErrorResult()
|
||||
|
||||
SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences(
|
||||
ListPreference(
|
||||
@@ -101,7 +99,5 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
)
|
||||
|
||||
SettingsPatch.addString("revanced_deleted_msg", "message deleted")
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
+2
-6
@@ -7,8 +7,6 @@ import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
@@ -26,7 +24,7 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
|
||||
class AutoClaimChannelPointPatch : BytecodePatch(
|
||||
listOf(CommunityPointsButtonViewDelegateFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_auto_claim_channel_points",
|
||||
@@ -62,8 +60,6 @@ class AutoClaimChannelPointPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("auto_claim", getInstruction(lastIndex))
|
||||
)
|
||||
} ?: return CommunityPointsButtonViewDelegateFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
} ?: throw CommunityPointsButtonViewDelegateFingerprint.toErrorResult()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
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.Patch
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
@@ -31,7 +29,7 @@ class DebugModePatch : BytecodePatch(
|
||||
ShouldShowDebugOptionsFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
listOf(
|
||||
IsDebugConfigEnabledFingerprint,
|
||||
IsOmVerificationEnabledFingerprint,
|
||||
@@ -46,7 +44,7 @@ class DebugModePatch : BytecodePatch(
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
} ?: return it.toErrorResult()
|
||||
} ?: throw it.toErrorResult()
|
||||
}
|
||||
|
||||
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
|
||||
@@ -67,7 +65,5 @@ class DebugModePatch : BytecodePatch(
|
||||
default = false,
|
||||
)
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
+5
-9
@@ -10,8 +10,6 @@ import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
|
||||
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.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable
|
||||
@@ -43,7 +41,7 @@ class SettingsPatch : BytecodePatch(
|
||||
MenuGroupsOnClickFingerprint
|
||||
)
|
||||
), Closeable {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
// Hook onCreate to handle fragment creation
|
||||
SettingsActivityOnCreateFingerprint.result?.apply {
|
||||
val insertIndex = mutableMethod.implementation!!.instructions.size - 2
|
||||
@@ -57,7 +55,7 @@ class SettingsPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_rv_settings_init", mutableMethod.getInstruction(insertIndex))
|
||||
)
|
||||
} ?: return SettingsActivityOnCreateFingerprint.toErrorResult()
|
||||
} ?: throw SettingsActivityOnCreateFingerprint.toErrorResult()
|
||||
|
||||
// Create new menu item for settings menu
|
||||
SettingsMenuItemEnumFingerprint.result?.apply {
|
||||
@@ -67,7 +65,7 @@ class SettingsPatch : BytecodePatch(
|
||||
REVANCED_SETTINGS_MENU_ITEM_TITLE_RES,
|
||||
REVANCED_SETTINGS_MENU_ITEM_ICON_RES
|
||||
)
|
||||
} ?: return SettingsMenuItemEnumFingerprint.toErrorResult()
|
||||
} ?: throw SettingsMenuItemEnumFingerprint.toErrorResult()
|
||||
|
||||
// Intercept settings menu creation and add new menu item
|
||||
MenuGroupsUpdatedFingerprint.result?.apply {
|
||||
@@ -79,7 +77,7 @@ class SettingsPatch : BytecodePatch(
|
||||
move-result-object p1
|
||||
"""
|
||||
)
|
||||
} ?: return MenuGroupsUpdatedFingerprint.toErrorResult()
|
||||
} ?: throw MenuGroupsUpdatedFingerprint.toErrorResult()
|
||||
|
||||
// Intercept onclick events for the settings menu
|
||||
MenuGroupsOnClickFingerprint.result?.apply {
|
||||
@@ -96,14 +94,12 @@ class SettingsPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_rv_settings_onclick", mutableMethod.getInstruction(insertIndex))
|
||||
)
|
||||
} ?: return MenuGroupsOnClickFingerprint.toErrorResult()
|
||||
} ?: throw MenuGroupsOnClickFingerprint.toErrorResult()
|
||||
|
||||
addString("revanced_settings", "ReVanced Settings", false)
|
||||
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
|
||||
addString("revanced_reboot", "Restart", false)
|
||||
addString("revanced_cancel", "Cancel", false)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
internal companion object {
|
||||
|
||||
Reference in New Issue
Block a user