mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-12 12:23:56 +01:00
Compare commits
2 Commits
v2.148.0-d
...
v2.145.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bb97f9b5f | ||
|
|
f577380796 |
@@ -17,7 +17,7 @@
|
|||||||
"assets": [
|
"assets": [
|
||||||
"README.md",
|
"README.md",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
"gradle.properties",
|
"gradle.properties",X
|
||||||
"patches.json"
|
"patches.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -38,8 +38,7 @@
|
|||||||
[
|
[
|
||||||
"@saithodev/semantic-release-backmerge",
|
"@saithodev/semantic-release-backmerge",
|
||||||
{
|
{
|
||||||
branches: [{from: "main", to: "dev"}],
|
"branches": [{from: "main", to: "dev"}]
|
||||||
clearWorkspace: true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
56
CHANGELOG.md
56
CHANGELOG.md
@@ -1,61 +1,9 @@
|
|||||||
# [2.148.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.148.0-dev.1...v2.148.0-dev.2) (2022-12-26)
|
# [2.145.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.145.0-dev.1...v2.145.0-dev.2) (2022-12-18)
|
||||||
|
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* **youtube/general-ads-patch:** hide guidelines for subscriber ([#1352](https://github.com/revanced/revanced-patches/issues/1352)) ([2d10932](https://github.com/revanced/revanced-patches/commit/2d1093251d5d50b476ca44f76acb9a8597b37aea))
|
* **twitter/timeline-ads:** add clarifying notice to description ([ed2f1f3](https://github.com/revanced/revanced-patches/commit/ed2f1f307fdad6128dc618815b9f8b24a5b99a66))
|
||||||
|
|
||||||
# [2.148.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.147.0...v2.148.0-dev.1) (2022-12-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **tasker:** `unlock-license` patch ([#1339](https://github.com/revanced/revanced-patches/issues/1339)) ([78a43b8](https://github.com/revanced/revanced-patches/commit/78a43b8abd972172eab99519dfa636ce77d9e64f))
|
|
||||||
|
|
||||||
# [2.147.0](https://github.com/revanced/revanced-patches/compare/v2.146.0...v2.147.0) (2022-12-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **youtube/return-youtube-dislike:** debug connection statistics, toast on error, high priority background threads ([#1320](https://github.com/revanced/revanced-patches/issues/1320)) ([30273a9](https://github.com/revanced/revanced-patches/commit/30273a9bbdd40453baeb09f26ac9d218569a3e71))
|
|
||||||
|
|
||||||
# [2.147.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.146.0...v2.147.0-dev.1) (2022-12-21)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **youtube/return-youtube-dislike:** debug connection statistics, toast on error, high priority background threads ([#1320](https://github.com/revanced/revanced-patches/issues/1320)) ([30273a9](https://github.com/revanced/revanced-patches/commit/30273a9bbdd40453baeb09f26ac9d218569a3e71))
|
|
||||||
|
|
||||||
# [2.146.0](https://github.com/revanced/revanced-patches/compare/v2.145.0...v2.146.0) (2022-12-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **predictive-back-gesture:** exclude by default ([176d34b](https://github.com/revanced/revanced-patches/commit/176d34b2ff92d0eb627dad86ad87f559df3db815))
|
|
||||||
* **twitter/timeline-ads:** add clarifying notice to description ([0eca2af](https://github.com/revanced/revanced-patches/commit/0eca2af1a4a688903c61ff6469ffea90c60f06a6))
|
|
||||||
* **youtube:** bump patches compatibility to v17.49.37 ([83ebc73](https://github.com/revanced/revanced-patches/commit/83ebc731130d3d216ac4b815382d8f13548cf665))
|
|
||||||
|
|
||||||
# [2.146.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.145.0...v2.146.0-dev.1) (2022-12-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **predictive-back-gesture:** exclude by default ([176d34b](https://github.com/revanced/revanced-patches/commit/176d34b2ff92d0eb627dad86ad87f559df3db815))
|
|
||||||
* **twitter/timeline-ads:** add clarifying notice to description ([0eca2af](https://github.com/revanced/revanced-patches/commit/0eca2af1a4a688903c61ff6469ffea90c60f06a6))
|
|
||||||
* **youtube:** bump patches compatibility to v17.49.37 ([83ebc73](https://github.com/revanced/revanced-patches/commit/83ebc731130d3d216ac4b815382d8f13548cf665))
|
|
||||||
|
|
||||||
# [2.145.0](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0) (2022-12-18)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **tiktok/settings:** make compatible with newer versions ([c88740d](https://github.com/revanced/revanced-patches/commit/c88740dc2bf040747d9704d5bed52a7b533c22d6))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **crunchyroll:** remove `enable-downloads` patch ([2ac1546](https://github.com/revanced/revanced-patches/commit/2ac15460f5734fc2c6d2d78d34083a8e6b2f7012))
|
|
||||||
* **youtube-music:** bump compatibility to 5.36.51 ([c4a3099](https://github.com/revanced/revanced-patches/commit/c4a3099c1ca39431fba9beb94cc2b43e260561d9))
|
|
||||||
|
|
||||||
# [2.145.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0-dev.1) (2022-12-18)
|
# [2.145.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0-dev.1) (2022-12-18)
|
||||||
|
|
||||||
|
|||||||
86
README.md
86
README.md
@@ -9,53 +9,53 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.49.37 |
|
| `always-autorepeat` | Always repeats the playing video again. | 17.45.36 |
|
||||||
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
| `comments` | Hides components related to comments. | 17.49.37 |
|
| `comments` | Hides components related to comments. | 17.45.36 |
|
||||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.49.37 |
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.45.36 |
|
||||||
| `custom-video-speed` | Adds more video speed options. | 17.49.37 |
|
| `custom-video-speed` | Adds more video speed options. | 17.45.36 |
|
||||||
| `debugging` | Adds debugging options. | all |
|
| `debugging` | Adds debugging options. | all |
|
||||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.49.37 |
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.45.36 |
|
||||||
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.49.37 |
|
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.45.36 |
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.49.37 |
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.45.36 |
|
||||||
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.49.37 |
|
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.45.36 |
|
||||||
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.49.37 |
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.45.36 |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.49.37 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.45.36 |
|
||||||
| `general-ads` | Removes general ads. | 17.49.37 |
|
| `general-ads` | Removes general ads. | 17.45.36 |
|
||||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.49.37 |
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.45.36 |
|
||||||
| `hide-album-cards` | Hides the album cards below the artist description. | 17.49.37 |
|
| `hide-album-cards` | Hides the album cards below the artist description. | 17.45.36 |
|
||||||
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.49.37 |
|
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.45.36 |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.49.37 |
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.45.36 |
|
||||||
| `hide-captions-button` | Hides the captions button on video player. | 17.49.37 |
|
| `hide-captions-button` | Hides the captions button on video player. | 17.45.36 |
|
||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
| `hide-create-button` | Hides the create button in the navigation bar. | 17.49.37 |
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.45.36 |
|
||||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.49.37 |
|
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.45.36 |
|
||||||
| `hide-email-address` | Hides the email address in the account switcher. | 17.49.37 |
|
| `hide-email-address` | Hides the email address in the account switcher. | 17.45.36 |
|
||||||
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.49.37 |
|
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.45.36 |
|
||||||
| `hide-info-cards` | Hides info-cards in videos. | 17.49.37 |
|
| `hide-info-cards` | Hides info-cards in videos. | 17.45.36 |
|
||||||
| `hide-my-mix` | Hides mix playlists. | 17.49.37 |
|
| `hide-my-mix` | Hides mix playlists. | 17.45.36 |
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.49.37 |
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.45.36 |
|
||||||
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.49.37 |
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.45.36 |
|
||||||
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.49.37 |
|
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.45.36 |
|
||||||
| `hide-watch-in-vr` | Hides the Watch in VR option in the player settings flyout panel. | 17.49.37 |
|
| `hide-watch-in-vr` | Hides the Watch in VR option in the player settings flyout panel. | 17.45.36 |
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.49.37 |
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.45.36 |
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.49.37 |
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.45.36 |
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.49.37 |
|
| `minimized-playback` | Enables minimized and background playback. | 17.45.36 |
|
||||||
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 17.49.37 |
|
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 17.45.36 |
|
||||||
| `open-links-directly` | Bypasses URL redirects and opens links directly inside YouTube app. | 17.49.37 |
|
| `open-links-directly` | Bypasses URL redirects and opens links directly inside YouTube app. | 17.45.36 |
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.49.37 |
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.45.36 |
|
||||||
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.49.37 |
|
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.45.36 |
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.49.37 |
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.45.36 |
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.49.37 |
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.45.36 |
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.49.37 |
|
| `sponsorblock` | Integrate SponsorBlock. | 17.45.36 |
|
||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.49.37 |
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.45.36 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.49.37 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.45.36 |
|
||||||
| `theme` | Applies a custom theme. | all |
|
| `theme` | Applies a custom theme. | all |
|
||||||
| `video-ads` | Removes ads in the video player. | 17.49.37 |
|
| `video-ads` | Removes ads in the video player. | 17.45.36 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||||
@@ -197,14 +197,6 @@ 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.dinglisch.android.taskerm`](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
|
|
||||||
<details>
|
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|
||||||
| `unlock-license` | Unlocks the trial version. | all |
|
|
||||||
</details>
|
|
||||||
|
|
||||||
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
|
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:6.3.2")
|
implementation("app.revanced:revanced-patcher:6.3.1")
|
||||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
// Required for meta
|
// Required for meta
|
||||||
implementation("com.google.code.gson:gson:2.10")
|
implementation("com.google.code.gson:gson:2.10")
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.148.0-dev.2
|
version = 2.145.0-dev.2
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -9,7 +9,7 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
|
||||||
@Patch(false)
|
@Patch
|
||||||
@Name("predictive-back-gesture")
|
@Name("predictive-back-gesture")
|
||||||
@Description("Enables the predictive back gesture introduced on Android 13.")
|
@Description("Enables the predictive back gesture introduced on Android 13.")
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patches.shared.fingerprints
|
|
||||||
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
object SeekbarFingerprint : MethodFingerprint(
|
|
||||||
"V",
|
|
||||||
strings = listOf("timed_markers_width")
|
|
||||||
)
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.shared.fingerprints
|
|
||||||
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
object SeekbarOnDrawFingerprint : MethodFingerprint(
|
|
||||||
customFingerprint = { it.name == "onDraw" }
|
|
||||||
)
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patches.tasker.license.unlock.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("net.dinglisch.android.taskerm")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
|
||||||
internal annotation class UnlockLicenseCompatibility
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package app.revanced.patches.tasker.license.unlock.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
object CheckLicenseFingerprint : MethodFingerprint(
|
|
||||||
strings = listOf("just(IsLicensedResult(true))"),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.GOTO,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
package app.revanced.patches.tasker.license.unlock.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
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.instruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.tasker.license.unlock.annotations.UnlockLicenseCompatibility
|
|
||||||
import app.revanced.patches.tasker.license.unlock.fingerprints.CheckLicenseFingerprint
|
|
||||||
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
|
||||||
import org.jf.dexlib2.immutable.instruction.ImmutableInstruction35c
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("unlock-license")
|
|
||||||
@Description("Unlocks the trial version.")
|
|
||||||
@UnlockLicenseCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class UnlockLicensePatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
CheckLicenseFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) = CheckLicenseFingerprint.result?.let { result ->
|
|
||||||
val patchIndex = result.scanResult.patternScanResult!!.endIndex
|
|
||||||
|
|
||||||
with(result.mutableMethod.instruction(patchIndex) as FiveRegisterInstruction) {
|
|
||||||
ImmutableInstruction35c(
|
|
||||||
opcode,
|
|
||||||
registerCount,
|
|
||||||
registerC,
|
|
||||||
0, // registerE is 1, registerD is now 0 instead of 1 bypassing the license verification
|
|
||||||
registerE,
|
|
||||||
registerF,
|
|
||||||
registerG,
|
|
||||||
(this as ReferenceInstruction).reference as MethodReference
|
|
||||||
)
|
|
||||||
}
|
|
||||||
PatchResultSuccess()
|
|
||||||
} ?: CheckLicenseFingerprint.toErrorResult()
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -102,13 +102,6 @@ class GeneralAdsResourcePatch : ResourcePatch {
|
|||||||
"Community guidelines are shown"
|
"Community guidelines are shown"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
SwitchPreference(
|
|
||||||
"revanced_adremover_subscribers_community_guidelines_removal",
|
|
||||||
StringResource("revanced_adremover_subscribers_community_guidelines_enabled_title", "Hide subscribers community guidelines"),
|
|
||||||
true,
|
|
||||||
StringResource("revanced_adremover_subscribers_community_guidelines_enabled_summary_on", "Subscribers community guidelines are hidden"),
|
|
||||||
StringResource("revanced_adremover_subscribers_community_guidelines_enabled_summary_off", "Subscribers community guidelines are shown")
|
|
||||||
),
|
|
||||||
SwitchPreference(
|
SwitchPreference(
|
||||||
"revanced_adremover_emergency_box_removal",
|
"revanced_adremover_emergency_box_removal",
|
||||||
StringResource("revanced_adremover_emergency_box_enabled_title", "Hide emergency boxes"),
|
StringResource("revanced_adremover_emergency_box_enabled_title", "Hide emergency boxes"),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,20 +5,18 @@ import app.revanced.patcher.annotation.Name
|
|||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
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.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.shared.fingerprints.SeekbarFingerprint
|
|
||||||
import app.revanced.patches.shared.fingerprints.SeekbarOnDrawFingerprint
|
|
||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
|
||||||
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
|
||||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.annotations.HideTimeAndSeekbarCompatibility
|
||||||
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
|
import app.revanced.patches.youtube.layout.hidetimeandseekbar.fingerprints.TimeCounterFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints.CreateVideoPlayerSeekbarFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
||||||
|
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
@@ -28,7 +26,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class HideTimeAndSeekbarPatch : BytecodePatch(
|
class HideTimeAndSeekbarPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
SeekbarFingerprint, TimeCounterFingerprint
|
CreateVideoPlayerSeekbarFingerprint, TimeCounterFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
@@ -42,9 +40,7 @@ class HideTimeAndSeekbarPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val createVideoPlayerSeekbarMethod = SeekbarFingerprint.result!!.let {
|
val createVideoPlayerSeekbarMethod = CreateVideoPlayerSeekbarFingerprint.result!!.mutableMethod
|
||||||
SeekbarOnDrawFingerprint.apply { resolve(context, it.mutableClass) }
|
|
||||||
}.result!!.mutableMethod
|
|
||||||
|
|
||||||
createVideoPlayerSeekbarMethod.addInstructions(
|
createVideoPlayerSeekbarMethod.addInstructions(
|
||||||
0, """
|
0, """
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[
|
[
|
||||||
Package("com.google.android.youtube", arrayOf("17.49.37"))
|
Package("com.google.android.youtube", arrayOf("17.45.36"))
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.revanced.patches.youtube.layout.returnyoutubedislike.patch
|
package app.revanced.patches.youtube.layout.returnyoutubedislike.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
@@ -52,8 +51,8 @@ class ReturnYouTubeDislikePatch : BytecodePatch(
|
|||||||
VideoIdPatch.injectCall("Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->newVideoLoaded(Ljava/lang/String;)V")
|
VideoIdPatch.injectCall("Lapp/revanced/integrations/patches/ReturnYouTubeDislikePatch;->newVideoLoaded(Ljava/lang/String;)V")
|
||||||
|
|
||||||
with(TextComponentFingerprint
|
with(TextComponentFingerprint
|
||||||
.apply { resolve(context, TextComponentSpecParentFingerprint.result!!.classDef) }
|
.also { it.resolve(context, TextComponentSpecParentFingerprint.result!!.classDef) }
|
||||||
.result ?: return TextComponentFingerprint.toErrorResult()
|
.result ?: return PatchResultError("Could not find createComponent method")
|
||||||
) {
|
) {
|
||||||
val createComponentMethod = mutableMethod
|
val createComponentMethod = mutableMethod
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.sponsorblock.bytecode.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CreateVideoPlayerSeekbarFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
strings = listOf("timed_markers_width")
|
||||||
|
)
|
||||||
@@ -16,14 +16,12 @@ import app.revanced.patcher.patch.PatchResultSuccess
|
|||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
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.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.shared.mapping.misc.patch.ResourceMappingPatch
|
||||||
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.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
|
||||||
@@ -50,7 +48,7 @@ import org.jf.dexlib2.iface.reference.StringReference
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SponsorBlockBytecodePatch : BytecodePatch(
|
class SponsorBlockBytecodePatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
SeekbarFingerprint,
|
CreateVideoPlayerSeekbarFingerprint,
|
||||||
NextGenWatchLayoutFingerprint,
|
NextGenWatchLayoutFingerprint,
|
||||||
AppendTimeFingerprint,
|
AppendTimeFingerprint,
|
||||||
PlayerOverlaysLayoutInitFingerprint,
|
PlayerOverlaysLayoutInitFingerprint,
|
||||||
@@ -87,9 +85,7 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
/*
|
/*
|
||||||
Seekbar drawing
|
Seekbar drawing
|
||||||
*/
|
*/
|
||||||
val seekbarSignatureResult = SeekbarFingerprint.result!!.let {
|
val seekbarSignatureResult = CreateVideoPlayerSeekbarFingerprint.result!!
|
||||||
SeekbarOnDrawFingerprint.apply { resolve(context, it.mutableClass) }
|
|
||||||
}.result!!
|
|
||||||
val seekbarMethod = seekbarSignatureResult.mutableMethod
|
val seekbarMethod = seekbarSignatureResult.mutableMethod
|
||||||
val seekbarMethodInstructions = seekbarMethod.implementation!!.instructions
|
val seekbarMethodInstructions = seekbarMethod.implementation!!.instructions
|
||||||
|
|
||||||
@@ -100,7 +96,7 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
if (instruction.opcode != Opcode.MOVE_OBJECT_FROM16) continue
|
if (instruction.opcode != Opcode.MOVE_OBJECT_FROM16) continue
|
||||||
seekbarMethod.addInstruction(
|
seekbarMethod.addInstruction(
|
||||||
index + 1,
|
index + 1,
|
||||||
"invoke-static/range {p0 .. p0}, $INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarRect(Ljava/lang/Object;)V"
|
"invoke-static {v0}, $INTEGRATIONS_PLAYER_CONTROLLER_CLASS_DESCRIPTOR->setSponsorBarRect(Ljava/lang/Object;)V"
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -124,10 +120,10 @@ class SponsorBlockBytecodePatch : BytecodePatch(
|
|||||||
/*
|
/*
|
||||||
Set rectangle absolute left and right positions
|
Set rectangle absolute left and right positions
|
||||||
*/
|
*/
|
||||||
val drawRectangleInstructions = seekbarMethodInstructions.withIndex().filter { (_, instruction) ->
|
val drawRectangleInstructions = seekbarMethodInstructions.filter {
|
||||||
instruction is ReferenceInstruction && (instruction.reference as? MethodReference)?.name == "drawRect"
|
it is ReferenceInstruction && (it.reference as? MethodReference)?.name == "drawRect" && it is FiveRegisterInstruction
|
||||||
}.map { (index, instruction) -> // TODO: improve code
|
}.map { // TODO: improve code
|
||||||
index to (instruction as FiveRegisterInstruction).registerD
|
seekbarMethodInstructions.indexOf(it) to (it as FiveRegisterInstruction).registerD
|
||||||
}
|
}
|
||||||
|
|
||||||
val (indexRight, rectangleRightRegister) = drawRectangleInstructions[0]
|
val (indexRight, rectangleRightRegister) = drawRectangleInstructions[0]
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -32,10 +32,12 @@ class ThemePatch : ResourcePatch {
|
|||||||
|
|
||||||
node.textContent = when (node.getAttribute("name")) {
|
node.textContent = when (node.getAttribute("name")) {
|
||||||
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3",
|
"yt_black0", "yt_black1", "yt_black1_opacity95", "yt_black1_opacity98", "yt_black2", "yt_black3",
|
||||||
"yt_black4", "yt_status_bar_background_dark", "material_grey_850" -> darkThemeBackgroundColor
|
"yt_black4", "yt_status_bar_background_dark", "material_grey_100", "material_grey_50",
|
||||||
|
"material_grey_600", "material_grey_800", "material_grey_850", "material_grey_900",
|
||||||
|
"material_grey_white_1000", "sud_glif_v3_dialog_background_color_dark" -> darkThemeBackgroundColor
|
||||||
|
|
||||||
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98", "yt_white2", "yt_white3", "yt_white4",
|
"yt_white1", "yt_white1_opacity95", "yt_white1_opacity98", "yt_white2", "yt_white3", "yt_white4",
|
||||||
-> lightThemeBackgroundColor
|
"sud_glif_v3_dialog_background_color_light" -> lightThemeBackgroundColor
|
||||||
|
|
||||||
else -> continue
|
else -> continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
object DrawActionBarFingerprint : MethodFingerprint(
|
|
||||||
"V",
|
|
||||||
AccessFlags.PRIVATE or AccessFlags.FINAL,
|
|
||||||
listOf("I", "I"),
|
|
||||||
listOf(
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.CONST,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object IsInOfflineModeCheckFingerprint : MethodFingerprint(
|
||||||
|
"L",
|
||||||
|
strings = listOf("bundle_is_in_offline_mode")
|
||||||
|
)
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.widesearchbar.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object IsInOfflineModeCheckResultFingerprint : MethodFingerprint(
|
||||||
|
"L",
|
||||||
|
parameters = listOf("L", "L", "L", "L", "L"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_STATIC,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IF_EQZ,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.MOVE_OBJECT,
|
||||||
|
Opcode.MOVE_OBJECT,
|
||||||
|
Opcode.MOVE_OBJECT,
|
||||||
|
),
|
||||||
|
)
|
||||||
@@ -8,6 +8,7 @@ import app.revanced.patcher.data.BytecodeContext
|
|||||||
import app.revanced.patcher.data.toMethodWalker
|
import app.revanced.patcher.data.toMethodWalker
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
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.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -17,7 +18,8 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|||||||
import app.revanced.patches.shared.settings.preference.impl.StringResource
|
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.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
import app.revanced.patches.youtube.layout.widesearchbar.annotations.WideSearchbarCompatibility
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.DrawActionBarFingerprint
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.IsInOfflineModeCheckFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.IsInOfflineModeCheckResultFingerprint
|
||||||
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.SetWordmarkHeaderFingerprint
|
import app.revanced.patches.youtube.layout.widesearchbar.fingerprints.SetWordmarkHeaderFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
@@ -30,7 +32,7 @@ import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
|||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class WideSearchbarPatch : BytecodePatch(
|
class WideSearchbarPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
SetWordmarkHeaderFingerprint, DrawActionBarFingerprint
|
SetWordmarkHeaderFingerprint, IsInOfflineModeCheckFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
private companion object {
|
private companion object {
|
||||||
@@ -73,12 +75,16 @@ class WideSearchbarPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val result = DrawActionBarFingerprint.result ?: return DrawActionBarFingerprint.toErrorResult()
|
// resolve fingerprints
|
||||||
|
IsInOfflineModeCheckFingerprint.result?.let {
|
||||||
|
if (!IsInOfflineModeCheckResultFingerprint.resolve(context, it.classDef))
|
||||||
|
return IsInOfflineModeCheckResultFingerprint.toErrorResult()
|
||||||
|
} ?: return IsInOfflineModeCheckFingerprint.toErrorResult()
|
||||||
|
|
||||||
// patch methods
|
// patch methods
|
||||||
mapOf(
|
mapOf(
|
||||||
SetWordmarkHeaderFingerprint to 1,
|
SetWordmarkHeaderFingerprint to 1,
|
||||||
DrawActionBarFingerprint to result.scanResult.patternScanResult!!.endIndex
|
IsInOfflineModeCheckResultFingerprint to 0
|
||||||
).forEach { (fingerprint, callIndex) ->
|
).forEach { (fingerprint, callIndex) ->
|
||||||
context.walkMutable(callIndex, fingerprint).injectSearchBarHook()
|
context.walkMutable(callIndex, fingerprint).injectSearchBarHook()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import app.revanced.patches.youtube.misc.litho.filter.fingerprints.EmptyComponen
|
|||||||
import org.jf.dexlib2.iface.instruction.Instruction
|
import org.jf.dexlib2.iface.instruction.Instruction
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
import org.jf.dexlib2.iface.reference.FieldReference
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
import org.jf.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@@ -45,16 +44,14 @@ class LithoFilterPatch : BytecodePatch(
|
|||||||
val builderMethodDescriptor = instruction(builderMethodIndex).toDescriptor()
|
val builderMethodDescriptor = instruction(builderMethodIndex).toDescriptor()
|
||||||
val emptyComponentFieldDescriptor = instruction(emptyComponentFieldIndex).toDescriptor()
|
val emptyComponentFieldDescriptor = instruction(emptyComponentFieldIndex).toDescriptor()
|
||||||
|
|
||||||
val stringBuilderRegister = (instruction(insertHookIndex - 1) as TwoRegisterInstruction).registerA
|
|
||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
insertHookIndex, // right after setting the component.pathBuilder field,
|
insertHookIndex, // right after setting the component.pathBuilder field,
|
||||||
"""
|
"""
|
||||||
invoke-static {v$stringBuilderRegister, v0}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
|
invoke-static {v5, v2}, Lapp/revanced/integrations/patches/LithoFilterPatch;->filter(Ljava/lang/StringBuilder;Ljava/lang/String;)Z
|
||||||
move-result v$clobberedRegister
|
move-result v$clobberedRegister
|
||||||
if-eqz v$clobberedRegister, :not_an_ad
|
if-eqz v$clobberedRegister, :not_an_ad
|
||||||
move-object/from16 v0, p1
|
move-object/from16 v2, p1
|
||||||
invoke-static {v0}, $builderMethodDescriptor
|
invoke-static {v2}, $builderMethodDescriptor
|
||||||
move-result-object v0
|
move-result-object v0
|
||||||
iget-object v0, v0, $emptyComponentFieldDescriptor
|
iget-object v0, v0, $emptyComponentFieldDescriptor
|
||||||
return-object v0
|
return-object v0
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.settings.bytecode.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
|
||||||
|
|
||||||
object ThemeConstructorFingerprint : MethodFingerprint(
|
|
||||||
"L",
|
|
||||||
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
|
||||||
listOf("L"),
|
|
||||||
strings = listOf("settings.SettingsActivity", ":android:show_fragment", "settings.GeneralPrefsFragment")
|
|
||||||
)
|
|
||||||
@@ -6,7 +6,18 @@ import org.jf.dexlib2.AccessFlags
|
|||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object ThemeSetterAppFingerprint : MethodFingerprint(
|
object ThemeSetterAppFingerprint : MethodFingerprint(
|
||||||
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "L", "L"), listOf(
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IF_EQZ,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IF_EQZ,
|
||||||
|
Opcode.NEW_INSTANCE,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.IF_NE,
|
||||||
Opcode.CONST, //target reference
|
Opcode.CONST, //target reference
|
||||||
Opcode.GOTO,
|
Opcode.GOTO,
|
||||||
Opcode.CONST, //target reference
|
Opcode.CONST, //target reference
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.misc.settings.bytecode.patch
|
package app.revanced.patches.youtube.misc.settings.bytecode.patch
|
||||||
|
|
||||||
import app.revanced.extensions.toErrorResult
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
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.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@@ -18,7 +16,6 @@ import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
|
|||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
import app.revanced.patches.youtube.misc.settings.annotations.SettingsCompatibility
|
import app.revanced.patches.youtube.misc.settings.annotations.SettingsCompatibility
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.LicenseActivityFingerprint
|
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.LicenseActivityFingerprint
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeConstructorFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterAppFingerprint
|
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterAppFingerprint
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterSystemFingerprint
|
import app.revanced.patches.youtube.misc.settings.bytecode.fingerprints.ThemeSetterSystemFingerprint
|
||||||
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch
|
import app.revanced.patches.youtube.misc.settings.resource.patch.SettingsResourcePatch
|
||||||
@@ -36,7 +33,7 @@ import org.jf.dexlib2.util.MethodUtil
|
|||||||
@SettingsCompatibility
|
@SettingsCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class SettingsPatch : BytecodePatch(
|
class SettingsPatch : BytecodePatch(
|
||||||
listOf(LicenseActivityFingerprint, ThemeSetterSystemFingerprint, ThemeConstructorFingerprint)
|
listOf(LicenseActivityFingerprint, ThemeSetterSystemFingerprint, ThemeSetterAppFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
fun buildInvokeInstructionsString(
|
fun buildInvokeInstructionsString(
|
||||||
@@ -47,47 +44,48 @@ class SettingsPatch : BytecodePatch(
|
|||||||
) = "invoke-static {$registers}, $classDescriptor->$methodName($parameters)V"
|
) = "invoke-static {$registers}, $classDescriptor->$methodName($parameters)V"
|
||||||
|
|
||||||
// apply the current theme of the settings page
|
// apply the current theme of the settings page
|
||||||
ThemeSetterSystemFingerprint.result!!.let { result ->
|
with(ThemeSetterSystemFingerprint.result!!) {
|
||||||
|
with(mutableMethod) {
|
||||||
val call = buildInvokeInstructionsString()
|
val call = buildInvokeInstructionsString()
|
||||||
result.mutableMethod.apply {
|
|
||||||
addInstruction(
|
addInstruction(
|
||||||
result.scanResult.patternScanResult!!.startIndex, call
|
scanResult.patternScanResult!!.startIndex,
|
||||||
|
call
|
||||||
)
|
)
|
||||||
addInstructions(
|
|
||||||
implementation!!.instructions.size - 1, call
|
addInstruction(
|
||||||
|
mutableMethod.implementation!!.instructions.size - 1,
|
||||||
|
call
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the theme based on the preference of the app
|
// set the theme based on the preference of the app
|
||||||
with((ThemeConstructorFingerprint.result?.let {
|
with(ThemeSetterAppFingerprint.result!!) {
|
||||||
ThemeSetterAppFingerprint.apply {
|
with(mutableMethod) {
|
||||||
if (!resolve(context, it.classDef)) return ThemeSetterAppFingerprint.toErrorResult()
|
|
||||||
}
|
|
||||||
} ?: return ThemeConstructorFingerprint.toErrorResult()).result!!) {
|
|
||||||
fun buildInstructionsString(theme: Int) = """
|
fun buildInstructionsString(theme: Int) = """
|
||||||
const/4 v0, 0x$theme
|
const/4 v0, 0x$theme
|
||||||
${buildInvokeInstructionsString(parameters = "I")}
|
${buildInvokeInstructionsString(parameters = "I")}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
val patternScanResult = scanResult.patternScanResult!!
|
|
||||||
|
|
||||||
mutableMethod.apply {
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
patternScanResult.endIndex + 1, buildInstructionsString(1)
|
scanResult.patternScanResult!!.endIndex + 1,
|
||||||
|
buildInstructionsString(1)
|
||||||
)
|
)
|
||||||
addInstructions(
|
addInstructions(
|
||||||
patternScanResult.endIndex - 7, buildInstructionsString(0)
|
scanResult.patternScanResult!!.endIndex - 7,
|
||||||
|
buildInstructionsString(0)
|
||||||
)
|
)
|
||||||
|
|
||||||
addInstructions(
|
addInstructions(
|
||||||
patternScanResult.endIndex - 9, buildInstructionsString(1)
|
scanResult.patternScanResult!!.endIndex - 9,
|
||||||
|
buildInstructionsString(1)
|
||||||
)
|
)
|
||||||
addInstructions(
|
addInstructions(
|
||||||
implementation!!.instructions.size - 2, buildInstructionsString(0)
|
mutableMethod.implementation!!.instructions.size - 2,
|
||||||
|
buildInstructionsString(0)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the theme based on the preference of the device
|
// set the theme based on the preference of the device
|
||||||
@@ -102,7 +100,8 @@ class SettingsPatch : BytecodePatch(
|
|||||||
|
|
||||||
// initialize the settings
|
// initialize the settings
|
||||||
addInstructions(
|
addInstructions(
|
||||||
1, """
|
1,
|
||||||
|
"""
|
||||||
${buildSettingsActivityInvokeString()}
|
${buildSettingsActivityInvokeString()}
|
||||||
return-void
|
return-void
|
||||||
"""
|
"""
|
||||||
@@ -135,7 +134,8 @@ class SettingsPatch : BytecodePatch(
|
|||||||
fun addPreferenceScreen(preferenceScreen: app.revanced.patches.shared.settings.preference.impl.PreferenceScreen) =
|
fun addPreferenceScreen(preferenceScreen: app.revanced.patches.shared.settings.preference.impl.PreferenceScreen) =
|
||||||
SettingsResourcePatch.addPreferenceScreen(preferenceScreen)
|
SettingsResourcePatch.addPreferenceScreen(preferenceScreen)
|
||||||
|
|
||||||
fun addPreference(preference: Preference) = SettingsResourcePatch.addPreference(preference)
|
fun addPreference(preference: Preference) =
|
||||||
|
SettingsResourcePatch.addPreference(preference)
|
||||||
|
|
||||||
fun renameIntentsTargetPackage(newPackage: String) {
|
fun renameIntentsTargetPackage(newPackage: String) {
|
||||||
SettingsResourcePatch.overrideIntentsTargetPackage = newPackage
|
SettingsResourcePatch.overrideIntentsTargetPackage = newPackage
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.49.37")
|
"com.google.android.youtube", arrayOf("17.45.36")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<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>
|
|
||||||
|
|
||||||
<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>
|
||||||
<string name="revanced_ryd_enable_summary_off">Dislikes are not shown</string>
|
<string name="revanced_ryd_enable_summary_off">Dislikes are not shown</string>
|
||||||
@@ -17,28 +9,4 @@
|
|||||||
|
|
||||||
<string name="revanced_ryd_attribution_title">ReturnYouTubeDislike.com</string>
|
<string name="revanced_ryd_attribution_title">ReturnYouTubeDislike.com</string>
|
||||||
<string name="revanced_ryd_attribution_summary">Dislike data is provided by the Return YouTube Dislike API. Tap here to learn more.</string>
|
<string name="revanced_ryd_attribution_summary">Dislike data is provided by the Return YouTube Dislike API. Tap here to learn more.</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="revanced_ryd_statistics_category_title">ReturnYouTubeDislike API statistics of this device</string>
|
|
||||||
|
|
||||||
<string name="revanced_ryd_statistics_getFetchCallResponseTimeAverage_title">API response time, average</string>
|
|
||||||
<string name="revanced_ryd_statistics_getFetchCallResponseTimeMin_title">API response time, minimum</string>
|
|
||||||
<string name="revanced_ryd_statistics_getFetchCallResponseTimeMax_title">API response time, maximum</string>
|
|
||||||
|
|
||||||
<string name="revanced_ryd_statistics_getFetchCallResponseTimeLast_title">API response time, last video</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_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_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_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_millisecond_text">%d milliseconds</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
Reference in New Issue
Block a user