mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-04-29 14:14:36 +02:00
build: bump patcher to 16.0.2
This commit is contained in:
parent
b35510e13c
commit
83bebf0113
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6,3 +6,4 @@
|
||||
|
||||
# These are Windows script files and should use crlf
|
||||
*.bat text eol=crlf
|
||||
|
||||
|
73
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
73
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
@ -1,73 +0,0 @@
|
||||
name: 🐞 Bug report
|
||||
description: Report a very clearly broken issue.
|
||||
title: 'bug: '
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# ReVanced bug report
|
||||
|
||||
Important to note that your issue may have already been reported before. Please check for existing issues [here](https://github.com/revanced/revanced-patches/labels/bug).
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Type
|
||||
options:
|
||||
- Error while patching
|
||||
- Error at runtime
|
||||
- Cosmetic
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Bug description
|
||||
description: How did you find the bug? Any additional details that might help?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Add the steps to reproduce this bug including your environment.
|
||||
placeholder: Step 1. Download some files. Step 2. ...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. Capture crash logs by running `logcat | grep AndroidRuntime`.
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots or videos
|
||||
description: Add screenshots or videos that show the bug here.
|
||||
placeholder: Drag and drop the screenshots/videos into this box.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Solution
|
||||
description: If applicable, add a possible solution.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add additional context here.
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you haven't done these steps.
|
||||
options:
|
||||
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||
required: true
|
||||
- label: I have written a short but informative title.
|
||||
required: true
|
||||
- label: I filled out all of the requested information in this issue properly.
|
||||
required: true
|
49
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
49
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
name: 🐞 Bug report
|
||||
description: Report a bug or an issue.
|
||||
title: 'bug: '
|
||||
labels: ['Bug report']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# ReVanced Patches bug report
|
||||
|
||||
Please check for existing bug reports
|
||||
[here](https://github.com/ReVanced/revanced-patches/labels/Bug%20report)
|
||||
before creating a new one.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Bug description
|
||||
description: |
|
||||
- Describe your bug in detail
|
||||
- Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...)
|
||||
- Add images and videos if possible
|
||||
- List used patches if applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Error logs
|
||||
description: Exceptions can be captured by running `logcat | grep AndroidRuntime` in a shell.
|
||||
render: shell
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Solution
|
||||
description: If applicable, add a possible solution to the bug.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add additional context here.
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you don't follow the checklist below.
|
||||
options:
|
||||
- label: This request is not a duplicate of an existing issue.
|
||||
required: true
|
||||
- label: I have chosen an appropriate title.
|
||||
required: true
|
||||
- label: All requested information has been provided properly.
|
||||
required: true
|
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,8 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 📃 Documentation
|
||||
url: https://github.com/revanced/revanced-documentation/
|
||||
about: Don't know how or where to start? Check out our documentation!
|
||||
- name: 🗨 Discussions
|
||||
url: https://github.com/revanced/revanced-suggestions/discussions
|
||||
about: Got something you think should change or be added? Search for or start a new discussion!
|
||||
about: Have something unspecific to ReVanced Patches in mind? Search for or start a new discussion!
|
44
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
44
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: ⭐ Feature request
|
||||
description: Create a detailed request for a new feature.
|
||||
title: 'feat: '
|
||||
labels: ['Feature request']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# ReVanced Patches feature request
|
||||
|
||||
Please check for existing feature requests
|
||||
[here](https://github.com/ReVanced/revanced-patches/labels/Feature%20request)
|
||||
before creating a new one.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Feature description
|
||||
description: |
|
||||
- Describe your feature in detail
|
||||
- Add images, videos, links, examples, references, etc. if possible
|
||||
- Add the target application name in case you request a new patch
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: |
|
||||
A strong motivation is necessary for a feature request to be considered.
|
||||
|
||||
- Why should this feature be implemented?
|
||||
- What is the explicit use case?
|
||||
- What are the benefits?
|
||||
- What makes this feature important?
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you don't follow the checklist below.
|
||||
options:
|
||||
- label: This request is not a duplicate of an existing issue.
|
||||
required: true
|
||||
- label: I have chosen an appropriate title.
|
||||
required: true
|
||||
- label: All requested information has been provided properly.
|
||||
required: true
|
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
@ -1,41 +0,0 @@
|
||||
name: ⭐ Patch Request
|
||||
description: Create a detailed patch request.
|
||||
title: 'feat: '
|
||||
labels: [patch-request]
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Application
|
||||
description: Which application is this patch for?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Issue
|
||||
description: What is the issue this patch should solve?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Patch
|
||||
description: "Describe the patch you'd like to see in detail."
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: Why should your patch request be considered? What makes it valuable to the community?
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you haven't done these steps.
|
||||
options:
|
||||
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||
required: true
|
||||
- label: I have written a short but informative title.
|
||||
required: true
|
||||
- label: I filled out all of the requested information in this issue properly.
|
||||
required: true
|
6
.github/workflows/pull_request.yml
vendored
6
.github/workflows/pull_request.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: PR to main
|
||||
name: Open a PR to main
|
||||
|
||||
on:
|
||||
push:
|
||||
@ -7,7 +7,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||
MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||
|
||||
jobs:
|
||||
pull-request:
|
||||
@ -15,7 +15,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Open pull request
|
||||
uses: repo-sync/pull-request@v2
|
||||
with:
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
# Make sure the release step uses its own credentials:
|
||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -121,3 +121,6 @@ gradle-app.setting
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# gradle properties, due to Github token
|
||||
./gradle.properties
|
||||
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -4,5 +4,5 @@
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="azul-17" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="azul-17" project-jdk-type="JavaSDK" />
|
||||
</project>
|
10
.releaserc
10
.releaserc
@ -7,7 +7,13 @@
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
[
|
||||
"@semantic-release/commit-analyzer", {
|
||||
"releaseRules": [
|
||||
{ "type": "build", "scope": "Needs bump", "release": "patch" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"gradle-semantic-release-plugin",
|
||||
@ -39,7 +45,7 @@
|
||||
[
|
||||
"@saithodev/semantic-release-backmerge",
|
||||
{
|
||||
branches: [{from: "main", to: "dev"}],
|
||||
backmergeBranches: [{"from": "main", "to": "dev"}],
|
||||
clearWorkspace: true
|
||||
}
|
||||
]
|
||||
|
2723
CHANGELOG.md
2723
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -15,11 +15,8 @@ Example:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "default-video-quality",
|
||||
"name": "Default video quality",
|
||||
"description": "Adds ability to set default video quality settings.",
|
||||
"excluded": false,
|
||||
"options": [],
|
||||
"dependencies": [],
|
||||
"compatiblePackages":[
|
||||
{
|
||||
"name":"com.google.android.youtube",
|
||||
@ -36,14 +33,14 @@ Example:
|
||||
"18.33.40"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"use":true,
|
||||
"requiresIntegrations":false,
|
||||
"options": []
|
||||
},
|
||||
{
|
||||
"name": "remember-video-quality",
|
||||
"name": "Remember video quality",
|
||||
"description": "Save the video quality value whenever you change the video quality.",
|
||||
"excluded": false,
|
||||
"options": [],
|
||||
"dependencies": [],
|
||||
"compatiblePackages": [
|
||||
{
|
||||
"name": "com.google.android.apps.youtube.music",
|
||||
@ -54,7 +51,10 @@ Example:
|
||||
"6.22.51"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"use":true,
|
||||
"requiresIntegrations":false,
|
||||
"options": []
|
||||
}
|
||||
]
|
||||
```
|
360
README.md
360
README.md
@ -9,107 +9,107 @@ ReVanced Extended Patches.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `add-splash-animation` | Adds splash animation, which was removed in YT v18.19.36+. This patch cannot be used with 'custom-branding-icon' patch | 18.22.37 ~ 18.33.40 |
|
||||
| `alternative-thumbnails` | Adds an option to replace video thumbnails with still image captures of the video. | 18.22.37 ~ 18.33.40 |
|
||||
| `append-time-stamps-information` | Add the current video quality or playback speed in brackets next to the current time. | 18.22.37 ~ 18.33.40 |
|
||||
| `bypass-ambient-mode-restrictions` | Bypass ambient mode restrictions in battery saver mode. | 18.22.37 ~ 18.33.40 |
|
||||
| `change-homepage` | Change home page to subscription feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-branding-youtube-name` | Rename the YouTube app to the name specified in options.json. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-branding-icon-mmt` | Changes the YouTube launcher icon to MMT. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-branding-icon-revancify-blue` | Changes the YouTube launcher icon to Revancify Blue. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-branding-icon-revancify-red` | Changes the YouTube launcher icon to Revancify Red. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-double-tap-length` | Add 'double-tap to seek' value. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-package-name` | Specifies the package name for YouTube and YT Music in the MicroG build. | all |
|
||||
| `custom-playback-speed` | Adds more playback speed options. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-seekbar-color` | Change seekbar color in video player and video thumbnails. | 18.22.37 ~ 18.33.40 |
|
||||
| `custom-speed-overlay` | Customize 'Play at 2x speed' while holding down. | 18.22.37 ~ 18.33.40 |
|
||||
| `default-playback-speed` | Adds ability to set default playback speed settings. | 18.22.37 ~ 18.33.40 |
|
||||
| `default-video-quality` | Adds ability to set default video quality settings. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-quic-protocol` | Disable CronetEngine's QUIC protocol. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-auto-captions` | Disables forced auto captions. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-haptic-feedback` | Disable haptic feedback when swiping. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-hdr-video` | Disable HDR video. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-landscape-mode` | Disable landscape mode when entering fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `disable-pip-notification` | Disable pip notification when you first launch pip mode. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-compact-controls-overlay` | Enables compact control overlay. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-debug-logging` | Adds debugging options. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-external-browser` | Open url outside the app in an external browser. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-minimized-playback` | Enables minimized and background playback. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-new-comment-popup-panels` | Enables a new type of comment popup panel in the shorts player. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-new-splash-animation` | Enables a new type of splash animation. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-new-thumbnail-preview` | Enables a new type of thumbnail preview. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-old-quality-layout` | Enables the original quality flyout menu. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-open-links-directly` | Skips over redirection URLs to external links. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-tablet-mini-player` | Enables the tablet mini player layout. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-tablet-navigation-bar` | Enables the tablet navigation bar. | 18.22.37 ~ 18.33.40 |
|
||||
| `enable-wide-search-bar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.22.37 ~ 18.33.40 |
|
||||
| `force-opus-codec` | Forces the OPUS codec for audios. | 18.22.37 ~ 18.33.40 |
|
||||
| `force-vp9-codec` | Forces the VP9 codec for videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `force-hide-player-button-background` | Force hides the background from the video player buttons. | 18.22.37 ~ 18.33.40 |
|
||||
| `force-premium-heading` | Forces premium heading on the homepage. | 18.22.37 ~ 18.33.40 |
|
||||
| `header-switch` | Add switch to change header. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-account-menu` | Hide account menu elements. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-auto-player-popup-panels` | Hide automatic popup panels (playlist or live chat) on video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-autoplay-preview` | Hides the autoplay preview container in the fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-button-container` | Adds the options to hide action buttons under a video. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-captions-button` | Hides the captions button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-cast-button` | Hides the cast button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-category-bar` | Hides the category bar in video feeds. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-channel-avatar-section` | Hides the channel avatar section of the subscription feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-channel-watermark` | Hides creator's watermarks on videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-collapse-button` | Hides the collapse button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-comment-component` | Hides components related to comments. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-description-components` | Hides description components. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-double-tap-overlay-filter` | Hides the double tap dark filter layer. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-end-screen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-end-screen-overlay` | Hide end screen overlay on swipe controls. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-feed-flyout-panel` | Hides feed flyout panel components. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-filmstrip-overlay` | Hide filmstrip overlay on swipe controls. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-floating-microphone` | Hides the floating microphone button which appears in search. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-fullscreen-panels` | Hides video description and comments panel in fullscreen view. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-general-ads` | Hides general ads. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-handle` | Hides the handle in the account switcher. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-info-cards` | Hides info-cards in videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-latest-videos-button` | Hides latest videos button in home feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-layout-components` | Hides general layout components. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-load-more-button` | Hides the button under videos that loads similar videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-mix-playlists` | Hides mix playlists from home feed and video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-music-button` | Hides the YouTube Music button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-navigation-buttons` | Adds options to hide or change navigation buttons. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-navigation-label` | Hide navigation bar labels. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-player-button-background` | Hide player button background. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-player-flyout-panel` | Hides player flyout panel components. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-player-overlay-filter` | Hides the dark filter layer from the player's background. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-previous-next-button` | Hides the previous and next button in the player controller. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-quick-actions` | Adds the options to hide quick actions components in the fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-seek-message` | Hides the 'Slide left or right to seek' message container. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-seekbar` | Hides the seekbar in video player and video thumbnails. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-shorts-components` | Hides other Shorts components. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-snack-bar` | Hides the snack bar action popup. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-suggested-actions` | Hide the suggested actions bar inside the player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-suggested-video-overlay` | Hide the suggested video overlay to play next. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-suggestions-shelf` | Hides the suggestions shelf. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-time-stamp` | Hides timestamp in video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-tooltip-content` | Hides the tooltip box that appears on first install. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-trending-searches` | Hide trending searches in the search bar. | 18.22.37 ~ 18.33.40 |
|
||||
| `hide-video-ads` | Hides ads in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `language-switch` | Add language switch toggle. | 18.22.37 ~ 18.33.40 |
|
||||
| `layout-switch` | Tricks the dpi to use some tablet/phone layouts. | 18.22.37 ~ 18.33.40 |
|
||||
| `materialyou` | Enables MaterialYou theme for Android 12+ | 18.22.37 ~ 18.33.40 |
|
||||
| `microg-support` | Allows ReVanced Extended to run without root and under a different package name with MicroG. | 18.22.37 ~ 18.33.40 |
|
||||
| `overlay-buttons` | Add overlay buttons to the player. | 18.22.37 ~ 18.33.40 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.22.37 ~ 18.33.40 |
|
||||
| `settings` | Applies mandatory patches to implement ReVanced Extended Settings into the application. | 18.22.37 ~ 18.33.40 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.22.37 ~ 18.33.40 |
|
||||
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.22.37 ~ 18.33.40 |
|
||||
| `spoof-player-parameters` | Spoofs player parameters to prevent playback issues. | 18.22.37 ~ 18.33.40 |
|
||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.22.37 ~ 18.33.40 |
|
||||
| `theme` | Change the app's theme to the values specified in options.json. | 18.22.37 ~ 18.33.40 |
|
||||
| `translations` | Add Crowdin translations for YouTube. | 18.22.37 ~ 18.33.40 |
|
||||
| `Add splash animation` | Adds splash animation, which was removed in YT v18.19.36+. This patch cannot be used with 'custom-branding-icon' patch | 18.22.37 ~ 18.33.40 |
|
||||
| `Alternative thumbnails` | Adds an option to replace video thumbnails with still image captures of the video. | 18.22.37 ~ 18.33.40 |
|
||||
| `Append time stamps information` | Add the current video quality or playback speed in brackets next to the current time. | 18.22.37 ~ 18.33.40 |
|
||||
| `Bypass ambient mode restrictions` | Bypass ambient mode restrictions in battery saver mode. | 18.22.37 ~ 18.33.40 |
|
||||
| `Change homepage` | Change home page to subscription feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom branding YouTube name` | Rename the YouTube app to the name specified in options.json. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom branding icon MMT` | Changes the YouTube launcher icon to MMT. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom branding icon Revancify blue` | Changes the YouTube launcher icon to Revancify Blue. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom branding icon Revancify red` | Changes the YouTube launcher icon to Revancify Red. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom double tap length` | Add 'double-tap to seek' value. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom package name` | Specifies the package name for YouTube and YT Music in the MicroG build. | all |
|
||||
| `Custom playback speed` | Adds more playback speed options. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom seekbar color` | Change seekbar color in video player and video thumbnails. | 18.22.37 ~ 18.33.40 |
|
||||
| `Custom speed overlay` | Customize 'Play at 2x speed' while holding down. | 18.22.37 ~ 18.33.40 |
|
||||
| `Default playback speed` | Adds ability to set default playback speed settings. | 18.22.37 ~ 18.33.40 |
|
||||
| `Default video quality` | Adds ability to set default video quality settings. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable QUIC protocol` | Disable CronetEngine's QUIC protocol. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable Shorts on startup` | Disables playing YouTube Shorts when launching YouTube. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable auto captions` | Disables forced auto captions. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable haptic feedback` | Disable haptic feedback when swiping. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable hdr video` | Disable HDR video. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable landscape mode` | Disable landscape mode when entering fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `Disable pip notification` | Disable pip notification when you first launch pip mode. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable compact controls overlay` | Enables compact control overlay. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable debug logging` | Adds debugging options. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable external browser` | Open url outside the app in an external browser. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable minimized playback` | Enables minimized and background playback. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable new comment popup panels` | Enables a new type of comment popup panel in the shorts player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable new splash animation` | Enables a new type of splash animation. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable new thumbnail preview` | Enables a new type of thumbnail preview. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable old quality layout` | Enables the original quality flyout menu. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable open links directly` | Skips over redirection URLs to external links. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable seekbar tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable tablet mini player` | Enables the tablet mini player layout. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable tablet navigation bar` | Enables the tablet navigation bar. | 18.22.37 ~ 18.33.40 |
|
||||
| `Enable wide search bar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.22.37 ~ 18.33.40 |
|
||||
| `Force OPUS codec` | Forces the OPUS codec for audios. | 18.22.37 ~ 18.33.40 |
|
||||
| `Force VP9 codec` | Forces the VP9 codec for videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `Force hide player button background` | Force hides the background from the video player buttons. | 18.22.37 ~ 18.33.40 |
|
||||
| `Force premium heading` | Forces premium heading on the homepage. | 18.22.37 ~ 18.33.40 |
|
||||
| `Header switch` | Add switch to change header. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide account menu` | Hide account menu elements. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide auto player popup panels` | Hide automatic popup panels (playlist or live chat) on video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide autoplay button` | Hides the autoplay button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide autoplay preview` | Hides the autoplay preview container in the fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide button container` | Adds the options to hide action buttons under a video. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide captions button` | Hides the captions button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide cast button` | Hides the cast button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide category bar` | Hides the category bar in feeds. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide channel avatar section` | Hides the channel avatar section of the subscription feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide channel watermark` | Hides creator's watermarks on videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide collapse button` | Hides the collapse button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide comment component` | Hides components related to comments. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide crowdfunding box` | Hides the crowdfunding box between the player and video description. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide description components` | Hides description components. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide double tap overlay filter` | Hides the double tap dark filter layer. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide end screen cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide end screen overlay` | Hide end screen overlay on swipe controls. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide feed flyout panel` | Hides feed flyout panel components. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide filmstrip overlay` | Hide filmstrip overlay on swipe controls. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide floating microphone` | Hides the floating microphone button which appears in search. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide fullscreen panels` | Hides video description and comments panel in fullscreen view. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide general ads` | Hides general ads. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide handle` | Hides the handle in the account switcher. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide info cards` | Hides info-cards in videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide latest videos button` | Hides latest videos button in home feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide layout components` | Hides general layout components. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide load more button` | Hides the button under videos that loads similar videos. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide mix playlists` | Hides mix playlists in feed. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide music button` | Hides the YouTube Music button in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide navigation buttons` | Adds options to hide or change navigation buttons. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide navigation label` | Hide navigation bar labels. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide player button background` | Hide player button background. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide player flyout panel` | Hides player flyout panel components. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide player overlay filter` | Hides the dark filter layer from the player's background. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide previous next button` | Hides the previous and next button in the player controller. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide quick actions` | Adds the options to hide quick actions components in the fullscreen. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide seek message` | Hides the 'Slide left or right to seek' message container. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide seekbar` | Hides the seekbar in video player and video thumbnails. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide shorts components` | Hides other Shorts components. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide snack bar` | Hides the snack bar action popup. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide suggested actions` | Hide the suggested actions bar inside the player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide suggested video overlay` | Hide the suggested video overlay to play next. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide suggestions shelf` | Hides the suggestions shelf. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide time stamp` | Hides timestamp in video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide tooltip content` | Hides the tooltip box that appears on first install. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide trending searches` | Hide trending searches in the search bar. | 18.22.37 ~ 18.33.40 |
|
||||
| `Hide video ads` | Hides ads in the video player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Language switch` | Add language switch toggle. | 18.22.37 ~ 18.33.40 |
|
||||
| `Layout switch` | Tricks the dpi to use some tablet/phone layouts. | 18.22.37 ~ 18.33.40 |
|
||||
| `MaterialYou` | Enables MaterialYou theme for Android 12+ | 18.22.37 ~ 18.33.40 |
|
||||
| `MicroG support` | Allows ReVanced Extended to run without root and under a different package name with MicroG. | 18.22.37 ~ 18.33.40 |
|
||||
| `Overlay buttons` | Add overlay buttons to the player. | 18.22.37 ~ 18.33.40 |
|
||||
| `Return YouTube Dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.22.37 ~ 18.33.40 |
|
||||
| `Settings` | Applies mandatory patches to implement ReVanced Extended settings into the application. | 18.22.37 ~ 18.33.40 |
|
||||
| `SponsorBlock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.22.37 ~ 18.33.40 |
|
||||
| `Spoof app version` | Spoof the YouTube client version. | 18.22.37 ~ 18.33.40 |
|
||||
| `Spoof player parameters` | Spoofs player parameters to prevent playback issues. | 18.22.37 ~ 18.33.40 |
|
||||
| `Swipe controls` | Adds volume and brightness swipe controls. | 18.22.37 ~ 18.33.40 |
|
||||
| `Theme` | Change the app's theme to the values specified in options.json. | 18.22.37 ~ 18.33.40 |
|
||||
| `Translations` | Add Crowdin translations for YouTube. | 18.22.37 ~ 18.33.40 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||
@ -117,66 +117,66 @@ ReVanced Extended Patches.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `amoled` | Applies pure black theme on some components. | 6.15.52 ~ 6.22.51 |
|
||||
| `background-play` | Enables playing music in the background. | 6.15.52 ~ 6.22.51 |
|
||||
| `bitrate-default-value` | Set the audio quality to "Always High" when you first install the app. | 6.15.52 ~ 6.22.51 |
|
||||
| `certificate-spoof` | Spoofs the YouTube Music certificate for Android Auto. | 6.15.52 ~ 6.22.51 |
|
||||
| `custom-branding-music-name` | Rename the YouTube Music app to the name specified in options.json. | 6.15.52 ~ 6.22.51 |
|
||||
| `custom-branding-icon-mmt` | Changes the YouTube Music launcher icon to MMT. | 6.15.52 ~ 6.22.51 |
|
||||
| `custom-branding-icon-revancify-blue` | Changes the YouTube Music launcher icon to Revancify Blue. | 6.15.52 ~ 6.22.51 |
|
||||
| `custom-branding-icon-revancify-red` | Changes the YouTube Music launcher icon to Revancify Red. | 6.15.52 ~ 6.22.51 |
|
||||
| `custom-package-name` | Specifies the package name for YouTube and YT Music in the MicroG build. | all |
|
||||
| `custom-playback-speed` | Adds more playback speed options. | 6.15.52 ~ 6.22.51 |
|
||||
| `disable-auto-captions` | Disables forced auto captions. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-black-navigation-bar` | Sets the navigation bar color to black. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-color-match-player` | Matches the color of the mini player and the fullscreen player. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-compact-dialog` | Enable compact dialog on phone. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-custom-filter` | Enables custom filter to hide layout components. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-debug-logging` | Adds debugging options. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-force-minimized-player` | Keep player permanently minimized even if another track is played. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-landscape-mode` | Enables entry into landscape mode by screen rotation on the phone. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-minimized-playback` | Enables minimized playback on Kids music. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-new-layout` | Enable new player layouts. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-old-style-library-shelf` | Return the library shelf to old style. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-old-style-miniplayer` | Return the miniplayers to old style. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-opus-codec` | Enable opus codec when playing audio. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-playback-speed` | Add playback speed button to the flyout panel. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-sleep-timer` | Add sleep timer to flyout menu. | 6.15.52 ~ 6.22.51 |
|
||||
| `enable-zen-mode` | Adds a grey tint to the video player to reduce eye strain. | 6.15.52 ~ 6.22.51 |
|
||||
| `exclusive-audio-playback` | Enables the option to play music without video. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-account-menu` | Hide account menu elements. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-action-bar-label` | Hide labels in action bar. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-button-shelf` | Hides the button shelf from homepage and explorer. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-carousel-shelf` | Hides the carousel shelf from homepage and explorer. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-cast-button` | Hides the cast button. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-category-bar` | Hides the music category bar at the top of the homepage. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-channel-guidelines` | Hides channel guidelines at the top of comments. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-emoji-picker` | Hides emoji picker at the comments box. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-flyout-panel` | Hides flyout panel components. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-get-premium` | Hides "Get Premium" label from the account menu or settings. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-handle` | Hides the handle in the account switcher. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-music-ads` | Hides ads before playing a music. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-navigation-bar-component` | Hides navigation bar components. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-new-playlist-button` | Hides the "New playlist" button in the library. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-playlist-card` | Hides the playlist card from homepage. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-radio-button` | Hides start radio button. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-taste-builder` | Hides the "Tell us which artists you like" card from homepage. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-terms-container` | Hides terms of service container at the account menu. | 6.15.52 ~ 6.22.51 |
|
||||
| `hide-tooltip-content` | Hides the tooltip box that appears on first install. | 6.15.52 ~ 6.22.51 |
|
||||
| `hook-download-button` | Replaces the offline download button with an external download button. | 6.15.52 ~ 6.22.51 |
|
||||
| `microg-support` | Allows ReVanced Extended Music to run without root and under a different package name with MicroG. | 6.15.52 ~ 6.22.51 |
|
||||
| `remember-playback-speed` | Save the playback speed value whenever you change the playback speed. | 6.15.52 ~ 6.22.51 |
|
||||
| `remember-repeat-state` | Remembers the state of the repeat. | 6.15.52 ~ 6.22.51 |
|
||||
| `remember-shuffle-state` | Remembers the state of the shuffle. | 6.15.52 ~ 6.22.51 |
|
||||
| `remember-video-quality` | Save the video quality value whenever you change the video quality. | 6.15.52 ~ 6.22.51 |
|
||||
| `replace-cast-button` | Replace the cast button in the player with the open music button. | 6.15.52 ~ 6.22.51 |
|
||||
| `replace-dismiss-queue` | Replace dismiss queue menu to watch on YouTube. | 6.15.52 ~ 6.22.51 |
|
||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 6.15.52 ~ 6.22.51 |
|
||||
| `settings` | Adds settings for ReVanced Extended to YouTube Music. | 6.15.52 ~ 6.22.51 |
|
||||
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 6.15.52 ~ 6.22.51 |
|
||||
| `spoof-app-version` | Spoof the YouTube Music client version. | 6.15.52 ~ 6.22.51 |
|
||||
| `start-page` | Set the default start page. | 6.15.52 ~ 6.22.51 |
|
||||
| `translations` | Add Crowdin translations for YouTube Music. | 6.15.52 ~ 6.22.51 |
|
||||
| `Amoled` | Applies pure black theme on some components. | 6.15.52 ~ 6.22.51 |
|
||||
| `Background play` | Enables playing music in the background. | 6.15.52 ~ 6.22.51 |
|
||||
| `Bitrate default value` | Set the audio quality to "Always High" when you first install the app. | 6.15.52 ~ 6.22.51 |
|
||||
| `Certificate spoof` | Spoofs the YouTube Music certificate for Android Auto. | 6.15.52 ~ 6.22.51 |
|
||||
| `Custom branding Music name` | Rename the YouTube Music app to the name specified in options.json. | 6.15.52 ~ 6.22.51 |
|
||||
| `Custom branding icon MMT` | Changes the YouTube Music launcher icon to MMT. | 6.15.52 ~ 6.22.51 |
|
||||
| `Custom branding icon Revancify blue` | Changes the YouTube Music launcher icon to Revancify Blue. | 6.15.52 ~ 6.22.51 |
|
||||
| `Custom branding icon Revancify red` | Changes the YouTube Music launcher icon to Revancify Red. | 6.15.52 ~ 6.22.51 |
|
||||
| `Custom package name` | Specifies the package name for YouTube and YT Music in the MicroG build. | all |
|
||||
| `Custom playback speed` | Adds more playback speed options. | 6.15.52 ~ 6.22.51 |
|
||||
| `Disable auto captions` | Disables forced auto captions. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable black navigation bar` | Sets the navigation bar color to black. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable color match player` | Matches the color of the mini player and the fullscreen player. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable compact dialog` | Enable compact dialog on phone. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable custom filter` | Enables custom filter to hide layout components. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable debug logging` | Adds debugging options. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable force minimized player` | Keep player permanently minimized even if another track is played. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable landscape mode` | Enables entry into landscape mode by screen rotation on the phone. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable minimized playback` | Enables minimized playback on Kids music. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable new layout` | Enable new player layouts. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable old style library shelf` | Return the library shelf to old style. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable old style miniplayer` | Return the miniplayers to old style. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable opus codec` | Enable opus codec when playing audio. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable playback speed` | Add playback speed button to the flyout panel. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable sleep timer` | Add sleep timer to flyout menu. | 6.15.52 ~ 6.22.51 |
|
||||
| `Enable zen mode` | Adds a grey tint to the video player to reduce eye strain. | 6.15.52 ~ 6.22.51 |
|
||||
| `Exclusive audio playback` | Enables the option to play music without video. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide account menu` | Hide account menu elements. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide action bar label` | Hide labels in action bar. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide button shelf` | Hides the button shelf from homepage and explorer. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide carousel shelf` | Hides the carousel shelf from homepage and explorer. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide cast button` | Hides the cast button. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide category bar` | Hides the music category bar at the top of the homepage. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide channel guidelines` | Hides channel guidelines at the top of comments. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide emoji picker` | Hides emoji picker at the comments box. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide flyout panel` | Hides flyout panel components. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide get premium` | Hides "Get Premium" label from the account menu or settings. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide handle` | Hides the handle in the account switcher. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide music ads` | Hides ads before playing a music. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide navigation bar component` | Hides navigation bar components. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide new playlist button` | Hides the "New playlist" button in the library. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide playlist card` | Hides the playlist card from homepage. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide radio button` | Hides start radio button. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide taste builder` | Hides the "Tell us which artists you like" card from homepage. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide terms container` | Hides terms of service container at the account menu. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hide tooltip content` | Hides the tooltip box that appears on first install. | 6.15.52 ~ 6.22.51 |
|
||||
| `Hook download button` | Replaces the offline download button with an external download button. | 6.15.52 ~ 6.22.51 |
|
||||
| `MicroG support` | Allows ReVanced Extended Music to run without root and under a different package name with MicroG. | 6.15.52 ~ 6.22.51 |
|
||||
| `Remember playback speed` | Save the playback speed value whenever you change the playback speed. | 6.15.52 ~ 6.22.51 |
|
||||
| `Remember repeat state` | Remembers the state of the repeat. | 6.15.52 ~ 6.22.51 |
|
||||
| `Remember shuffle state` | Remembers the state of the shuffle. | 6.15.52 ~ 6.22.51 |
|
||||
| `Remember video quality` | Save the video quality value whenever you change the video quality. | 6.15.52 ~ 6.22.51 |
|
||||
| `Replace cast button` | Replace the cast button in the player with the open music button. | 6.15.52 ~ 6.22.51 |
|
||||
| `Replace dismiss queue` | Replace dismiss queue menu to watch on YouTube. | 6.15.52 ~ 6.22.51 |
|
||||
| `Return YouTube Dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 6.15.52 ~ 6.22.51 |
|
||||
| `Settings` | Adds settings for ReVanced Extended to YouTube Music. | 6.15.52 ~ 6.22.51 |
|
||||
| `SponsorBlock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 6.15.52 ~ 6.22.51 |
|
||||
| `Spoof app version` | Spoof the YouTube Music client version. | 6.15.52 ~ 6.22.51 |
|
||||
| `Start page` | Set the default start page. | 6.15.52 ~ 6.22.51 |
|
||||
| `Translations` | Add Crowdin translations for YouTube Music. | 6.15.52 ~ 6.22.51 |
|
||||
</details>
|
||||
|
||||
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
|
||||
@ -184,15 +184,15 @@ ReVanced Extended Patches.
|
||||
|
||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||
|:--------:|:--------------:|:-----------------:|
|
||||
| `disable-screenshot-popup` | Disables the popup that shows up when taking a screenshot. | all |
|
||||
| `hide-ads` | Hides ads from the Reddit. | all |
|
||||
| `hide-navigation-buttons` | Hide buttons at navigation bar. | all |
|
||||
| `hide-place-button` | Hide r/place button in toolbar. | all |
|
||||
| `open-links-directly` | Skips over redirection URLs to external links. | all |
|
||||
| `open-links-externally` | Open links outside of the app directly in your browser. | all |
|
||||
| `premium-icon` | Unlocks premium icons. | all |
|
||||
| `reddit-settings` | Adds ReVanced Extended Settings to Reddit. | all |
|
||||
| `sanitize-sharing-links` | Removes (tracking) query parameters from the URLs when sharing links. | all |
|
||||
| `Disable screenshot popup` | Disables the popup that shows up when taking a screenshot. | all |
|
||||
| `Hide ads` | Hides ads from the Reddit. | all |
|
||||
| `Hide navigation buttons` | Hide buttons at navigation bar. | all |
|
||||
| `Hide place button` | Hide r/place button in toolbar. | all |
|
||||
| `Open links directly` | Skips over redirection URLs to external links. | all |
|
||||
| `Open links externally` | Open links outside of the app directly in your browser. | all |
|
||||
| `Premium icon` | Unlocks premium icons. | all |
|
||||
| `Sanitize sharing links` | Removes (tracking) query parameters from the URLs when sharing links. | all |
|
||||
| `Settings` | Adds ReVanced settings to Reddit. | all |
|
||||
</details>
|
||||
|
||||
|
||||
@ -206,11 +206,8 @@ Example:
|
||||
```json
|
||||
[
|
||||
{
|
||||
"name": "default-video-quality",
|
||||
"name": "Default video quality",
|
||||
"description": "Adds ability to set default video quality settings.",
|
||||
"excluded": false,
|
||||
"options": [],
|
||||
"dependencies": [],
|
||||
"compatiblePackages":[
|
||||
{
|
||||
"name":"com.google.android.youtube",
|
||||
@ -227,14 +224,14 @@ Example:
|
||||
"18.33.40"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"use":true,
|
||||
"requiresIntegrations":false,
|
||||
"options": []
|
||||
},
|
||||
{
|
||||
"name": "remember-video-quality",
|
||||
"name": "Remember video quality",
|
||||
"description": "Save the video quality value whenever you change the video quality.",
|
||||
"excluded": false,
|
||||
"options": [],
|
||||
"dependencies": [],
|
||||
"compatiblePackages": [
|
||||
{
|
||||
"name": "com.google.android.apps.youtube.music",
|
||||
@ -245,7 +242,10 @@ Example:
|
||||
"6.22.51"
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"use":true,
|
||||
"requiresIntegrations":false,
|
||||
"options": []
|
||||
}
|
||||
]
|
||||
```
|
@ -1,25 +1,22 @@
|
||||
@file:Suppress("DEPRECATION")
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.9.10"
|
||||
alias(libs.plugins.ksp)
|
||||
}
|
||||
|
||||
group = "app.revanced"
|
||||
|
||||
val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
||||
val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
maven {
|
||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||
credentials {
|
||||
username = githubUsername
|
||||
password = githubPassword
|
||||
username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
||||
password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
||||
}
|
||||
}
|
||||
// Required for FlexVer-Java
|
||||
maven {
|
||||
url = uri("https://repo.sleeping.town")
|
||||
content {
|
||||
@ -29,13 +26,18 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("app.revanced:revanced-patcher:14.2.2")
|
||||
implementation("com.android.tools.smali:smali:3.0.3")
|
||||
implementation(libs.revanced.patcher)
|
||||
implementation(libs.smali)
|
||||
implementation(libs.revanced.patch.annotation.processor)
|
||||
// Used in JsonGenerator.
|
||||
implementation(libs.gson)
|
||||
implementation(libs.flexver)
|
||||
|
||||
// Required for meta
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
// Required for FlexVer-Java
|
||||
implementation("com.unascribed:flexver-java:1.1.1")
|
||||
ksp(libs.revanced.patch.annotation.processor)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(11)
|
||||
}
|
||||
|
||||
tasks {
|
||||
@ -44,11 +46,10 @@ tasks {
|
||||
dependsOn(build)
|
||||
|
||||
doLast {
|
||||
val androidHome =
|
||||
System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
||||
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
||||
val d8 = "${androidHome}/build-tools/34.0.0/d8"
|
||||
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
||||
val work = File("${buildDir}/libs")
|
||||
val work = layout.buildDirectory.dir("libs").get().asFile
|
||||
|
||||
exec {
|
||||
workingDir = work
|
||||
@ -61,6 +62,7 @@ tasks {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
register<JavaExec>("generateMeta") {
|
||||
description = "Generate metadata for this bundle"
|
||||
dependsOn(build)
|
||||
@ -68,6 +70,7 @@ tasks {
|
||||
classpath = sourceSets["main"].runtimeClasspath
|
||||
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
||||
}
|
||||
|
||||
// Dummy task to fix the Gradle semantic-release plugin.
|
||||
// Remove this if you forked it to support building only.
|
||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||
|
17
gradle/libs.versions.toml
Normal file
17
gradle/libs.versions.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[versions]
|
||||
revanced-patcher = "16.0.2"
|
||||
revanced-patch-annotation-processor = "16.0.2"
|
||||
ksp = "1.9.10-1.0.13"
|
||||
smali = "3.0.3"
|
||||
gson = "2.10.1"
|
||||
flexver = "1.1.1"
|
||||
|
||||
[libraries]
|
||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
||||
revanced-patch-annotation-processor = { module = "app.revanced:revanced-patch-annotation-processor", version.ref = "revanced-patch-annotation-processor" }
|
||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||
flexver = { module = "com.unascribed:flexver-java", version.ref = "flexver" }
|
||||
|
||||
[plugins]
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,6 @@
|
||||
package app.revanced.extensions
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||
@ -32,7 +31,7 @@ internal fun MutableMethodImplementation.injectHideCall(
|
||||
* @return The [PatchException] for the [MethodFingerprint].
|
||||
*/
|
||||
val MethodFingerprint.exception
|
||||
get() = PatchException("Failed to resolve $name")
|
||||
get() = PatchException("Failed to resolve ${this.javaClass.simpleName}")
|
||||
|
||||
/**
|
||||
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
||||
|
@ -1,67 +1,41 @@
|
||||
package app.revanced.meta
|
||||
|
||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
import app.revanced.patcher.extensions.PatchExtensions.include
|
||||
import app.revanced.patcher.extensions.PatchExtensions.options
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.patch.PatchOption
|
||||
import app.revanced.patcher.PatchSet
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import com.google.gson.GsonBuilder
|
||||
import java.io.File
|
||||
|
||||
internal class JsonGenerator : PatchesFileGenerator {
|
||||
override fun generate(bundle: PatchBundlePatches) {
|
||||
val patches = bundle.map {
|
||||
override fun generate(patches: PatchSet) = patches.map {
|
||||
JsonPatch(
|
||||
it.patchName,
|
||||
it.description ?: "This patch has no description.",
|
||||
!it.include,
|
||||
it.options?.map { option ->
|
||||
JsonPatch.Option(
|
||||
option.key,
|
||||
option.title,
|
||||
option.description,
|
||||
option.required,
|
||||
option.let { listOption ->
|
||||
if (listOption is PatchOption.ListOption<*>) {
|
||||
listOption.options.toMutableList().toTypedArray()
|
||||
} else null
|
||||
it.name!!,
|
||||
it.description,
|
||||
it.compatiblePackages,
|
||||
it.use,
|
||||
it.requiresIntegrations,
|
||||
it.options.values.map { option ->
|
||||
JsonPatch.Option(option.key, option.value, option.title, option.description, option.required)
|
||||
}
|
||||
)
|
||||
}?.toTypedArray() ?: emptyArray(),
|
||||
it.dependencies?.map { dep ->
|
||||
dep.java.patchName
|
||||
}?.toTypedArray() ?: emptyArray(),
|
||||
it.compatiblePackages?.map { pkg ->
|
||||
JsonPatch.CompatiblePackage(pkg.name, pkg.versions)
|
||||
}?.toTypedArray() ?: emptyArray()
|
||||
)
|
||||
}
|
||||
|
||||
val json = File("patches.json")
|
||||
json.writeText(GsonBuilder().serializeNulls().create().toJson(patches))
|
||||
}.let {
|
||||
File("patches.json").writeText(GsonBuilder().serializeNulls().create().toJson(it))
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
private class JsonPatch(
|
||||
val name: String,
|
||||
val description: String,
|
||||
val excluded: Boolean,
|
||||
val options: Array<Option>,
|
||||
val dependencies: Array<String>,
|
||||
val compatiblePackages: Array<CompatiblePackage>,
|
||||
val name: String? = null,
|
||||
val description: String? = null,
|
||||
val compatiblePackages: Set<Patch.CompatiblePackage>? = null,
|
||||
val use: Boolean = true,
|
||||
val requiresIntegrations: Boolean = false,
|
||||
val options: List<Option>
|
||||
) {
|
||||
class CompatiblePackage(
|
||||
val name: String,
|
||||
val versions: Array<String>,
|
||||
)
|
||||
|
||||
class Option(
|
||||
val key: String,
|
||||
val title: String,
|
||||
val description: String,
|
||||
val default: Any?,
|
||||
val title: String?,
|
||||
val description: String?,
|
||||
val required: Boolean,
|
||||
val choices: Array<*>?,
|
||||
)
|
||||
}
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
package app.revanced.meta
|
||||
|
||||
import app.revanced.patcher.PatchBundleLoader
|
||||
import app.revanced.patcher.patch.PatchClass
|
||||
import app.revanced.patcher.PatchSet
|
||||
import java.io.File
|
||||
|
||||
internal typealias PatchBundlePatches = List<PatchClass>
|
||||
|
||||
internal interface PatchesFileGenerator {
|
||||
fun generate(bundle: PatchBundlePatches)
|
||||
fun generate(patches: PatchSet)
|
||||
|
||||
private companion object {
|
||||
@JvmStatic
|
||||
@ -16,11 +14,7 @@ internal interface PatchesFileGenerator {
|
||||
).also { loader ->
|
||||
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
||||
}.let { bundle ->
|
||||
arrayOf(JsonGenerator(), ReadmeGenerator()).forEach { generator ->
|
||||
generator.generate(
|
||||
bundle
|
||||
)
|
||||
}
|
||||
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) }
|
||||
}
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
package app.revanced.meta
|
||||
|
||||
import app.revanced.patcher.data.Context
|
||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.patch.Patch
|
||||
import com.unascribed.flexver.FlexVerComparator
|
||||
import java.io.File
|
||||
|
||||
internal class ReadmeGenerator : PatchesFileGenerator {
|
||||
private companion object {
|
||||
private const val TABLE_HEADER =
|
||||
"| \uD83D\uDC8A Patch | \uD83D\uDCDC Description | \uD83C\uDFF9 Target Version |\n" +
|
||||
"|:--------:|:--------------:|:-----------------:|"
|
||||
}
|
||||
|
||||
override fun generate(bundle: PatchBundlePatches) {
|
||||
val output = StringBuilder()
|
||||
|
||||
mutableMapOf<String, MutableList<Class<out Patch<Context<*>>>>>()
|
||||
.apply {
|
||||
for (patch in bundle) {
|
||||
patch.compatiblePackages?.forEach { pkg ->
|
||||
if (!contains(pkg.name)) put(pkg.name, mutableListOf())
|
||||
this[pkg.name]!!.add(patch)
|
||||
}
|
||||
}
|
||||
}
|
||||
.entries
|
||||
.sortedByDescending { it.value.size }
|
||||
.forEach { (`package`, patches) ->
|
||||
val supportVersions = buildMap {
|
||||
patches.forEach { patch ->
|
||||
patch.compatiblePackages?.single { compatiblePackage -> compatiblePackage.name == `package` }?.versions?.let {
|
||||
it.forEach { version -> merge(version, 1, Integer::sum) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val minVersion = supportVersions.let { commonMap ->
|
||||
commonMap.maxByOrNull { it.value }?.value?.let {
|
||||
commonMap.entries.filter { supported -> supported.value == it }
|
||||
.minOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key)
|
||||
} ?: "all"
|
||||
}
|
||||
val maxVersion = supportVersions.let { commonMap ->
|
||||
commonMap.maxByOrNull { it.value }?.value?.let {
|
||||
commonMap.entries.filter { supported -> supported.value == it }
|
||||
.maxOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key)
|
||||
} ?: "all"
|
||||
}
|
||||
|
||||
output.apply {
|
||||
appendLine("### [\uD83D\uDCE6 `${`package`}`](https://play.google.com/store/apps/details?id=${`package`})")
|
||||
appendLine("<details>\n")
|
||||
appendLine(TABLE_HEADER)
|
||||
patches.forEach { patch ->
|
||||
val supportedVersion =
|
||||
if (
|
||||
patch.compatiblePackages?.single { it.name == `package` }?.versions?.isNotEmpty() == true
|
||||
) {
|
||||
if (minVersion == maxVersion)
|
||||
maxVersion
|
||||
else
|
||||
"$minVersion ~ $maxVersion"
|
||||
} else
|
||||
"all"
|
||||
|
||||
appendLine(
|
||||
"| `${patch.patchName.lowercase().replace(" ", "-")}` " +
|
||||
"| ${patch.description} " +
|
||||
"| $supportedVersion |"
|
||||
)
|
||||
}
|
||||
appendLine("</details>\n")
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder(File("README-template.md").readText())
|
||||
.replace(Regex("\\{\\{\\s?table\\s?}}"), output.toString())
|
||||
.let(File("README.md")::writeText)
|
||||
}
|
||||
}
|
@ -1,38 +1,45 @@
|
||||
package app.revanced.patches.music.account.component.patch
|
||||
package app.revanced.patches.music.account.component
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.account.component.fingerprints.MenuEntryFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch
|
||||
@Name("Hide account menu")
|
||||
@Description("Hide account menu elements.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide account menu",
|
||||
description = "Hide account menu elements.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class MenuComponentPatch : BytecodePatch(
|
||||
listOf(MenuEntryFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object MenuComponentPatch : BytecodePatch(
|
||||
setOf(MenuEntryFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
@ -69,8 +76,7 @@ class MenuComponentPatch : BytecodePatch(
|
||||
)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
fun MutableMethod.targetIndex(descriptor: String): Int {
|
||||
private fun MutableMethod.targetIndex(descriptor: String): Int {
|
||||
return implementation?.let {
|
||||
it.instructions.indexOfFirst { instruction ->
|
||||
((instruction as? ReferenceInstruction)?.reference as? MethodReference)?.name == descriptor
|
||||
@ -78,4 +84,3 @@ class MenuComponentPatch : BytecodePatch(
|
||||
} ?: throw PatchException("No Method Implementation found!")
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.music.account.component.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.MenuEntry
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.MenuEntry
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
|
||||
object MenuEntryFingerprint : MethodFingerprint(
|
||||
|
@ -1,20 +1,17 @@
|
||||
package app.revanced.patches.music.account.handle.patch
|
||||
package app.revanced.patches.music.account.handle
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.account.handle.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||
import app.revanced.patches.music.account.handle.fingerprints.NamesInactiveAccountThumbnailSizeFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@ -23,18 +20,28 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch
|
||||
@Name("Hide handle")
|
||||
@Description("Hides the handle in the account switcher.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide handle",
|
||||
description = "Hides the handle in the account switcher.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideHandlePatch : BytecodePatch(
|
||||
listOf(
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideHandlePatch : BytecodePatch(
|
||||
setOf(
|
||||
AccountSwitcherAccessibilityLabelFingerprint,
|
||||
NamesInactiveAccountThumbnailSizeFingerprint
|
||||
)
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.music.account.handle.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.AccountSwitcherAccessibility
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.AccountSwitcherAccessibility
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
|
||||
object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
||||
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.music.account.handle.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.NamesInactiveAccountThumbnailSize
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.NamesInactiveAccountThumbnailSize
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
@ -1,21 +1,18 @@
|
||||
package app.revanced.patches.music.account.tos.patch
|
||||
package app.revanced.patches.music.account.tos
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.account.tos.fingerprints.TermsOfServiceFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.TosFooter
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.TosFooter
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
||||
@ -23,18 +20,28 @@ import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
|
||||
@Patch
|
||||
@Name("Hide terms container")
|
||||
@Description("Hides terms of service container at the account menu.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide terms container",
|
||||
description = "Hides terms of service container at the account menu.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class TermsContainerPatch : BytecodePatch(
|
||||
listOf(TermsOfServiceFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object TermsContainerPatch : BytecodePatch(
|
||||
setOf(TermsOfServiceFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.music.account.tos.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.TosFooter
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.TosFooter
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
|
||||
object TermsOfServiceFingerprint : MethodFingerprint(
|
||||
|
@ -0,0 +1,50 @@
|
||||
package app.revanced.patches.music.actionbar.downloadbuttonhook
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.actionbarhook.ActionBarHookPatch
|
||||
import app.revanced.patches.music.utils.intenthook.IntentHookPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.music.video.information.VideoInformationPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch(
|
||||
name = "Hook download button",
|
||||
description = "Replaces the offline download button with an external download button.",
|
||||
dependencies = [
|
||||
ActionBarHookPatch::class,
|
||||
IntentHookPatch::class,
|
||||
SettingsPatch::class,
|
||||
VideoInformationPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DownloadButtonHookPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_hook_action_bar_download",
|
||||
"false"
|
||||
)
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_external_downloader_package_name",
|
||||
"revanced_hook_action_bar_download"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package app.revanced.patches.music.actionbar.downloadbuttonhook.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.actionbarhook.patch.ActionBarHookPatch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.intenthook.patch.IntentHookPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.video.information.patch.VideoInformationPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@Name("Hook download button")
|
||||
@Description("Replaces the offline download button with an external download button.")
|
||||
@DependsOn(
|
||||
[
|
||||
ActionBarHookPatch::class,
|
||||
IntentHookPatch::class,
|
||||
SettingsPatch::class,
|
||||
VideoInformationPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class DownloadButtonHookPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_hook_action_bar_download",
|
||||
"false"
|
||||
)
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_external_downloader_package_name",
|
||||
"revanced_hook_action_bar_download"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,36 +1,43 @@
|
||||
package app.revanced.patches.music.actionbar.label.patch
|
||||
package app.revanced.patches.music.actionbar.label
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.actionbar.label.fingerprints.ActionBarLabelFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.fingerprints.ActionsBarParentFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ACTIONBAR
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Hide action bar label")
|
||||
@Description("Hide labels in action bar.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide action bar label",
|
||||
description = "Hide labels in action bar.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class ActionBarLabelPatch : BytecodePatch(
|
||||
listOf(ActionsBarParentFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ActionBarLabelPatch : BytecodePatch(
|
||||
setOf(ActionsBarParentFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
ActionsBarParentFingerprint.result?.let { parentResult ->
|
@ -0,0 +1,41 @@
|
||||
package app.revanced.patches.music.actionbar.radio
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.actionbarhook.ActionBarHookPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch(
|
||||
name = "Hide radio button",
|
||||
description = "Hides start radio button.",
|
||||
dependencies = [
|
||||
ActionBarHookPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideRadioButtonPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_hide_action_bar_radio",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package app.revanced.patches.music.actionbar.radio.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.actionbarhook.patch.ActionBarHookPatch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@Name("Hide radio button")
|
||||
@Description("Hides start radio button.")
|
||||
@DependsOn(
|
||||
[
|
||||
ActionBarHookPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideRadioButtonPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.ACTION_BAR,
|
||||
"revanced_hide_action_bar_radio",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package app.revanced.patches.music.ads.music
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.ads.AbstractAdsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide music ads",
|
||||
description = "Hides ads before playing a music.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object MusicAdsPatch : AbstractAdsPatch(
|
||||
"$MUSIC_ADS_PATH/HideMusicAdsPatch;->hideMusicAds()Z"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreference(CategoryType.ADS, "revanced_hide_music_ads", "true")
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/AdsFilter;"
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package app.revanced.patches.music.ads.music.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.ads.AbstractAdsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Hide music ads")
|
||||
@Description("Hides ads before playing a music.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class MusicAdsPatch : AbstractAdsPatch(
|
||||
"$MUSIC_ADS_PATH/HideMusicAdsPatch;->hideMusicAds()Z"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreference(CategoryType.ADS, "revanced_hide_music_ads", "true")
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/AdsFilter;"
|
||||
}
|
||||
}
|
@ -1,33 +1,40 @@
|
||||
package app.revanced.patches.music.flyoutpanel.compactdialog.patch
|
||||
package app.revanced.patches.music.flyoutpanel.compactdialog
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.flyoutpanel.compactdialog.fingerprints.DialogSolidFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||
|
||||
@Patch
|
||||
@Name("Enable compact dialog")
|
||||
@Description("Enable compact dialog on phone.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Enable compact dialog",
|
||||
description = "Enable compact dialog on phone.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class CompactDialogPatch : BytecodePatch(
|
||||
listOf(DialogSolidFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CompactDialogPatch : BytecodePatch(
|
||||
setOf(DialogSolidFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
DialogSolidFingerprint.result?.let {
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.flyoutpanel.compactdialog.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.DialogSolid
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.DialogSolid
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
@ -1,20 +1,17 @@
|
||||
package app.revanced.patches.music.flyoutpanel.hide.patch
|
||||
package app.revanced.patches.music.flyoutpanel.component
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.music.flyoutpanel.utils.EnumUtils.getEnumIndex
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.fingerprints.MenuItemFingerprint
|
||||
import app.revanced.patches.music.utils.flyoutbutton.patch.FlyoutButtonContainerPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.flyoutbutton.FlyoutButtonContainerPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@ -22,18 +19,28 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Hide flyout panel")
|
||||
@Description("Hides flyout panel components.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide flyout panel",
|
||||
description = "Hides flyout panel components.",
|
||||
dependencies = [
|
||||
FlyoutButtonContainerPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class FlyoutPanelPatch : BytecodePatch(
|
||||
listOf(MenuItemFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object FlyoutPanelPatch : BytecodePatch(
|
||||
setOf(MenuItemFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
MenuItemFingerprint.result?.let {
|
@ -0,0 +1,43 @@
|
||||
package app.revanced.patches.music.flyoutpanel.playbackspeed
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.flyoutbutton.FlyoutButtonContainerPatch
|
||||
import app.revanced.patches.music.utils.overridespeed.OverrideSpeedHookPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch(
|
||||
name = "Enable playback speed",
|
||||
description = "Add playback speed button to the flyout panel.",
|
||||
dependencies = [
|
||||
FlyoutButtonContainerPatch::class,
|
||||
OverrideSpeedHookPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object PlaybackSpeedPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.FLYOUT,
|
||||
"revanced_enable_flyout_panel_playback_speed",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package app.revanced.patches.music.flyoutpanel.playbackspeed.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.flyoutbutton.patch.FlyoutButtonContainerPatch
|
||||
import app.revanced.patches.music.utils.overridespeed.patch.OverrideSpeedHookPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch
|
||||
@Name("Enable playback speed")
|
||||
@Description("Add playback speed button to the flyout panel.")
|
||||
@DependsOn(
|
||||
[
|
||||
FlyoutButtonContainerPatch::class,
|
||||
OverrideSpeedHookPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class PlaybackSpeedPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.FLYOUT,
|
||||
"revanced_enable_flyout_panel_playback_speed",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,37 +1,44 @@
|
||||
package app.revanced.patches.music.flyoutpanel.replace.patch
|
||||
package app.revanced.patches.music.flyoutpanel.replace
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.flyoutpanel.utils.EnumUtils.getEnumIndex
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.fingerprints.MenuItemFingerprint
|
||||
import app.revanced.patches.music.utils.flyoutbutton.patch.FlyoutButtonItemResourcePatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.video.information.patch.VideoInformationPatch
|
||||
import app.revanced.patches.music.utils.flyoutbutton.FlyoutButtonItemResourcePatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.music.video.information.VideoInformationPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Replace dismiss queue")
|
||||
@Description("Replace dismiss queue menu to watch on YouTube.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Replace dismiss queue",
|
||||
description = "Replace dismiss queue menu to watch on YouTube.",
|
||||
dependencies = [
|
||||
FlyoutButtonItemResourcePatch::class,
|
||||
SettingsPatch::class,
|
||||
VideoInformationPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class ReplaceDismissQueuePatch : BytecodePatch(
|
||||
listOf(MenuItemFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ReplaceDismissQueuePatch : BytecodePatch(
|
||||
setOf(MenuItemFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
MenuItemFingerprint.result?.let {
|
@ -1,28 +1,37 @@
|
||||
package app.revanced.patches.music.flyoutpanel.sleeptimer.patch
|
||||
package app.revanced.patches.music.flyoutpanel.sleeptimer
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.flyoutpanel.sleeptimer.fingerprints.SleepTimerFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Enable sleep timer")
|
||||
@Description("Add sleep timer to flyout menu.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class SleepTimerPatch : BytecodePatch(
|
||||
listOf(SleepTimerFingerprint)
|
||||
@Patch(
|
||||
name = "Enable sleep timer",
|
||||
description = "Add sleep timer to flyout menu.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object SleepTimerPatch : BytecodePatch(
|
||||
setOf(SleepTimerFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -1,22 +1,31 @@
|
||||
package app.revanced.patches.music.general.amoled.patch
|
||||
package app.revanced.patches.music.general.amoled
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.shared.patch.litho.LithoThemePatch
|
||||
import app.revanced.util.integrations.Constants.MUSIC_UTILS_PATH
|
||||
import org.w3c.dom.Element
|
||||
|
||||
@Patch
|
||||
@Name("Amoled")
|
||||
@Description("Applies pure black theme on some components.")
|
||||
@DependsOn([LithoThemePatch::class])
|
||||
@MusicCompatibility
|
||||
class AmoledPatch : ResourcePatch {
|
||||
@Patch(
|
||||
name = "Amoled",
|
||||
description = "Applies pure black theme on some components.",
|
||||
dependencies = [LithoThemePatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object AmoledPatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
LithoThemePatch.injectCall("$MUSIC_UTILS_PATH/LithoThemePatch;->applyLithoTheme(I)I")
|
@ -1,28 +1,37 @@
|
||||
package app.revanced.patches.music.general.autocaptions.patch
|
||||
package app.revanced.patches.music.general.autocaptions
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.shared.fingerprints.captions.SubtitleTrackFingerprint
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Disable auto captions")
|
||||
@Description("Disables forced auto captions.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class DisableAutoCaptionsPatch : BytecodePatch(
|
||||
listOf(SubtitleTrackFingerprint)
|
||||
@Patch(
|
||||
name = "Disable auto captions",
|
||||
description = "Disables forced auto captions.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
],
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DisableAutoCaptionsPatch : BytecodePatch(
|
||||
setOf(SubtitleTrackFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -0,0 +1,35 @@
|
||||
package app.revanced.patches.music.general.branding.icon
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
import app.revanced.util.resources.IconHelper.customIconMusicAdditional
|
||||
|
||||
@Patch(
|
||||
name = "Custom branding icon MMT",
|
||||
description = "Changes the YouTube Music launcher icon to MMT.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
],
|
||||
use = false
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CustomBrandingIconMMTPatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.customIconMusic("mmt")
|
||||
context.customIconMusicAdditional("mmt")
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package app.revanced.patches.music.general.branding.icon
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
|
||||
@Patch(
|
||||
name = "Custom branding icon Revancify blue",
|
||||
description = "Changes the YouTube Music launcher icon to Revancify Blue.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CustomBrandingIconRevancifyBluePatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.customIconMusic("revancify-blue")
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package app.revanced.patches.music.general.branding.icon
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
|
||||
@Patch(
|
||||
name = "Custom branding icon Revancify red",
|
||||
description = "Changes the YouTube Music launcher icon to Revancify Red.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
],
|
||||
use = false
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CustomBrandingIconRevancifyRedPatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.customIconMusic("revancify-red")
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
package app.revanced.patches.music.general.branding.icon.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
import app.revanced.util.resources.IconHelper.customIconMusicAdditional
|
||||
|
||||
@Patch(false)
|
||||
@Name("Custom branding icon MMT")
|
||||
@Description("Changes the YouTube Music launcher icon to MMT.")
|
||||
@MusicCompatibility
|
||||
class CustomBrandingIconMMTPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.customIconMusic("mmt")
|
||||
context.customIconMusicAdditional("mmt")
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package app.revanced.patches.music.general.branding.icon.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
|
||||
@Patch
|
||||
@Name("Custom branding icon Revancify blue")
|
||||
@Description("Changes the YouTube Music launcher icon to Revancify Blue.")
|
||||
@MusicCompatibility
|
||||
class CustomBrandingIconRevancifyBluePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.customIconMusic("revancify-blue")
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package app.revanced.patches.music.general.branding.icon.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.util.resources.IconHelper.customIconMusic
|
||||
|
||||
@Patch(false)
|
||||
@Name("Custom branding icon Revancify red")
|
||||
@Description("Changes the YouTube Music launcher icon to Revancify Red.")
|
||||
@MusicCompatibility
|
||||
class CustomBrandingIconRevancifyRedPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.customIconMusic("revancify-red")
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package app.revanced.patches.music.general.branding.name
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.patch.options.types.StringPatchOption.Companion.stringPatchOption
|
||||
|
||||
@Patch(
|
||||
name = "Custom branding Music name",
|
||||
description = "Rename the YouTube Music app to the name specified in options.json.",
|
||||
dependencies = [RemoveElementsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CustomBrandingNamePatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
val longName = MusicLongName
|
||||
?: throw PatchException("Invalid app name.")
|
||||
|
||||
val shortName = MusicShortName
|
||||
?: throw PatchException("Invalid app name.")
|
||||
|
||||
context.xmlEditor["res/values/strings.xml"].use { editor ->
|
||||
val document = editor.file
|
||||
|
||||
mapOf(
|
||||
"app_name" to longName,
|
||||
"app_launcher_name" to shortName
|
||||
).forEach { (k, v) ->
|
||||
val stringElement = document.createElement("string")
|
||||
|
||||
stringElement.setAttribute("name", k)
|
||||
stringElement.textContent = v
|
||||
|
||||
document.getElementsByTagName("resources").item(0).appendChild(stringElement)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal var MusicLongName by stringPatchOption(
|
||||
key = "MusicLongName",
|
||||
default = "ReVanced Extended Music",
|
||||
title = "Application Name of YouTube Music",
|
||||
description = "The name of the YouTube Music it will show on your notification panel."
|
||||
)
|
||||
|
||||
internal var MusicShortName by stringPatchOption(
|
||||
key = "MusicShortName",
|
||||
default = "RVX Music",
|
||||
title = "Application Name of YouTube Music",
|
||||
description = "The name of the YouTube Music it will show on your home screen."
|
||||
)
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package app.revanced.patches.music.general.branding.name
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import kotlin.io.path.exists
|
||||
|
||||
object RemoveElementsPatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
LANGUAGE_LIST.forEach { path ->
|
||||
val resDirectory = context["res"]
|
||||
val targetXmlPath = resDirectory.resolve(path).resolve("strings.xml").toPath()
|
||||
|
||||
if (targetXmlPath.exists()) {
|
||||
val targetXml = context["res/$path/strings.xml"]
|
||||
|
||||
targetXml.writeText(
|
||||
targetXml.readText()
|
||||
.replace(""".+"app_launcher_name".+""".toRegex(), "")
|
||||
.replace(""".+"app_name".+""".toRegex(), "")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private val LANGUAGE_LIST = arrayOf(
|
||||
"values",
|
||||
"values-af",
|
||||
"values-am",
|
||||
"values-ar",
|
||||
"values-ar-rXB",
|
||||
"values-as",
|
||||
"values-az",
|
||||
"values-b+es+419",
|
||||
"values-b+sr+Latn",
|
||||
"values-be",
|
||||
"values-bg",
|
||||
"values-bn",
|
||||
"values-bs",
|
||||
"values-ca",
|
||||
"values-cs",
|
||||
"values-da",
|
||||
"values-de",
|
||||
"values-el",
|
||||
"values-en-rAU",
|
||||
"values-en-rCA",
|
||||
"values-en-rGB",
|
||||
"values-en-rIN",
|
||||
"values-en-rXA",
|
||||
"values-en-rXC",
|
||||
"values-es",
|
||||
"values-es-rUS",
|
||||
"values-et",
|
||||
"values-eu",
|
||||
"values-fa",
|
||||
"values-fi",
|
||||
"values-fr",
|
||||
"values-fr-rCA",
|
||||
"values-gl",
|
||||
"values-gu",
|
||||
"values-hi",
|
||||
"values-hr",
|
||||
"values-hu",
|
||||
"values-hy",
|
||||
"values-id",
|
||||
"values-in",
|
||||
"values-is",
|
||||
"values-it",
|
||||
"values-iw",
|
||||
"values-ja",
|
||||
"values-ka",
|
||||
"values-kk",
|
||||
"values-km",
|
||||
"values-kn",
|
||||
"values-ko",
|
||||
"values-ky",
|
||||
"values-lo",
|
||||
"values-lt",
|
||||
"values-lv",
|
||||
"values-mk",
|
||||
"values-ml",
|
||||
"values-mn",
|
||||
"values-mr",
|
||||
"values-ms",
|
||||
"values-my",
|
||||
"values-nb",
|
||||
"values-ne",
|
||||
"values-nl",
|
||||
"values-no",
|
||||
"values-or",
|
||||
"values-pa",
|
||||
"values-pl",
|
||||
"values-pt",
|
||||
"values-pt-rBR",
|
||||
"values-pt-rPT",
|
||||
"values-ro",
|
||||
"values-ru",
|
||||
"values-si",
|
||||
"values-sk",
|
||||
"values-sl",
|
||||
"values-sq",
|
||||
"values-sr",
|
||||
"values-sv",
|
||||
"values-sw",
|
||||
"values-ta",
|
||||
"values-te",
|
||||
"values-th",
|
||||
"values-tl",
|
||||
"values-tr",
|
||||
"values-uk",
|
||||
"values-ur",
|
||||
"values-uz",
|
||||
"values-vi",
|
||||
"values-zh",
|
||||
"values-zh-rCN",
|
||||
"values-zh-rHK",
|
||||
"values-zh-rTW",
|
||||
"values-zu"
|
||||
)
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package app.revanced.patches.music.layout.branding.name.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.OptionsContainer
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.PatchOption
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
|
||||
@Patch
|
||||
@Name("Custom branding Music name")
|
||||
@Description("Rename the YouTube Music app to the name specified in options.json.")
|
||||
@DependsOn([RemoveElementsPatch::class])
|
||||
@MusicCompatibility
|
||||
class CustomBrandingNamePatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
val longName = MusicLongName
|
||||
?: throw PatchException("Invalid app name.")
|
||||
|
||||
val shortName = MusicShortName
|
||||
?: throw PatchException("Invalid app name.")
|
||||
|
||||
context.xmlEditor["res/values/strings.xml"].use { editor ->
|
||||
val document = editor.file
|
||||
|
||||
mapOf(
|
||||
"app_name" to longName,
|
||||
"app_launcher_name" to shortName
|
||||
).forEach { (k, v) ->
|
||||
val stringElement = document.createElement("string")
|
||||
|
||||
stringElement.setAttribute("name", k)
|
||||
stringElement.textContent = v
|
||||
|
||||
document.getElementsByTagName("resources").item(0).appendChild(stringElement)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
companion object : OptionsContainer() {
|
||||
var MusicLongName: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "MusicLongName",
|
||||
default = "ReVanced Extended Music",
|
||||
title = "Application Name of YouTube Music",
|
||||
description = "The name of the YouTube Music it will show on your notification panel."
|
||||
)
|
||||
)
|
||||
var MusicShortName: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "MusicShortName",
|
||||
default = "RVX Music",
|
||||
title = "Application Name of YouTube Music",
|
||||
description = "The name of the YouTube Music it will show on your home screen."
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
package app.revanced.patches.music.layout.branding.name.patch
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import kotlin.io.path.exists
|
||||
|
||||
class RemoveElementsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
LANGUAGE_LIST.forEach { path ->
|
||||
val resDirectory = context["res"]
|
||||
val targetXmlPath = resDirectory.resolve(path).resolve("strings.xml").toPath()
|
||||
|
||||
if (targetXmlPath.exists()) {
|
||||
val targetXml = context["res/$path/strings.xml"]
|
||||
|
||||
targetXml.writeText(
|
||||
targetXml.readText()
|
||||
.replace(""".+"app_launcher_name".+""".toRegex(), "")
|
||||
.replace(""".+"app_name".+""".toRegex(), "")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
companion object {
|
||||
val LANGUAGE_LIST = arrayOf(
|
||||
"values",
|
||||
"values-af",
|
||||
"values-am",
|
||||
"values-ar",
|
||||
"values-ar-rXB",
|
||||
"values-as",
|
||||
"values-az",
|
||||
"values-b+es+419",
|
||||
"values-b+sr+Latn",
|
||||
"values-be",
|
||||
"values-bg",
|
||||
"values-bn",
|
||||
"values-bs",
|
||||
"values-ca",
|
||||
"values-cs",
|
||||
"values-da",
|
||||
"values-de",
|
||||
"values-el",
|
||||
"values-en-rAU",
|
||||
"values-en-rCA",
|
||||
"values-en-rGB",
|
||||
"values-en-rIN",
|
||||
"values-en-rXA",
|
||||
"values-en-rXC",
|
||||
"values-es",
|
||||
"values-es-rUS",
|
||||
"values-et",
|
||||
"values-eu",
|
||||
"values-fa",
|
||||
"values-fi",
|
||||
"values-fr",
|
||||
"values-fr-rCA",
|
||||
"values-gl",
|
||||
"values-gu",
|
||||
"values-hi",
|
||||
"values-hr",
|
||||
"values-hu",
|
||||
"values-hy",
|
||||
"values-id",
|
||||
"values-in",
|
||||
"values-is",
|
||||
"values-it",
|
||||
"values-iw",
|
||||
"values-ja",
|
||||
"values-ka",
|
||||
"values-kk",
|
||||
"values-km",
|
||||
"values-kn",
|
||||
"values-ko",
|
||||
"values-ky",
|
||||
"values-lo",
|
||||
"values-lt",
|
||||
"values-lv",
|
||||
"values-mk",
|
||||
"values-ml",
|
||||
"values-mn",
|
||||
"values-mr",
|
||||
"values-ms",
|
||||
"values-my",
|
||||
"values-nb",
|
||||
"values-ne",
|
||||
"values-nl",
|
||||
"values-no",
|
||||
"values-or",
|
||||
"values-pa",
|
||||
"values-pl",
|
||||
"values-pt",
|
||||
"values-pt-rBR",
|
||||
"values-pt-rPT",
|
||||
"values-ro",
|
||||
"values-ru",
|
||||
"values-si",
|
||||
"values-sk",
|
||||
"values-sl",
|
||||
"values-sq",
|
||||
"values-sr",
|
||||
"values-sv",
|
||||
"values-sw",
|
||||
"values-ta",
|
||||
"values-te",
|
||||
"values-th",
|
||||
"values-tl",
|
||||
"values-tr",
|
||||
"values-uk",
|
||||
"values-ur",
|
||||
"values-uz",
|
||||
"values-vi",
|
||||
"values-zh",
|
||||
"values-zh-rCN",
|
||||
"values-zh-rHK",
|
||||
"values-zh-rTW",
|
||||
"values-zu"
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package app.revanced.patches.music.general.buttonshelf
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide button shelf",
|
||||
description = "Hides the button shelf from homepage and explorer.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideButtonShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_button_shelf",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/ButtonShelfFilter;"
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package app.revanced.patches.music.general.buttonshelf.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Hide button shelf")
|
||||
@Description("Hides the button shelf from homepage and explorer.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideButtonShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_button_shelf",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/ButtonShelfFilter;"
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package app.revanced.patches.music.general.carouselshelf
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide carousel shelf",
|
||||
description = "Hides the carousel shelf from homepage and explorer.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideCarouselShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_carousel_shelf",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/CarouselShelfFilter;"
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package app.revanced.patches.music.general.carouselshelf.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Hide carousel shelf")
|
||||
@Description("Hides the carousel shelf from homepage and explorer.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideCarouselShelfPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_carousel_shelf",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/CarouselShelfFilter;"
|
||||
}
|
||||
}
|
@ -1,39 +1,46 @@
|
||||
package app.revanced.patches.music.general.castbutton.patch
|
||||
package app.revanced.patches.music.general.castbutton
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.castbutton.fingerprints.MediaRouteButtonFingerprint
|
||||
import app.revanced.patches.music.general.castbutton.fingerprints.PlayerOverlayChipFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PlayerOverlayChip
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.PlayerOverlayChip
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Hide cast button")
|
||||
@Description("Hides the cast button.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide cast button",
|
||||
description = "Hides the cast button.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideCastButtonPatch : BytecodePatch(
|
||||
listOf(
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideCastButtonPatch : BytecodePatch(
|
||||
setOf(
|
||||
MediaRouteButtonFingerprint,
|
||||
PlayerOverlayChipFingerprint
|
||||
)
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.general.castbutton.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PlayerOverlayChip
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.PlayerOverlayChip
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
@ -1,34 +1,41 @@
|
||||
package app.revanced.patches.music.general.categorybar.patch
|
||||
package app.revanced.patches.music.general.categorybar
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.categorybar.fingerprints.ChipCloudFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Hide category bar")
|
||||
@Description("Hides the music category bar at the top of the homepage.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide category bar",
|
||||
description = "Hides the music category bar at the top of the homepage.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class CategoryBarPatch : BytecodePatch(
|
||||
listOf(ChipCloudFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CategoryBarPatch : BytecodePatch(
|
||||
setOf(ChipCloudFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
ChipCloudFingerprint.result?.let {
|
@ -1,7 +1,7 @@
|
||||
package app.revanced.patches.music.general.categorybar.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.ChipCloud
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.ChipCloud
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
|
@ -0,0 +1,47 @@
|
||||
package app.revanced.patches.music.general.channelguidelines
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide channel guidelines",
|
||||
description = "Hides channel guidelines at the top of comments.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideChannelGuidelinesPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_channel_guidelines",
|
||||
"true"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/ChannelGuidelinesFilter;"
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package app.revanced.patches.music.general.channelguidelines.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Hide channel guidelines")
|
||||
@Description("Hides channel guidelines at the top of comments.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideChannelGuidelinesPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_channel_guidelines",
|
||||
"true"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/ChannelGuidelinesFilter;"
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package app.revanced.patches.music.general.customfilter
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Enable custom filter",
|
||||
description = "Enables custom filter to hide layout components.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CustomFilterPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_custom_filter",
|
||||
"false"
|
||||
)
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_custom_filter_strings",
|
||||
"revanced_custom_filter"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/CustomFilter;"
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
package app.revanced.patches.music.general.customfilter.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Enable custom filter")
|
||||
@Description("Enables custom filter to hide layout components.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class CustomFilterPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_custom_filter",
|
||||
"false"
|
||||
)
|
||||
SettingsPatch.addMusicPreferenceWithIntent(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_custom_filter_strings",
|
||||
"revanced_custom_filter"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/CustomFilter;"
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package app.revanced.patches.music.general.emojipicker
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide emoji picker",
|
||||
description = "Hides emoji picker at the comments box.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideEmojiPickerPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_emoji_picker",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/EmojiPickerFilter;"
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package app.revanced.patches.music.general.emojipicker.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Hide emoji picker")
|
||||
@Description("Hides emoji picker at the comments box.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HideEmojiPickerPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_emoji_picker",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/EmojiPickerFilter;"
|
||||
}
|
||||
}
|
@ -1,36 +1,43 @@
|
||||
package app.revanced.patches.music.general.floatingbutton.patch
|
||||
package app.revanced.patches.music.general.floatingbutton
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.music.general.floatingbutton.fingerprints.FloatingButtonFingerprint
|
||||
import app.revanced.patches.music.general.floatingbutton.fingerprints.FloatingButtonParentFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
|
||||
@Patch
|
||||
@Name("Hide new playlist button")
|
||||
@Description("Hides the \"New playlist\" button in the library.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide new playlist button",
|
||||
description = "Hides the \"New playlist\" button in the library.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class NewPlaylistButtonPatch : BytecodePatch(
|
||||
listOf(FloatingButtonParentFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object NewPlaylistButtonPatch : BytecodePatch(
|
||||
setOf(FloatingButtonParentFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -1,32 +1,39 @@
|
||||
package app.revanced.patches.music.general.landscapemode.patch
|
||||
package app.revanced.patches.music.general.landscapemode
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.landscapemode.fingerprints.TabletIdentifierFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
|
||||
@Patch
|
||||
@Name("Enable landscape mode")
|
||||
@Description("Enables entry into landscape mode by screen rotation on the phone.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Enable landscape mode",
|
||||
description = "Enables entry into landscape mode by screen rotation on the phone.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class LandScapeModePatch : BytecodePatch(
|
||||
listOf(TabletIdentifierFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object LandScapeModePatch : BytecodePatch(
|
||||
setOf(TabletIdentifierFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
TabletIdentifierFingerprint.result?.let {
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.general.landscapemode.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.IsTablet
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.IsTablet
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
@ -1,29 +1,38 @@
|
||||
package app.revanced.patches.music.general.oldstylelibraryshelf.patch
|
||||
package app.revanced.patches.music.general.oldstylelibraryshelf
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.oldstylelibraryshelf.fingerprints.BrowseIdFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.bytecode.getStringIndex
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Enable old style library shelf")
|
||||
@Description("Return the library shelf to old style.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class OldStyleLibraryShelfPatch : BytecodePatch(
|
||||
listOf(BrowseIdFingerprint)
|
||||
@Patch(
|
||||
name = "Enable old style library shelf",
|
||||
description = "Return the library shelf to old style.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object OldStyleLibraryShelfPatch : BytecodePatch(
|
||||
setOf(BrowseIdFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -0,0 +1,47 @@
|
||||
package app.revanced.patches.music.general.playlistcard
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.litho.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Hide playlist card",
|
||||
description = "Hides the playlist card from homepage.",
|
||||
dependencies = [
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HidePlaylistCardPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_playlist_card",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/PlaylistCardFilter;"
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package app.revanced.patches.music.general.playlistcard.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.litho.patch.LithoFilterPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_ADS_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Hide playlist card")
|
||||
@Description("Hides the playlist card from homepage.")
|
||||
@DependsOn(
|
||||
[
|
||||
LithoFilterPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class HidePlaylistCardPatch : BytecodePatch() {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.GENERAL,
|
||||
"revanced_hide_playlist_card",
|
||||
"false"
|
||||
)
|
||||
|
||||
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private const val FILTER_CLASS_DESCRIPTOR =
|
||||
"$MUSIC_ADS_PATH/PlaylistCardFilter;"
|
||||
}
|
||||
}
|
@ -1,37 +1,44 @@
|
||||
package app.revanced.patches.music.general.startpage.patch
|
||||
package app.revanced.patches.music.general.startpage
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.startpage.fingerprints.ColdStartUpFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.intenthook.patch.IntentHookPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch.Companion.contexts
|
||||
import app.revanced.patches.music.utils.intenthook.IntentHookPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch.contexts
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||
import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Start page")
|
||||
@Description("Set the default start page.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Start page",
|
||||
description = "Set the default start page.",
|
||||
dependencies = [
|
||||
IntentHookPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class StartPagePatch : BytecodePatch(
|
||||
listOf(ColdStartUpFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object StartPagePatch : BytecodePatch(
|
||||
setOf(ColdStartUpFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -0,0 +1,40 @@
|
||||
package app.revanced.patches.music.general.tooltip
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.tooltip.fingerprints.TooltipContentViewFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
|
||||
@Patch(
|
||||
name = "Hide tooltip content",
|
||||
description = "Hides the tooltip box that appears on first install.",
|
||||
dependencies = [SharedResourceIdPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object TooltipContentViewPatch : BytecodePatch(
|
||||
setOf(TooltipContentViewFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
TooltipContentViewFingerprint.result?.mutableMethod?.addInstruction(
|
||||
0,
|
||||
"return-void"
|
||||
) ?: throw TooltipContentViewFingerprint.exception
|
||||
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.general.tooltip.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.ToolTipContentView
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.ToolTipContentView
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
package app.revanced.patches.music.general.tooltip.patch
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.general.tooltip.fingerprints.TooltipContentViewFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
|
||||
@Patch
|
||||
@Name("Hide tooltip content")
|
||||
@Description("Hides the tooltip box that appears on first install.")
|
||||
@DependsOn([SharedResourceIdPatch::class])
|
||||
@MusicCompatibility
|
||||
class TooltipContentViewPatch : BytecodePatch(
|
||||
listOf(TooltipContentViewFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
TooltipContentViewFingerprint.result?.mutableMethod?.addInstruction(
|
||||
0,
|
||||
"return-void"
|
||||
) ?: throw TooltipContentViewFingerprint.exception
|
||||
|
||||
}
|
||||
}
|
@ -1,22 +1,32 @@
|
||||
package app.revanced.patches.music.misc.backgroundplay.patch
|
||||
package app.revanced.patches.music.misc.backgroundplay
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.misc.backgroundplay.fingerprints.BackgroundPlaybackParentFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
|
||||
@Patch
|
||||
@Name("Background play")
|
||||
@Description("Enables playing music in the background.")
|
||||
@MusicCompatibility
|
||||
class BackgroundPlayPatch : BytecodePatch(
|
||||
listOf(BackgroundPlaybackParentFingerprint)
|
||||
@Patch(
|
||||
name = "Background play",
|
||||
description = "Enables playing music in the background.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object BackgroundPlayPatch : BytecodePatch(
|
||||
setOf(BackgroundPlaybackParentFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -1,17 +1,27 @@
|
||||
package app.revanced.patches.music.misc.bitrate.patch
|
||||
package app.revanced.patches.music.misc.bitrate
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
|
||||
@Patch
|
||||
@Name("Bitrate default value")
|
||||
@Description("Set the audio quality to \"Always High\" when you first install the app.")
|
||||
@MusicCompatibility
|
||||
class BitrateDefaultValuePatch : ResourcePatch {
|
||||
@Patch(
|
||||
name = "Bitrate default value",
|
||||
description = "Set the audio quality to \"Always High\" when you first install the app.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object BitrateDefaultValuePatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
context.xmlEditor[RESOURCE_FILE_PATH].use { editor ->
|
||||
editor.file.getElementsByTagName("com.google.android.apps.youtube.music.ui.preference.PreferenceCategoryCompat")
|
||||
@ -34,7 +44,5 @@ class BitrateDefaultValuePatch : ResourcePatch {
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val RESOURCE_FILE_PATH = "res/xml/data_saving_settings.xml"
|
||||
}
|
||||
private const val RESOURCE_FILE_PATH = "res/xml/data_saving_settings.xml"
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package app.revanced.patches.music.misc.codecs
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.opus.AbstractOpusCodecsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Enable opus codec",
|
||||
description = "Enable opus codec when playing audio.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object CodecsUnlockPatch : AbstractOpusCodecsPatch(
|
||||
"$MUSIC_MISC_PATH/OpusCodecPatch;->enableOpusCodec()Z"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_opus_codec",
|
||||
"true"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package app.revanced.patches.music.misc.codecs.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.opus.AbstractOpusCodecsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Enable opus codec")
|
||||
@Description("Enable opus codec when playing audio.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class CodecsUnlockPatch : AbstractOpusCodecsPatch(
|
||||
"$MUSIC_MISC_PATH/OpusCodecPatch;->enableOpusCodec()Z"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_opus_codec",
|
||||
"true"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package app.revanced.patches.music.misc.debugging
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch(
|
||||
name = "Enable debug logging",
|
||||
description = "Adds debugging options.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
],
|
||||
use = false
|
||||
)
|
||||
@Suppress("unused")
|
||||
object DebuggingPatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_debug_logging",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package app.revanced.patches.music.misc.debugging.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
|
||||
@Patch(false)
|
||||
@Name("Enable debug logging")
|
||||
@Description("Adds debugging options.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class DebuggingPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_enable_debug_logging",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,31 +1,41 @@
|
||||
package app.revanced.patches.music.misc.exclusiveaudio.patch
|
||||
package app.revanced.patches.music.misc.exclusiveaudio
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.DataSavingSettingsFragmentFingerprint
|
||||
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.MusicBrowserServiceFingerprint
|
||||
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.PodCastConfigFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.util.bytecode.getStringIndex
|
||||
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
|
||||
|
||||
@Patch
|
||||
@Name("Exclusive audio playback")
|
||||
@Description("Enables the option to play music without video.")
|
||||
@MusicCompatibility
|
||||
class ExclusiveAudioPatch : BytecodePatch(
|
||||
listOf(
|
||||
@Patch(
|
||||
name = "Exclusive audio playback",
|
||||
description = "Enables the option to play music without video.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ExclusiveAudioPatch : BytecodePatch(
|
||||
setOf(
|
||||
DataSavingSettingsFragmentFingerprint,
|
||||
MusicBrowserServiceFingerprint,
|
||||
PodCastConfigFingerprint
|
@ -0,0 +1,37 @@
|
||||
package app.revanced.patches.music.misc.minimizedplayback
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.misc.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
||||
|
||||
@Patch(
|
||||
name = "Enable minimized playback",
|
||||
description = "Enables minimized playback on Kids music.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object MinimizedPlaybackPatch : BytecodePatch(
|
||||
setOf(MinimizedPlaybackManagerFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
MinimizedPlaybackManagerFingerprint.result?.mutableMethod?.addInstruction(
|
||||
0, "return-void"
|
||||
) ?: throw MinimizedPlaybackManagerFingerprint.exception
|
||||
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package app.revanced.patches.music.misc.minimizedplayback.patch
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.misc.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
|
||||
@Patch
|
||||
@Name("Enable minimized playback")
|
||||
@Description("Enables minimized playback on Kids music.")
|
||||
@MusicCompatibility
|
||||
class MinimizedPlaybackPatch : BytecodePatch(
|
||||
listOf(MinimizedPlaybackManagerFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
MinimizedPlaybackManagerFingerprint.result?.mutableMethod?.addInstruction(
|
||||
0, "return-void"
|
||||
) ?: throw MinimizedPlaybackManagerFingerprint.exception
|
||||
|
||||
}
|
||||
}
|
@ -1,24 +1,21 @@
|
||||
package app.revanced.patches.music.misc.premium.patch
|
||||
package app.revanced.patches.music.misc.premium
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patches.music.misc.premium.fingerprints.AccountMenuFooterFingerprint
|
||||
import app.revanced.patches.music.misc.premium.fingerprints.HideGetPremiumFingerprint
|
||||
import app.revanced.patches.music.misc.premium.fingerprints.MembershipSettingsFingerprint
|
||||
import app.revanced.patches.music.misc.premium.fingerprints.MembershipSettingsParentFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PrivacyTosFooter
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.PrivacyTosFooter
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
@ -26,13 +23,25 @@ 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.Reference
|
||||
|
||||
@Patch
|
||||
@Name("Hide get premium")
|
||||
@Description("Hides \"Get Premium\" label from the account menu or settings.")
|
||||
@DependsOn([SharedResourceIdPatch::class])
|
||||
@MusicCompatibility
|
||||
class HideGetPremiumPatch : BytecodePatch(
|
||||
listOf(
|
||||
@Patch(
|
||||
name = "Hide get premium",
|
||||
description = "Hides \"Get Premium\" label from the account menu or settings.",
|
||||
dependencies = [SharedResourceIdPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object HideGetPremiumPatch : BytecodePatch(
|
||||
setOf(
|
||||
AccountMenuFooterFingerprint,
|
||||
HideGetPremiumFingerprint,
|
||||
MembershipSettingsParentFingerprint
|
||||
@ -105,7 +114,5 @@ class HideGetPremiumPatch : BytecodePatch(
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
lateinit var targetReference: Reference
|
||||
}
|
||||
private lateinit var targetReference: Reference
|
||||
}
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.misc.premium.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PrivacyTosFooter
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.PrivacyTosFooter
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
@ -0,0 +1,45 @@
|
||||
package app.revanced.patches.music.misc.spoofappversion
|
||||
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.general.oldstylelibraryshelf.OldStyleLibraryShelfPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.versionspoof.AbstractVersionSpoofPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
|
||||
@Patch(
|
||||
name = "Spoof app version",
|
||||
description = "Spoof the YouTube Music client version.",
|
||||
dependencies = [
|
||||
OldStyleLibraryShelfPatch::class,
|
||||
SettingsPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object SpoofAppVersionPatch : AbstractVersionSpoofPatch(
|
||||
"$MUSIC_MISC_PATH/SpoofAppVersionPatch;->getVersionOverride(Ljava/lang/String;)Ljava/lang/String;"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_spoof_app_version",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,23 +1,33 @@
|
||||
package app.revanced.patches.music.misc.tastebuilder.patch
|
||||
package app.revanced.patches.music.misc.tastebuilder
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.misc.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Hide taste builder")
|
||||
@Description("Hides the \"Tell us which artists you like\" card from homepage.")
|
||||
@MusicCompatibility
|
||||
class TasteBuilderPatch : BytecodePatch(
|
||||
listOf(TasteBuilderConstructorFingerprint)
|
||||
@Patch(
|
||||
name = "Hide taste builder",
|
||||
description = "Hides the \"Tell us which artists you like\" card from homepage.",
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object TasteBuilderPatch : BytecodePatch(
|
||||
setOf(TasteBuilderConstructorFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
TasteBuilderConstructorFingerprint.result?.let {
|
@ -0,0 +1,61 @@
|
||||
package app.revanced.patches.music.misc.translations
|
||||
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.resources.ResourceHelper.addTranslations
|
||||
|
||||
@Patch(
|
||||
name = "Translations",
|
||||
description = "Add Crowdin translations for YouTube Music.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object TranslationsPatch : ResourcePatch() {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.addTranslations("music", LANGUAGE_LIST)
|
||||
|
||||
}
|
||||
|
||||
private val LANGUAGE_LIST = arrayOf(
|
||||
"az-rAZ",
|
||||
"be-rBY",
|
||||
"bn",
|
||||
"cs-rCZ",
|
||||
"de-rDE",
|
||||
"el-rGR",
|
||||
"es-rES",
|
||||
"fr-rFR",
|
||||
"hi-rIN",
|
||||
"hu-rHU",
|
||||
"id-rID",
|
||||
"in",
|
||||
"it-rIT",
|
||||
"ja-rJP",
|
||||
"ko-rKR",
|
||||
"nl-rNL",
|
||||
"pl-rPL",
|
||||
"pt-rBR",
|
||||
"ru-rRU",
|
||||
"th-rTH",
|
||||
"tr-rTR",
|
||||
"uk-rUA",
|
||||
"vi-rVN",
|
||||
"zh-rCN",
|
||||
"zh-rTW"
|
||||
)
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package app.revanced.patches.music.misc.translations.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.ResourceContext
|
||||
import app.revanced.patcher.patch.ResourcePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.util.resources.ResourceHelper.addTranslations
|
||||
|
||||
@Patch
|
||||
@Name("Translations")
|
||||
@Description("Add Crowdin translations for YouTube Music.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class TranslationsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext) {
|
||||
|
||||
context.addTranslations("music", LANGUAGE_LIST)
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
val LANGUAGE_LIST = arrayOf(
|
||||
"az-rAZ",
|
||||
"be-rBY",
|
||||
"bn",
|
||||
"cs-rCZ",
|
||||
"de-rDE",
|
||||
"el-rGR",
|
||||
"es-rES",
|
||||
"fr-rFR",
|
||||
"hi-rIN",
|
||||
"hu-rHU",
|
||||
"id-rID",
|
||||
"in",
|
||||
"it-rIT",
|
||||
"ja-rJP",
|
||||
"ko-rKR",
|
||||
"nl-rNL",
|
||||
"pl-rPL",
|
||||
"pt-rBR",
|
||||
"ru-rRU",
|
||||
"th-rTH",
|
||||
"tr-rTR",
|
||||
"uk-rUA",
|
||||
"vi-rVN",
|
||||
"zh-rCN",
|
||||
"zh-rTW"
|
||||
)
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package app.revanced.patches.music.misc.versionspoof.patch
|
||||
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patches.music.general.oldstylelibraryshelf.patch.OldStyleLibraryShelfPatch
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.shared.patch.versionspoof.AbstractVersionSpoofPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_MISC_PATH
|
||||
|
||||
@Patch
|
||||
@Name("Spoof app version")
|
||||
@Description("Spoof the YouTube Music client version.")
|
||||
@DependsOn(
|
||||
[
|
||||
OldStyleLibraryShelfPatch::class,
|
||||
SettingsPatch::class
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class SpoofAppVersionPatch : AbstractVersionSpoofPatch(
|
||||
"$MUSIC_MISC_PATH/SpoofAppVersionPatch;->getVersionOverride(Ljava/lang/String;)Ljava/lang/String;"
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
super.execute(context)
|
||||
|
||||
SettingsPatch.addMusicPreference(
|
||||
CategoryType.MISC,
|
||||
"revanced_spoof_app_version",
|
||||
"false"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
@ -1,34 +1,41 @@
|
||||
package app.revanced.patches.music.navigation.black.patch
|
||||
package app.revanced.patches.music.navigation.black
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.navigation.black.fingerprints.TabLayoutFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_NAVIGATION
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Enable black navigation bar")
|
||||
@Description("Sets the navigation bar color to black.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Enable black navigation bar",
|
||||
description = "Sets the navigation bar color to black.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class BlackNavigationBarPatch : BytecodePatch(
|
||||
listOf(TabLayoutFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object BlackNavigationBarPatch : BytecodePatch(
|
||||
setOf(TabLayoutFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.navigation.black.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.ColorGrey
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.ColorGrey
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
@ -1,19 +1,16 @@
|
||||
package app.revanced.patches.music.navigation.component.patch
|
||||
package app.revanced.patches.music.navigation.component
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.PatchException
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.navigation.component.fingerprints.TabLayoutTextFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_NAVIGATION
|
||||
@ -23,18 +20,28 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
@Patch
|
||||
@Name("Hide navigation bar component")
|
||||
@Description("Hides navigation bar components.")
|
||||
@DependsOn(
|
||||
[
|
||||
@Patch(
|
||||
name = "Hide navigation bar component",
|
||||
description = "Hides navigation bar components.",
|
||||
dependencies = [
|
||||
SettingsPatch::class,
|
||||
SharedResourceIdPatch::class
|
||||
],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
@MusicCompatibility
|
||||
class NavigationBarComponentPatch : BytecodePatch(
|
||||
listOf(TabLayoutTextFingerprint)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object NavigationBarComponentPatch : BytecodePatch(
|
||||
setOf(TabLayoutTextFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
/**
|
||||
@ -135,8 +142,6 @@ class NavigationBarComponentPatch : BytecodePatch(
|
||||
)
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val FLAG = "android:layout_weight"
|
||||
const val RESOURCE_FILE_PATH = "res/layout/image_with_text_tab.xml"
|
||||
}
|
||||
private const val FLAG = "android:layout_weight"
|
||||
private const val RESOURCE_FILE_PATH = "res/layout/image_with_text_tab.xml"
|
||||
}
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.navigation.component.fingerprints
|
||||
|
||||
import app.revanced.patcher.extensions.or
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.Text1
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.Text1
|
||||
import app.revanced.util.bytecode.isWideLiteralExists
|
||||
import com.android.tools.smali.dexlib2.AccessFlags
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
@ -1,20 +1,17 @@
|
||||
package app.revanced.patches.music.player.colormatchplayer.patch
|
||||
package app.revanced.patches.music.player.colormatchplayer
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||
import app.revanced.patcher.util.smali.ExternalLabel
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.fingerprints.PlayerColorFingerprint
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_PLAYER
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
@ -22,13 +19,25 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@Patch
|
||||
@Name("Enable color match player")
|
||||
@Description("Matches the color of the mini player and the fullscreen player.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class ColorMatchPlayerPatch : BytecodePatch(
|
||||
listOf(PlayerColorFingerprint)
|
||||
@Patch(
|
||||
name = "Enable color match player",
|
||||
description = "Matches the color of the mini player and the fullscreen player.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object ColorMatchPlayerPatch : BytecodePatch(
|
||||
setOf(PlayerColorFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
||||
@ -75,11 +84,9 @@ class ColorMatchPlayerPatch : BytecodePatch(
|
||||
|
||||
}
|
||||
|
||||
private companion object {
|
||||
var relativeIndex by Delegates.notNull<Int>()
|
||||
private var relativeIndex by Delegates.notNull<Int>()
|
||||
|
||||
fun MutableMethod.descriptor(index: Int): String {
|
||||
private fun MutableMethod.descriptor(index: Int): String {
|
||||
return getInstruction<ReferenceInstruction>(relativeIndex + index).reference.toString()
|
||||
}
|
||||
}
|
||||
}
|
@ -1,27 +1,36 @@
|
||||
package app.revanced.patches.music.player.minimizedplayer.patch
|
||||
package app.revanced.patches.music.player.minimizedplayer
|
||||
|
||||
import app.revanced.extensions.exception
|
||||
import app.revanced.patcher.annotation.Description
|
||||
import app.revanced.patcher.annotation.Name
|
||||
import app.revanced.patcher.data.BytecodeContext
|
||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||
import app.revanced.patcher.patch.BytecodePatch
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||
import app.revanced.patcher.patch.annotation.Patch
|
||||
import app.revanced.patches.music.player.minimizedplayer.fingerprints.MinimizedPlayerFingerprint
|
||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
||||
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||
import app.revanced.util.enum.CategoryType
|
||||
import app.revanced.util.integrations.Constants.MUSIC_PLAYER
|
||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||
|
||||
@Patch
|
||||
@Name("Enable force minimized player")
|
||||
@Description("Keep player permanently minimized even if another track is played.")
|
||||
@DependsOn([SettingsPatch::class])
|
||||
@MusicCompatibility
|
||||
class MinimizedPlayerPatch : BytecodePatch(
|
||||
listOf(MinimizedPlayerFingerprint)
|
||||
@Patch(
|
||||
name = "Enable force minimized player",
|
||||
description = "Keep player permanently minimized even if another track is played.",
|
||||
dependencies = [SettingsPatch::class],
|
||||
compatiblePackages = [
|
||||
CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
[
|
||||
"6.15.52",
|
||||
"6.20.51",
|
||||
"6.21.51",
|
||||
"6.22.51"
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@Suppress("unused")
|
||||
object MinimizedPlayerPatch : BytecodePatch(
|
||||
setOf(MinimizedPlayerFingerprint)
|
||||
) {
|
||||
override fun execute(context: BytecodeContext) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user