mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-29 21:51:04 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15a044cae1 | ||
|
|
ede60b994c | ||
|
|
c15cc431d6 | ||
|
|
fb006f87ab | ||
|
|
28206fd804 | ||
|
|
e425e75152 | ||
|
|
69d6c55942 |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,3 +1,24 @@
|
|||||||
|
## [2.43.1](https://github.com/revanced/revanced-patches/compare/v2.43.0...v2.43.1) (2022-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* `Patch` annotation for `client-spoof` patch ([6a8af47](https://github.com/revanced/revanced-patches/commit/6a8af47f2dfb319a53db9b5f9deb0392f10f4185))
|
||||||
|
|
||||||
|
# [2.43.0](https://github.com/revanced/revanced-patches/compare/v2.42.1...v2.43.0) (2022-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* `client-spoof` patch ([5512c07](https://github.com/revanced/revanced-patches/commit/5512c072fa4b047849dbea0d2d382dd85e3a0827))
|
||||||
|
|
||||||
|
## [2.42.1](https://github.com/revanced/revanced-patches/compare/v2.42.0...v2.42.1) (2022-08-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* changed default value for autorepeat setting ([#386](https://github.com/revanced/revanced-patches/issues/386)) ([d43add7](https://github.com/revanced/revanced-patches/commit/d43add7c21f0d9f45830476704985755e37d33ef))
|
||||||
|
|
||||||
# [2.42.0](https://github.com/revanced/revanced-patches/compare/v2.41.0...v2.42.0) (2022-08-22)
|
# [2.42.0](https://github.com/revanced/revanced-patches/compare/v2.41.0...v2.42.0) (2022-08-22)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -84,9 +84,10 @@ Official patches by ReVanced
|
|||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.32.35 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.32.35 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.32.35 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.32.35 |
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.32.35 |
|
| `minimized-playback` | Enables minimized and background playback. | 17.32.35 |
|
||||||
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.32.35 |
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.32.35 |
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.32.35 |
|
| `always-autorepeat` | Always repeats the playing video again. | 17.32.35 |
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG | 17.32.35 |
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.32.35 |
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
||||||
| `custom-playback-speed` | Adds more video playback speed options. | 17.32.35 |
|
| `custom-playback-speed` | Adds more video playback speed options. | 17.32.35 |
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.42.0
|
version = 2.43.1
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class AutoRepeatPatch : BytecodePatch(
|
|||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_pref_auto_repeat",
|
"revanced_pref_auto_repeat",
|
||||||
StringResource("revanced_auto_repeat_enabled_title", "Enable auto-repeat"),
|
StringResource("revanced_auto_repeat_enabled_title", "Enable auto-repeat"),
|
||||||
true,
|
false,
|
||||||
StringResource("revanced_auto_repeat_summary_on", "Auto-repeat is enabled"),
|
StringResource("revanced_auto_repeat_summary_on", "Auto-repeat is enabled"),
|
||||||
StringResource("revanced_auto_repeat_summary_off", "Auto-repeat is disabled")
|
StringResource("revanced_auto_repeat_summary_off", "Auto-repeat is disabled")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.clientspoof.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.google.android.youtube", arrayOf()),
|
||||||
|
Package("com.vanced.android", arrayOf())
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class ClientSpoofCompatibility
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.clientspoof.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.clientspoof.annotations.ClientSpoofCompatibility
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("user-agent-header-builder-fingerprint")
|
||||||
|
@ClientSpoofCompatibility
|
||||||
|
@DirectPatternScanMethod
|
||||||
|
@Version("0.0.1")
|
||||||
|
object UserAgentHeaderBuilderFingerprint : MethodFingerprint(
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
listOf("L", "L", "L"),
|
||||||
|
listOf(Opcode.MOVE_RESULT_OBJECT, Opcode.INVOKE_VIRTUAL),
|
||||||
|
listOf("(Linux; U; Android "),
|
||||||
|
)
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package app.revanced.patches.youtube.misc.clientspoof.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
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.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.misc.clientspoof.annotations.ClientSpoofCompatibility
|
||||||
|
import app.revanced.patches.youtube.misc.clientspoof.fingerprints.UserAgentHeaderBuilderFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("client-spoof")
|
||||||
|
@Description("Spoofs the YouTube or Vanced client to prevent playback issues.")
|
||||||
|
@DependsOn([IntegrationsPatch::class])
|
||||||
|
@ClientSpoofCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class ClientSpoofPatch : BytecodePatch(
|
||||||
|
listOf(UserAgentHeaderBuilderFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
val result = UserAgentHeaderBuilderFingerprint.result!!
|
||||||
|
val method = result.mutableMethod
|
||||||
|
|
||||||
|
val insertIndex = result.patternScanResult!!.endIndex
|
||||||
|
val packageNameRegister = (method.instruction(insertIndex) as FiveRegisterInstruction).registerD
|
||||||
|
|
||||||
|
val originalPackageName = "com.google.android.youtube"
|
||||||
|
method.addInstructions(insertIndex, "const-string v$packageNameRegister, \"$originalPackageName\"")
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@ import app.revanced.patcher.patch.annotations.Patch
|
|||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
import app.revanced.patches.youtube.layout.castbutton.patch.HideCastButtonPatch
|
import app.revanced.patches.youtube.layout.castbutton.patch.HideCastButtonPatch
|
||||||
|
import app.revanced.patches.youtube.misc.clientspoof.patch.ClientSpoofPatch
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
||||||
import app.revanced.patches.youtube.misc.microg.fingerprints.*
|
import app.revanced.patches.youtube.misc.microg.fingerprints.*
|
||||||
import app.revanced.patches.youtube.misc.microg.patch.resource.MicroGResourcePatch
|
import app.revanced.patches.youtube.misc.microg.patch.resource.MicroGResourcePatch
|
||||||
@@ -32,10 +33,11 @@ import org.jf.dexlib2.immutable.reference.ImmutableStringReference
|
|||||||
[
|
[
|
||||||
MicroGResourcePatch::class,
|
MicroGResourcePatch::class,
|
||||||
HideCastButtonPatch::class,
|
HideCastButtonPatch::class,
|
||||||
|
ClientSpoofPatch::class
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Name("microg-support")
|
@Name("microg-support")
|
||||||
@Description("Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG")
|
@Description("Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG.")
|
||||||
@MicroGPatchCompatibility
|
@MicroGPatchCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class MicroGBytecodePatch : BytecodePatch(
|
class MicroGBytecodePatch : BytecodePatch(
|
||||||
|
|||||||
Reference in New Issue
Block a user