mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-20 16:12:26 +01:00
Compare commits
4 Commits
v2.194.0-d
...
v2.194.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b352f48cb1 | ||
|
|
51844222c8 | ||
|
|
87877a8f2f | ||
|
|
bff07aa5b8 |
23
CHANGELOG.md
23
CHANGELOG.md
@@ -1,3 +1,26 @@
|
|||||||
|
## [2.194.1-dev.1](https://github.com/ReVanced/revanced-patches/compare/v2.194.0...v2.194.1-dev.1) (2023-10-13)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **YouTube - Hide layout components:** Hide new channel watermark component ([cbfd569](https://github.com/ReVanced/revanced-patches/commit/cbfd5691d31ed144eac1d23de918ab5a6a905dfa))
|
||||||
|
|
||||||
|
# [2.194.0](https://github.com/ReVanced/revanced-patches/compare/v2.193.0...v2.194.0) (2023-10-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Fix builds ([d7b8149](https://github.com/ReVanced/revanced-patches/commit/d7b8149b0a8dad4e2c201b2f514d298bc6b97f54))
|
||||||
|
* **YouTube - ReturnYouTubeDislike:** Fix dislikes not showing on Shorts ([#3133](https://github.com/ReVanced/revanced-patches/issues/3133)) ([0e8a286](https://github.com/ReVanced/revanced-patches/commit/0e8a2868e8e4328a6f02fa31537abc5e5ed220eb))
|
||||||
|
* **YouTube - Spoof app version:** Recommend clearing the app data after turning off spoofing ([#3134](https://github.com/ReVanced/revanced-patches/issues/3134)) ([166bf5b](https://github.com/ReVanced/revanced-patches/commit/166bf5b1aec5f8868b3895f7e24d2abc9037a7de))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **CieID:** Add `bypass root check` patch ([#3011](https://github.com/ReVanced/revanced-patches/issues/3011)) ([20cfa8a](https://github.com/ReVanced/revanced-patches/commit/20cfa8a5cdebc7e81128c820a2aa01415a068320))
|
||||||
|
* Do not support reading options from a properties file ([3d1c0c1](https://github.com/ReVanced/revanced-patches/commit/3d1c0c1a958271c358755220b97b9dd92eb81d54))
|
||||||
|
* Improve option descriptions and titles ([9f86daa](https://github.com/ReVanced/revanced-patches/commit/9f86daa82271591bcaa9144d300a4810458fdd28))
|
||||||
|
|
||||||
# [2.194.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.194.0-dev.2...v2.194.0-dev.3) (2023-10-12)
|
# [2.194.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.194.0-dev.2...v2.194.0-dev.3) (2023-10-12)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 = 2.194.0-dev.3
|
version = 2.194.1-dev.1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -2,9 +2,12 @@ package app.revanced.patches.youtube.layout.hide.general
|
|||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
@@ -14,6 +17,8 @@ import app.revanced.patches.shared.settings.preference.impl.StringResource
|
|||||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
import app.revanced.patches.shared.settings.preference.impl.TextPreference
|
import app.revanced.patches.shared.settings.preference.impl.TextPreference
|
||||||
import app.revanced.patches.youtube.layout.hide.general.fingerprints.ParseElementFromBufferFingerprint
|
import app.revanced.patches.youtube.layout.hide.general.fingerprints.ParseElementFromBufferFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hide.general.fingerprints.PlayerOverlayFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.hide.general.fingerprints.ShowWatermarkFingerprint
|
||||||
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
|
import app.revanced.patches.youtube.misc.settings.SettingsPatch.PreferenceScreen
|
||||||
@@ -39,7 +44,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object HideLayoutComponentsPatch : BytecodePatch(
|
object HideLayoutComponentsPatch : BytecodePatch(
|
||||||
setOf(ParseElementFromBufferFingerprint)
|
setOf(ParseElementFromBufferFingerprint, PlayerOverlayFingerprint)
|
||||||
) {
|
) {
|
||||||
private const val FILTER_CLASS_DESCRIPTOR =
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
"Lapp/revanced/integrations/patches/components/LayoutComponentsFilter;"
|
"Lapp/revanced/integrations/patches/components/LayoutComponentsFilter;"
|
||||||
@@ -58,7 +63,15 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
StringResource("revanced_hide_join_membership_button_summary_on", "Button is hidden"),
|
StringResource("revanced_hide_join_membership_button_summary_on", "Button is hidden"),
|
||||||
StringResource("revanced_hide_join_membership_button_summary_off", "Button is shown")
|
StringResource("revanced_hide_join_membership_button_summary_off", "Button is shown")
|
||||||
),
|
),
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_hide_channel_watermark_title",
|
||||||
|
StringResource(
|
||||||
|
"revanced_hide_channel_watermark_title",
|
||||||
|
"Hide channel watermark in video player"
|
||||||
|
),
|
||||||
|
StringResource("revanced_hide_channel_watermark_title_summary_on", "Watermark is hidden"),
|
||||||
|
StringResource("revanced_hide_channel_watermark_title_summary_off", "Watermark is shown")
|
||||||
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_hide_notify_me_button",
|
"revanced_hide_notify_me_button",
|
||||||
StringResource("revanced_hide_notify_me_button_title", "Hide \\\'Notify me\\\' button"),
|
StringResource("revanced_hide_notify_me_button_title", "Hide \\\'Notify me\\\' button"),
|
||||||
@@ -316,5 +329,24 @@ object HideLayoutComponentsPatch : BytecodePatch(
|
|||||||
} ?: throw ParseElementFromBufferFingerprint.exception
|
} ?: throw ParseElementFromBufferFingerprint.exception
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
|
// region Watermark (legacy code for old versions of YouTube)
|
||||||
|
|
||||||
|
ShowWatermarkFingerprint.also {
|
||||||
|
it.resolve(context, PlayerOverlayFingerprint.result?.classDef ?: throw PlayerOverlayFingerprint.exception)
|
||||||
|
}.result?.mutableMethod?.apply {
|
||||||
|
val index = implementation!!.instructions.size - 5
|
||||||
|
|
||||||
|
removeInstruction(index)
|
||||||
|
addInstructions(
|
||||||
|
index,
|
||||||
|
"""
|
||||||
|
invoke-static {}, $FILTER_CLASS_DESCRIPTOR->showWatermark()Z
|
||||||
|
move-result p2
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
} ?: throw ShowWatermarkFingerprint.exception
|
||||||
|
|
||||||
|
// endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package app.revanced.patches.youtube.layout.hide.watermark.fingerprints
|
package app.revanced.patches.youtube.layout.hide.general.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object HideWatermarkParentFingerprint : MethodFingerprint (
|
object PlayerOverlayFingerprint : MethodFingerprint (
|
||||||
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("player_overlay_in_video_programming")
|
"L", AccessFlags.PUBLIC or AccessFlags.FINAL, strings = listOf("player_overlay_in_video_programming")
|
||||||
)
|
)
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package app.revanced.patches.youtube.layout.hide.watermark.fingerprints
|
package app.revanced.patches.youtube.layout.hide.general.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object HideWatermarkFingerprint : MethodFingerprint (
|
object ShowWatermarkFingerprint : MethodFingerprint (
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L")
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L", "L")
|
||||||
)
|
)
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.hide.watermark
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchException
|
|
||||||
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.watermark.fingerprints.HideWatermarkFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.hide.watermark.fingerprints.HideWatermarkParentFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Hide watermark",
|
|
||||||
description = "Hides creator's watermarks on videos.",
|
|
||||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
|
||||||
compatiblePackages = [
|
|
||||||
CompatiblePackage(
|
|
||||||
"com.google.android.youtube",
|
|
||||||
[
|
|
||||||
"18.16.37",
|
|
||||||
"18.19.35",
|
|
||||||
"18.20.39",
|
|
||||||
"18.23.35",
|
|
||||||
"18.29.38",
|
|
||||||
"18.32.39",
|
|
||||||
"18.37.36",
|
|
||||||
"18.38.44"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object HideWatermarkPatch : BytecodePatch(
|
|
||||||
setOf(HideWatermarkParentFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_hide_video_watermark",
|
|
||||||
StringResource("revanced_hide_video_watermark_title", "Hide creator watermark on videos"),
|
|
||||||
StringResource("revanced_hide_video_watermark_summary_on", "Watermark is hidden"),
|
|
||||||
StringResource("revanced_hide_video_watermark_summary_off", "Watermark is shown")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
HideWatermarkFingerprint.resolve(context, HideWatermarkParentFingerprint.result!!.classDef)
|
|
||||||
val result = HideWatermarkFingerprint.result
|
|
||||||
?: throw PatchException("Required parent method could not be found.")
|
|
||||||
|
|
||||||
val method = result.mutableMethod
|
|
||||||
val line = method.implementation!!.instructions.size - 5
|
|
||||||
|
|
||||||
method.removeInstruction(line)
|
|
||||||
method.addInstructions(
|
|
||||||
line,
|
|
||||||
"""
|
|
||||||
invoke-static {}, Lapp/revanced/integrations/patches/BrandingWaterMarkPatch;->isBrandingWatermarkShown()Z
|
|
||||||
move-result p2
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user