Compare commits

...

12 Commits

Author SHA1 Message Date
semantic-release-bot
e671258572 chore(release): 2.196.0-dev.11 [skip ci]
# [2.196.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.10...v2.196.0-dev.11) (2023-10-25)

### Bug Fixes

* **YouTube - Custom branding:** Set default values for patch options ([01e8938](01e8938227))
2023-10-25 21:04:48 +00:00
oSumAtrIX
01e8938227 fix(YouTube - Custom branding): Set default values for patch options 2023-10-25 23:01:58 +02:00
semantic-release-bot
e73e1a2898 chore(release): 2.196.0-dev.10 [skip ci]
# [2.196.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.9...v2.196.0-dev.10) (2023-10-25)

### Features

* **YouTube - Client spoof:** Update current video id ([82949a0](82949a098c))
2023-10-25 18:22:35 +00:00
oSumAtrIX
82949a098c feat(YouTube - Client spoof): Update current video id
Previously this patch was only working when other patches depended on a patch that hooked the current video id. If you did not use these patches, this patch would not work as the video id would not be hooked.
2023-10-25 20:19:57 +02:00
semantic-release-bot
fd83834788 chore(release): 2.196.0-dev.9 [skip ci]
# [2.196.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.8...v2.196.0-dev.9) (2023-10-25)

### Features

* **YouTube - Disable precise seeking gesture:** Use better patch name ([4874853](4874853cda))
* **YouTube:** Add `Enable old seekbar thumbnails` patch ([0756f81](0756f81547))
2023-10-25 17:37:15 +00:00
oSumAtrIX
4874853cda feat(YouTube - Disable precise seeking gesture): Use better patch name
The new name now is taken from what YouTube names this feature.
2023-10-25 19:34:27 +02:00
oSumAtrIX
0756f81547 feat(YouTube): Add Enable old seekbar thumbnails patch 2023-10-25 19:34:26 +02:00
semantic-release-bot
47f96563a9 chore(release): 2.196.0-dev.8 [skip ci]
# [2.196.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.7...v2.196.0-dev.8) (2023-10-25)

### Features

* **ID Austria:** Constrain compatibility to last working version ([#3196](https://github.com/ReVanced/revanced-patches/issues/3196)) ([2e9be4e](2e9be4ea8f))
2023-10-25 11:17:57 +00:00
fe
2e9be4ea8f feat(ID Austria): Constrain compatibility to last working version (#3196) 2023-10-25 13:15:12 +02:00
semantic-release-bot
d76d96c1aa chore(release): 2.196.0-dev.7 [skip ci]
# [2.196.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.6...v2.196.0-dev.7) (2023-10-24)

### Features

* **YouTube:** Add `Disable fullscreen ambient mode` patch ([340dc59](340dc59f74))
* **YouTube:** Add `Disable suggested video end screen` patch ([d5e226b](d5e226b449))
2023-10-24 23:50:08 +00:00
oSumAtrIX
d5e226b449 feat(YouTube): Add Disable suggested video end screen patch 2023-10-25 01:47:23 +02:00
oSumAtrIX
340dc59f74 feat(YouTube): Add Disable fullscreen ambient mode patch 2023-10-25 01:47:22 +02:00
15 changed files with 320 additions and 13 deletions

View File

@@ -1,3 +1,40 @@
# [2.196.0-dev.11](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.10...v2.196.0-dev.11) (2023-10-25)
### Bug Fixes
* **YouTube - Custom branding:** Set default values for patch options ([2ba31f1](https://github.com/ReVanced/revanced-patches/commit/2ba31f13012284f4ae9d556cbaa01dc128f193df))
# [2.196.0-dev.10](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.9...v2.196.0-dev.10) (2023-10-25)
### Features
* **YouTube - Client spoof:** Update current video id ([9937b8f](https://github.com/ReVanced/revanced-patches/commit/9937b8fc7e7df6c850073da6faeeb70f82977cd1))
# [2.196.0-dev.9](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.8...v2.196.0-dev.9) (2023-10-25)
### Features
* **YouTube - Disable precise seeking gesture:** Use better patch name ([88cce59](https://github.com/ReVanced/revanced-patches/commit/88cce592adde46bc2811596772c03d275352be4b))
* **YouTube:** Add `Enable old seekbar thumbnails` patch ([e97e0e6](https://github.com/ReVanced/revanced-patches/commit/e97e0e6631f64e12b8d45d8cacbc059d5fc72e0c))
# [2.196.0-dev.8](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.7...v2.196.0-dev.8) (2023-10-25)
### Features
* **ID Austria:** Constrain compatibility to last working version ([#3196](https://github.com/ReVanced/revanced-patches/issues/3196)) ([79a2416](https://github.com/ReVanced/revanced-patches/commit/79a24164193460acf1b7bac43abdfa2604b02679))
# [2.196.0-dev.7](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.6...v2.196.0-dev.7) (2023-10-24)
### Features
* **YouTube:** Add `Disable fullscreen ambient mode` patch ([2a5514a](https://github.com/ReVanced/revanced-patches/commit/2a5514a6b3df076d5bc2cdc4459df30bca18f396))
* **YouTube:** Add `Disable suggested video end screen` patch ([09f1684](https://github.com/ReVanced/revanced-patches/commit/09f168406c36fb71e12c6c1875a765a86ec2b4f9))
# [2.196.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v2.196.0-dev.5...v2.196.0-dev.6) (2023-10-24)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 2.196.0-dev.6
version = 2.196.0-dev.11

File diff suppressed because one or more lines are too long

View File

@@ -10,7 +10,7 @@ import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionF
@Patch(
name = "Remove root detection",
description = "Removes the check for root permissions and unlocked bootloader.",
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["2.7.1"])]
)
@Suppress("unused")
object RootDetectionPatch : BytecodePatch(

View File

@@ -10,7 +10,7 @@ import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSign
@Patch(
name = "Spoof signature",
description = "Spoofs the signature of the app.",
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["2.7.1"])]
)
@Suppress("unused")
object SpoofSignaturePatch : BytecodePatch(

View File

@@ -15,8 +15,8 @@ import app.revanced.patches.youtube.misc.settings.SettingsPatch
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch(
name = "Disable fine scrubbing gesture",
description = "Disables gesture that shows the fine scrubbing overlay when swiping up on the seekbar.",
name = "Disable precise seeking gesture",
description = "Disables the gesture that is used to seek precisely when swiping up on the seekbar.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
@@ -30,20 +30,20 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
]
)
@Suppress("unused")
object DisableFineScrubbingGesturePatch : BytecodePatch(
object DisablePreciseSeekingGesturePatch : BytecodePatch(
setOf(IsSwipingUpFingerprint)
) {
private const val INTEGRATIONS_METHOD_DESCRIPTOR =
"Lapp/revanced/integrations/patches/DisableFineScrubbingGesturePatch;->" +
"Lapp/revanced/integrations/patches/DisablePreciseSeekingGesturePatch;->" +
"disableGesture(Landroid/view/VelocityTracker;Landroid/view/MotionEvent;)V"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.INTERACTIONS.addPreferences(
SwitchPreference(
"revanced_disable_fine_scrubbing_gesture",
StringResource("revanced_disable_fine_scrubbing_gesture_title", "Disable fine scrubbing gesture"),
StringResource("revanced_disable_fine_scrubbing_gesture_summary_on", "Gesture is disabled"),
StringResource("revanced_disable_fine_scrubbing_gesture_summary_off", "Gesture is enabled"),
"revanced_disable_precise_seeking_gesture",
StringResource("revanced_disable_precise_seeking_gesture_title", "Disable precise seeking gesture"),
StringResource("revanced_disable_precise_seeking_gesture_summary_on", "Gesture is disabled"),
StringResource("revanced_disable_precise_seeking_gesture_summary_off", "Gesture is enabled"),
)
)

View File

@@ -21,6 +21,7 @@ import java.nio.file.Files
@Suppress("unused")
object CustomBrandingPatch : ResourcePatch() {
private const val REVANCED_ICON = "ReVanced*Logo" // Can never be a valid path.
private const val APP_NAME = "YouTube ReVanced"
private val iconResourceFileNames = arrayOf(
"adaptiveproduct_youtube_background_color_108",
@@ -39,8 +40,9 @@ object CustomBrandingPatch : ResourcePatch() {
private var appName by stringPatchOption(
key = "appName",
default = APP_NAME,
values = mapOf(
"YouTube ReVanced" to "YouTube ReVanced",
"YouTube ReVanced" to APP_NAME,
"YT" to "YT",
"YouTube" to "YouTube",
),
@@ -50,6 +52,7 @@ object CustomBrandingPatch : ResourcePatch() {
private var icon by stringPatchOption(
key = "iconPath",
default = REVANCED_ICON,
values = mapOf("ReVanced Logo" to REVANCED_ICON),
title = "App icon",
description = """

View File

@@ -0,0 +1,66 @@
package app.revanced.patches.youtube.layout.hide.fullscreenambientmode
import app.revanced.extensions.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.layout.hide.fullscreenambientmode.fingerprints.InitializeAmbientModeFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Disable fullscreen ambient mode",
description = "Disables the ambient mode when in fullscreen.",
dependencies = [SettingsPatch::class, IntegrationsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube", [
"18.37.36",
"18.38.44"
]
)
]
)
@Suppress("unused")
object DisableFullscreenAmbientModePatch : BytecodePatch(
setOf(InitializeAmbientModeFingerprint)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/DisableFullscreenAmbientModePatch;"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_disable_fullscreen_ambient_mode",
StringResource(
"revanced_disable_fullscreen_ambient_mode_title",
"Disable ambient mode in fullscreen"
),
StringResource(
"revanced_disable_fullscreen_ambient_mode_summary_on",
"Ambient mode disabled"
),
StringResource(
"revanced_disable_fullscreen_ambient_mode_summary_off",
"Ambient mode enabled"
),
)
)
InitializeAmbientModeFingerprint.result?.let {
it.mutableMethod.apply {
val moveIsEnabledIndex = it.scanResult.patternScanResult!!.endIndex
addInstruction(
moveIsEnabledIndex,
"invoke-static { }, " +
"$INTEGRATIONS_CLASS_DESCRIPTOR->enableFullScreenAmbientMode()Z"
)
}
} ?: throw InitializeAmbientModeFingerprint.exception
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.youtube.layout.hide.fullscreenambientmode.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.util.patch.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
object InitializeAmbientModeFingerprint : LiteralValueFingerprint(
returnType = "V",
accessFlags = AccessFlags.CONSTRUCTOR or AccessFlags.PUBLIC,
opcodes = listOf(Opcode.MOVE_RESULT),
literalSupplier = { 45389368 }
)

View File

@@ -0,0 +1,48 @@
package app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen
import app.revanced.extensions.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen.fingerprints.CreateEndScreenViewFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch(
name = "Disable suggested video end screen",
description = "Disables the suggested video end screen at the end of a video.",
dependencies = [IntegrationsPatch::class, DisableSuggestedVideoEndScreenResourcePatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube", [
"18.37.36",
"18.38.44"
]
)
]
)
@Suppress("unused")
object DisableSuggestedVideoEndScreenPatch : BytecodePatch(
setOf(CreateEndScreenViewFingerprint)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/DisableSuggestedVideoEndScreenPatch;"
override fun execute(context: BytecodeContext) {
CreateEndScreenViewFingerprint.result?.let {
it.mutableMethod.apply {
val addOnClickEventListenerIndex = it.scanResult.patternScanResult!!.endIndex - 1
val viewRegister = getInstruction<FiveRegisterInstruction>(addOnClickEventListenerIndex).registerC
addInstruction(
addOnClickEventListenerIndex + 1,
"invoke-static {v$viewRegister}, " +
"$INTEGRATIONS_CLASS_DESCRIPTOR->closeEndScreen(Landroid/widget/ImageView;)V"
)
}
} ?: throw CreateEndScreenViewFingerprint.exception
}
}

View File

@@ -0,0 +1,43 @@
package app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
dependencies = [
SettingsPatch::class,
ResourceMappingPatch::class
],
)
object DisableSuggestedVideoEndScreenResourcePatch : ResourcePatch() {
internal var sizeAdjustableLiteAutoNavOverlay: Long = -1
override fun execute(context: ResourceContext) {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_disable_suggested_video_end_screen",
StringResource(
"revanced_disable_suggested_video_end_screen_title",
"Disable suggested video end screen"
),
StringResource(
"revanced_disable_suggested_video_end_screen_summary_on",
"Suggested videos will be disabled"
),
StringResource(
"revanced_disable_suggested_video_end_screen_summary_off",
"Suggested videos will be shown"
),
)
)
sizeAdjustableLiteAutoNavOverlay = ResourceMappingPatch.resourceMappings.single {
it.type == "layout" && it.name == "size_adjustable_lite_autonav_overlay"
}.id
}
}

View File

@@ -0,0 +1,19 @@
package app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patches.youtube.layout.hide.suggestedvideoendscreen.DisableSuggestedVideoEndScreenResourcePatch
import app.revanced.util.patch.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
import com.android.tools.smali.dexlib2.Opcode
object CreateEndScreenViewFingerprint : LiteralValueFingerprint(
returnType= "Landroid/view/View;",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = listOf("Landroid/content/Context;"),
opcodes = listOf(
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL,
Opcode.CONST
),
literalSupplier = { DisableSuggestedVideoEndScreenResourcePatch.sizeAdjustableLiteAutoNavOverlay }
)

View File

@@ -0,0 +1,64 @@
package app.revanced.patches.youtube.layout.seekbar
import app.revanced.extensions.exception
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotation.CompatiblePackage
import app.revanced.patcher.patch.annotation.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.layout.seekbar.fingerprints.EnableNewSeekbarThumbnailsFingerprint
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
@Patch(
name = "Enable old seekbar thumbnails",
description = "Enables the old seekbar thumbnails that appear above the seekbar instead of in fullscreen.",
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
compatiblePackages = [
CompatiblePackage(
"com.google.android.youtube", [
"18.37.36",
"18.38.44"
]
)
]
)
@Suppress("unused")
object EnableOldSeekbarThumbnailsPatch : BytecodePatch(
setOf(EnableNewSeekbarThumbnailsFingerprint)
) {
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
"Lapp/revanced/integrations/patches/EnableOldSeekbarThumbnailsPatch;"
override fun execute(context: BytecodeContext) {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_enable_old_seekbar_thumbnails",
StringResource(
"revanced_enable_old_seekbar_thumbnails_title",
"Enable old seekbar thumbnails"
),
StringResource(
"revanced_enable_old_seekbar_thumbnails_summary_on",
"Seekbar thumbnails will appear above the seekbar"
),
StringResource(
"revanced_enable_old_seekbar_thumbnails_summary_off",
"Seekbar thumbnails will appear in fullscreen"
),
)
)
EnableNewSeekbarThumbnailsFingerprint.result?.mutableMethod?.apply {
val moveResultIndex = getInstructions().lastIndex - 1
addInstruction(
moveResultIndex,
"invoke-static { }, $INTEGRATIONS_CLASS_DESCRIPTOR->enableOldSeekbarThumbnails()Z"
)
} ?: throw EnableNewSeekbarThumbnailsFingerprint.exception
}
}

View File

@@ -0,0 +1,12 @@
package app.revanced.patches.youtube.layout.seekbar.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.util.patch.LiteralValueFingerprint
import com.android.tools.smali.dexlib2.AccessFlags
object EnableNewSeekbarThumbnailsFingerprint : LiteralValueFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters = emptyList(),
literalSupplier = { 45398577 }
)

View File

@@ -15,6 +15,7 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.youtube.misc.fix.playback.fingerprints.*
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
import app.revanced.patches.youtube.misc.settings.SettingsPatch
import app.revanced.patches.youtube.video.information.VideoInformationPatch
import app.revanced.patches.youtube.video.playerresponse.PlayerResponseMethodHookPatch
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
@@ -24,6 +25,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
SettingsPatch::class,
PlayerTypeHookPatch::class,
PlayerResponseMethodHookPatch::class,
VideoInformationPatch::class,
]
)
object SpoofSignaturePatch : BytecodePatch(