mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-28 13:11:03 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be02acecfc | ||
|
|
9e873329c6 | ||
|
|
8a2b79ec16 | ||
|
|
9842f7ca0d | ||
|
|
8a913c6a2a | ||
|
|
84676ef33d | ||
|
|
eb985942f0 | ||
|
|
886018d6fb | ||
|
|
e7a17ccbc6 | ||
|
|
c707dc8769 | ||
|
|
1bb93e3598 | ||
|
|
e8848171ac | ||
|
|
249288c8a5 | ||
|
|
1791525b54 | ||
|
|
47fbe3cb25 | ||
|
|
89235ca7fa | ||
|
|
f63abb8eb3 | ||
|
|
b701f86fa1 | ||
|
|
3117ee7ba4 |
50
CHANGELOG.md
50
CHANGELOG.md
@@ -1,3 +1,53 @@
|
|||||||
|
# [2.60.0](https://github.com/revanced/revanced-patches/compare/v2.59.0...v2.60.0) (2022-09-19)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **downloads:** missing package installation request ([bc9e81a](https://github.com/revanced/revanced-patches/commit/bc9e81a6c343a912cab6fe3c2560d759fbf1be8a))
|
||||||
|
|
||||||
|
# [2.59.0](https://github.com/revanced/revanced-patches/compare/v2.58.0...v2.59.0) (2022-09-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **sponsorblock:** string for response error code 400 ([#512](https://github.com/revanced/revanced-patches/issues/512)) ([d42569f](https://github.com/revanced/revanced-patches/commit/d42569fcc4367fa65c5c88ddc75098d4e208f7f3))
|
||||||
|
|
||||||
|
# [2.58.0](https://github.com/revanced/revanced-patches/compare/v2.57.0...v2.58.0) (2022-09-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **hdr-auto-brightness:** increase patching compatibility across versions ([bc5c8c1](https://github.com/revanced/revanced-patches/commit/bc5c8c118d5f95905fb7f0fb6afaf97bdcb753bf))
|
||||||
|
* **hide-create-button:** increase patching compatibility across versions ([b217a1e](https://github.com/revanced/revanced-patches/commit/b217a1e89f4b9e3ad030ece08a1b81e507c7cc02))
|
||||||
|
* **hide-shorts-button:** increase patching compatibility across versions ([7f17934](https://github.com/revanced/revanced-patches/commit/7f1793490f25b9fa16539e80cdc417b3b3e0e639))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* bump patches compatibility to v17.36.37 ([4493d7e](https://github.com/revanced/revanced-patches/commit/4493d7e6c7d76760cf4bc93968bf425b23c994de))
|
||||||
|
|
||||||
|
# [2.57.0](https://github.com/revanced/revanced-patches/compare/v2.56.1...v2.57.0) (2022-09-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **amoled:** remove in favour of `theme` patch ([0032301](https://github.com/revanced/revanced-patches/commit/00323010ed7356a639e4e86916dcbae96a53f7f6))
|
||||||
|
* **theme:** arbitrary background color for dark theme ([afd5502](https://github.com/revanced/revanced-patches/commit/afd5502afdb207d5f52516653869b26fae7e5d21))
|
||||||
|
|
||||||
|
## [2.56.1](https://github.com/revanced/revanced-patches/compare/v2.56.0...v2.56.1) (2022-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* `auto-captions` patch switch description ([#488](https://github.com/revanced/revanced-patches/issues/488)) ([57824fb](https://github.com/revanced/revanced-patches/commit/57824fb16c56889d8f18299e9bab2563bb13e5c2))
|
||||||
|
|
||||||
|
# [2.56.0](https://github.com/revanced/revanced-patches/compare/v2.55.0...v2.56.0) (2022-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **tiktok-download:** custom download path ([#479](https://github.com/revanced/revanced-patches/issues/479)) ([944aa48](https://github.com/revanced/revanced-patches/commit/944aa485cec513faa30a21b91887dcacf9d70b45))
|
||||||
|
|
||||||
# [2.55.0](https://github.com/revanced/revanced-patches/compare/v2.54.1...v2.55.0) (2022-09-15)
|
# [2.55.0](https://github.com/revanced/revanced-patches/compare/v2.54.1...v2.55.0) (2022-09-15)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
55
README.md
55
README.md
@@ -59,7 +59,7 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `tiktok-download` | Remove restrictions on downloads video. | all |
|
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
||||||
| `tiktok-ads` | Removes ads from TikTok. | all |
|
| `tiktok-ads` | Removes ads from TikTok. | all |
|
||||||
</details>
|
</details>
|
||||||
@@ -69,7 +69,7 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `tiktok-download` | Remove restrictions on downloads video. | all |
|
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
| `tiktok-seekbar` | Show progress bar for all video. | all |
|
||||||
| `tiktok-ads` | Removes ads from TikTok. | all |
|
| `tiktok-ads` | Removes ads from TikTok. | all |
|
||||||
</details>
|
</details>
|
||||||
@@ -79,38 +79,37 @@ The official Patch bundle provided by ReVanced and the community.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.33.42 |
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.36.37 |
|
||||||
| `downloads` | Enables downloading music and videos from YouTube. | 17.33.42 |
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.36.37 |
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.33.42 |
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.36.37 |
|
||||||
| `amoled` | Enables pure black theme. | all |
|
|
||||||
| `disable-create-button` | Hides the create button in the navigation bar. | 17.33.42 |
|
|
||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.33.42 |
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.36.37 |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.33.42 |
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.36.37 |
|
||||||
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.36.37 |
|
||||||
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.36.37 |
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
| `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 |
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.33.42 |
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.36.37 |
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.33.42 |
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.36.37 |
|
||||||
| `theme` | Enables a custom theme. | all |
|
| `theme` | Applies a custom theme. | all |
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.33.42 |
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.36.37 |
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.33.42 |
|
| `sponsorblock` | Integrate SponsorBlock. | 17.36.37 |
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.33.42 |
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.36.37 |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.33.42 |
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.36.37 |
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.33.42 |
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.36.37 |
|
||||||
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.33.42 |
|
| `minimized-playback` | Enables minimized and background playback. | 17.36.37 |
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.33.42 |
|
|
||||||
| `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 |
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.33.42 |
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.36.37 |
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.33.42 |
|
| `always-autorepeat` | Always repeats the playing video again. | 17.36.37 |
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.33.42 |
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.36.37 |
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
||||||
| `custom-playback-speed` | Adds more video playback speed options. | 17.33.42 |
|
| `custom-playback-speed` | Adds more video playback speed options. | 17.36.37 |
|
||||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.33.42 |
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.36.37 |
|
||||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.33.42 |
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.36.37 |
|
||||||
| `video-ads` | Removes ads in the video player. | 17.33.42 |
|
| `video-ads` | Removes ads in the video player. | 17.36.37 |
|
||||||
| `general-ads` | Removes general ads. | 17.33.42 |
|
| `general-ads` | Removes general ads. | 17.36.37 |
|
||||||
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.33.42 |
|
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.36.37 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.vanced.android.youtube`
|
### 📦 `com.vanced.android.youtube`
|
||||||
|
|||||||
@@ -20,9 +20,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:4.2.3")
|
implementation("app.revanced:revanced-patcher:4.4.2")
|
||||||
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.9.1")
|
implementation("com.google.code.gson:gson:2.9.1")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.55.0
|
version = 2.60.0
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.patches.tiktok.interaction.downloads.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
@Name("download-path-parent-fingerprint")
|
||||||
|
@MatchingMethod("LX/4bF;", "LIZ")
|
||||||
|
@DownloadsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object DownloadPathParentFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
strings = listOf(
|
||||||
|
"code",
|
||||||
|
"reason",
|
||||||
|
"params insufficient"
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -4,24 +4,34 @@ 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.impl.BytecodeData
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.data.impl.toMethodWalker
|
||||||
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.extensions.replaceInstructions
|
import app.revanced.patcher.extensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.*
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
import app.revanced.patches.tiktok.interaction.downloads.annotations.DownloadsCompatibility
|
||||||
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.*
|
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint
|
||||||
|
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2
|
||||||
|
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3
|
||||||
|
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import org.jf.dexlib2.iface.reference.StringReference
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("tiktok-download")
|
@Name("tiktok-download")
|
||||||
@Description("Remove restrictions on downloads video.")
|
@Description("Removes download restrictions and changes the default path to download to.")
|
||||||
@DownloadsCompatibility
|
@DownloadsCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class DownloadsPatch : BytecodePatch(
|
class DownloadsPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
ACLCommonShareFingerprint,
|
ACLCommonShareFingerprint,
|
||||||
ACLCommonShareFingerprint2,
|
ACLCommonShareFingerprint2,
|
||||||
ACLCommonShareFingerprint3
|
ACLCommonShareFingerprint3,
|
||||||
|
DownloadPathParentFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
@@ -50,7 +60,76 @@ class DownloadsPatch : BytecodePatch(
|
|||||||
return v0
|
return v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
//Change the download path patch
|
||||||
|
val method4 = DownloadPathParentFingerprint.result!!.mutableMethod
|
||||||
|
val implementation4 = method4.implementation
|
||||||
|
val instructions = implementation4!!.instructions
|
||||||
|
var targetOffset = -1
|
||||||
|
//Search for the target method called instruction offset.
|
||||||
|
for ((index, instruction) in instructions.withIndex()) {
|
||||||
|
if (instruction.opcode != Opcode.CONST_STRING) continue
|
||||||
|
val reference = (instruction as ReferenceInstruction).reference as StringReference
|
||||||
|
if (reference.string != "video/mp4") continue
|
||||||
|
val targetInstruction = instructions[index + 1]
|
||||||
|
if (targetInstruction.opcode != Opcode.INVOKE_STATIC) continue
|
||||||
|
targetOffset = index + 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (targetOffset == -1) return PatchResultError("Can not find download path uri method.")
|
||||||
|
//Change videos' download path.
|
||||||
|
val downloadPath = "$downloadPathParent/$downloadPathChild"
|
||||||
|
val downloadUriMethod = data
|
||||||
|
.toMethodWalker(DownloadPathParentFingerprint.result!!.method)
|
||||||
|
.nextMethod(targetOffset, true)
|
||||||
|
.getMethod() as MutableMethod
|
||||||
|
downloadUriMethod.implementation!!.instructions.forEachIndexed { index, instruction ->
|
||||||
|
if (instruction.opcode == Opcode.SGET_OBJECT) {
|
||||||
|
val overrideRegister = (instruction as OneRegisterInstruction).registerA
|
||||||
|
downloadUriMethod.replaceInstruction(
|
||||||
|
index,
|
||||||
|
"""
|
||||||
|
const-string v$overrideRegister, "$downloadPath"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (instruction.opcode == Opcode.CONST_STRING) {
|
||||||
|
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
||||||
|
if (string.contains("/Camera")) {
|
||||||
|
val overrideRegister = (instruction as OneRegisterInstruction).registerA
|
||||||
|
val overrideString = string.replace("/Camera", "")
|
||||||
|
downloadUriMethod.replaceInstruction(
|
||||||
|
index,
|
||||||
|
"""
|
||||||
|
const-string v$overrideRegister, "$overrideString"
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object : OptionsContainer() {
|
||||||
|
private var downloadPathParent: String? by option(
|
||||||
|
PatchOption.StringListOption(
|
||||||
|
key = "mediaFolder",
|
||||||
|
default = "DCIM",
|
||||||
|
options = listOf(
|
||||||
|
"DCIM", "Movies", "Pictures"
|
||||||
|
),
|
||||||
|
title = "Media folder",
|
||||||
|
description = "The media root folder to download to.",
|
||||||
|
required = true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
private var downloadPathChild: String? by option(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
key = "downloadPath",
|
||||||
|
default = "TikTok",
|
||||||
|
title = "Download path",
|
||||||
|
description = "Download path relative to the media folder.",
|
||||||
|
required = true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.27.39", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.27.39", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.amoled.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.google.android.youtube")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
|
||||||
internal annotation class AmoledCompatibility
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.amoled.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.PatchDeprecated
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.impl.ResourceData
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
|
||||||
import app.revanced.patches.youtube.layout.amoled.annotations.AmoledCompatibility
|
|
||||||
import app.revanced.patches.youtube.layout.theme.patch.ThemePatch
|
|
||||||
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@DependsOn([FixLocaleConfigErrorPatch::class])
|
|
||||||
@Name("amoled")
|
|
||||||
@Description("Enables pure black theme.")
|
|
||||||
@AmoledCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
@PatchDeprecated("Theme patch already includes the Amoled theme.", ThemePatch::class)
|
|
||||||
class AmoledPatch : ResourcePatch() {
|
|
||||||
override fun execute(data: ResourceData): PatchResult {
|
|
||||||
ThemePatch.theme = ThemePatch.Themes.Amoled.name
|
|
||||||
return ThemePatch().execute(data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ class AutoCaptionsPatch : BytecodePatch(
|
|||||||
"revanced_autocaptions_enabled",
|
"revanced_autocaptions_enabled",
|
||||||
StringResource("revanced_autocaptions_enabled_title", "Disable auto-captions"),
|
StringResource("revanced_autocaptions_enabled_title", "Disable auto-captions"),
|
||||||
false,
|
false,
|
||||||
StringResource("revanced_autocaptions_summary_on", "Auto-captions are enabled"),
|
StringResource("revanced_autocaptions_summary_on", "Auto-captions are disabled"),
|
||||||
StringResource("revanced_autocaptions_summary_off", "Auto-captions are disabled")
|
StringResource("revanced_autocaptions_summary_off", "Auto-captions are enabled")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -77,4 +77,4 @@ class AutoCaptionsPatch : BytecodePatch(
|
|||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.createbutton.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patches.youtube.layout.createbutton.annotations.CreateButtonCompatibility
|
|
||||||
import app.revanced.patches.youtube.layout.createbutton.fingerprints.CreateButtonFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@DependsOn([IntegrationsPatch::class, ResourceIdMappingProviderResourcePatch::class, SettingsPatch::class])
|
|
||||||
@Name("disable-create-button")
|
|
||||||
@Description("Hides the create button in the navigation bar.")
|
|
||||||
@CreateButtonCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class CreateButtonRemoverPatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
CreateButtonFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_create_button_enabled",
|
|
||||||
StringResource("revanced_create_button_enabled_title", "Show create button"),
|
|
||||||
false,
|
|
||||||
StringResource("revanced_create_button_summary_on", "Create button is shown"),
|
|
||||||
StringResource("revanced_create_button_summary_off", "Create button is hidden")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
val result = CreateButtonFingerprint.result!!
|
|
||||||
|
|
||||||
// Get the required register which holds the view object we need to pass to the method hideCreateButton
|
|
||||||
val implementation = result.mutableMethod.implementation!!
|
|
||||||
|
|
||||||
val imageOnlyLayout =
|
|
||||||
ResourceIdMappingProviderResourcePatch.resourceMappings.single { it.type == "layout" && it.name == "image_only_tab" }
|
|
||||||
|
|
||||||
val imageOnlyLayoutConstIndex =
|
|
||||||
implementation.instructions.indexOfFirst { (it as? WideLiteralInstruction)?.wideLiteral == imageOnlyLayout.id }
|
|
||||||
|
|
||||||
val (instructionIndex, instruction) = implementation.instructions.drop(imageOnlyLayoutConstIndex).withIndex()
|
|
||||||
.first {
|
|
||||||
(((it.value as? ReferenceInstruction)?.reference) as? MethodReference)?.definingClass?.contains("PivotBar")
|
|
||||||
?: false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (instruction.opcode != Opcode.INVOKE_VIRTUAL) return PatchResultError("Could not find the correct instruction")
|
|
||||||
|
|
||||||
val moveResultIndex = imageOnlyLayoutConstIndex + instructionIndex + 1
|
|
||||||
val moveResultInstruction = implementation.instructions[moveResultIndex] as OneRegisterInstruction
|
|
||||||
|
|
||||||
// Hide the button view via proxy by passing it to the hideCreateButton method
|
|
||||||
result.mutableMethod.addInstruction(
|
|
||||||
moveResultIndex + 1,
|
|
||||||
"invoke-static { v${moveResultInstruction.registerA} }, Lapp/revanced/integrations/patches/HideCreateButtonPatch;->hideCreateButton(Landroid/view/View;)V"
|
|
||||||
)
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.annotations.ShortsButtonCompatibility
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("fullscreen-view-adder-fingerprint")
|
@Name("fullscreen-view-adder-fingerprint")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Version
|
|||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.annotations.ShortsButtonCompatibility
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("fullscreen-view-adder-parent-fingerprint")
|
@Name("fullscreen-view-adder-parent-fingerprint")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.layout.createbutton.annotations
|
package app.revanced.patches.youtube.layout.pivotbar.createbutton.annotations
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Package
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.pivotbar.createbutton.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.createbutton.annotations.CreateButtonCompatibility
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("pivot-bar-create-button-view-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lknw", "z"
|
||||||
|
)
|
||||||
|
@CreateButtonCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object PivotBarCreateButtonViewFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_DIRECT_RANGE, // unique instruction anchor
|
||||||
|
Opcode.CONST_4,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.INVOKE_STATIC
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.pivotbar.createbutton.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
|
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.injectHook
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.createbutton.annotations.CreateButtonCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.createbutton.fingerprints.PivotBarCreateButtonViewFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.fingerprints.PivotBarFingerprint
|
||||||
|
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.mapping.patch.ResourceIdMappingProviderResourcePatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, ResourceIdMappingProviderResourcePatch::class, SettingsPatch::class])
|
||||||
|
@Name("hide-create-button")
|
||||||
|
@Description("Hides the create button in the navigation bar.")
|
||||||
|
@CreateButtonCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class CreateButtonRemoverPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
PivotBarFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_create_button_enabled",
|
||||||
|
StringResource("revanced_create_button_enabled_title", "Show create button"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_create_button_summary_on", "Create button is shown"),
|
||||||
|
StringResource("revanced_create_button_summary_off", "Create button is hidden")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolve fingerprints
|
||||||
|
*/
|
||||||
|
|
||||||
|
val pivotBarResult = PivotBarFingerprint.result ?: return PatchResultError("PivotBarFingerprint failed")
|
||||||
|
|
||||||
|
if (!PivotBarCreateButtonViewFingerprint.resolve(data, pivotBarResult.method, pivotBarResult.classDef))
|
||||||
|
return PatchResultError("${PivotBarCreateButtonViewFingerprint.name} failed")
|
||||||
|
|
||||||
|
val createButtonResult = PivotBarCreateButtonViewFingerprint.result!!
|
||||||
|
val insertIndex = createButtonResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Inject hooks
|
||||||
|
*/
|
||||||
|
|
||||||
|
val integrationsClass = "Lapp/revanced/integrations/patches/HideCreateButtonPatch;"
|
||||||
|
val hook =
|
||||||
|
"invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, $integrationsClass->hideCreateButton(Landroid/view/View;)V"
|
||||||
|
|
||||||
|
createButtonResult.mutableMethod.injectHook(hook, insertIndex)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
package app.revanced.patches.youtube.layout.createbutton.fingerprints
|
package app.revanced.patches.youtube.layout.pivotbar.fingerprints
|
||||||
|
|
||||||
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.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
import app.revanced.patches.youtube.layout.createbutton.annotations.CreateButtonCompatibility
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("create-button-fingerprint")
|
@Name("pivot-bar-fingerprint")
|
||||||
@MatchingMethod(
|
@MatchingMethod(
|
||||||
"Lknw", "z"
|
"Lknw", "z"
|
||||||
)
|
)
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2)
|
||||||
@CreateButtonCompatibility
|
// TODO: This fingerprint is used in multiple patches, so technically two compatibilities are needed
|
||||||
|
// @CreateButtonCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object CreateButtonFingerprint : MethodFingerprint(
|
object PivotBarFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf("Z"),
|
listOf("Z"),
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.youtube.layout.shorts.button.annotations
|
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.annotations
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Package
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.annotations.ShortsButtonCompatibility
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("pivot-bar-enum-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lknw", "z"
|
||||||
|
)
|
||||||
|
@ShortsButtonCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object PivotBarEnumFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.IF_NEZ,
|
||||||
|
Opcode.SGET_OBJECT,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IGET,
|
||||||
|
Opcode.AND_INT_LIT8, // unique instruction anchor
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.annotations.ShortsButtonCompatibility
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("pivot-bar-shorts-button-view-fingerprint")
|
||||||
|
@MatchingMethod(
|
||||||
|
"Lknw", "z"
|
||||||
|
)
|
||||||
|
@ShortsButtonCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object PivotBarShortsButtonViewFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_VIRTUAL_RANGE, // unique instruction anchor
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.GOTO,
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.pivotbar.shortsbutton.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.impl.BytecodeData
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
|
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.REGISTER_TEMPLATE_REPLACEMENT
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.utils.InjectionUtils.injectHook
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.fingerprints.PivotBarFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.annotations.ShortsButtonCompatibility
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints.PivotBarEnumFingerprint
|
||||||
|
import app.revanced.patches.youtube.layout.pivotbar.shortsbutton.fingerprints.PivotBarShortsButtonViewFingerprint
|
||||||
|
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.framework.components.impl.StringResource
|
||||||
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
|
@Name("hide-shorts-button")
|
||||||
|
@Description("Hides the shorts button on the navigation bar.")
|
||||||
|
@ShortsButtonCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class ShortsButtonRemoverPatch : BytecodePatch(
|
||||||
|
listOf(PivotBarFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
|
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||||
|
SwitchPreference(
|
||||||
|
"revanced_shorts_button_enabled",
|
||||||
|
StringResource("revanced_shorts_button_enabled_title", "Show shorts button"),
|
||||||
|
false,
|
||||||
|
StringResource("revanced_shorts_button_summary_on", "Shorts button is shown"),
|
||||||
|
StringResource("revanced_shorts_button_summary_off", "Shorts button is hidden")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Resolve fingerprints
|
||||||
|
*/
|
||||||
|
|
||||||
|
val pivotBarResult = PivotBarFingerprint.result ?: return PatchResultError("PivotBarFingerprint failed")
|
||||||
|
val fingerprintResults = arrayOf(PivotBarEnumFingerprint, PivotBarShortsButtonViewFingerprint)
|
||||||
|
.onEach {
|
||||||
|
val resolutionSucceeded = it.resolve(
|
||||||
|
data,
|
||||||
|
pivotBarResult.method,
|
||||||
|
pivotBarResult.classDef
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!resolutionSucceeded) return PatchResultError("${it.name} failed")
|
||||||
|
}
|
||||||
|
.map { it.result!!.patternScanResult!! }
|
||||||
|
|
||||||
|
val enumScanResult = fingerprintResults[0]
|
||||||
|
val buttonViewResult = fingerprintResults[1]
|
||||||
|
|
||||||
|
val enumHookInsertIndex = enumScanResult.startIndex
|
||||||
|
val buttonHookInsertIndex = buttonViewResult.endIndex
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Inject hooks
|
||||||
|
*/
|
||||||
|
|
||||||
|
val integrationsClass = "Lapp/revanced/integrations/patches/HideShortsButtonPatch;"
|
||||||
|
|
||||||
|
val enumHook =
|
||||||
|
"sput-object v$REGISTER_TEMPLATE_REPLACEMENT, $integrationsClass->lastPivotTab:Ljava/lang/Enum;"
|
||||||
|
val buttonHook =
|
||||||
|
"invoke-static { v$REGISTER_TEMPLATE_REPLACEMENT }, $integrationsClass->hideShortsButton(Landroid/view/View;)V"
|
||||||
|
|
||||||
|
// Inject bottom to top to not mess up the indices
|
||||||
|
mapOf(
|
||||||
|
buttonHook to buttonHookInsertIndex,
|
||||||
|
enumHook to enumHookInsertIndex
|
||||||
|
).forEach { (hook, insertIndex) ->
|
||||||
|
pivotBarResult.mutableMethod.injectHook(hook, insertIndex)
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package app.revanced.patches.youtube.layout.pivotbar.utils
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
|
import org.jf.dexlib2.Opcode.MOVE_RESULT_OBJECT
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
internal object InjectionUtils {
|
||||||
|
const val REGISTER_TEMPLATE_REPLACEMENT: String = "REGISTER_INDEX"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injects an instruction into insertIndex of the hook.
|
||||||
|
* @param hook The hook to insert.
|
||||||
|
* @param insertIndex The index to insert the instruction at.
|
||||||
|
* [MOVE_RESULT_OBJECT] has to be the previous instruction before [insertIndex].
|
||||||
|
*/
|
||||||
|
fun MutableMethod.injectHook(hook: String, insertIndex: Int) {
|
||||||
|
val injectTarget = this
|
||||||
|
|
||||||
|
// Register to pass to the hook
|
||||||
|
val registerIndex = insertIndex - 1 // MOVE_RESULT_OBJECT is always the previous instruction
|
||||||
|
val register = (injectTarget.instruction(registerIndex) as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
|
injectTarget.addInstruction(
|
||||||
|
insertIndex,
|
||||||
|
hook.replace("REGISTER_INDEX", register.toString()),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.14.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.shorts.button.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
@Name("pivotbar-buttons-tabenum-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lknw;", "z"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
|
||||||
@ShortsButtonCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PivotBarButtonTabEnumFingerprint : MethodFingerprint(
|
|
||||||
"V",
|
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
listOf("Z"),
|
|
||||||
listOf(
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IGET,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.IF_NEZ,
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.CHECK_CAST,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.shorts.button.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
@Name("pivotbar-buttons-view-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lknw;", "z"
|
|
||||||
)
|
|
||||||
@ShortsButtonCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PivotBarButtonsViewFingerprint : MethodFingerprint(
|
|
||||||
"V",
|
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
listOf("Z"),
|
|
||||||
listOf(
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IGET,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.IF_NEZ,
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.INVOKE_INTERFACE,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.IGET
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.layout.shorts.button.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.annotations.ShortsButtonCompatibility
|
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.fingerprints.PivotBarButtonTabEnumFingerprint
|
|
||||||
import app.revanced.patches.youtube.layout.shorts.button.fingerprints.PivotBarButtonsViewFingerprint
|
|
||||||
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.framework.components.impl.StringResource
|
|
||||||
import app.revanced.patches.youtube.misc.settings.framework.components.impl.SwitchPreference
|
|
||||||
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
|
||||||
@Name("hide-shorts-button")
|
|
||||||
@Description("Hides the shorts button on the navigation bar.")
|
|
||||||
@ShortsButtonCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
class ShortsButtonRemoverPatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
PivotBarButtonTabEnumFingerprint, PivotBarButtonsViewFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
|
||||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
|
||||||
SwitchPreference(
|
|
||||||
"revanced_shorts_button_enabled",
|
|
||||||
StringResource("revanced_shorts_button_enabled_title", "Show shorts button"),
|
|
||||||
false,
|
|
||||||
StringResource("revanced_shorts_button_summary_on", "Shorts button is shown"),
|
|
||||||
StringResource("revanced_shorts_button_summary_off", "Shorts button is hidden")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
val tabEnumResult = PivotBarButtonTabEnumFingerprint.result!!
|
|
||||||
val tabEnumImplementation = tabEnumResult.mutableMethod.implementation!!
|
|
||||||
val scanResultEndIndex = tabEnumResult.patternScanResult!!.endIndex
|
|
||||||
val tabEnumIndex = scanResultEndIndex +
|
|
||||||
if (tabEnumImplementation.instructions[scanResultEndIndex + 1].opcode == Opcode.IGET_OBJECT) {
|
|
||||||
// for 17.31.xx and lower
|
|
||||||
7
|
|
||||||
} else {
|
|
||||||
// since 17.32.xx
|
|
||||||
10
|
|
||||||
}
|
|
||||||
val moveEnumInstruction = tabEnumImplementation.instructions[tabEnumIndex]
|
|
||||||
val enumRegister = (moveEnumInstruction as OneRegisterInstruction).registerA
|
|
||||||
|
|
||||||
val buttonsViewResult = PivotBarButtonsViewFingerprint.result!!
|
|
||||||
val buttonsViewImplementation = buttonsViewResult.mutableMethod.implementation!!
|
|
||||||
val scanResultStartIndex = buttonsViewResult.patternScanResult!!.startIndex
|
|
||||||
val buttonsViewIndex = scanResultStartIndex +
|
|
||||||
if (buttonsViewImplementation.instructions[scanResultStartIndex - 1].opcode == Opcode.GOTO) {
|
|
||||||
// since 17.32.xx
|
|
||||||
-7
|
|
||||||
} else {
|
|
||||||
// for 17.31.xx and lower
|
|
||||||
-3
|
|
||||||
}
|
|
||||||
val moveViewInstruction = buttonsViewImplementation.instructions[buttonsViewIndex - 1]
|
|
||||||
val viewRegister = (moveViewInstruction as OneRegisterInstruction).registerA
|
|
||||||
|
|
||||||
|
|
||||||
// Save the tab enum in XGlobals to avoid smali/register workarounds
|
|
||||||
tabEnumResult.mutableMethod.addInstruction(
|
|
||||||
tabEnumIndex,
|
|
||||||
"sput-object v$enumRegister, Lapp/revanced/integrations/patches/HideShortsButtonPatch;->lastPivotTab:Ljava/lang/Enum;"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Hide the button view via proxy by passing it to the hideShortsButton method
|
|
||||||
// It only hides it if the last tab name is "TAB_SHORTS"
|
|
||||||
buttonsViewResult.mutableMethod.addInstruction(
|
|
||||||
buttonsViewIndex + 1,
|
|
||||||
"invoke-static { v$viewRegister }, Lapp/revanced/integrations/patches/HideShortsButtonPatch;->hideShortsButton(Landroid/view/View;)V"
|
|
||||||
)
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.26.35", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.26.35", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ 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.impl.ResourceData
|
import app.revanced.patcher.data.impl.ResourceData
|
||||||
import app.revanced.patcher.patch.*
|
import app.revanced.patcher.patch.OptionsContainer
|
||||||
|
import app.revanced.patcher.patch.PatchOption
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
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.patch.impl.ResourcePatch
|
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||||
@@ -15,19 +18,24 @@ import org.w3c.dom.Element
|
|||||||
@Patch
|
@Patch
|
||||||
@DependsOn([FixLocaleConfigErrorPatch::class])
|
@DependsOn([FixLocaleConfigErrorPatch::class])
|
||||||
@Name("theme")
|
@Name("theme")
|
||||||
@Description("Enables a custom theme.")
|
@Description("Applies a custom theme.")
|
||||||
@ThemeCompatibility
|
@ThemeCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class ThemePatch : ResourcePatch() {
|
class ThemePatch : ResourcePatch() {
|
||||||
override fun execute(data: ResourceData): PatchResult {
|
override fun execute(data: ResourceData): PatchResult {
|
||||||
val theme = Themes.of(theme!!) ?: return PatchResultError("Theme '$theme' not found.")
|
val backgroundColor = backgroundColor!!
|
||||||
|
|
||||||
data.xmlEditor["res/values/colors.xml"].use { editor ->
|
data.xmlEditor["res/values/colors.xml"].use { editor ->
|
||||||
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element
|
||||||
|
|
||||||
for (i in 0 until resourcesNode.childNodes.length) {
|
for (i in 0 until resourcesNode.childNodes.length) {
|
||||||
val node = resourcesNode.childNodes.item(i) as? Element ?: continue
|
val node = resourcesNode.childNodes.item(i) as? Element ?: continue
|
||||||
node.textContent = theme.apply(node.getAttribute("name")) ?: continue
|
|
||||||
|
node.textContent = when (node.getAttribute("name")) {
|
||||||
|
"yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4",
|
||||||
|
"yt_status_bar_background_dark" -> backgroundColor
|
||||||
|
else -> continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,33 +43,13 @@ class ThemePatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object : OptionsContainer() {
|
companion object : OptionsContainer() {
|
||||||
var theme: String? by option(
|
var backgroundColor: String? by option(
|
||||||
PatchOption.StringListOption(
|
PatchOption.StringOption(
|
||||||
key = "theme",
|
key = "darkThemeBackgroundColor",
|
||||||
default = Themes.Amoled.name,
|
default = "@android:color/black",
|
||||||
options = Themes.names,
|
title = "Background color for the dark theme",
|
||||||
title = "Theme",
|
description = "The background color of the dark theme. Can be a hex color or a resource reference.",
|
||||||
description = "Select a theme.",
|
|
||||||
required = true
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class Themes(val apply: (String) -> String?) {
|
|
||||||
Amoled({ attr ->
|
|
||||||
when (attr) {
|
|
||||||
"yt_black1", "yt_black1_opacity95", "yt_black2", "yt_black3", "yt_black4",
|
|
||||||
"yt_status_bar_background_dark" -> "@android:color/black"
|
|
||||||
|
|
||||||
"yt_selected_nav_label_dark" -> "#ffdf0000"
|
|
||||||
else -> null
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
val names = values().map { it.name }
|
|
||||||
|
|
||||||
fun of(name: String) = values().firstOrNull { it.name == name }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -2,30 +2,17 @@ package app.revanced.patches.youtube.misc.hdrbrightness.fingerprints
|
|||||||
|
|
||||||
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.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility
|
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
|
|
||||||
@Name("hdr-brightness-fingerprint-xxz")
|
@Name("hdr-brightness-fingerprint")
|
||||||
@MatchingMethod(
|
@MatchingMethod(
|
||||||
"Lyjk;", "D"
|
"Lyls;", "c"
|
||||||
)
|
)
|
||||||
@FuzzyPatternScanMethod(3)
|
|
||||||
@HDRBrightnessCompatibility
|
@HDRBrightnessCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
object HDRBrightnessFingerprintYJK : MethodFingerprint(
|
object HDRBrightnessFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
opcodes = listOf(
|
strings = listOf("c.SettingNotFound;", "screen_brightness", "android.mediaview", "lux"),
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.IGET,
|
|
||||||
Opcode.IPUT,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL
|
|
||||||
),
|
|
||||||
strings = listOf("c.SettingNotFound;", "screen_brightness", "android.mediaview"),
|
|
||||||
)
|
)
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
package app.revanced.patches.youtube.misc.hdrbrightness.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import org.jf.dexlib2.iface.reference.FieldReference
|
|
||||||
|
|
||||||
@Name("hdr-brightness-fingerprint-xxz")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lyel;", "G"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(3)
|
|
||||||
@HDRBrightnessCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object HDRBrightnessFingerprintYEL : MethodFingerprint(
|
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
listOf("I", "I", "I", "I"),
|
|
||||||
listOf(
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.IGET,
|
|
||||||
Opcode.IPUT,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL
|
|
||||||
),
|
|
||||||
customFingerprint = { methodDef ->
|
|
||||||
methodDef.implementation!!.instructions.any {
|
|
||||||
((it as? ReferenceInstruction)?.reference as? FieldReference)?.let { field ->
|
|
||||||
// iput vx, vy, Landroid/view/WindowManager$LayoutParams;->screenBrightness:F
|
|
||||||
field.definingClass == "Landroid/view/WindowManager\$LayoutParams;" && field.name == "screenBrightness"
|
|
||||||
} == true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -11,8 +11,7 @@ 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.patch.impl.BytecodePatch
|
import app.revanced.patcher.patch.impl.BytecodePatch
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility
|
import app.revanced.patches.youtube.misc.hdrbrightness.annotations.HDRBrightnessCompatibility
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.fingerprints.HDRBrightnessFingerprintYEL
|
import app.revanced.patches.youtube.misc.hdrbrightness.fingerprints.HDRBrightnessFingerprint
|
||||||
import app.revanced.patches.youtube.misc.hdrbrightness.fingerprints.HDRBrightnessFingerprintYJK
|
|
||||||
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.youtube.misc.settings.framework.components.impl.StringResource
|
import app.revanced.patches.youtube.misc.settings.framework.components.impl.StringResource
|
||||||
@@ -28,10 +27,7 @@ import org.jf.dexlib2.iface.reference.FieldReference
|
|||||||
@Version("0.0.2")
|
@Version("0.0.2")
|
||||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||||
class HDRBrightnessPatch : BytecodePatch(
|
class HDRBrightnessPatch : BytecodePatch(
|
||||||
listOf(
|
listOf(HDRBrightnessFingerprint)
|
||||||
HDRBrightnessFingerprintYEL,
|
|
||||||
HDRBrightnessFingerprintYJK
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(data: BytecodeData): PatchResult {
|
||||||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||||
@@ -44,32 +40,25 @@ class HDRBrightnessPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
val result = try {
|
val method = HDRBrightnessFingerprint.result!!.mutableMethod
|
||||||
HDRBrightnessFingerprintYEL.result!!
|
|
||||||
} catch (e: Exception) {
|
|
||||||
HDRBrightnessFingerprintYJK.result!!
|
|
||||||
}
|
|
||||||
|
|
||||||
val method = result.mutableMethod
|
method.implementation!!.instructions.filter { instruction ->
|
||||||
|
val fieldReference = (instruction as? ReferenceInstruction)?.reference as? FieldReference
|
||||||
method.implementation!!.instructions.filter {
|
fieldReference?.let { it.name == "screenBrightness" } == true
|
||||||
((it as? ReferenceInstruction)?.reference as? FieldReference)?.let { field ->
|
|
||||||
// iput vx, vy, Landroid/view/WindowManager$LayoutParams;->screenBrightness:F
|
|
||||||
field.definingClass == "Landroid/view/WindowManager\$LayoutParams;" && field.name == "screenBrightness"
|
|
||||||
} == true
|
|
||||||
}.forEach { instruction ->
|
}.forEach { instruction ->
|
||||||
// inject right before the call that sets 'screenBrightness'
|
val brightnessRegisterIndex = method.implementation!!.instructions.indexOf(instruction)
|
||||||
val index = method.implementation!!.instructions.indexOf(instruction)
|
|
||||||
val register = (instruction as TwoRegisterInstruction).registerA
|
val register = (instruction as TwoRegisterInstruction).registerA
|
||||||
|
|
||||||
// inject the call to
|
val insertIndex = brightnessRegisterIndex + 1
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
index, """
|
insertIndex,
|
||||||
invoke-static {v$register}, Lapp/revanced/integrations/patches/HDRAutoBrightnessPatch;->getHDRBrightness(F)F
|
"""
|
||||||
move-result v$register
|
invoke-static {v$register}, Lapp/revanced/integrations/patches/HDRAutoBrightnessPatch;->getHDRBrightness(F)F
|
||||||
"""
|
move-result v$register
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.03.38", "17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.17.34", "17.19.36", "17.20.37", "17.22.36", "17.23.35", "17.23.36", "17.24.34", "17.24.35", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.27.39", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.27.39", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.24.34", "17.25.34", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.22.36", "17.24.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.22.36", "17.24.35", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.25.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.25.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@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.14.35", "17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42")
|
"com.google.android.youtube", arrayOf("17.14.35", "17.22.36", "17.26.35", "17.27.39", "17.28.34", "17.29.34", "17.32.35", "17.33.42", "17.36.37")
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="downloader_not_installed_warning">is not installed</string>
|
<string name="downloader_not_installed_warning">is not installed. Please install it.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<string name="about_madeby">Integration made by JakubWeg, recoded by oSumAtrIX</string>
|
<string name="about_madeby">Integration made by JakubWeg, recoded by oSumAtrIX</string>
|
||||||
<string name="tap_skip">Tap to skip</string>
|
<string name="tap_skip">Tap to skip</string>
|
||||||
|
|
||||||
|
<string name="submit_failed_invalid">Can\'t submit the segment: %s</string>
|
||||||
<string name="submit_failed_unknown_error" formatted="false">Unable to submit segments: Status: %d %s</string>
|
<string name="submit_failed_unknown_error" formatted="false">Unable to submit segments: Status: %d %s</string>
|
||||||
<string name="submit_failed_rate_limit">Can\'t submit the segment.\nRate Limited (Too many from the same user or IP)</string>
|
<string name="submit_failed_rate_limit">Can\'t submit the segment.\nRate Limited (Too many from the same user or IP)</string>
|
||||||
<string name="submit_failed_forbidden" formatted="false">Can\'t submit the segment.\n\n%s</string>
|
<string name="submit_failed_forbidden" formatted="false">Can\'t submit the segment.\n\n%s</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user