mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 18:03:55 +01:00
Compare commits
11 Commits
v2.157.0-d
...
v2.157.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ee531f816 | ||
|
|
d3bd5f65ef | ||
|
|
d5fff653d5 | ||
|
|
3cf86bd1e9 | ||
|
|
f24a7c3ca9 | ||
|
|
69394a60b2 | ||
|
|
9ff595d5df | ||
|
|
46effd337f | ||
|
|
06a981a317 | ||
|
|
dd3a9a4f38 | ||
|
|
5228700317 |
51
CHANGELOG.md
51
CHANGELOG.md
@@ -1,3 +1,54 @@
|
||||
## [2.157.1-dev.1](https://github.com/revanced/revanced-patches/compare/v2.157.0...v2.157.1-dev.1) (2023-01-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/microg-support:** replace new permission ([3d1cce5](https://github.com/revanced/revanced-patches/commit/3d1cce5b4ca54c622b863f24febeb03a6060033c))
|
||||
|
||||
# [2.157.0](https://github.com/revanced/revanced-patches/compare/v2.156.0...v2.157.0) (2023-01-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* parse any kind of patch version ([66cd88f](https://github.com/revanced/revanced-patches/commit/66cd88f4d8a9161a4c51b70f2384dcee92fe2aea))
|
||||
* **twitter/hide-views-stats:** constrain to last working version ([#1522](https://github.com/revanced/revanced-patches/issues/1522)) ([bf45817](https://github.com/revanced/revanced-patches/commit/bf45817677fd058f9b255dbef5c1ca9aaec95531))
|
||||
* **youtube/return-youtube-dislike:** do not fetch voting stats when watching shorts ([#1532](https://github.com/revanced/revanced-patches/issues/1532)) ([f46fcad](https://github.com/revanced/revanced-patches/commit/f46fcadd855a13d9f8916f21980abcf5564e97d7))
|
||||
* **youtube/settings:** resolve fingerprints robustly ([8e98605](https://github.com/revanced/revanced-patches/commit/8e98605a7491d69e99c6b1aeb2de3db9396faa20))
|
||||
* **youtube/sponsorblock:** replace missing strings ([7b8f0db](https://github.com/revanced/revanced-patches/commit/7b8f0db2c17da6488db1ec2c21a21a14ff8466aa))
|
||||
* **youtube:** reliably resolve fingerprints ([1598306](https://github.com/revanced/revanced-patches/commit/1598306eb58ae8f8dc38b472628b237e55ec0f1b))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **finanzonline:** `remove-bootloader-detection` patch ([3952138](https://github.com/revanced/revanced-patches/commit/39521386c2296f46479e31c39ab245c2778ebd65))
|
||||
* **finanzonline:** `remove-root-detection` patch ([1d46d63](https://github.com/revanced/revanced-patches/commit/1d46d63fdcf3cbce53a7719f4490225368c4d5ae))
|
||||
* **music:** update patches compatibility to v5.40.51 ([#1541](https://github.com/revanced/revanced-patches/issues/1541)) ([13143cb](https://github.com/revanced/revanced-patches/commit/13143cb5260f8793d246633a6a506bdc9f3a3ce7))
|
||||
* **youtube/general-ads:** remove hiding video shelf ([c4c9e5b](https://github.com/revanced/revanced-patches/commit/c4c9e5bb3765d08d6653864d33546c25ba367292))
|
||||
* **youtube/microg-support:** check if Vanced MicroG is running in the background ([#1531](https://github.com/revanced/revanced-patches/issues/1531)) ([81934ef](https://github.com/revanced/revanced-patches/commit/81934efb39b8ed9b0a523ffd7c4d841227ac141f))
|
||||
* **youtube:** `open-links-externally` patch ([#1524](https://github.com/revanced/revanced-patches/issues/1524)) ([caf3d70](https://github.com/revanced/revanced-patches/commit/caf3d70c30bc440923c0e76e7331010905f6e729))
|
||||
* **youtube:** show toasts along exceptions ([#1511](https://github.com/revanced/revanced-patches/issues/1511)) ([5817e4d](https://github.com/revanced/revanced-patches/commit/5817e4d27fab692c0e95ab4aa2fa8f13005cb780))
|
||||
|
||||
# [2.157.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.157.0-dev.5...v2.157.0-dev.6) (2023-01-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/sponsorblock:** replace missing strings ([7b8f0db](https://github.com/revanced/revanced-patches/commit/7b8f0db2c17da6488db1ec2c21a21a14ff8466aa))
|
||||
|
||||
# [2.157.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.157.0-dev.4...v2.157.0-dev.5) (2023-01-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **youtube:** show toasts along exceptions ([#1511](https://github.com/revanced/revanced-patches/issues/1511)) ([5817e4d](https://github.com/revanced/revanced-patches/commit/5817e4d27fab692c0e95ab4aa2fa8f13005cb780))
|
||||
|
||||
# [2.157.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.157.0-dev.3...v2.157.0-dev.4) (2023-01-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **youtube/return-youtube-dislike:** do not fetch voting stats when watching shorts ([#1532](https://github.com/revanced/revanced-patches/issues/1532)) ([f46fcad](https://github.com/revanced/revanced-patches/commit/f46fcadd855a13d9f8916f21980abcf5564e97d7))
|
||||
|
||||
# [2.157.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.157.0-dev.2...v2.157.0-dev.3) (2023-01-28)
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
kotlin.code.style = official
|
||||
version = 2.157.0-dev.3
|
||||
version = 2.157.1-dev.1
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,17 +19,28 @@ import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.Retu
|
||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.fingerprints.*
|
||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||
|
||||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, VideoIdPatch::class, ReturnYouTubeDislikeResourcePatch::class])
|
||||
@DependsOn(
|
||||
[
|
||||
IntegrationsPatch::class,
|
||||
VideoIdPatch::class,
|
||||
ReturnYouTubeDislikeResourcePatch::class,
|
||||
PlayerTypeHookPatch::class,
|
||||
]
|
||||
)
|
||||
@Name("return-youtube-dislike")
|
||||
@Description("Shows the dislike count of videos using the Return YouTube Dislike API.")
|
||||
@ReturnYouTubeDislikeCompatibility
|
||||
@Version("0.0.1")
|
||||
class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||
listOf(
|
||||
TextComponentSpecParentFingerprint, LikeFingerprint, DislikeFingerprint, RemoveLikeFingerprint
|
||||
TextComponentSpecParentFingerprint,
|
||||
LikeFingerprint,
|
||||
DislikeFingerprint,
|
||||
RemoveLikeFingerprint,
|
||||
)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.resource.patch.SponsorBlockResourcePatch
|
||||
import org.jf.dexlib2.AccessFlags
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
||||
|
||||
|
||||
@FuzzyPatternScanMethod(3)
|
||||
object ShortsPlayerConstructorFingerprint : MethodFingerprint(
|
||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||
opcodes = listOf(
|
||||
Opcode.MOVE_OBJECT_FROM16,
|
||||
Opcode.MOVE_OBJECT_FROM16,
|
||||
Opcode.MOVE_OBJECT_FROM16,
|
||||
Opcode.INVOKE_DIRECT_RANGE,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.IPUT_OBJECT,
|
||||
Opcode.CONST_4
|
||||
),
|
||||
customFingerprint = { methodDef ->
|
||||
methodDef.implementation?.instructions?.any { instruction ->
|
||||
instruction.opcode.ordinal == Opcode.CONST.ordinal &&
|
||||
(instruction as? WideLiteralInstruction)?.wideLiteral == SponsorBlockResourcePatch.reelButtonGroupResourceId
|
||||
} == true
|
||||
}
|
||||
)
|
||||
@@ -19,12 +19,12 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.shared.fingerprints.SeekbarFingerprint
|
||||
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
||||
import app.revanced.patches.youtube.layout.autocaptions.fingerprints.StartVideoInformerFingerprint
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.*
|
||||
import app.revanced.patches.youtube.layout.sponsorblock.resource.patch.SponsorBlockResourcePatch
|
||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
||||
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||
import app.revanced.patches.youtube.misc.video.information.patch.VideoInformationPatch
|
||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||
import org.jf.dexlib2.Opcode
|
||||
@@ -39,6 +39,7 @@ import org.jf.dexlib2.iface.reference.StringReference
|
||||
dependencies = [
|
||||
VideoInformationPatch::class, // updates video information and adds method to seek in video
|
||||
PlayerControlsBytecodePatch::class,
|
||||
PlayerTypeHookPatch::class,
|
||||
IntegrationsPatch::class,
|
||||
SponsorBlockResourcePatch::class,
|
||||
VideoIdPatch::class
|
||||
@@ -54,8 +55,6 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
||||
NextGenWatchLayoutFingerprint,
|
||||
AppendTimeFingerprint,
|
||||
PlayerOverlaysLayoutInitFingerprint,
|
||||
ShortsPlayerConstructorFingerprint,
|
||||
StartVideoInformerFingerprint
|
||||
)
|
||||
) {
|
||||
|
||||
@@ -260,32 +259,15 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
||||
if (it.opcode.ordinal != Opcode.CONST_STRING.ordinal) continue
|
||||
|
||||
when (((it as ReferenceInstruction).reference as StringReference).string) {
|
||||
"replaceMeWithsetSponsorBarRect" ->
|
||||
method.replaceStringInstruction(index, it, rectangleFieldName)
|
||||
|
||||
"replaceMeWithsetMillisecondMethod" ->
|
||||
method.replaceStringInstruction(index, it, "seekHelper")
|
||||
"replaceMeWithsetSponsorBarRect" -> method.replaceStringInstruction(
|
||||
index,
|
||||
it,
|
||||
rectangleFieldName
|
||||
)
|
||||
}
|
||||
}
|
||||
} ?: return PatchResultError("Could not find the method which contains the replaceMeWith* strings")
|
||||
|
||||
val startVideoInformerMethod = StartVideoInformerFingerprint.result!!.mutableMethod
|
||||
startVideoInformerMethod.addInstructions(
|
||||
0, """
|
||||
const/4 v0, 0x0
|
||||
sput-boolean v0, $INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->shorts_playing:Z
|
||||
"""
|
||||
)
|
||||
|
||||
val shortsPlayerConstructorMethod = ShortsPlayerConstructorFingerprint.result!!.mutableMethod
|
||||
|
||||
shortsPlayerConstructorMethod.addInstructions(
|
||||
0, """
|
||||
const/4 v0, 0x1
|
||||
sput-boolean v0, $INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->shorts_playing:Z
|
||||
"""
|
||||
)
|
||||
|
||||
// TODO: isSBChannelWhitelisting implementation
|
||||
|
||||
return PatchResultSuccess()
|
||||
|
||||
@@ -23,9 +23,6 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
||||
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class, ResourceMappingPatch::class])
|
||||
@Version("0.0.1")
|
||||
class SponsorBlockResourcePatch : ResourcePatch {
|
||||
companion object {
|
||||
internal var reelButtonGroupResourceId: Long = 0
|
||||
}
|
||||
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
val youtubePackage = "com.google.android.youtube"
|
||||
@@ -107,10 +104,6 @@ class SponsorBlockResourcePatch : ResourcePatch {
|
||||
}
|
||||
}.close() // close afterwards
|
||||
|
||||
reelButtonGroupResourceId = ResourceMappingPatch.resourceMappings.single {
|
||||
it.type == "id" && it.name == "reel_persistent_edu_button_group"
|
||||
}.id
|
||||
|
||||
return PatchResultSuccess()
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ class DebuggingPatch : ResourcePatch {
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_debug_enabled",
|
||||
StringResource("revanced_debug_enabled_title", "Enable debug logs"),
|
||||
StringResource("revanced_debug_enabled_title", "Debug logging"),
|
||||
false,
|
||||
StringResource("revanced_debug_summary_on", "Debug logs are enabled"),
|
||||
StringResource("revanced_debug_summary_off", "Debug logs are disabled")
|
||||
@@ -38,11 +38,21 @@ class DebuggingPatch : ResourcePatch {
|
||||
"revanced_debug_stacktrace_enabled",
|
||||
StringResource(
|
||||
"revanced_debug_stacktrace_enabled_title",
|
||||
"Print stack traces"
|
||||
"Log stack traces"
|
||||
),
|
||||
false,
|
||||
StringResource("revanced_debug_stacktrace_summary_on", "Enabled printing stack traces"),
|
||||
StringResource("revanced_debug_stacktrace_summary_off", "Disabled printing stack traces")
|
||||
StringResource("revanced_debug_stacktrace_summary_on", "Debug logs include stack trace"),
|
||||
StringResource("revanced_debug_stacktrace_summary_off", "Debug logs do not include stack trace")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_debug_toast_on_error_enabled",
|
||||
StringResource(
|
||||
"revanced_debug_toast_on_error_enabled_title",
|
||||
"Show toast on ReVanced error"
|
||||
),
|
||||
true,
|
||||
StringResource("revanced_debug_toast_on_error_summary_on", "Toast shown if error occurs"),
|
||||
StringResource("revanced_debug_toast_on_error_summary_off", "Toast not shown if error occurs")
|
||||
),
|
||||
),
|
||||
StringResource("revanced_debug_summary", "Enable or disable debugging options")
|
||||
|
||||
@@ -14,7 +14,8 @@ internal object MicroGResourceHelper {
|
||||
* @param context The resource context.
|
||||
* @param stringsHost The file which hosts the strings.
|
||||
*/
|
||||
fun addStrings(context: ResourceContext, stringsHost: String = "microg/host/values/strings.xml") = context.mergeStrings(stringsHost)
|
||||
fun addStrings(context: ResourceContext, stringsHost: String = "microg/host/values/strings.xml") =
|
||||
context.mergeStrings(stringsHost)
|
||||
|
||||
/**
|
||||
* Patch the manifest to work with MicroG.
|
||||
@@ -47,6 +48,9 @@ internal object MicroGResourceHelper {
|
||||
).replace(
|
||||
"$fromPackageName.permission.C2D_MESSAGE",
|
||||
"$toPackageName.permission.C2D_MESSAGE"
|
||||
).replace(
|
||||
"$fromPackageName.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION",
|
||||
"$toPackageName.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
|
||||
).replace(
|
||||
"com.google.android.c2dm",
|
||||
"${Constants.MICROG_VENDOR}.android.c2dm"
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
|
||||
<string name="revanced_ryd_failure_connection_timeout">Dislikes temporarily not available (API timed out)</string>
|
||||
<string name="revanced_ryd_failure_client_rate_limit_requested">Dislikes not available (client API limit reached)</string>
|
||||
<string name="revanced_ryd_failure_register_user">ReturnYouTubeDislike failed to register as new user</string>
|
||||
<string name="revanced_ryd_failure_confirm_user">ReturnYouTubeDislike failed to confirm new user</string>
|
||||
<string name="revanced_ryd_failure_send_vote_failed">ReturnYouTubeDislike failed to send vote</string>
|
||||
<string name="revanced_ryd_failure_confirm_vote_failed">ReturnYouTubeDislike failed to confirm vote</string>
|
||||
|
||||
<!-- corner case situation, where user enables RYD while video is playing and then tries to vote for the video -->
|
||||
<string name="revanced_ryd_failure_ryd_enabled_while_playing_video_then_user_voted">Reload video to vote using ReturnYouTubeDislike</string>
|
||||
|
||||
<string name="revanced_ryd_enable_title">Return YouTube Dislike</string>
|
||||
<string name="revanced_ryd_enable_summary_on">Dislikes are shown</string>
|
||||
@@ -34,16 +33,16 @@
|
||||
<string name="revanced_ryd_statistics_getFetchCallResponseTimeLast_rate_limit_summary">Dislikes temporarily not available - Client API rate limit in effect</string>
|
||||
|
||||
<string name="revanced_ryd_statistics_getFetchCallCount_title">API fetch votes, number of calls</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallCount_zero_summary">No network calls have been made</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallCount_non_zero_summary">%d network calls have been made</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallCount_zero_summary">No network calls made</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallCount_non_zero_summary">%d network calls made</string>
|
||||
|
||||
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_title">API fetch votes, number of timeouts</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_zero_summary">No network calls have timed out</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_zero_summary">No network calls timed out</string>
|
||||
<string name="revanced_ryd_statistics_getFetchCallNumberOfFailures_non_zero_summary">%d network calls timed out</string>
|
||||
|
||||
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_title">API client rate limits</string>
|
||||
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_zero_summary">No client rate limits have been encountered</string>
|
||||
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_non_zero_summary">Client rate limit was encountered %d times</string>
|
||||
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_zero_summary">No client rate limits encountered</string>
|
||||
<string name="revanced_ryd_statistics_getNumberOfRateLimitRequestsEncountered_non_zero_summary">Client rate limit encountered %d times</string>
|
||||
|
||||
<string name="revanced_ryd_statistics_millisecond_text">%d milliseconds</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user