mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-14 05:14:37 +01:00
Compare commits
9 Commits
v3.0.0-dev
...
v3.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e820724111 | ||
|
|
ba58edbd7f | ||
|
|
a6d7c633f5 | ||
|
|
17f44ca780 | ||
|
|
3bd66406cc | ||
|
|
536b354fd6 | ||
|
|
e6a1573c59 | ||
|
|
d63288cc3e | ||
|
|
aaad91333f |
33
CHANGELOG.md
33
CHANGELOG.md
@@ -1,3 +1,36 @@
|
|||||||
|
# [3.0.0-dev.6](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.5...v3.0.0-dev.6) (2023-12-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Twitch - Settings:** Support version `16.1.0` and `15.4.1` ([#3377](https://github.com/ReVanced/revanced-patches/issues/3377)) ([062310d](https://github.com/ReVanced/revanced-patches/commit/062310dcc3923568c96171420c7fb9c0c2144233))
|
||||||
|
|
||||||
|
# [3.0.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.4...v3.0.0-dev.5) (2023-12-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Use correct class loader to load resources ([1d5f1f8](https://github.com/ReVanced/revanced-patches/commit/1d5f1f83be1f4eb78381887cd59f1649f1ed6d71))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Photomath:** Constrain patches to last working version ([f9a5dc6](https://github.com/ReVanced/revanced-patches/commit/f9a5dc6c91f37e9d7018e631739ca61511940d29))
|
||||||
|
|
||||||
|
# [3.0.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.3...v3.0.0-dev.4) (2023-12-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Minimized playback:** Fix PIP incorrectly shown for some Shorts playback ([#3364](https://github.com/ReVanced/revanced-patches/issues/3364)) ([84607ff](https://github.com/ReVanced/revanced-patches/commit/84607ff5f4bd30d328cdc4e1d46070a86d6c56bf))
|
||||||
|
|
||||||
|
# [3.0.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.2...v3.0.0-dev.3) (2023-12-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Return YouTube Dislike:** Prevent the first Short opened from freezing the UI ([#3359](https://github.com/ReVanced/revanced-patches/issues/3359)) ([e024409](https://github.com/ReVanced/revanced-patches/commit/e024409219bfbccc32c337d95da24b7146b6c7b7))
|
||||||
|
|
||||||
# [3.0.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.1...v3.0.0-dev.2) (2023-12-02)
|
# [3.0.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v3.0.0-dev.1...v3.0.0-dev.2) (2023-12-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 = 3.0.0-dev.2
|
version = 3.0.0-dev.6
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@ import kotlin.random.Random
|
|||||||
name = "Spoof device ID",
|
name = "Spoof device ID",
|
||||||
description = "Spoofs device ID to mitigate manual bans by developers.",
|
description = "Spoofs device ID to mitigate manual bans by developers.",
|
||||||
dependencies = [SignatureDetectionPatch::class],
|
dependencies = [SignatureDetectionPatch::class],
|
||||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath")]
|
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofDeviceIdPatch : BytecodePatch(
|
object SpoofDeviceIdPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import app.revanced.patches.photomath.misc.unlockplus.fingerprints.IsPlusUnlocke
|
|||||||
@Patch(
|
@Patch(
|
||||||
name = "Unlock plus",
|
name = "Unlock plus",
|
||||||
dependencies = [SignatureDetectionPatch::class, EnableBookpointPatch::class],
|
dependencies = [SignatureDetectionPatch::class, EnableBookpointPatch::class],
|
||||||
compatiblePackages = [CompatiblePackage("com.microblink.photomath")]
|
compatiblePackages = [CompatiblePackage("com.microblink.photomath", ["8.32.0"])]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object UnlockPlusPatch : BytecodePatch(
|
object UnlockPlusPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import java.io.Closeable
|
|||||||
description = "Adds settings menu to Twitch.",
|
description = "Adds settings menu to Twitch.",
|
||||||
dependencies = [IntegrationsPatch::class, SettingsResourcePatch::class],
|
dependencies = [IntegrationsPatch::class, SettingsResourcePatch::class],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage("tv.twitch.android.app", ["16.9.1"])
|
CompatiblePackage("tv.twitch.android.app", ["15.4.1", "16.1.0", "16.9.1"])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
object SettingsPatch : BytecodePatch(
|
object SettingsPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
|
|
||||||
// Hook the player parameters.
|
// Hook the player parameters.
|
||||||
PlayerResponseMethodHookPatch += PlayerResponseMethodHookPatch.Hook.ProtoBufferParameter(
|
PlayerResponseMethodHookPatch += PlayerResponseMethodHookPatch.Hook.ProtoBufferParameter(
|
||||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;)Ljava/lang/String;"
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->spoofParameter(Ljava/lang/String;Z)Ljava/lang/String;"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Force the seekbar time and chapters to always show up.
|
// Force the seekbar time and chapters to always show up.
|
||||||
|
|||||||
@@ -17,13 +17,19 @@ import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.Minimize
|
|||||||
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackSettingsParentFingerprint
|
import app.revanced.patches.youtube.misc.minimizedplayback.fingerprints.MinimizedPlaybackSettingsParentFingerprint
|
||||||
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
|
import app.revanced.patches.youtube.misc.playertype.PlayerTypeHookPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.video.information.VideoInformationPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Minimized playback",
|
name = "Minimized playback",
|
||||||
description = "Enables minimized and background playback.",
|
description = "Enables minimized and background playback.",
|
||||||
dependencies = [IntegrationsPatch::class, PlayerTypeHookPatch::class, SettingsPatch::class],
|
dependencies = [
|
||||||
|
IntegrationsPatch::class,
|
||||||
|
PlayerTypeHookPatch::class,
|
||||||
|
VideoInformationPatch::class,
|
||||||
|
SettingsPatch::class
|
||||||
|
],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
CompatiblePackage(
|
CompatiblePackage(
|
||||||
"com.google.android.youtube",
|
"com.google.android.youtube",
|
||||||
@@ -65,7 +71,7 @@ object MinimizedPlaybackPatch : BytecodePatch(
|
|||||||
mutableMethod.addInstructions(
|
mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->isPlaybackNotShort()Z
|
invoke-static {}, $INTEGRATIONS_CLASS_DESCRIPTOR->playbackIsNotShort()Z
|
||||||
move-result v0
|
move-result v0
|
||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.video.information.fingerprints.*
|
import app.revanced.patches.youtube.video.information.fingerprints.*
|
||||||
|
import app.revanced.patches.youtube.video.playerresponse.PlayerResponseMethodHookPatch
|
||||||
import app.revanced.patches.youtube.video.videoid.VideoIdPatch
|
import app.revanced.patches.youtube.video.videoid.VideoIdPatch
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
@@ -26,7 +27,7 @@ import com.android.tools.smali.dexlib2.util.MethodUtil
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
description = "Hooks YouTube to get information about the current playing video.",
|
description = "Hooks YouTube to get information about the current playing video.",
|
||||||
dependencies = [IntegrationsPatch::class, VideoIdPatch::class]
|
dependencies = [IntegrationsPatch::class, VideoIdPatch::class, PlayerResponseMethodHookPatch::class]
|
||||||
)
|
)
|
||||||
object VideoInformationPatch : BytecodePatch(
|
object VideoInformationPatch : BytecodePatch(
|
||||||
setOf(
|
setOf(
|
||||||
@@ -115,6 +116,10 @@ object VideoInformationPatch : BytecodePatch(
|
|||||||
VideoIdPatch.hookBackgroundPlayVideoId(videoIdMethodDescriptor)
|
VideoIdPatch.hookBackgroundPlayVideoId(videoIdMethodDescriptor)
|
||||||
VideoIdPatch.hookPlayerResponseVideoId(
|
VideoIdPatch.hookPlayerResponseVideoId(
|
||||||
"$INTEGRATIONS_CLASS_DESCRIPTOR->setPlayerResponseVideoId(Ljava/lang/String;Z)V")
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->setPlayerResponseVideoId(Ljava/lang/String;Z)V")
|
||||||
|
// Call before any other video id hooks,
|
||||||
|
// so they can use VideoInformation and check if the video id is for a Short.
|
||||||
|
PlayerResponseMethodHookPatch += PlayerResponseMethodHookPatch.Hook.ProtoBufferParameterBeforeVideoId(
|
||||||
|
"$INTEGRATIONS_CLASS_DESCRIPTOR->newPlayerResponseSignature(Ljava/lang/String;Z)Ljava/lang/String;")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the video time method
|
* Set the video time method
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ object PlayerResponseMethodHookPatch :
|
|||||||
Closeable,
|
Closeable,
|
||||||
MutableSet<PlayerResponseMethodHookPatch.Hook> by mutableSetOf() {
|
MutableSet<PlayerResponseMethodHookPatch.Hook> by mutableSetOf() {
|
||||||
private const val VIDEO_ID_PARAMETER = 1
|
private const val VIDEO_ID_PARAMETER = 1
|
||||||
private const val VIDEO_IS_OPENING_OR_PLAYING_PARAMETER = 11
|
private const val IS_SHORT_AND_OPENING_OR_PLAYING_PARAMETER = 11
|
||||||
private const val PROTO_BUFFER_PARAMETER_PARAMETER = 3
|
private const val PROTO_BUFFER_PARAMETER_PARAMETER = 3
|
||||||
|
|
||||||
private lateinit var playerResponseMethod: MutableMethod
|
private lateinit var playerResponseMethod: MutableMethod
|
||||||
@@ -31,13 +31,13 @@ object PlayerResponseMethodHookPatch :
|
|||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
fun hookVideoId(hook: Hook) = playerResponseMethod.addInstruction(
|
fun hookVideoId(hook: Hook) = playerResponseMethod.addInstruction(
|
||||||
0, "invoke-static {p$VIDEO_ID_PARAMETER, p$VIDEO_IS_OPENING_OR_PLAYING_PARAMETER}, $hook"
|
0, "invoke-static {p$VIDEO_ID_PARAMETER, p$IS_SHORT_AND_OPENING_OR_PLAYING_PARAMETER}, $hook"
|
||||||
)
|
)
|
||||||
|
|
||||||
fun hookProtoBufferParameter(hook: Hook) = playerResponseMethod.addInstructions(
|
fun hookProtoBufferParameter(hook: Hook) = playerResponseMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
invoke-static {p$PROTO_BUFFER_PARAMETER_PARAMETER}, $hook
|
invoke-static {p$PROTO_BUFFER_PARAMETER_PARAMETER, p$IS_SHORT_AND_OPENING_OR_PLAYING_PARAMETER}, $hook
|
||||||
move-result-object p$PROTO_BUFFER_PARAMETER_PARAMETER
|
move-result-object p$PROTO_BUFFER_PARAMETER_PARAMETER
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ object VideoIdPatch : BytecodePatch(
|
|||||||
* Supports all videos and functions in all situations.
|
* Supports all videos and functions in all situations.
|
||||||
*
|
*
|
||||||
* First parameter is the video id.
|
* First parameter is the video id.
|
||||||
* Second parameter is if the video is being opened or is currently playing.
|
* Second parameter is if the video is a Short AND it is being opened or is currently playing.
|
||||||
*
|
*
|
||||||
* Hook is always called off the main thread.
|
* Hook is always called off the main thread.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import org.w3c.dom.Node
|
|||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
import java.nio.file.StandardCopyOption
|
import java.nio.file.StandardCopyOption
|
||||||
|
|
||||||
|
private val classLoader = object {}.javaClass.classLoader
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recursively traverse the DOM tree starting from the given root node.
|
* Recursively traverse the DOM tree starting from the given root node.
|
||||||
*
|
*
|
||||||
@@ -45,7 +47,6 @@ fun ResourceContext.mergeStrings(host: String) {
|
|||||||
* @param resources The resources to copy.
|
* @param resources The resources to copy.
|
||||||
*/
|
*/
|
||||||
fun ResourceContext.copyResources(sourceResourceDirectory: String, vararg resources: ResourceGroup) {
|
fun ResourceContext.copyResources(sourceResourceDirectory: String, vararg resources: ResourceGroup) {
|
||||||
val classLoader = javaClass.classLoader
|
|
||||||
val targetResourceDirectory = this["res"]
|
val targetResourceDirectory = this["res"]
|
||||||
|
|
||||||
for (resourceGroup in resources) {
|
for (resourceGroup in resources) {
|
||||||
@@ -77,7 +78,7 @@ fun ResourceContext.iterateXmlNodeChildren(
|
|||||||
targetTag: String,
|
targetTag: String,
|
||||||
callback: (node: Node) -> Unit
|
callback: (node: Node) -> Unit
|
||||||
) =
|
) =
|
||||||
xmlEditor[javaClass.classLoader.getResourceAsStream(resource)!!].use {
|
xmlEditor[classLoader.getResourceAsStream(resource)!!].use {
|
||||||
val stringsNode = it.file.getElementsByTagName(targetTag).item(0).childNodes
|
val stringsNode = it.file.getElementsByTagName(targetTag).item(0).childNodes
|
||||||
for (i in 1 until stringsNode.length - 1) callback(stringsNode.item(i))
|
for (i in 1 until stringsNode.length - 1) callback(stringsNode.item(i))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<string name="revanced_ryd_compact_layout_summary_on">Like button styled for minimum width</string>
|
<string name="revanced_ryd_compact_layout_summary_on">Like button styled for minimum width</string>
|
||||||
<string name="revanced_ryd_compact_layout_summary_off">Like button styled for best appearance</string>
|
<string name="revanced_ryd_compact_layout_summary_off">Like button styled for best appearance</string>
|
||||||
|
|
||||||
<string name="ryd_toast_on_connection_error_title">Show toast if API not available</string>
|
<string name="ryd_toast_on_connection_error_title">Show toast if API is not available</string>
|
||||||
<string name="ryd_toast_on_connection_error_summary_on">Toast shown if ReturnYouTubeDislike API is not available</string>
|
<string name="ryd_toast_on_connection_error_summary_on">Toast shown if ReturnYouTubeDislike API is not available</string>
|
||||||
<string name="ryd_toast_on_connection_error_summary_off">Toast not shown if ReturnYouTubeDislike API is not available</string>
|
<string name="ryd_toast_on_connection_error_summary_off">Toast not shown if ReturnYouTubeDislike API is not available</string>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user