Skip to content

Commit

Permalink
Merge branch 'dev' into revanced-extended
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Sep 28, 2024
2 parents c57de97 + 191fd6d commit b725e54
Show file tree
Hide file tree
Showing 363 changed files with 38,654 additions and 15,719 deletions.
82 changes: 42 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ ReVanced Extended Patches.
| `Hide layout components` | Adds options to hide general layout components. | 18.29.38 ~ 19.16.39 |
| `Hide player buttons` | Adds options to hide buttons in the video player. | 18.29.38 ~ 19.16.39 |
| `Hide player flyout menu` | Adds options to hide player flyout menu components. | 18.29.38 ~ 19.16.39 |
| `Hide shortcuts` | Remove, at compile time, the app shortcuts that appears when app icon is long pressed. | 18.29.38 ~ 19.16.39 |
| `Hook YouTube Music actions` | Adds support for opening music in RVX Music using the in-app YouTube Music button. | 18.29.38 ~ 19.16.39 |
| `Hook download actions` | Adds support to download videos with an external downloader app using the in-app download button. | 18.29.38 ~ 19.16.39 |
| `Layout switch` | Adds an option to spoof the dpi in order to use a tablet or phone layout. | 18.29.38 ~ 19.16.39 |
| `MaterialYou` | Applies the MaterialYou theme for Android 12+ devices. | 18.29.38 ~ 19.16.39 |
Expand All @@ -66,7 +68,7 @@ ReVanced Extended Patches.
| `Toolbar components` | Adds options to hide or change components located on the toolbar, such as toolbar buttons, search bar, and header. | 18.29.38 ~ 19.16.39 |
| `Translations for YouTube` | Add translations or remove string resources. | 18.29.38 ~ 19.16.39 |
| `Video playback` | Adds options to customize settings related to video playback, such as default video quality and playback speed. | 18.29.38 ~ 19.16.39 |
| `Visual preferences icons` | Adds icons to specific preferences in the settings. | 18.29.38 ~ 19.16.39 |
| `Visual preferences icons for YouTube` | Adds icons to specific preferences in the settings. | 18.29.38 ~ 19.16.39 |
| `Watch history` | Adds an option to change the domain of the watch history or check its status. | 18.29.38 ~ 19.16.39 |
</details>

Expand All @@ -75,41 +77,42 @@ ReVanced Extended Patches.

| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `Amoled` | Applies a pure black theme to some components. | 6.29.58 ~ 7.17.51 |
| `Bitrate default value` | Sets the audio quality to 'Always High' when you first install the app. | 6.29.58 ~ 7.17.51 |
| `Bypass image region restrictions` | Adds an option to use a different host for static images, so that images blocked in some countries can be received. | 6.29.58 ~ 7.17.51 |
| `Certificate spoof` | Enables YouTube Music to work with Android Auto by spoofing the YouTube Music certificate. | 6.29.58 ~ 7.17.51 |
| `Change share sheet` | Add option to change from in-app share sheet to system share sheet. | 6.29.58 ~ 7.17.51 |
| `Change start page` | Adds an option to set which page the app opens in instead of the homepage. | 6.29.58 ~ 7.17.51 |
| `Custom branding icon for YouTube Music` | Changes the YouTube Music app icon to the icon specified in options.json. | 6.29.58 ~ 7.17.51 |
| `Custom branding name for YouTube Music` | Renames the YouTube Music app to the name specified in options.json. | 6.29.58 ~ 7.17.51 |
| `Custom header for YouTube Music` | Applies a custom header in the top left corner within the app. | 6.29.58 ~ 7.17.51 |
| `Disable Cairo splash animation` | Adds an option to disable Cairo splash animation. | 7.06.54 ~ 7.17.51 |
| `Disable auto captions` | Adds an option to disable captions from being automatically enabled. | 6.29.58 ~ 7.17.51 |
| `Disable dislike redirection` | Adds an option to disable redirection to the next track when clicking the Dislike button. | 6.29.58 ~ 7.17.51 |
| `Enable OPUS codec` | Adds an options to enable the OPUS audio codec if the player response includes. | 6.29.58 ~ 7.17.51 |
| `Enable debug logging` | Adds an option to enable debug logging. | 6.29.58 ~ 7.17.51 |
| `Enable landscape mode` | Adds an option to enable landscape mode when rotating the screen on phones. | 6.29.58 ~ 7.17.51 |
| `Flyout menu components` | Adds options to hide or change flyout menu components. | 6.29.58 ~ 7.17.51 |
| `GmsCore support` | Allows patched Google apps to run without root and under a different package name by using GmsCore instead of Google Play Services. | 6.29.58 ~ 7.17.51 |
| `Hide account components` | Adds options to hide components related to the account menu. | 6.29.58 ~ 7.17.51 |
| `Hide action bar components` | Adds options to hide action bar components and replace the offline download button with an external download button. | 6.29.58 ~ 7.17.51 |
| `Hide ads` | Adds options to hide ads. | 6.29.58 ~ 7.17.51 |
| `Hide layout components` | Adds options to hide general layout components. | 6.29.58 ~ 7.17.51 |
| `Hide overlay filter` | Removes, at compile time, the dark overlay that appears when player flyout menus are open. | 6.29.58 ~ 7.17.51 |
| `Hide player overlay filter` | Removes, at compile time, the dark overlay that appears when single-tapping in the player. | 6.29.58 ~ 7.17.51 |
| `Navigation bar components` | Adds options to hide or change components related to the navigation bar. | 6.29.58 ~ 7.17.51 |
| `Player components` | Adds options to hide or change components related to the player. | 6.29.58 ~ 7.17.51 |
| `Remove background playback restrictions` | Removes restrictions on background playback, including for kids videos. | 6.29.58 ~ 7.17.51 |
| `Remove viewer discretion dialog` | Adds an option to remove the dialog that appears when opening a video that has been age-restricted by accepting it automatically. This does not bypass the age restriction. | 6.29.58 ~ 7.17.51 |
| `Restore old style library shelf` | Adds an option to return the Library tab to the old style. | 6.29.58 ~ 7.17.51 |
| `Return YouTube Dislike` | Adds an option to show the dislike count of songs using the Return YouTube Dislike API. | 6.29.58 ~ 7.17.51 |
| `Sanitize sharing links` | Adds an option to remove tracking query parameters from URLs when sharing links. | 6.29.58 ~ 7.17.51 |
| `Settings for YouTube Music` | Applies mandatory patches to implement ReVanced Extended settings into the application. | 6.29.58 ~ 7.17.51 |
| `SponsorBlock` | Adds options to enable and configure SponsorBlock, which can skip undesired video segments, such as non-music sections. | 6.29.58 ~ 7.17.51 |
| `Spoof app version` | Adds options to spoof the YouTube Music client version. This can remove the radio mode restriction in Canadian regions or disable real-time lyrics. | 6.29.58 ~ 7.17.51 |
| `Translations for YouTube Music` | Add translations or remove string resources. | 6.29.58 ~ 7.17.51 |
| `Video playback` | Adds options to customize settings related to video playback, such as default video quality and playback speed. | 6.29.58 ~ 7.17.51 |
| `Amoled` | Applies a pure black theme to some components. | 6.20.51 ~ 7.16.53 |
| `Bitrate default value` | Sets the audio quality to 'Always High' when you first install the app. | 6.20.51 ~ 7.16.53 |
| `Bypass image region restrictions` | Adds an option to use a different host for static images, so that images blocked in some countries can be received. | 6.20.51 ~ 7.16.53 |
| `Certificate spoof` | Enables YouTube Music to work with Android Auto by spoofing the YouTube Music certificate. | 6.20.51 ~ 7.16.53 |
| `Change share sheet` | Add option to change from in-app share sheet to system share sheet. | 6.20.51 ~ 7.16.53 |
| `Change start page` | Adds an option to set which page the app opens in instead of the homepage. | 6.20.51 ~ 7.16.53 |
| `Custom branding icon for YouTube Music` | Changes the YouTube Music app icon to the icon specified in options.json. | 6.20.51 ~ 7.16.53 |
| `Custom branding name for YouTube Music` | Renames the YouTube Music app to the name specified in options.json. | 6.20.51 ~ 7.16.53 |
| `Custom header for YouTube Music` | Applies a custom header in the top left corner within the app. | 6.20.51 ~ 7.16.53 |
| `Disable Cairo splash animation` | Adds an option to disable Cairo splash animation. | 7.06.54 ~ 7.16.53 |
| `Disable auto captions` | Adds an option to disable captions from being automatically enabled. | 6.20.51 ~ 7.16.53 |
| `Disable dislike redirection` | Adds an option to disable redirection to the next track when clicking the Dislike button. | 6.20.51 ~ 7.16.53 |
| `Enable OPUS codec` | Adds an options to enable the OPUS audio codec if the player response includes. | 6.20.51 ~ 7.16.53 |
| `Enable debug logging` | Adds an option to enable debug logging. | 6.20.51 ~ 7.16.53 |
| `Enable landscape mode` | Adds an option to enable landscape mode when rotating the screen on phones. | 6.20.51 ~ 7.16.53 |
| `Flyout menu components` | Adds options to hide or change flyout menu components. | 6.20.51 ~ 7.16.53 |
| `GmsCore support` | Allows patched Google apps to run without root and under a different package name by using GmsCore instead of Google Play Services. | 6.20.51 ~ 7.16.53 |
| `Hide account components` | Adds options to hide components related to the account menu. | 6.20.51 ~ 7.16.53 |
| `Hide action bar components` | Adds options to hide action bar components and replace the offline download button with an external download button. | 6.20.51 ~ 7.16.53 |
| `Hide ads` | Adds options to hide ads. | 6.20.51 ~ 7.16.53 |
| `Hide layout components` | Adds options to hide general layout components. | 6.20.51 ~ 7.16.53 |
| `Hide overlay filter` | Removes, at compile time, the dark overlay that appears when player flyout menus are open. | 6.20.51 ~ 7.16.53 |
| `Hide player overlay filter` | Removes, at compile time, the dark overlay that appears when single-tapping in the player. | 6.20.51 ~ 7.16.53 |
| `Navigation bar components` | Adds options to hide or change components related to the navigation bar. | 6.20.51 ~ 7.16.53 |
| `Player components` | Adds options to hide or change components related to the player. | 6.20.51 ~ 7.16.53 |
| `Remove background playback restrictions` | Removes restrictions on background playback, including for kids videos. | 6.20.51 ~ 7.16.53 |
| `Remove viewer discretion dialog` | Adds an option to remove the dialog that appears when opening a video that has been age-restricted by accepting it automatically. This does not bypass the age restriction. | 6.20.51 ~ 7.16.53 |
| `Restore old style library shelf` | Adds an option to return the Library tab to the old style. | 6.20.51 ~ 7.16.53 |
| `Return YouTube Dislike` | Adds an option to show the dislike count of songs using the Return YouTube Dislike API. | 6.20.51 ~ 7.16.53 |
| `Sanitize sharing links` | Adds an option to remove tracking query parameters from URLs when sharing links. | 6.20.51 ~ 7.16.53 |
| `Settings for YouTube Music` | Applies mandatory patches to implement ReVanced Extended settings into the application. | 6.20.51 ~ 7.16.53 |
| `SponsorBlock` | Adds options to enable and configure SponsorBlock, which can skip undesired video segments, such as non-music sections. | 6.20.51 ~ 7.16.53 |
| `Spoof app version` | Adds options to spoof the YouTube Music client version. This can remove the radio mode restriction in Canadian regions or disable real-time lyrics. | 6.20.51 ~ 7.16.53 |
| `Translations for YouTube Music` | Add translations or remove string resources. | 6.20.51 ~ 7.16.53 |
| `Video playback` | Adds options to customize settings related to video playback, such as default video quality and playback speed. | 6.20.51 ~ 7.16.53 |
| `Visual preferences icons for YouTube Music` | Adds icons to specific preferences in the settings. | 6.20.51 ~ 7.16.53 |
</details>

### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
Expand Down Expand Up @@ -169,12 +172,11 @@ Example:
{
"name": "com.google.android.apps.youtube.music",
"versions": [
"6.29.58",
"6.33.52",
"6.20.51",
"6.29.59",
"6.42.55",
"6.51.53",
"7.16.53",
"7.17.51"
"7.16.53"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 4.13.1
version = 4.14.1
2 changes: 1 addition & 1 deletion patches.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import app.revanced.patches.music.utils.integrations.Constants.ACCOUNT_CLASS_DES
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
import app.revanced.patches.music.utils.settings.CategoryType
import app.revanced.patches.music.utils.settings.SettingsPatch
import app.revanced.util.getTargetIndexWithMethodReferenceNameOrThrow
import app.revanced.util.getTargetIndexWithReferenceOrThrow
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstructionOrThrow
import app.revanced.util.patch.BaseBytecodePatch
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.reference.MethodReference

@Suppress("unused")
object AccountComponentsPatch : BaseBytecodePatch(
Expand All @@ -43,8 +45,14 @@ object AccountComponentsPatch : BaseBytecodePatch(

MenuEntryFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
val textIndex = getTargetIndexWithMethodReferenceNameOrThrow("setText")
val viewIndex = getTargetIndexWithMethodReferenceNameOrThrow("addView")
val textIndex = indexOfFirstInstructionOrThrow {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.name == "setText"
}
val viewIndex = indexOfFirstInstructionOrThrow {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.name == "addView"
}

val textRegister = getInstruction<FiveRegisterInstruction>(textIndex).registerD
val viewRegister = getInstruction<FiveRegisterInstruction>(viewIndex).registerD
Expand All @@ -64,9 +72,14 @@ object AccountComponentsPatch : BaseBytecodePatch(
AccountSwitcherAccessibilityLabelFingerprint.resultOrThrow().let { result ->
result.mutableMethod.apply {

val textColorIndex = getTargetIndexWithMethodReferenceNameOrThrow("setTextColor")
val setVisibilityIndex =
getTargetIndexWithMethodReferenceNameOrThrow(textColorIndex, "setVisibility")
val textColorIndex = indexOfFirstInstructionOrThrow {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.name == "setTextColor"
}
val setVisibilityIndex = indexOfFirstInstructionOrThrow(textColorIndex) {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.name == "setVisibility"
}
val textViewInstruction =
getInstruction<FiveRegisterInstruction>(setVisibilityIndex)

Expand Down Expand Up @@ -98,8 +111,12 @@ object AccountComponentsPatch : BaseBytecodePatch(

TermsOfServiceFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
val insertIndex =
getTargetIndexWithReferenceOrThrow("/PrivacyTosFooter;->setVisibility(I)V")
val insertIndex = indexOfFirstInstructionOrThrow {
val reference = getReference<MethodReference>()
opcode == Opcode.INVOKE_VIRTUAL &&
reference?.name == "setVisibility" &&
reference.definingClass.endsWith("/PrivacyTosFooter;")
}
val visibilityRegister =
getInstruction<FiveRegisterInstruction>(insertIndex).registerD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.LikeDis
import app.revanced.patches.music.utils.settings.CategoryType
import app.revanced.patches.music.utils.settings.SettingsPatch
import app.revanced.patches.music.video.information.VideoInformationPatch
import app.revanced.util.getTargetIndexWithMethodReferenceNameOrThrow
import app.revanced.util.getTargetIndexWithReferenceOrThrow
import app.revanced.util.getWideLiteralInstructionIndex
import app.revanced.util.getReference
import app.revanced.util.indexOfFirstInstructionOrThrow
import app.revanced.util.indexOfFirstWideLiteralInstructionValueOrThrow
import app.revanced.util.patch.BaseBytecodePatch
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
import kotlin.math.min

@Suppress("unused")
Expand All @@ -48,7 +48,10 @@ object ActionBarComponentsPatch : BaseBytecodePatch(
it.mutableMethod.apply {

// hook download button
val addViewIndex = getTargetIndexWithMethodReferenceNameOrThrow("addView")
val addViewIndex = indexOfFirstInstructionOrThrow {
opcode == Opcode.INVOKE_VIRTUAL &&
getReference<MethodReference>()?.name == "addView"
}
val addViewRegister =
getInstruction<FiveRegisterInstruction>(addViewIndex).registerD

Expand Down Expand Up @@ -83,10 +86,15 @@ object ActionBarComponentsPatch : BaseBytecodePatch(
removeInstruction(replaceIndex)

// hide action button
val hasNextIndex = getTargetIndexWithMethodReferenceNameOrThrow("hasNext")
val hasNextIndex = indexOfFirstInstructionOrThrow {
opcode == Opcode.INVOKE_INTERFACE &&
getReference<MethodReference>()?.name == "hasNext"
}
val freeRegister = min(implementation!!.registerCount - parameters.size - 2, 15)

val spannedIndex = getTargetIndexWithReferenceOrThrow(")Landroid/text/Spanned;")
val spannedIndex = indexOfFirstInstructionOrThrow {
getReference<MethodReference>()?.returnType == "Landroid/text/Spanned;"
}
val spannedRegister =
getInstruction<FiveRegisterInstruction>(spannedIndex).registerC
val spannedReference = getInstruction<ReferenceInstruction>(spannedIndex).reference
Expand Down Expand Up @@ -124,7 +132,8 @@ object ActionBarComponentsPatch : BaseBytecodePatch(

LikeDislikeContainerFingerprint.resultOrThrow().let {
it.mutableMethod.apply {
val insertIndex = getWideLiteralInstructionIndex(LikeDislikeContainer) + 2
val insertIndex =
indexOfFirstWideLiteralInstructionValueOrThrow(LikeDislikeContainer) + 2
val insertRegister = getInstruction<OneRegisterInstruction>(insertIndex).registerA

addInstruction(
Expand Down
Loading

0 comments on commit b725e54

Please sign in to comment.