mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-26 20:21:04 +00:00
Compare commits
4 Commits
v2.175.0-d
...
v2.175.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e74df8bba9 | ||
|
|
b285e4663b | ||
|
|
9159c77725 | ||
|
|
3ac1be3f01 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
# [2.175.0-dev.13](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.12...v2.175.0-dev.13) (2023-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **settings:** sort setting preferences using lowercase ([#2312](https://github.com/revanced/revanced-patches/issues/2312)) ([2743a95](https://github.com/revanced/revanced-patches/commit/2743a95b417a6023799035e30631e7b3a68bcc45))
|
||||||
|
|
||||||
|
# [2.175.0-dev.12](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.11...v2.175.0-dev.12) (2023-05-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube/integrations:** fix playback of embedded videos ([#2304](https://github.com/revanced/revanced-patches/issues/2304)) ([1dffbaf](https://github.com/revanced/revanced-patches/commit/1dffbaf0aa73f0f703516648d5cd935000fa2770))
|
||||||
|
|
||||||
# [2.175.0-dev.11](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.10...v2.175.0-dev.11) (2023-05-28)
|
# [2.175.0-dev.11](https://github.com/revanced/revanced-patches/compare/v2.175.0-dev.10...v2.175.0-dev.11) (2023-05-28)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.175.0-dev.11
|
version = 2.175.0-dev.13
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ internal abstract class AbstractPreferenceScreen(
|
|||||||
return PreferenceScreen(
|
return PreferenceScreen(
|
||||||
key,
|
key,
|
||||||
StringResource("${key}_title", title),
|
StringResource("${key}_title", title),
|
||||||
preferences.sortedBy { it.title.value } +
|
preferences.sortedBy { it.title.value.lowercase() } +
|
||||||
categories.sortedBy { it.title }.map { it.transform() },
|
categories.sortedBy { it.title.lowercase() }.map { it.transform() },
|
||||||
summary?.let { summary ->
|
summary?.let { summary ->
|
||||||
StringResource("${key}_summary", summary)
|
StringResource("${key}_summary", summary)
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ internal abstract class AbstractPreferenceScreen(
|
|||||||
return PreferenceCategory(
|
return PreferenceCategory(
|
||||||
key,
|
key,
|
||||||
StringResource("${key}_title", title),
|
StringResource("${key}_title", title),
|
||||||
preferences.sortedBy { it.title.value }
|
preferences.sortedBy { it.title.value.lowercase() }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For embedded playback.
|
||||||
|
* It appears this hook may no longer be needed as one of the constructor parameters is the already hooked
|
||||||
|
* [EmbeddedPlayerControlsOverlayFingerprint]
|
||||||
|
*/
|
||||||
|
object APIPlayerServiceFingerprint : IntegrationsFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
customFingerprint = { methodDef, _ -> methodDef.definingClass == "Lcom/google/android/apps/youtube/embeddedplayer/service/service/jar/ApiPlayerService;" },
|
||||||
|
// Integrations context is the first method parameter.
|
||||||
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
||||||
|
)
|
||||||
@@ -2,6 +2,10 @@ package app.revanced.patches.youtube.misc.integrations.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
|
||||||
object InitFingerprint : IntegrationsFingerprint(
|
/**
|
||||||
|
* Hooks the context when the app is launched as a regular application (and is not an embedded video playback).
|
||||||
|
*/
|
||||||
|
object ApplicationInitFingerprint : IntegrationsFingerprint(
|
||||||
strings = listOf("Application creation", "Application.onCreate"),
|
strings = listOf("Application creation", "Application.onCreate"),
|
||||||
|
// Integrations context is the Activity itself.
|
||||||
)
|
)
|
||||||
@@ -4,12 +4,19 @@ import app.revanced.patcher.extensions.or
|
|||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For embedded playback inside Google Play store (and probably other situations as well).
|
||||||
|
*
|
||||||
|
* Note: this fingerprint may no longer be needed, as it appears
|
||||||
|
* [RemoteEmbedFragmentFingerprint] may be set before this hook is called.
|
||||||
|
*/
|
||||||
object EmbeddedPlayerControlsOverlayFingerprint : IntegrationsFingerprint(
|
object EmbeddedPlayerControlsOverlayFingerprint : IntegrationsFingerprint(
|
||||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.CONSTRUCTOR,
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
parameters = listOf("L", "L", "L"),
|
parameters = listOf("Landroid/content/Context;", "L", "L"),
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.startsWith("Lcom/google/android/apps/youtube/embeddedplayer/service/ui/overlays/controlsoverlay/remoteloaded/")
|
methodDef.definingClass.startsWith("Lcom/google/android/apps/youtube/embeddedplayer/service/ui/overlays/controlsoverlay/remoteloaded/")
|
||||||
},
|
},
|
||||||
|
// Integrations context is the first method parameter.
|
||||||
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For embedded playback inside the Google app (such as the in app 'discover' tab).
|
||||||
|
*
|
||||||
|
* Note: this fingerprint may or may not be needed, as
|
||||||
|
* [RemoteEmbedFragmentFingerprint] might be set before this is called.
|
||||||
|
*/
|
||||||
|
object EmbeddedPlayerFingerprint : IntegrationsFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
returnType = "L",
|
||||||
|
parameters = listOf("L", "L", "Landroid/content/Context;"),
|
||||||
|
strings = listOf("android.hardware.type.television"), // String is also found in other classes
|
||||||
|
// Integrations context is the third method parameter.
|
||||||
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size + 2 }
|
||||||
|
)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For embedded playback. Likely covers Google Play store and other Google products.
|
||||||
|
*/
|
||||||
|
object RemoteEmbedFragmentFingerprint : IntegrationsFingerprint(
|
||||||
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf("Landroid/content/Context;", "L", "L"),
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass == "Lcom/google/android/apps/youtube/embeddedplayer/service/jar/client/RemoteEmbedFragment;"
|
||||||
|
},
|
||||||
|
// Integrations context is the first method parameter.
|
||||||
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
||||||
|
)
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For embedded playback inside 3rd party android app (such as 3rd party Reddit apps).
|
||||||
|
*/
|
||||||
|
object RemoteEmbeddedPlayerFingerprint : IntegrationsFingerprint(
|
||||||
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.CONSTRUCTOR,
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf("Landroid/content/Context;", "L", "L", "Z"),
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass == "Lcom/google/android/youtube/api/jar/client/RemoteEmbeddedPlayer;"
|
||||||
|
},
|
||||||
|
// Integrations context is the first method parameter.
|
||||||
|
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
||||||
|
)
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
|
||||||
|
|
||||||
object ServiceFingerprint : IntegrationsFingerprint(
|
|
||||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("ApiPlayerService;") && methodDef.name == "<init>" },
|
|
||||||
contextRegisterResolver = { it.implementation!!.registerCount - it.parameters.size }
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Old API activity to embed YouTube into 3rd party Android apps.
|
||||||
|
*
|
||||||
|
* In 2023 supported was ended and is no longer available,
|
||||||
|
* but this may still be used by older apps:
|
||||||
|
* https://developers.google.com/youtube/android/player
|
||||||
|
*/
|
||||||
|
object StandalonePlayerActivityFingerprint : IntegrationsFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass == "Lcom/google/android/youtube/api/StandalonePlayerActivity;"
|
||||||
|
&& methodDef.name == "onCreate"
|
||||||
|
},
|
||||||
|
// Integrations context is the Activity itself.
|
||||||
|
)
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.integrations.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch.IntegrationsFingerprint
|
|
||||||
|
|
||||||
object StandalonePlayerFingerprint : IntegrationsFingerprint(
|
|
||||||
strings = listOf(
|
|
||||||
"Invalid PlaybackStartDescriptor. Returning the instance itself.",
|
|
||||||
"com.google.android.music",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@@ -4,15 +4,26 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||||
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch
|
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility
|
import app.revanced.patches.youtube.misc.integrations.annotations.IntegrationsCompatibility
|
||||||
import app.revanced.patches.youtube.misc.integrations.fingerprints.InitFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.integrations.fingerprints.EmbeddedPlayerControlsOverlayFingerprint
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.EmbeddedPlayerControlsOverlayFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.fingerprints.ServiceFingerprint
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.EmbeddedPlayerFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.fingerprints.StandalonePlayerFingerprint
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.ApplicationInitFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.RemoteEmbedFragmentFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.RemoteEmbeddedPlayerFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.APIPlayerServiceFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.fingerprints.StandalonePlayerActivityFingerprint
|
||||||
|
|
||||||
@Name("integrations")
|
@Name("integrations")
|
||||||
@IntegrationsCompatibility
|
@IntegrationsCompatibility
|
||||||
@RequiresIntegrations
|
@RequiresIntegrations
|
||||||
class IntegrationsPatch : AbstractIntegrationsPatch(
|
class IntegrationsPatch : AbstractIntegrationsPatch(
|
||||||
"Lapp/revanced/integrations/utils/ReVancedUtils;",
|
"Lapp/revanced/integrations/utils/ReVancedUtils;",
|
||||||
listOf(InitFingerprint, StandalonePlayerFingerprint, ServiceFingerprint, EmbeddedPlayerControlsOverlayFingerprint),
|
listOf(
|
||||||
|
ApplicationInitFingerprint,
|
||||||
|
StandalonePlayerActivityFingerprint,
|
||||||
|
RemoteEmbeddedPlayerFingerprint,
|
||||||
|
RemoteEmbedFragmentFingerprint,
|
||||||
|
EmbeddedPlayerControlsOverlayFingerprint,
|
||||||
|
EmbeddedPlayerFingerprint,
|
||||||
|
APIPlayerServiceFingerprint,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
Reference in New Issue
Block a user