mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-10 19:33:55 +01:00
Compare commits
15 Commits
v2.157.0-d
...
v2.158.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
963089d866 | ||
|
|
86e28acd2f | ||
|
|
cc86f4ead3 | ||
|
|
5324d471c9 | ||
|
|
8ee531f816 | ||
|
|
d3bd5f65ef | ||
|
|
d5fff653d5 | ||
|
|
3cf86bd1e9 | ||
|
|
f24a7c3ca9 | ||
|
|
69394a60b2 | ||
|
|
9ff595d5df | ||
|
|
46effd337f | ||
|
|
06a981a317 | ||
|
|
dd3a9a4f38 | ||
|
|
5228700317 |
65
CHANGELOG.md
65
CHANGELOG.md
@@ -1,3 +1,68 @@
|
|||||||
|
# [2.158.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.157.1-dev.2...v2.158.0-dev.1) (2023-01-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **irplus:** `remove-ads` patch ([#1554](https://github.com/revanced/revanced-patches/issues/1554)) ([9943a52](https://github.com/revanced/revanced-patches/commit/9943a520d29ee89598b4aa6aba69ff83cb4768ce))
|
||||||
|
|
||||||
|
## [2.157.1-dev.2](https://github.com/revanced/revanced-patches/compare/v2.157.1-dev.1...v2.157.1-dev.2) (2023-01-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **youtube:** resolve duplicate preference keys ([#1550](https://github.com/revanced/revanced-patches/issues/1550)) ([aafdb89](https://github.com/revanced/revanced-patches/commit/aafdb891b2f0f243cb2d997a38ab3e6a7b46aba8))
|
||||||
|
|
||||||
|
## [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)
|
# [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)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -220,6 +220,14 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
### [📦 `net.binarymode.android.irplus`](https://play.google.com/store/apps/details?id=net.binarymode.android.irplus)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `remove-ads` | Removes all ads from the app. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
### [📦 `com.teslacoilsw.launcher`](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher)
|
### [📦 `com.teslacoilsw.launcher`](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher)
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.157.0-dev.3
|
version = 2.158.0-dev.1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.irplus.ad.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("net.binarymode.android.irplus")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class IrplusAdsCompatibility
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.irplus.ad.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object IrplusAdsFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
listOf("L", "Z"),
|
||||||
|
strings = listOf("TAGGED")
|
||||||
|
)
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package app.revanced.patches.irplus.ad.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.addInstruction
|
||||||
|
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.irplus.ad.annotations.IrplusAdsCompatibility
|
||||||
|
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
||||||
|
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("remove-ads")
|
||||||
|
@Description("Removes all ads from the app.")
|
||||||
|
@IrplusAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class IrplusAdsPatch : BytecodePatch(
|
||||||
|
listOf(IrplusAdsFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
// By overwriting the second parameter of the method,
|
||||||
|
// the view which holds the advertisement is removed.
|
||||||
|
method.addInstruction(0, "const/4 p2, 0x0")
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,14 +31,14 @@ class CopyVideoUrlResourcePatch : ResourcePatch {
|
|||||||
StringResource("revanced_copy_video_url_title", "Copy video URL settings"),
|
StringResource("revanced_copy_video_url_title", "Copy video URL settings"),
|
||||||
listOf(
|
listOf(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_copy_video_url",
|
"revanced_copy_video_url_enabled",
|
||||||
StringResource("revanced_copy_video_url_enabled_title", "Show copy video URL button"),
|
StringResource("revanced_copy_video_url_enabled_title", "Show copy video URL button"),
|
||||||
true,
|
true,
|
||||||
StringResource("revanced_copy_video_url_enabled_summary_on", "Button is shown, click to copy video URL without timestamp"),
|
StringResource("revanced_copy_video_url_enabled_summary_on", "Button is shown, click to copy video URL without timestamp"),
|
||||||
StringResource("revanced_copy_video_url_enabled_summary_off", "Button is not shown")
|
StringResource("revanced_copy_video_url_enabled_summary_off", "Button is not shown")
|
||||||
),
|
),
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_copy_video_url_timestamp",
|
"revanced_copy_video_url_timestamp_enabled",
|
||||||
StringResource("revanced_copy_video_url_timestamp_enabled_title", "Show copy timestamp URL button"),
|
StringResource("revanced_copy_video_url_timestamp_enabled_title", "Show copy timestamp URL button"),
|
||||||
true,
|
true,
|
||||||
StringResource("revanced_copy_video_url_timestamp_enabled_summary_on", "Button is shown, click to copy video URL with timestamp"),
|
StringResource("revanced_copy_video_url_timestamp_enabled_summary_on", "Button is shown, click to copy video URL with timestamp"),
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class DownloadsResourcePatch : ResourcePatch {
|
|||||||
StringResource("revanced_downloads_title", "Download settings"),
|
StringResource("revanced_downloads_title", "Download settings"),
|
||||||
listOf(
|
listOf(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_downloads",
|
"revanced_downloads_enabled",
|
||||||
StringResource("revanced_downloads_enabled_title", "Show download button"),
|
StringResource("revanced_downloads_enabled_title", "Show download button"),
|
||||||
true,
|
true,
|
||||||
StringResource("revanced_downloads_enabled_summary_on", "Download button is shown"),
|
StringResource("revanced_downloads_enabled_summary_on", "Download button is shown"),
|
||||||
|
|||||||
@@ -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.fingerprints.*
|
||||||
import app.revanced.patches.youtube.layout.returnyoutubedislike.resource.patch.ReturnYouTubeDislikeResourcePatch
|
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.integrations.patch.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch
|
||||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn([IntegrationsPatch::class, VideoIdPatch::class, ReturnYouTubeDislikeResourcePatch::class])
|
@DependsOn(
|
||||||
|
[
|
||||||
|
IntegrationsPatch::class,
|
||||||
|
VideoIdPatch::class,
|
||||||
|
ReturnYouTubeDislikeResourcePatch::class,
|
||||||
|
PlayerTypeHookPatch::class,
|
||||||
|
]
|
||||||
|
)
|
||||||
@Name("return-youtube-dislike")
|
@Name("return-youtube-dislike")
|
||||||
@Description("Shows the dislike count of videos using the Return YouTube Dislike API.")
|
@Description("Shows the dislike count of videos using the Return YouTube Dislike API.")
|
||||||
@ReturnYouTubeDislikeCompatibility
|
@ReturnYouTubeDislikeCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class ReturnYouTubeDislikePatch : BytecodePatch(
|
class ReturnYouTubeDislikePatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
TextComponentSpecParentFingerprint, LikeFingerprint, DislikeFingerprint, RemoveLikeFingerprint
|
TextComponentSpecParentFingerprint,
|
||||||
|
LikeFingerprint,
|
||||||
|
DislikeFingerprint,
|
||||||
|
RemoveLikeFingerprint,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
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.SeekbarFingerprint
|
||||||
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
||||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
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.annotations.SponsorBlockCompatibility
|
||||||
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.*
|
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.*
|
||||||
import app.revanced.patches.youtube.layout.sponsorblock.resource.patch.SponsorBlockResourcePatch
|
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.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.playercontrols.bytecode.patch.PlayerControlsBytecodePatch
|
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.information.patch.VideoInformationPatch
|
||||||
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
import app.revanced.patches.youtube.misc.video.videoid.patch.VideoIdPatch
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
@@ -39,6 +39,7 @@ import org.jf.dexlib2.iface.reference.StringReference
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
VideoInformationPatch::class, // updates video information and adds method to seek in video
|
VideoInformationPatch::class, // updates video information and adds method to seek in video
|
||||||
PlayerControlsBytecodePatch::class,
|
PlayerControlsBytecodePatch::class,
|
||||||
|
PlayerTypeHookPatch::class,
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
SponsorBlockResourcePatch::class,
|
SponsorBlockResourcePatch::class,
|
||||||
VideoIdPatch::class
|
VideoIdPatch::class
|
||||||
@@ -54,8 +55,6 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
NextGenWatchLayoutFingerprint,
|
NextGenWatchLayoutFingerprint,
|
||||||
AppendTimeFingerprint,
|
AppendTimeFingerprint,
|
||||||
PlayerOverlaysLayoutInitFingerprint,
|
PlayerOverlaysLayoutInitFingerprint,
|
||||||
ShortsPlayerConstructorFingerprint,
|
|
||||||
StartVideoInformerFingerprint
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -260,32 +259,15 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
if (it.opcode.ordinal != Opcode.CONST_STRING.ordinal) continue
|
if (it.opcode.ordinal != Opcode.CONST_STRING.ordinal) continue
|
||||||
|
|
||||||
when (((it as ReferenceInstruction).reference as StringReference).string) {
|
when (((it as ReferenceInstruction).reference as StringReference).string) {
|
||||||
"replaceMeWithsetSponsorBarRect" ->
|
"replaceMeWithsetSponsorBarRect" -> method.replaceStringInstruction(
|
||||||
method.replaceStringInstruction(index, it, rectangleFieldName)
|
index,
|
||||||
|
it,
|
||||||
"replaceMeWithsetMillisecondMethod" ->
|
rectangleFieldName
|
||||||
method.replaceStringInstruction(index, it, "seekHelper")
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ?: return PatchResultError("Could not find the method which contains the replaceMeWith* strings")
|
} ?: 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
|
// TODO: isSBChannelWhitelisting implementation
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ import app.revanced.util.resources.ResourceUtils.mergeStrings
|
|||||||
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class, ResourceMappingPatch::class])
|
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class, ResourceMappingPatch::class])
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SponsorBlockResourcePatch : ResourcePatch {
|
class SponsorBlockResourcePatch : ResourcePatch {
|
||||||
companion object {
|
|
||||||
internal var reelButtonGroupResourceId: Long = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext): PatchResult {
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
val youtubePackage = "com.google.android.youtube"
|
val youtubePackage = "com.google.android.youtube"
|
||||||
@@ -107,10 +104,6 @@ class SponsorBlockResourcePatch : ResourcePatch {
|
|||||||
}
|
}
|
||||||
}.close() // close afterwards
|
}.close() // close afterwards
|
||||||
|
|
||||||
reelButtonGroupResourceId = ResourceMappingPatch.resourceMappings.single {
|
|
||||||
it.type == "id" && it.name == "reel_persistent_edu_button_group"
|
|
||||||
}.id
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ class DebuggingPatch : ResourcePatch {
|
|||||||
listOf(
|
listOf(
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_debug_enabled",
|
"revanced_debug_enabled",
|
||||||
StringResource("revanced_debug_enabled_title", "Enable debug logs"),
|
StringResource("revanced_debug_enabled_title", "Debug logging"),
|
||||||
false,
|
false,
|
||||||
StringResource("revanced_debug_summary_on", "Debug logs are enabled"),
|
StringResource("revanced_debug_summary_on", "Debug logs are enabled"),
|
||||||
StringResource("revanced_debug_summary_off", "Debug logs are disabled")
|
StringResource("revanced_debug_summary_off", "Debug logs are disabled")
|
||||||
@@ -38,11 +38,21 @@ class DebuggingPatch : ResourcePatch {
|
|||||||
"revanced_debug_stacktrace_enabled",
|
"revanced_debug_stacktrace_enabled",
|
||||||
StringResource(
|
StringResource(
|
||||||
"revanced_debug_stacktrace_enabled_title",
|
"revanced_debug_stacktrace_enabled_title",
|
||||||
"Print stack traces"
|
"Log stack traces"
|
||||||
),
|
),
|
||||||
false,
|
false,
|
||||||
StringResource("revanced_debug_stacktrace_summary_on", "Enabled printing stack traces"),
|
StringResource("revanced_debug_stacktrace_summary_on", "Debug logs include stack trace"),
|
||||||
StringResource("revanced_debug_stacktrace_summary_off", "Disabled printing stack traces")
|
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")
|
StringResource("revanced_debug_summary", "Enable or disable debugging options")
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ internal object MicroGResourceHelper {
|
|||||||
* @param context The resource context.
|
* @param context The resource context.
|
||||||
* @param stringsHost The file which hosts the strings.
|
* @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.
|
* Patch the manifest to work with MicroG.
|
||||||
@@ -47,6 +48,9 @@ internal object MicroGResourceHelper {
|
|||||||
).replace(
|
).replace(
|
||||||
"$fromPackageName.permission.C2D_MESSAGE",
|
"$fromPackageName.permission.C2D_MESSAGE",
|
||||||
"$toPackageName.permission.C2D_MESSAGE"
|
"$toPackageName.permission.C2D_MESSAGE"
|
||||||
|
).replace(
|
||||||
|
"$fromPackageName.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION",
|
||||||
|
"$toPackageName.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
|
||||||
).replace(
|
).replace(
|
||||||
"com.google.android.c2dm",
|
"com.google.android.c2dm",
|
||||||
"${Constants.MICROG_VENDOR}.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_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_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>
|
<!-- corner case situation, where user enables RYD while video is playing and then tries to vote for the video -->
|
||||||
<string name="revanced_ryd_failure_send_vote_failed">ReturnYouTubeDislike failed to send vote</string>
|
<string name="revanced_ryd_failure_ryd_enabled_while_playing_video_then_user_voted">Reload video to vote using ReturnYouTubeDislike</string>
|
||||||
<string name="revanced_ryd_failure_confirm_vote_failed">ReturnYouTubeDislike failed to confirm vote</string>
|
|
||||||
|
|
||||||
<string name="revanced_ryd_enable_title">Return YouTube Dislike</string>
|
<string name="revanced_ryd_enable_title">Return YouTube Dislike</string>
|
||||||
<string name="revanced_ryd_enable_summary_on">Dislikes are shown</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_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_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_zero_summary">No network calls made</string>
|
||||||
<string name="revanced_ryd_statistics_getFetchCallCount_non_zero_summary">%d network calls have been 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_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_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_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_zero_summary">No client rate limits 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_non_zero_summary">Client rate limit encountered %d times</string>
|
||||||
|
|
||||||
<string name="revanced_ryd_statistics_millisecond_text">%d milliseconds</string>
|
<string name="revanced_ryd_statistics_millisecond_text">%d milliseconds</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user