mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-12 12:23:56 +01:00
Compare commits
14 Commits
v2.195.0-d
...
v2.195.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
777b6f6160 | ||
|
|
358b367408 | ||
|
|
68eee9b5e2 | ||
|
|
dc7bf5c760 | ||
|
|
b3fcb0e92b | ||
|
|
fb3cd9a3ad | ||
|
|
2a047ed1b6 | ||
|
|
0d1ab25cb5 | ||
|
|
87185171da | ||
|
|
d9c3748314 | ||
|
|
c14642a34b | ||
|
|
af2df3edd9 | ||
|
|
b5a7258f74 | ||
|
|
28fa499974 |
45
CHANGELOG.md
45
CHANGELOG.md
@@ -1,3 +1,48 @@
|
||||
## [2.195.1-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.195.1-dev.1...v2.195.1-dev.2) (2023-10-20)
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* Revert "fix(YouTube - Minimized playback): Fix pip incorrectly showing for Short playback (#3170)" ([4179b16](https://github.com/ReVanced/revanced-patches/commit/4179b166bbdfbe98cc368f4a7ad17419e1b469a9)), closes [#3170](https://github.com/ReVanced/revanced-patches/issues/3170)
|
||||
* Revert "chore(release): 2.195.1-dev.1 [skip ci]" ([be0e0e4](https://github.com/ReVanced/revanced-patches/commit/be0e0e40d6396ceebd40c4e43aecd32dfd86cf0f))
|
||||
|
||||
# [2.195.0](https://github.com/ReVanced/revanced-patches/compare/v2.194.0...v2.195.0) (2023-10-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Indent option description correctly ([d4a9ea1](https://github.com/ReVanced/revanced-patches/commit/d4a9ea1f6c7ab9d25fd60695cce0965c7b5269a4))
|
||||
* **Reddit - Sanitize sharing links:** Restore compatibility with newer versions of the app ([1671d8d](https://github.com/ReVanced/revanced-patches/commit/1671d8d826a08273fae5ccffc4a4ebfef9648fe2))
|
||||
* **YouTube - Hide layout components:** Hide new channel watermark component ([cbfd569](https://github.com/ReVanced/revanced-patches/commit/cbfd5691d31ed144eac1d23de918ab5a6a905dfa))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube - Theme:** Disable gradient loading screen ([90d5877](https://github.com/ReVanced/revanced-patches/commit/90d5877950095b7abacdca979bc7ad709192eee2))
|
||||
* **YouTube:** Add `Announcements` patch ([#3166](https://github.com/ReVanced/revanced-patches/issues/3166)) ([f977983](https://github.com/ReVanced/revanced-patches/commit/f97798391ffc3477f781d43817664d31cfcd209a))
|
||||
* **YouTube:** Add `Spoof device dimensions` patch ([c8d409e](https://github.com/ReVanced/revanced-patches/commit/c8d409e1dbda6ac45fef01912ce7afad1022b4b7))
|
||||
|
||||
# [2.195.0-dev.5](https://github.com/ReVanced/revanced-patches/compare/v2.195.0-dev.4...v2.195.0-dev.5) (2023-10-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube:** Add `Announcements` patch ([#3166](https://github.com/ReVanced/revanced-patches/issues/3166)) ([f977983](https://github.com/ReVanced/revanced-patches/commit/f97798391ffc3477f781d43817664d31cfcd209a))
|
||||
|
||||
# [2.195.0-dev.4](https://github.com/ReVanced/revanced-patches/compare/v2.195.0-dev.3...v2.195.0-dev.4) (2023-10-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **Reddit - Sanitize sharing links:** Restore compatibility with newer versions of the app ([1671d8d](https://github.com/ReVanced/revanced-patches/commit/1671d8d826a08273fae5ccffc4a4ebfef9648fe2))
|
||||
|
||||
# [2.195.0-dev.3](https://github.com/ReVanced/revanced-patches/compare/v2.195.0-dev.2...v2.195.0-dev.3) (2023-10-19)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **YouTube:** Add `Spoof device dimensions` patch ([c8d409e](https://github.com/ReVanced/revanced-patches/commit/c8d409e1dbda6ac45fef01912ce7afad1022b4b7))
|
||||
|
||||
# [2.195.0-dev.2](https://github.com/ReVanced/revanced-patches/compare/v2.195.0-dev.1...v2.195.0-dev.2) (2023-10-14)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 2.195.0-dev.2
|
||||
version = 2.195.1-dev.2
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ package app.revanced.patches.reddit.misc.tracking.url.fingerprints
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object ShareLinkFormatterFingerprint : MethodFingerprint(
|
||||
returnType = "Ljava/lang/String;",
|
||||
parameters = listOf("Ljava/lang/String;", "Ljava/util/Map;"),
|
||||
strings = listOf("uri.getQueryParameters(name)", "uri.queryParameterNames", "newUriBuilder.build().toString()"),
|
||||
customFingerprint = { methodDef, classDef ->
|
||||
methodDef.definingClass.startsWith("Lcom/reddit/sharing/") && classDef.sourceFile == "UrlUtil.kt"
|
||||
}
|
||||
)
|
||||
@@ -32,7 +32,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
"com.google.android.youtube",
|
||||
[
|
||||
"18.37.36",
|
||||
"18.38.44 "
|
||||
"18.38.44"
|
||||
]
|
||||
)
|
||||
]
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package app.revanced.patches.youtube.misc.announcements
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint
|
||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
@Patch(
|
||||
name = "Announcements",
|
||||
description = "Shows announcements on startup.",
|
||||
compatiblePackages = [CompatiblePackage("com.google.android.youtube")],
|
||||
dependencies = [SettingsPatch::class]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object AnnouncementsPatch : BytecodePatch(
|
||||
setOf(WatchWhileActivityFingerprint)
|
||||
) {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/announcements/AnnouncementsPatch;"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
val onCreateMethod = WatchWhileActivityFingerprint.result?.let {
|
||||
it.mutableClass.methods.find { method -> method.name == "onCreate" }
|
||||
} ?: throw WatchWhileActivityFingerprint.exception
|
||||
|
||||
val superCallIndex = onCreateMethod.getInstructions().indexOfFirst { it.opcode == Opcode.INVOKE_SUPER_RANGE }
|
||||
|
||||
onCreateMethod.addInstructions(
|
||||
superCallIndex + 1,
|
||||
"invoke-static { v1 }, $INTEGRATIONS_CLASS_DESCRIPTOR->showAnnouncement(Landroid/app/Activity;)V"
|
||||
)
|
||||
|
||||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_announcements",
|
||||
StringResource(
|
||||
"revanced_announcements_title",
|
||||
"Show announcements"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_announcements_summary_on",
|
||||
"Announcements are shown on startup."
|
||||
), StringResource(
|
||||
"revanced_announcements_summary_off",
|
||||
"Announcements are not shown on startup."
|
||||
), StringResource(
|
||||
"revanced_announcements_enabled_summary",
|
||||
"Show announcements on startup."
|
||||
),
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package app.revanced.patches.youtube.misc.dimensions.spoof
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
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.misc.dimensions.spoof.fingerprints.DeviceDimensionsModelToStringFingerprint
|
||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.settings.SettingsPatch
|
||||
|
||||
@Patch(
|
||||
name = "Spoof device dimensions",
|
||||
description = "Spoofs the device dimensions in order to unlock higher video qualities " +
|
||||
"that may not be available on your device.",
|
||||
dependencies = [IntegrationsPatch::class, SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.youtube",
|
||||
[
|
||||
"18.38.44"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
object SpoofDeviceDimensionsPatch : BytecodePatch(
|
||||
setOf(DeviceDimensionsModelToStringFingerprint)
|
||||
) {
|
||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR =
|
||||
"Lapp/revanced/integrations/patches/spoof/SpoofDeviceDimensionsPatch;"
|
||||
|
||||
override fun execute(context: BytecodeContext) {
|
||||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_spoof_device_dimensions",
|
||||
StringResource("revanced_spoof_device_dimensions_title", "Spoof device dimensions"),
|
||||
StringResource("revanced_spoof_device_dimensions_summary_on", "Device dimensions spoofed"),
|
||||
StringResource("revanced_spoof_device_dimensions_summary_off", "Device dimensions not spoofed"),
|
||||
)
|
||||
)
|
||||
|
||||
DeviceDimensionsModelToStringFingerprint.result
|
||||
?.mutableClass?.methods?.find { method -> method.name == "<init>" }
|
||||
// Override the parameters containing the dimensions.
|
||||
?.addInstructions(
|
||||
1, // Add after super call.
|
||||
mapOf(
|
||||
1 to "MinHeightOrWidth", // p1 = min height
|
||||
2 to "MaxHeightOrWidth", // p2 = max height
|
||||
3 to "MinHeightOrWidth", // p3 = min width
|
||||
4 to "MaxHeightOrWidth" // p4 = max width
|
||||
).map { (parameter, method) ->
|
||||
"""
|
||||
invoke-static { p$parameter }, $INTEGRATIONS_CLASS_DESCRIPTOR->get$method(I)I
|
||||
move-result p$parameter
|
||||
"""
|
||||
}.joinToString("\n") { it }
|
||||
) ?: throw DeviceDimensionsModelToStringFingerprint.exception
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package app.revanced.patches.youtube.misc.dimensions.spoof.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object DeviceDimensionsModelToStringFingerprint : MethodFingerprint(
|
||||
returnType = "L",
|
||||
strings = listOf("minh.", ";maxh.")
|
||||
)
|
||||
Reference in New Issue
Block a user