mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 09:53:55 +01:00
Compare commits
8 Commits
v2.178.0-d
...
v2.178.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8f8746fce | ||
|
|
ed28862733 | ||
|
|
36e08dbe46 | ||
|
|
8233c30fc9 | ||
|
|
21e96aff19 | ||
|
|
f038278c05 | ||
|
|
46f2ca230b | ||
|
|
08cfd81362 |
28
CHANGELOG.md
28
CHANGELOG.md
@@ -1,3 +1,31 @@
|
||||
# [2.178.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.8...v2.178.0-dev.9) (2023-06-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **twitch:** 15.4.1 support ([#2462](https://github.com/revanced/revanced-patches/issues/2462)) ([826ed49](https://github.com/revanced/revanced-patches/commit/826ed49c7ca5a00e383b743f88f75dbfc00adb43))
|
||||
|
||||
# [2.178.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.7...v2.178.0-dev.8) (2023-06-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **boostforreddit:** use correct options ([ec39732](https://github.com/revanced/revanced-patches/commit/ec39732a05f7c4c3360b8ba42fe50fd60952e6ac))
|
||||
|
||||
# [2.178.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.6...v2.178.0-dev.7) (2023-06-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube-music:** remove version compatibility constraints ([276af14](https://github.com/revanced/revanced-patches/commit/276af1415a4d354c62fe6259b6559bca1fa84f08))
|
||||
|
||||
# [2.178.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.5...v2.178.0-dev.6) (2023-06-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/hide-album-cards:** call correct integrations method ([0dbffaa](https://github.com/revanced/revanced-patches/commit/0dbffaae7d6dcb7050a9ea6e3c771839bcfdfbe1))
|
||||
|
||||
# [2.178.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.178.0-dev.4...v2.178.0-dev.5) (2023-06-18)
|
||||
|
||||
|
||||
|
||||
17
README.md
17
README.md
@@ -71,16 +71,15 @@ The official ReVanced Patches.
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `background-play` | Enables playing music in the background. | all |
|
||||
| `bypass-certificate-checks` | Bypasses certificate checks which prevent YouTube Music from working on Android Auto. | 5.39.52 |
|
||||
| `bypass-certificate-checks` | Bypasses certificate checks which prevent YouTube Music from working on Android Auto. | all |
|
||||
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | all |
|
||||
| `compact-header` | Hides the music category bar at the top of the homepage. | all |
|
||||
| `exclusive-audio-playback` | Enables the option to play music without video. | all |
|
||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.39.52 |
|
||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | all |
|
||||
| `minimized-playback-music` | Enables minimized playback on Kids music. | all |
|
||||
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | all |
|
||||
| `music-video-ads` | Removes ads in the music player. | all |
|
||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | all |
|
||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | all |
|
||||
| `vanced-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | all |
|
||||
</details>
|
||||
|
||||
### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill)
|
||||
@@ -120,13 +119,13 @@ The official ReVanced Patches.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `auto-claim-channel-points` | Automatically claim Channel Points. | all |
|
||||
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 14.6.1 |
|
||||
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
|
||||
| `block-video-ads` | Blocks video ads in streams and VODs. | 14.6.1 |
|
||||
| `auto-claim-channel-points` | Automatically claim Channel Points. | 15.4.1 |
|
||||
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 15.4.1 |
|
||||
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 15.4.1 |
|
||||
| `block-video-ads` | Blocks video ads in streams and VODs. | 15.4.1 |
|
||||
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
|
||||
| `settings` | Adds settings menu to Twitch. | all |
|
||||
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
|
||||
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | 15.4.1 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.178.0-dev.5
|
||||
version = 2.178.0-dev.9
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -10,19 +10,17 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
||||
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
|
||||
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
|
||||
@Patch
|
||||
@Name("music-video-ads")
|
||||
@Description("Removes ads in the music player.")
|
||||
@MusicVideoAdsCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MusicVideoAdsPatch : BytecodePatch(
|
||||
listOf(
|
||||
ShowMusicVideoAdsConstructorFingerprint
|
||||
)
|
||||
listOf(ShowMusicVideoAdsConstructorFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.revanced.patches.music.ad.video.annotations
|
||||
package app.revanced.patches.music.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class MusicVideoAdsCompatibility
|
||||
internal annotation class MusicCompatibility
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.audio.codecs.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class CodecsUnlockCompatibility
|
||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.toInstruction
|
||||
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
|
||||
import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
@@ -18,7 +18,7 @@ import org.jf.dexlib2.Opcode
|
||||
@Patch
|
||||
@Name("codecs-unlock")
|
||||
@Description("Adds more audio codec options. The new audio codecs usually result in better audio quality.")
|
||||
@CodecsUnlockCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CodecsUnlockPatch : BytecodePatch(
|
||||
listOf(
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.audio.exclusiveaudio.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ExclusiveAudioCompatibility
|
||||
@@ -10,18 +10,16 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("exclusive-audio-playback")
|
||||
@Description("Enables the option to play music without video.")
|
||||
@ExclusiveAudioCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class ExclusiveAudioPatch : BytecodePatch(
|
||||
listOf(
|
||||
AudioOnlyEnablerFingerprint
|
||||
)
|
||||
listOf(AudioOnlyEnablerFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.layout.compactheader.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class CompactHeaderCompatibility
|
||||
@@ -9,19 +9,17 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
||||
|
||||
@Patch(false)
|
||||
@Name("compact-header")
|
||||
@Description("Hides the music category bar at the top of the homepage.")
|
||||
@CompactHeaderCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class CompactHeaderPatch : BytecodePatch(
|
||||
listOf(
|
||||
CompactHeaderConstructorFingerprint
|
||||
)
|
||||
listOf(CompactHeaderConstructorFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = CompactHeaderConstructorFingerprint.result!!
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.layout.minimizedplayback.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class MinimizedPlaybackCompatibility
|
||||
@@ -9,18 +9,16 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("minimized-playback-music")
|
||||
@Description("Enables minimized playback on Kids music.")
|
||||
@MinimizedPlaybackCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class MinimizedPlaybackPatch : BytecodePatch(
|
||||
listOf(
|
||||
MinimizedPlaybackManagerFingerprint
|
||||
)
|
||||
listOf(MinimizedPlaybackManagerFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstruction(
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
package app.revanced.patches.music.layout.premium.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.apps.youtube.music",
|
||||
arrayOf(
|
||||
"5.14.53",
|
||||
"5.16.51",
|
||||
"5.17.51",
|
||||
"5.21.52",
|
||||
"5.22.54",
|
||||
"5.23.50",
|
||||
"5.25.51",
|
||||
"5.25.52",
|
||||
"5.26.52",
|
||||
"5.27.51",
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51",
|
||||
"5.36.51",
|
||||
"5.38.53",
|
||||
"5.39.52"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class HideGetPremiumCompatibility
|
||||
@@ -11,19 +11,17 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
|
||||
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("hide-get-premium")
|
||||
@Description("Removes all \"Get Premium\" evidences from the avatar menu.")
|
||||
@HideGetPremiumCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class HideGetPremiumPatch : BytecodePatch(
|
||||
listOf(
|
||||
HideGetPremiumParentFingerprint
|
||||
)
|
||||
listOf(HideGetPremiumParentFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val parentResult = HideGetPremiumParentFingerprint.result!!
|
||||
@@ -33,9 +31,10 @@ class HideGetPremiumPatch : BytecodePatch(
|
||||
|
||||
val parentMethod = parentResult.mutableMethod
|
||||
parentMethod.replaceInstruction(
|
||||
startIndex, """
|
||||
const/4 v1, 0x0
|
||||
"""
|
||||
startIndex,
|
||||
"""
|
||||
const/4 v1, 0x0
|
||||
"""
|
||||
)
|
||||
|
||||
val result = HideGetPremiumFingerprint.result!!
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package app.revanced.patches.music.layout.tastebuilder.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
/**
|
||||
* -- Note 2022-08-05 --
|
||||
* Since 5.17.xx the tastebuilder component is dismissible, so this patch is less useful
|
||||
* also it is partly litho now
|
||||
*/
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class RemoveTasteBuilderCompatibility
|
||||
@@ -1,34 +0,0 @@
|
||||
package app.revanced.patches.music.layout.tastebuilder.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
|
||||
|
||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||
object TasteBuilderConstructorFingerprint : MethodFingerprint(
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CONST,
|
||||
Opcode.CONST_4,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT_OBJECT,
|
||||
Opcode.CHECK_CAST,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST
|
||||
)
|
||||
)
|
||||
@@ -1,42 +0,0 @@
|
||||
package app.revanced.patches.music.layout.tastebuilder.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
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.Patch
|
||||
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
|
||||
import app.revanced.patches.music.layout.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
|
||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
||||
|
||||
@Patch
|
||||
@Name("tasteBuilder-remover")
|
||||
@Description("Removes the \"Tell us which artists you like\" card from the home screen.")
|
||||
@RemoveTasteBuilderCompatibility
|
||||
@Version("0.0.1")
|
||||
class RemoveTasteBuilderPatch : BytecodePatch(
|
||||
listOf(
|
||||
TasteBuilderConstructorFingerprint
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = TasteBuilderConstructorFingerprint.result!!
|
||||
val method = result.mutableMethod
|
||||
|
||||
val insertIndex = result.scanResult.patternScanResult!!.endIndex - 8
|
||||
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
|
||||
method.addInstructions(
|
||||
insertIndex,
|
||||
"""
|
||||
const/16 v1, 0x8
|
||||
invoke-virtual {v${register}, v1}, Landroid/view/View;->setVisibility(I)V
|
||||
"""
|
||||
)
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.layout.upgradebutton.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class RemoveUpgradeButtonCompatibility
|
||||
@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.util.smali.toInstructions
|
||||
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction22t
|
||||
@@ -21,12 +21,10 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
||||
@Patch
|
||||
@Name("upgrade-button-remover")
|
||||
@Description("Removes the upgrade tab from the pivot bar.")
|
||||
@RemoveUpgradeButtonCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class RemoveUpgradeButtonPatch : BytecodePatch(
|
||||
listOf(
|
||||
PivotBarConstructorFingerprint
|
||||
)
|
||||
listOf(PivotBarConstructorFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
val result = PivotBarConstructorFingerprint.result!!
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package app.revanced.patches.music.misc.androidauto.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[Package(
|
||||
"com.google.android.apps.youtube.music",
|
||||
arrayOf(
|
||||
"5.14.53",
|
||||
"5.16.51",
|
||||
"5.17.51",
|
||||
"5.21.52",
|
||||
"5.22.54",
|
||||
"5.23.50",
|
||||
"5.25.51",
|
||||
"5.25.52",
|
||||
"5.26.52",
|
||||
"5.27.51",
|
||||
"5.28.52",
|
||||
"5.29.52",
|
||||
"5.31.50",
|
||||
"5.34.51",
|
||||
"5.36.51",
|
||||
"5.38.53",
|
||||
"5.39.52",
|
||||
"5.40.51",
|
||||
"5.41.50",
|
||||
"5.48.52"
|
||||
)
|
||||
)]
|
||||
)
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
internal annotation class BypassCertificateChecksCompatibility
|
||||
@@ -11,18 +11,16 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.misc.androidauto.annotations.BypassCertificateChecksCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("bypass-certificate-checks")
|
||||
@Description("Bypasses certificate checks which prevent YouTube Music from working on Android Auto.")
|
||||
@BypassCertificateChecksCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class BypassCertificateChecksPatch : BytecodePatch(
|
||||
listOf(
|
||||
CheckCertificateFingerprint
|
||||
)
|
||||
listOf(CheckCertificateFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
CheckCertificateFingerprint.result?.let { result ->
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.misc.microg.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class MusicMicroGPatchCompatibility
|
||||
@@ -1,65 +1,65 @@
|
||||
package app.revanced.patches.music.misc.microg.patch.bytecode
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
||||
import app.revanced.patches.music.misc.microg.fingerprints.*
|
||||
import app.revanced.patches.music.misc.microg.patch.resource.MusicMicroGResourcePatch
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.youtube.misc.microg.shared.Constants
|
||||
import app.revanced.util.microg.MicroGBytecodeHelper
|
||||
|
||||
@Patch
|
||||
@DependsOn([MusicMicroGResourcePatch::class])
|
||||
@Name("music-microg-support")
|
||||
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
|
||||
@MusicMicroGPatchCompatibility
|
||||
@Version("0.0.2")
|
||||
class MusicMicroGBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
ServiceCheckFingerprint,
|
||||
GooglePlayUtilityFingerprint,
|
||||
CastDynamiteModuleFingerprint,
|
||||
CastDynamiteModuleV2Fingerprint,
|
||||
CastContextFetchFingerprint,
|
||||
PrimeFingerprint,
|
||||
)
|
||||
) {
|
||||
// NOTE: the previous patch also replaced the following strings, but it seems like they are not needed:
|
||||
// - "com.google.android.gms.chimera.GmsIntentOperationService",
|
||||
// - "com.google.android.gms.phenotype.internal.IPhenotypeCallbacks",
|
||||
// - "com.google.android.gms.phenotype.internal.IPhenotypeService",
|
||||
// - "com.google.android.gms.phenotype.PACKAGE_NAME",
|
||||
// - "com.google.android.gms.phenotype.UPDATE",
|
||||
// - "com.google.android.gms.phenotype",
|
||||
override fun execute(context: BytecodeContext) =
|
||||
// apply common microG patch
|
||||
MicroGBytecodeHelper.patchBytecode(
|
||||
context,
|
||||
arrayOf(
|
||||
MicroGBytecodeHelper.packageNameTransform(
|
||||
Constants.PACKAGE_NAME,
|
||||
Constants.REVANCED_PACKAGE_NAME
|
||||
)
|
||||
),
|
||||
MicroGBytecodeHelper.PrimeMethodTransformationData(
|
||||
PrimeFingerprint,
|
||||
MUSIC_PACKAGE_NAME,
|
||||
REVANCED_MUSIC_PACKAGE_NAME
|
||||
),
|
||||
listOf(
|
||||
ServiceCheckFingerprint,
|
||||
GooglePlayUtilityFingerprint,
|
||||
CastDynamiteModuleFingerprint,
|
||||
CastDynamiteModuleV2Fingerprint,
|
||||
CastContextFetchFingerprint
|
||||
)
|
||||
).let { PatchResultSuccess() }
|
||||
}
|
||||
package app.revanced.patches.music.misc.microg.patch.bytecode
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.misc.microg.fingerprints.*
|
||||
import app.revanced.patches.music.misc.microg.patch.resource.MicroGResourcePatch
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.youtube.misc.microg.shared.Constants
|
||||
import app.revanced.util.microg.MicroGBytecodeHelper
|
||||
|
||||
@Patch
|
||||
@DependsOn([MicroGResourcePatch::class])
|
||||
@Name("vanced-microg-support")
|
||||
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
|
||||
@MusicCompatibility
|
||||
@Version("0.0.2")
|
||||
class MicroGBytecodePatch : BytecodePatch(
|
||||
listOf(
|
||||
ServiceCheckFingerprint,
|
||||
GooglePlayUtilityFingerprint,
|
||||
CastDynamiteModuleFingerprint,
|
||||
CastDynamiteModuleV2Fingerprint,
|
||||
CastContextFetchFingerprint,
|
||||
PrimeFingerprint,
|
||||
)
|
||||
) {
|
||||
// NOTE: the previous patch also replaced the following strings, but it seems like they are not needed:
|
||||
// - "com.google.android.gms.chimera.GmsIntentOperationService",
|
||||
// - "com.google.android.gms.phenotype.internal.IPhenotypeCallbacks",
|
||||
// - "com.google.android.gms.phenotype.internal.IPhenotypeService",
|
||||
// - "com.google.android.gms.phenotype.PACKAGE_NAME",
|
||||
// - "com.google.android.gms.phenotype.UPDATE",
|
||||
// - "com.google.android.gms.phenotype",
|
||||
override fun execute(context: BytecodeContext) =
|
||||
// apply common microG patch
|
||||
MicroGBytecodeHelper.patchBytecode(
|
||||
context,
|
||||
arrayOf(
|
||||
MicroGBytecodeHelper.packageNameTransform(
|
||||
Constants.PACKAGE_NAME,
|
||||
Constants.REVANCED_PACKAGE_NAME
|
||||
)
|
||||
),
|
||||
MicroGBytecodeHelper.PrimeMethodTransformationData(
|
||||
PrimeFingerprint,
|
||||
MUSIC_PACKAGE_NAME,
|
||||
REVANCED_MUSIC_PACKAGE_NAME
|
||||
),
|
||||
listOf(
|
||||
ServiceCheckFingerprint,
|
||||
GooglePlayUtilityFingerprint,
|
||||
CastDynamiteModuleFingerprint,
|
||||
CastDynamiteModuleV2Fingerprint,
|
||||
CastContextFetchFingerprint
|
||||
)
|
||||
).let { PatchResultSuccess() }
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
|
||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
||||
@@ -16,11 +16,11 @@ import app.revanced.patches.music.misc.microg.shared.Constants.SPOOFED_PACKAGE_S
|
||||
import app.revanced.util.microg.MicroGManifestHelper
|
||||
import app.revanced.util.microg.MicroGResourceHelper
|
||||
|
||||
@Name("music-microg-resource-patch")
|
||||
@Name("microg-resource-patch")
|
||||
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
|
||||
@MusicMicroGPatchCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.2")
|
||||
class MusicMicroGResourcePatch : ResourcePatch {
|
||||
class MicroGResourcePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
// update manifest
|
||||
MicroGResourceHelper.patchManifest(
|
||||
@@ -1,8 +0,0 @@
|
||||
package app.revanced.patches.music.premium.backgroundplay.annotations
|
||||
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("com.google.android.apps.youtube.music")])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class BackgroundPlayCompatibility
|
||||
@@ -9,18 +9,16 @@ import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
|
||||
import app.revanced.patches.music.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
|
||||
|
||||
@Patch
|
||||
@Name("background-play")
|
||||
@Description("Enables playing music in the background.")
|
||||
@BackgroundPlayCompatibility
|
||||
@MusicCompatibility
|
||||
@Version("0.0.1")
|
||||
class BackgroundPlayPatch : BytecodePatch(
|
||||
listOf(
|
||||
BackgroundPlaybackDisableFingerprint
|
||||
)
|
||||
listOf(BackgroundPlaybackDisableFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
|
||||
|
||||
@@ -4,16 +4,15 @@ import android.os.Environment
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.patch.*
|
||||
import app.revanced.patches.reddit.customclients.boostforreddit.api.patch.ChangeOAuthClientIdPatch
|
||||
import app.revanced.patches.reddit.customclients.syncforreddit.api.patch.ChangeOAuthClientIdPatch.Companion.clientId
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractChangeOAuthClientIdPatch(
|
||||
private val redirectUri: String,
|
||||
private val options: ChangeOAuthClientIdOptionsContainer,
|
||||
private val fingerprint: MethodFingerprint,
|
||||
) : BytecodePatch(listOf(fingerprint)) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
if (ChangeOAuthClientIdPatch.clientId == null) {
|
||||
if (options.clientId == null) {
|
||||
// Test if on Android
|
||||
try {
|
||||
Class.forName("android.os.Environment")
|
||||
@@ -30,11 +29,11 @@ abstract class AbstractChangeOAuthClientIdPatch(
|
||||
Alternatively, you can provide the client ID using patch options.
|
||||
|
||||
You can get your client ID from https://www.reddit.com/prefs/apps.
|
||||
The application type has to be "installed app" and the redirect URI has to be set to "$redirectUri"
|
||||
The application type has to be "Installed app" and the redirect URI has to be set to "$redirectUri".
|
||||
""".trimIndent()
|
||||
|
||||
return PatchResultError(error)
|
||||
}.let { clientId = it.readText().trim() }
|
||||
}.let { options.clientId = it.readText().trim() }
|
||||
}
|
||||
|
||||
return fingerprint.patch(context)
|
||||
|
||||
@@ -18,6 +18,7 @@ import app.revanced.patches.reddit.customclients.boostforreddit.api.fingerprints
|
||||
@Version("0.0.1")
|
||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||
"http://rubenmayayo.com",
|
||||
Options,
|
||||
GetClientIdFingerprint
|
||||
) {
|
||||
override fun MethodFingerprint.patch(context: BytecodeContext): PatchResult {
|
||||
@@ -32,5 +33,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
companion object : Options.ChangeOAuthClientIdOptionsContainer()
|
||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import org.jf.dexlib2.iface.reference.StringReference
|
||||
import java.util.*
|
||||
|
||||
|
||||
@Patch
|
||||
@Name("change-oauth-client-id")
|
||||
@Description("Changes the OAuth client ID.")
|
||||
@@ -27,6 +26,7 @@ import java.util.*
|
||||
@Version("0.0.1")
|
||||
class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||
"http://redditsync/auth",
|
||||
Options,
|
||||
GetAuthorizationStringFingerprint,
|
||||
) {
|
||||
override fun MethodFingerprint.patch(context: BytecodeContext): PatchResult {
|
||||
@@ -51,7 +51,7 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||
|
||||
val newAuthorizationUrl = reference.string.replace(
|
||||
"client_id=.*?&".toRegex(),
|
||||
"client_id=${clientId!!}&"
|
||||
"client_id=$clientId&"
|
||||
)
|
||||
|
||||
replaceInstruction(
|
||||
@@ -64,5 +64,5 @@ class ChangeOAuthClientIdPatch : AbstractChangeOAuthClientIdPatch(
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
|
||||
companion object : Options.ChangeOAuthClientIdOptionsContainer()
|
||||
companion object Options : AbstractChangeOAuthClientIdPatch.Options.ChangeOAuthClientIdOptionsContainer()
|
||||
}
|
||||
|
||||
@@ -3,20 +3,7 @@ package app.revanced.patches.twitch.ad.audio.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package(
|
||||
"tv.twitch.android.app", arrayOf(
|
||||
"14.3.3",
|
||||
"14.4.0",
|
||||
"14.5.0",
|
||||
"14.5.2",
|
||||
"14.6.0",
|
||||
"14.6.1"
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class AudioAdsCompatibility
|
||||
|
||||
|
||||
@@ -3,20 +3,7 @@ package app.revanced.patches.twitch.ad.embedded.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package(
|
||||
"tv.twitch.android.app", arrayOf(
|
||||
"14.3.3",
|
||||
"14.4.0",
|
||||
"14.5.0",
|
||||
"14.5.2",
|
||||
"14.6.0",
|
||||
"14.6.1"
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class EmbeddedAdsCompatibility
|
||||
|
||||
|
||||
@@ -3,20 +3,7 @@ package app.revanced.patches.twitch.ad.video.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility(
|
||||
[
|
||||
Package(
|
||||
"tv.twitch.android.app", arrayOf(
|
||||
"14.3.3",
|
||||
"14.4.0",
|
||||
"14.5.0",
|
||||
"14.5.2",
|
||||
"14.6.0",
|
||||
"14.6.1"
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class VideoAdsCompatibility
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
|
||||
object CheckAdEligibilityLambdaFingerprint : MethodFingerprint(
|
||||
"L",
|
||||
AccessFlags.PRIVATE or AccessFlags.FINAL or AccessFlags.STATIC,
|
||||
listOf("L", "L", "L"),
|
||||
returnType = "Lio/reactivex/Single;",
|
||||
parameters = listOf("L"),
|
||||
customFingerprint = { method, _ ->
|
||||
method.definingClass.endsWith("AdEligibilityFetcher;") &&
|
||||
method.name.contains("shouldRequestAd")
|
||||
method.definingClass.endsWith("/AdEligibilityFetcher;")
|
||||
&& method.name == "shouldRequestAd"
|
||||
}
|
||||
)
|
||||
@@ -1,10 +1,11 @@
|
||||
package app.revanced.patches.twitch.ad.video.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object ContentConfigShowAdsFingerprint : MethodFingerprint(
|
||||
returnType = "Z",
|
||||
parameters = listOf(),
|
||||
customFingerprint = { method, _ ->
|
||||
method.definingClass.endsWith("ContentConfigData;") && method.name == "getShowAds"
|
||||
method.definingClass.endsWith("/ContentConfigData;") && method.name == "getShowAds"
|
||||
}
|
||||
)
|
||||
@@ -3,6 +3,8 @@ package app.revanced.patches.twitch.ad.video.fingerprints
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object GetReadyToShowAdFingerprint : MethodFingerprint(
|
||||
returnType = "Ltv/twitch/android/core/mvp/presenter/StateAndAction;",
|
||||
parameters = listOf("L", "L"),
|
||||
customFingerprint = { method, _ ->
|
||||
method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.ad.video.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -86,7 +87,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
)
|
||||
|
||||
// Pretend our player is ineligible for all ads
|
||||
with(CheckAdEligibilityLambdaFingerprint.result!!) {
|
||||
CheckAdEligibilityLambdaFingerprint.result?.apply {
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
@@ -98,9 +99,9 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
""",
|
||||
ExternalLabel(skipLabelName, mutableMethod.getInstruction(0))
|
||||
)
|
||||
}
|
||||
} ?: return CheckAdEligibilityLambdaFingerprint.toErrorResult()
|
||||
|
||||
with(GetReadyToShowAdFingerprint.result!!) {
|
||||
GetReadyToShowAdFingerprint.result?.apply {
|
||||
val adFormatDeclined = "Ltv/twitch/android/shared/display/ads/theatre/StreamDisplayAdsPresenter\$Action\$AdFormatDeclined;"
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
0,
|
||||
@@ -113,10 +114,10 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
""",
|
||||
ExternalLabel(skipLabelName, mutableMethod.getInstruction(0))
|
||||
)
|
||||
}
|
||||
} ?: return GetReadyToShowAdFingerprint.toErrorResult()
|
||||
|
||||
// Spoof showAds JSON field
|
||||
with(ContentConfigShowAdsFingerprint.result!!) {
|
||||
ContentConfigShowAdsFingerprint.result?.apply {
|
||||
mutableMethod.addInstructions(0, """
|
||||
${createConditionInstructions()}
|
||||
const/4 v0, 0
|
||||
@@ -124,7 +125,7 @@ class VideoAdsPatch : AbstractAdPatch(
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return ContentConfigShowAdsFingerprint.toErrorResult()
|
||||
|
||||
SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences(
|
||||
SwitchPreference(
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.revanced.patches.twitch.chat.antidelete.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("tv.twitch.android.app")])
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class ShowDeletedMessagesCompatibility
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.chat.antidelete.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -44,7 +45,7 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// Spoiler mode: Force set hasModAccess member to true in constructor
|
||||
DeletedMessageClickableSpanCtorFingerprint.result!!.mutableMethod.apply {
|
||||
DeletedMessageClickableSpanCtorFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructionsWithLabels(
|
||||
implementation!!.instructions.lastIndex, /* place in front of return-void */
|
||||
"""
|
||||
@@ -54,14 +55,14 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_spoiler", getInstruction(implementation!!.instructions.lastIndex))
|
||||
)
|
||||
}
|
||||
} ?: return DeletedMessageClickableSpanCtorFingerprint.toErrorResult()
|
||||
|
||||
// Spoiler mode: Disable setHasModAccess setter
|
||||
SetHasModAccessFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
||||
|
||||
SetHasModAccessFingerprint.result?.mutableMethod?.addInstruction(0, "return-void")
|
||||
?: return SetHasModAccessFingerprint.toErrorResult()
|
||||
|
||||
// Cross-out mode: Reformat span of deleted message
|
||||
ChatUtilCreateDeletedSpanFingerprint.result!!.mutableMethod.apply {
|
||||
ChatUtilCreateDeletedSpanFingerprint.result?.mutableMethod?.apply {
|
||||
addInstructionsWithLabels(
|
||||
0,
|
||||
"""
|
||||
@@ -72,7 +73,7 @@ class ShowDeletedMessagesPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_reformat", getInstruction(0))
|
||||
)
|
||||
}
|
||||
} ?: return ChatUtilCreateDeletedSpanFingerprint.toErrorResult()
|
||||
|
||||
SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences(
|
||||
ListPreference(
|
||||
|
||||
@@ -3,6 +3,6 @@ package app.revanced.patches.twitch.chat.autoclaim.annotations
|
||||
import app.revanced.patcher.annotation.Compatibility
|
||||
import app.revanced.patcher.annotation.Package
|
||||
|
||||
@Compatibility([Package("tv.twitch.android.app")])
|
||||
@Compatibility([Package("tv.twitch.android.app", arrayOf("15.4.1"))])
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
internal annotation class AutoClaimChannelPointsCompatibility
|
||||
@@ -65,6 +65,7 @@ class AutoClaimChannelPointPatch : BytecodePatch(
|
||||
ExternalLabel("auto_claim", getInstruction(lastIndex))
|
||||
)
|
||||
} ?: return CommunityPointsButtonViewDelegateFingerprint.toErrorResult()
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package app.revanced.patches.twitch.debug.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object IsDebugConfigEnabledFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
||||
methodDef.definingClass.endsWith("/BuildConfigUtil;") && methodDef.name == "isDebugConfigEnabled"
|
||||
}
|
||||
)
|
||||
@@ -1,10 +1,9 @@
|
||||
package app.revanced.patches.twitch.debug.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object IsOmVerificationEnabledFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
||||
methodDef.definingClass.endsWith("/BuildConfigUtil;") && methodDef.name == "isOmVerificationEnabled"
|
||||
}
|
||||
)
|
||||
@@ -1,10 +1,9 @@
|
||||
package app.revanced.patches.twitch.debug.fingerprints
|
||||
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object ShouldShowDebugOptionsFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
||||
methodDef.definingClass.endsWith("/BuildConfigUtil;") && methodDef.name == "shouldShowDebugOptions"
|
||||
}
|
||||
)
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.debug.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -38,18 +39,16 @@ class DebugModePatch : BytecodePatch(
|
||||
IsOmVerificationEnabledFingerprint,
|
||||
ShouldShowDebugOptionsFingerprint
|
||||
).forEach {
|
||||
with(it.result!!) {
|
||||
with(mutableMethod) {
|
||||
addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
|
||||
move-result v0
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
it.result?.mutableMethod?.apply {
|
||||
addInstructions(
|
||||
0,
|
||||
"""
|
||||
invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
|
||||
move-result v0
|
||||
return v0
|
||||
"""
|
||||
)
|
||||
} ?: return it.toErrorResult()
|
||||
}
|
||||
|
||||
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.patches.twitch.misc.settings.bytecode.patch
|
||||
|
||||
import app.revanced.extensions.toErrorResult
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.annotation.Version
|
||||
@@ -45,7 +46,7 @@ class SettingsPatch : BytecodePatch(
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
// Hook onCreate to handle fragment creation
|
||||
with(SettingsActivityOnCreateFingerprint.result!!) {
|
||||
SettingsActivityOnCreateFingerprint.result?.apply {
|
||||
val insertIndex = mutableMethod.implementation!!.instructions.size - 2
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
@@ -57,20 +58,20 @@ class SettingsPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_rv_settings_init", mutableMethod.getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
} ?: return SettingsActivityOnCreateFingerprint.toErrorResult()
|
||||
|
||||
// Create new menu item for settings menu
|
||||
with(SettingsMenuItemEnumFingerprint.result!!) {
|
||||
SettingsMenuItemEnumFingerprint.result?.apply {
|
||||
injectMenuItem(
|
||||
REVANCED_SETTINGS_MENU_ITEM_NAME,
|
||||
REVANCED_SETTINGS_MENU_ITEM_ID,
|
||||
REVANCED_SETTINGS_MENU_ITEM_TITLE_RES,
|
||||
REVANCED_SETTINGS_MENU_ITEM_ICON_RES
|
||||
)
|
||||
}
|
||||
} ?: return SettingsMenuItemEnumFingerprint.toErrorResult()
|
||||
|
||||
// Intercept settings menu creation and add new menu item
|
||||
with(MenuGroupsUpdatedFingerprint.result!!) {
|
||||
MenuGroupsUpdatedFingerprint.result?.apply {
|
||||
mutableMethod.addInstructions(
|
||||
0,
|
||||
"""
|
||||
@@ -79,10 +80,10 @@ class SettingsPatch : BytecodePatch(
|
||||
move-result-object p1
|
||||
"""
|
||||
)
|
||||
}
|
||||
} ?: return MenuGroupsUpdatedFingerprint.toErrorResult()
|
||||
|
||||
// Intercept onclick events for the settings menu
|
||||
with(MenuGroupsOnClickFingerprint.result!!) {
|
||||
MenuGroupsOnClickFingerprint.result?.apply {
|
||||
val insertIndex = 0
|
||||
mutableMethod.addInstructionsWithLabels(
|
||||
insertIndex,
|
||||
@@ -96,7 +97,7 @@ class SettingsPatch : BytecodePatch(
|
||||
""",
|
||||
ExternalLabel("no_rv_settings_onclick", mutableMethod.getInstruction(insertIndex))
|
||||
)
|
||||
}
|
||||
} ?: return MenuGroupsOnClickFingerprint.toErrorResult()
|
||||
|
||||
addString("revanced_settings", "ReVanced Settings", false)
|
||||
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
|
||||
|
||||
@@ -42,7 +42,7 @@ class AlbumCardsPatch : BytecodePatch(
|
||||
"invoke-static {v$albumCardViewRegister}, " +
|
||||
"Lapp/revanced/integrations/patches/HideAlbumCardsPatch;" +
|
||||
"->" +
|
||||
"hideAlbumCards(Landroid/view/View;)V"
|
||||
"hideAlbumCard(Landroid/view/View;)V"
|
||||
)
|
||||
}
|
||||
} ?: return AlbumCardsFingerprint.toErrorResult()
|
||||
|
||||
Reference in New Issue
Block a user