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
|
# These are Windows script files and should use crlf
|
||||||
*.bat text eol=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
|
blank_issues_enabled: false
|
||||||
contact_links:
|
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
|
- name: 🗨 Discussions
|
||||||
url: https://github.com/revanced/revanced-suggestions/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:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -7,7 +7,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pull-request:
|
pull-request:
|
||||||
@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Open pull request
|
- name: Open pull request
|
||||||
uses: repo-sync/pull-request@v2
|
uses: repo-sync/pull-request@v2
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Make sure the release step uses its own credentials:
|
# Make sure the release step uses its own credentials:
|
||||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||||
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -120,4 +120,7 @@ gradle-app.setting
|
|||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
# Dependency directories
|
# Dependency directories
|
||||||
node_modules/
|
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">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</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>
|
</project>
|
10
.releaserc
10
.releaserc
@ -7,7 +7,13 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@semantic-release/commit-analyzer",
|
[
|
||||||
|
"@semantic-release/commit-analyzer", {
|
||||||
|
"releaseRules": [
|
||||||
|
{ "type": "build", "scope": "Needs bump", "release": "patch" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/changelog",
|
"@semantic-release/changelog",
|
||||||
"gradle-semantic-release-plugin",
|
"gradle-semantic-release-plugin",
|
||||||
@ -39,7 +45,7 @@
|
|||||||
[
|
[
|
||||||
"@saithodev/semantic-release-backmerge",
|
"@saithodev/semantic-release-backmerge",
|
||||||
{
|
{
|
||||||
branches: [{from: "main", to: "dev"}],
|
backmergeBranches: [{"from": "main", "to": "dev"}],
|
||||||
clearWorkspace: true
|
clearWorkspace: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
2725
CHANGELOG.md
2725
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -15,15 +15,12 @@ Example:
|
|||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "default-video-quality",
|
"name": "Default video quality",
|
||||||
"description": "Adds ability to set default video quality settings.",
|
"description": "Adds ability to set default video quality settings.",
|
||||||
"excluded": false,
|
"compatiblePackages":[
|
||||||
"options": [],
|
|
||||||
"dependencies": [],
|
|
||||||
"compatiblePackages": [
|
|
||||||
{
|
{
|
||||||
"name": "com.google.android.youtube",
|
"name":"com.google.android.youtube",
|
||||||
"versions": [
|
"versions":[
|
||||||
"18.22.37",
|
"18.22.37",
|
||||||
"18.23.36",
|
"18.23.36",
|
||||||
"18.24.37",
|
"18.24.37",
|
||||||
@ -36,14 +33,14 @@ Example:
|
|||||||
"18.33.40"
|
"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.",
|
"description": "Save the video quality value whenever you change the video quality.",
|
||||||
"excluded": false,
|
|
||||||
"options": [],
|
|
||||||
"dependencies": [],
|
|
||||||
"compatiblePackages": [
|
"compatiblePackages": [
|
||||||
{
|
{
|
||||||
"name": "com.google.android.apps.youtube.music",
|
"name": "com.google.android.apps.youtube.music",
|
||||||
@ -54,7 +51,10 @@ Example:
|
|||||||
"6.22.51"
|
"6.22.51"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"use":true,
|
||||||
|
"requiresIntegrations":false,
|
||||||
|
"options": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
366
README.md
366
README.md
@ -9,107 +9,107 @@ ReVanced Extended Patches.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 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 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 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 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 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 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 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 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 |
|
| `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 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 |
|
| `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 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 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 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 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 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 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 |
|
| `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 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 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 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 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 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 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 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 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 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 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 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 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 |
|
| `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 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 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 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 |
|
| `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 |
|
| `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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `Translations` | Add Crowdin translations for YouTube. | 18.22.37 ~ 18.33.40 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||||
@ -117,66 +117,66 @@ ReVanced Extended Patches.
|
|||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `amoled` | Applies pure black theme on some components. | 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 |
|
| `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 |
|
| `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 |
|
| `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 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 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 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 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 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 |
|
| `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 |
|
| `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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
|
| `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 |
|
| `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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 |
|
| `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 |
|
| `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 |
|
| `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 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 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 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 |
|
| `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 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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `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 |
|
| `Translations` | Add Crowdin translations for YouTube Music. | 6.15.52 ~ 6.22.51 |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
|
### [📦 `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 |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `disable-screenshot-popup` | Disables the popup that shows up when taking a screenshot. | all |
|
| `Disable screenshot popup` | Disables the popup that shows up when taking a screenshot. | all |
|
||||||
| `hide-ads` | Hides ads from the Reddit. | all |
|
| `Hide ads` | Hides ads from the Reddit. | all |
|
||||||
| `hide-navigation-buttons` | Hide buttons at navigation bar. | all |
|
| `Hide navigation buttons` | Hide buttons at navigation bar. | all |
|
||||||
| `hide-place-button` | Hide r/place button in toolbar. | all |
|
| `Hide place button` | Hide r/place button in toolbar. | all |
|
||||||
| `open-links-directly` | Skips over redirection URLs to external links. | 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 |
|
| `Open links externally` | Open links outside of the app directly in your browser. | all |
|
||||||
| `premium-icon` | Unlocks premium icons. | 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 |
|
||||||
| `sanitize-sharing-links` | Removes (tracking) query parameters from the URLs when sharing links. | all |
|
| `Settings` | Adds ReVanced settings to Reddit. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
@ -206,15 +206,12 @@ Example:
|
|||||||
```json
|
```json
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "default-video-quality",
|
"name": "Default video quality",
|
||||||
"description": "Adds ability to set default video quality settings.",
|
"description": "Adds ability to set default video quality settings.",
|
||||||
"excluded": false,
|
"compatiblePackages":[
|
||||||
"options": [],
|
|
||||||
"dependencies": [],
|
|
||||||
"compatiblePackages": [
|
|
||||||
{
|
{
|
||||||
"name": "com.google.android.youtube",
|
"name":"com.google.android.youtube",
|
||||||
"versions": [
|
"versions":[
|
||||||
"18.22.37",
|
"18.22.37",
|
||||||
"18.23.36",
|
"18.23.36",
|
||||||
"18.24.37",
|
"18.24.37",
|
||||||
@ -227,14 +224,14 @@ Example:
|
|||||||
"18.33.40"
|
"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.",
|
"description": "Save the video quality value whenever you change the video quality.",
|
||||||
"excluded": false,
|
|
||||||
"options": [],
|
|
||||||
"dependencies": [],
|
|
||||||
"compatiblePackages": [
|
"compatiblePackages": [
|
||||||
{
|
{
|
||||||
"name": "com.google.android.apps.youtube.music",
|
"name": "com.google.android.apps.youtube.music",
|
||||||
@ -245,7 +242,10 @@ Example:
|
|||||||
"6.22.51"
|
"6.22.51"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"use":true,
|
||||||
|
"requiresIntegrations":false,
|
||||||
|
"options": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
@ -1,25 +1,22 @@
|
|||||||
@file:Suppress("DEPRECATION")
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.10"
|
kotlin("jvm") version "1.9.10"
|
||||||
|
alias(libs.plugins.ksp)
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "app.revanced"
|
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 {
|
repositories {
|
||||||
google()
|
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
google()
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||||
credentials {
|
credentials {
|
||||||
username = githubUsername
|
username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
||||||
password = githubPassword
|
password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Required for FlexVer-Java
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://repo.sleeping.town")
|
url = uri("https://repo.sleeping.town")
|
||||||
content {
|
content {
|
||||||
@ -29,13 +26,18 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:14.2.2")
|
implementation(libs.revanced.patcher)
|
||||||
implementation("com.android.tools.smali:smali:3.0.3")
|
implementation(libs.smali)
|
||||||
|
implementation(libs.revanced.patch.annotation.processor)
|
||||||
|
// Used in JsonGenerator.
|
||||||
|
implementation(libs.gson)
|
||||||
|
implementation(libs.flexver)
|
||||||
|
|
||||||
// Required for meta
|
ksp(libs.revanced.patch.annotation.processor)
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
}
|
||||||
// Required for FlexVer-Java
|
|
||||||
implementation("com.unascribed:flexver-java:1.1.1")
|
kotlin {
|
||||||
|
jvmToolchain(11)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@ -44,11 +46,10 @@ tasks {
|
|||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
val androidHome =
|
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
||||||
System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
|
||||||
val d8 = "${androidHome}/build-tools/34.0.0/d8"
|
val d8 = "${androidHome}/build-tools/34.0.0/d8"
|
||||||
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
||||||
val work = File("${buildDir}/libs")
|
val work = layout.buildDirectory.dir("libs").get().asFile
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
workingDir = work
|
workingDir = work
|
||||||
@ -61,6 +62,7 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
register<JavaExec>("generateMeta") {
|
register<JavaExec>("generateMeta") {
|
||||||
description = "Generate metadata for this bundle"
|
description = "Generate metadata for this bundle"
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
@ -68,6 +70,7 @@ tasks {
|
|||||||
classpath = sourceSets["main"].runtimeClasspath
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dummy task to fix the Gradle semantic-release plugin.
|
// Dummy task to fix the Gradle semantic-release plugin.
|
||||||
// Remove this if you forked it to support building only.
|
// Remove this if you forked it to support building only.
|
||||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching=true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.190.24
|
version = 2.190.24
|
||||||
|
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
|
package app.revanced.extensions
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
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.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
@ -32,7 +31,7 @@ internal fun MutableMethodImplementation.injectHideCall(
|
|||||||
* @return The [PatchException] for the [MethodFingerprint].
|
* @return The [PatchException] for the [MethodFingerprint].
|
||||||
*/
|
*/
|
||||||
val MethodFingerprint.exception
|
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].
|
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
||||||
|
@ -1,67 +1,41 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
import app.revanced.patcher.PatchSet
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
import app.revanced.patcher.patch.Patch
|
||||||
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 com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal class JsonGenerator : PatchesFileGenerator {
|
internal class JsonGenerator : PatchesFileGenerator {
|
||||||
override fun generate(bundle: PatchBundlePatches) {
|
override fun generate(patches: PatchSet) = patches.map {
|
||||||
val patches = bundle.map {
|
JsonPatch(
|
||||||
JsonPatch(
|
it.name!!,
|
||||||
it.patchName,
|
it.description,
|
||||||
it.description ?: "This patch has no description.",
|
it.compatiblePackages,
|
||||||
!it.include,
|
it.use,
|
||||||
it.options?.map { option ->
|
it.requiresIntegrations,
|
||||||
JsonPatch.Option(
|
it.options.values.map { option ->
|
||||||
option.key,
|
JsonPatch.Option(option.key, option.value, option.title, option.description, option.required)
|
||||||
option.title,
|
}
|
||||||
option.description,
|
)
|
||||||
option.required,
|
}.let {
|
||||||
option.let { listOption ->
|
File("patches.json").writeText(GsonBuilder().serializeNulls().create().toJson(it))
|
||||||
if (listOption is PatchOption.ListOption<*>) {
|
|
||||||
listOption.options.toMutableList().toTypedArray()
|
|
||||||
} else null
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}?.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))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
private class JsonPatch(
|
private class JsonPatch(
|
||||||
val name: String,
|
val name: String? = null,
|
||||||
val description: String,
|
val description: String? = null,
|
||||||
val excluded: Boolean,
|
val compatiblePackages: Set<Patch.CompatiblePackage>? = null,
|
||||||
val options: Array<Option>,
|
val use: Boolean = true,
|
||||||
val dependencies: Array<String>,
|
val requiresIntegrations: Boolean = false,
|
||||||
val compatiblePackages: Array<CompatiblePackage>,
|
val options: List<Option>
|
||||||
) {
|
) {
|
||||||
class CompatiblePackage(
|
|
||||||
val name: String,
|
|
||||||
val versions: Array<String>,
|
|
||||||
)
|
|
||||||
|
|
||||||
class Option(
|
class Option(
|
||||||
val key: String,
|
val key: String,
|
||||||
val title: String,
|
val default: Any?,
|
||||||
val description: String,
|
val title: String?,
|
||||||
|
val description: String?,
|
||||||
val required: Boolean,
|
val required: Boolean,
|
||||||
val choices: Array<*>?,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,11 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.PatchBundleLoader
|
import app.revanced.patcher.PatchBundleLoader
|
||||||
import app.revanced.patcher.patch.PatchClass
|
import app.revanced.patcher.PatchSet
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal typealias PatchBundlePatches = List<PatchClass>
|
|
||||||
|
|
||||||
internal interface PatchesFileGenerator {
|
internal interface PatchesFileGenerator {
|
||||||
fun generate(bundle: PatchBundlePatches)
|
fun generate(patches: PatchSet)
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@ -16,11 +14,7 @@ internal interface PatchesFileGenerator {
|
|||||||
).also { loader ->
|
).also { loader ->
|
||||||
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
||||||
}.let { bundle ->
|
}.let { bundle ->
|
||||||
arrayOf(JsonGenerator(), ReadmeGenerator()).forEach { generator ->
|
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) }
|
||||||
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.music.account.component.fingerprints.MenuEntryFingerprint
|
import app.revanced.patches.music.account.component.fingerprints.MenuEntryFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
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.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide account menu")
|
name = "Hide account menu",
|
||||||
@Description("Hide account menu elements.")
|
description = "Hide account menu elements.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class MenuComponentPatch : BytecodePatch(
|
object MenuComponentPatch : BytecodePatch(
|
||||||
listOf(MenuEntryFingerprint)
|
setOf(MenuEntryFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|
||||||
@ -69,13 +76,11 @@ class MenuComponentPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private fun MutableMethod.targetIndex(descriptor: String): Int {
|
||||||
fun MutableMethod.targetIndex(descriptor: String): Int {
|
return implementation?.let {
|
||||||
return implementation?.let {
|
it.instructions.indexOfFirst { instruction ->
|
||||||
it.instructions.indexOfFirst { instruction ->
|
((instruction as? ReferenceInstruction)?.reference as? MethodReference)?.name == descriptor
|
||||||
((instruction as? ReferenceInstruction)?.reference as? MethodReference)?.name == descriptor
|
}
|
||||||
}
|
} ?: throw PatchException("No Method Implementation found!")
|
||||||
} ?: throw PatchException("No Method Implementation found!")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.music.account.component.fingerprints
|
package app.revanced.patches.music.account.component.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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
|
import app.revanced.util.bytecode.isWideLiteralExists
|
||||||
|
|
||||||
object MenuEntryFingerprint : MethodFingerprint(
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.account.handle.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
import app.revanced.patches.music.account.handle.fingerprints.AccountSwitcherAccessibilityLabelFingerprint
|
||||||
import app.revanced.patches.music.account.handle.fingerprints.NamesInactiveAccountThumbnailSizeFingerprint
|
import app.revanced.patches.music.account.handle.fingerprints.NamesInactiveAccountThumbnailSizeFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.instruction.formats.Instruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide handle")
|
name = "Hide handle",
|
||||||
@Description("Hides the handle in the account switcher.")
|
description = "Hides the handle in the account switcher.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class HideHandlePatch : BytecodePatch(
|
object HideHandlePatch : BytecodePatch(
|
||||||
listOf(
|
setOf(
|
||||||
AccountSwitcherAccessibilityLabelFingerprint,
|
AccountSwitcherAccessibilityLabelFingerprint,
|
||||||
NamesInactiveAccountThumbnailSizeFingerprint
|
NamesInactiveAccountThumbnailSizeFingerprint
|
||||||
)
|
)
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.music.account.handle.fingerprints
|
package app.revanced.patches.music.account.handle.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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
|
import app.revanced.util.bytecode.isWideLiteralExists
|
||||||
|
|
||||||
object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
object AccountSwitcherAccessibilityLabelFingerprint : MethodFingerprint(
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.music.account.handle.fingerprints
|
package app.revanced.patches.music.account.handle.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.account.tos.fingerprints.TermsOfServiceFingerprint
|
import app.revanced.patches.music.account.tos.fingerprints.TermsOfServiceFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.TosFooter
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.TosFooter
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_ACCOUNT
|
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.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction35c
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide terms container")
|
name = "Hide terms container",
|
||||||
@Description("Hides terms of service container at the account menu.")
|
description = "Hides terms of service container at the account menu.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class TermsContainerPatch : BytecodePatch(
|
object TermsContainerPatch : BytecodePatch(
|
||||||
listOf(TermsOfServiceFingerprint)
|
setOf(TermsOfServiceFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.music.account.tos.fingerprints
|
package app.revanced.patches.music.account.tos.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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
|
import app.revanced.util.bytecode.isWideLiteralExists
|
||||||
|
|
||||||
object TermsOfServiceFingerprint : MethodFingerprint(
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.actionbar.label.fingerprints.ActionBarLabelFingerprint
|
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.fingerprints.ActionsBarParentFingerprint
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
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.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_ACTIONBAR
|
import app.revanced.util.integrations.Constants.MUSIC_ACTIONBAR
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide action bar label")
|
name = "Hide action bar label",
|
||||||
@Description("Hide labels in action bar.")
|
description = "Hide labels in action bar.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class ActionBarLabelPatch : BytecodePatch(
|
object ActionBarLabelPatch : BytecodePatch(
|
||||||
listOf(ActionsBarParentFingerprint)
|
setOf(ActionsBarParentFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
ActionsBarParentFingerprint.result?.let { parentResult ->
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.music.flyoutpanel.compactdialog.fingerprints.DialogSolidFingerprint
|
import app.revanced.patches.music.flyoutpanel.compactdialog.fingerprints.DialogSolidFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Enable compact dialog")
|
name = "Enable compact dialog",
|
||||||
@Description("Enable compact dialog on phone.")
|
description = "Enable compact dialog on phone.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class CompactDialogPatch : BytecodePatch(
|
object CompactDialogPatch : BytecodePatch(
|
||||||
listOf(DialogSolidFingerprint)
|
setOf(DialogSolidFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
DialogSolidFingerprint.result?.let {
|
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.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.music.flyoutpanel.utils.EnumUtils.getEnumIndex
|
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.fingerprints.MenuItemFingerprint
|
||||||
import app.revanced.patches.music.utils.flyoutbutton.patch.FlyoutButtonContainerPatch
|
import app.revanced.patches.music.utils.flyoutbutton.FlyoutButtonContainerPatch
|
||||||
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.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide flyout panel")
|
name = "Hide flyout panel",
|
||||||
@Description("Hides flyout panel components.")
|
description = "Hides flyout panel components.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
FlyoutButtonContainerPatch::class,
|
FlyoutButtonContainerPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class FlyoutPanelPatch : BytecodePatch(
|
object FlyoutPanelPatch : BytecodePatch(
|
||||||
listOf(MenuItemFingerprint)
|
setOf(MenuItemFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
MenuItemFingerprint.result?.let {
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.flyoutpanel.utils.EnumUtils.getEnumIndex
|
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.fingerprints.MenuItemFingerprint
|
||||||
import app.revanced.patches.music.utils.flyoutbutton.patch.FlyoutButtonItemResourcePatch
|
import app.revanced.patches.music.utils.flyoutbutton.FlyoutButtonItemResourcePatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.video.information.patch.VideoInformationPatch
|
import app.revanced.patches.music.video.information.VideoInformationPatch
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Replace dismiss queue")
|
name = "Replace dismiss queue",
|
||||||
@Description("Replace dismiss queue menu to watch on YouTube.")
|
description = "Replace dismiss queue menu to watch on YouTube.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
FlyoutButtonItemResourcePatch::class,
|
FlyoutButtonItemResourcePatch::class,
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
VideoInformationPatch::class
|
VideoInformationPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class ReplaceDismissQueuePatch : BytecodePatch(
|
object ReplaceDismissQueuePatch : BytecodePatch(
|
||||||
listOf(MenuItemFingerprint)
|
setOf(MenuItemFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
MenuItemFingerprint.result?.let {
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.flyoutpanel.sleeptimer.fingerprints.SleepTimerFingerprint
|
import app.revanced.patches.music.flyoutpanel.sleeptimer.fingerprints.SleepTimerFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
import app.revanced.util.integrations.Constants.MUSIC_FLYOUT
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Enable sleep timer")
|
name = "Enable sleep timer",
|
||||||
@Description("Add sleep timer to flyout menu.")
|
description = "Add sleep timer to flyout menu.",
|
||||||
@DependsOn([SettingsPatch::class])
|
dependencies = [SettingsPatch::class],
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class SleepTimerPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(SleepTimerFingerprint)
|
"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) {
|
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.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
|
||||||
import app.revanced.patches.shared.patch.litho.LithoThemePatch
|
import app.revanced.patches.shared.patch.litho.LithoThemePatch
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_UTILS_PATH
|
import app.revanced.util.integrations.Constants.MUSIC_UTILS_PATH
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Amoled")
|
name = "Amoled",
|
||||||
@Description("Applies pure black theme on some components.")
|
description = "Applies pure black theme on some components.",
|
||||||
@DependsOn([LithoThemePatch::class])
|
dependencies = [LithoThemePatch::class],
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class AmoledPatch : ResourcePatch {
|
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) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
|
||||||
LithoThemePatch.injectCall("$MUSIC_UTILS_PATH/LithoThemePatch;->applyLithoTheme(I)I")
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.patches.shared.fingerprints.captions.SubtitleTrackFingerprint
|
import app.revanced.patches.shared.fingerprints.captions.SubtitleTrackFingerprint
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Disable auto captions")
|
name = "Disable auto captions",
|
||||||
@Description("Disables forced auto captions.")
|
description = "Disables forced auto captions.",
|
||||||
@DependsOn([SettingsPatch::class])
|
dependencies = [SettingsPatch::class],
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class DisableAutoCaptionsPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(SubtitleTrackFingerprint)
|
"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) {
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.general.castbutton.fingerprints.MediaRouteButtonFingerprint
|
import app.revanced.patches.music.general.castbutton.fingerprints.MediaRouteButtonFingerprint
|
||||||
import app.revanced.patches.music.general.castbutton.fingerprints.PlayerOverlayChipFingerprint
|
import app.revanced.patches.music.general.castbutton.fingerprints.PlayerOverlayChipFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.PlayerOverlayChip
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PlayerOverlayChip
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide cast button")
|
name = "Hide cast button",
|
||||||
@Description("Hides the cast button.")
|
description = "Hides the cast button.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class HideCastButtonPatch : BytecodePatch(
|
object HideCastButtonPatch : BytecodePatch(
|
||||||
listOf(
|
setOf(
|
||||||
MediaRouteButtonFingerprint,
|
MediaRouteButtonFingerprint,
|
||||||
PlayerOverlayChipFingerprint
|
PlayerOverlayChipFingerprint
|
||||||
)
|
)
|
@ -2,7 +2,7 @@ package app.revanced.patches.music.general.castbutton.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.general.categorybar.fingerprints.ChipCloudFingerprint
|
import app.revanced.patches.music.general.categorybar.fingerprints.ChipCloudFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide category bar")
|
name = "Hide category bar",
|
||||||
@Description("Hides the music category bar at the top of the homepage.")
|
description = "Hides the music category bar at the top of the homepage.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class CategoryBarPatch : BytecodePatch(
|
object CategoryBarPatch : BytecodePatch(
|
||||||
listOf(ChipCloudFingerprint)
|
setOf(ChipCloudFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
ChipCloudFingerprint.result?.let {
|
ChipCloudFingerprint.result?.let {
|
@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.music.general.categorybar.fingerprints
|
package app.revanced.patches.music.general.categorybar.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.music.general.floatingbutton.fingerprints.FloatingButtonFingerprint
|
import app.revanced.patches.music.general.floatingbutton.fingerprints.FloatingButtonFingerprint
|
||||||
import app.revanced.patches.music.general.floatingbutton.fingerprints.FloatingButtonParentFingerprint
|
import app.revanced.patches.music.general.floatingbutton.fingerprints.FloatingButtonParentFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide new playlist button")
|
name = "Hide new playlist button",
|
||||||
@Description("Hides the \"New playlist\" button in the library.")
|
description = "Hides the \"New playlist\" button in the library.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class NewPlaylistButtonPatch : BytecodePatch(
|
object NewPlaylistButtonPatch : BytecodePatch(
|
||||||
listOf(FloatingButtonParentFingerprint)
|
setOf(FloatingButtonParentFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.general.landscapemode.fingerprints.TabletIdentifierFingerprint
|
import app.revanced.patches.music.general.landscapemode.fingerprints.TabletIdentifierFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Enable landscape mode")
|
name = "Enable landscape mode",
|
||||||
@Description("Enables entry into landscape mode by screen rotation on the phone.")
|
description = "Enables entry into landscape mode by screen rotation on the phone.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class LandScapeModePatch : BytecodePatch(
|
object LandScapeModePatch : BytecodePatch(
|
||||||
listOf(TabletIdentifierFingerprint)
|
setOf(TabletIdentifierFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
TabletIdentifierFingerprint.result?.let {
|
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.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.general.oldstylelibraryshelf.fingerprints.BrowseIdFingerprint
|
import app.revanced.patches.music.general.oldstylelibraryshelf.fingerprints.BrowseIdFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.bytecode.getStringIndex
|
import app.revanced.util.bytecode.getStringIndex
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Enable old style library shelf")
|
name = "Enable old style library shelf",
|
||||||
@Description("Return the library shelf to old style.")
|
description = "Return the library shelf to old style.",
|
||||||
@DependsOn([SettingsPatch::class])
|
dependencies = [SettingsPatch::class],
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class OldStyleLibraryShelfPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(BrowseIdFingerprint)
|
"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) {
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.general.startpage.fingerprints.ColdStartUpFingerprint
|
import app.revanced.patches.music.general.startpage.fingerprints.ColdStartUpFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.intenthook.IntentHookPatch
|
||||||
import app.revanced.patches.music.utils.intenthook.patch.IntentHookPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch.contexts
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch.Companion.contexts
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
import app.revanced.util.integrations.Constants.MUSIC_GENERAL
|
||||||
import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
import app.revanced.util.resources.ResourceUtils.copyXmlNode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Start page")
|
name = "Start page",
|
||||||
@Description("Set the default start page.")
|
description = "Set the default start page.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
IntentHookPatch::class,
|
IntentHookPatch::class,
|
||||||
SettingsPatch::class
|
SettingsPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class StartPagePatch : BytecodePatch(
|
object StartPagePatch : BytecodePatch(
|
||||||
listOf(ColdStartUpFingerprint)
|
setOf(ColdStartUpFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
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.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.music.misc.backgroundplay.fingerprints.BackgroundPlaybackParentFingerprint
|
import app.revanced.patches.music.misc.backgroundplay.fingerprints.BackgroundPlaybackParentFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Background play")
|
name = "Background play",
|
||||||
@Description("Enables playing music in the background.")
|
description = "Enables playing music in the background.",
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class BackgroundPlayPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(BackgroundPlaybackParentFingerprint)
|
"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) {
|
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.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Bitrate default value")
|
name = "Bitrate default value",
|
||||||
@Description("Set the audio quality to \"Always High\" when you first install the app.")
|
description = "Set the audio quality to \"Always High\" when you first install the app.",
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class BitrateDefaultValuePatch : ResourcePatch {
|
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) {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor[RESOURCE_FILE_PATH].use { editor ->
|
context.xmlEditor[RESOURCE_FILE_PATH].use { editor ->
|
||||||
editor.file.getElementsByTagName("com.google.android.apps.youtube.music.ui.preference.PreferenceCategoryCompat")
|
editor.file.getElementsByTagName("com.google.android.apps.youtube.music.ui.preference.PreferenceCategoryCompat")
|
||||||
@ -34,7 +44,5 @@ class BitrateDefaultValuePatch : ResourcePatch {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private const val RESOURCE_FILE_PATH = "res/xml/data_saving_settings.xml"
|
||||||
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.DataSavingSettingsFragmentFingerprint
|
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.MusicBrowserServiceFingerprint
|
||||||
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.PodCastConfigFingerprint
|
import app.revanced.patches.music.misc.exclusiveaudio.fingerprints.PodCastConfigFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
|
||||||
import app.revanced.util.bytecode.getStringIndex
|
import app.revanced.util.bytecode.getStringIndex
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
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.OneRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Exclusive audio playback")
|
name = "Exclusive audio playback",
|
||||||
@Description("Enables the option to play music without video.")
|
description = "Enables the option to play music without video.",
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class ExclusiveAudioPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(
|
"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,
|
DataSavingSettingsFragmentFingerprint,
|
||||||
MusicBrowserServiceFingerprint,
|
MusicBrowserServiceFingerprint,
|
||||||
PodCastConfigFingerprint
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
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.AccountMenuFooterFingerprint
|
||||||
import app.revanced.patches.music.misc.premium.fingerprints.HideGetPremiumFingerprint
|
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.MembershipSettingsFingerprint
|
||||||
import app.revanced.patches.music.misc.premium.fingerprints.MembershipSettingsParentFingerprint
|
import app.revanced.patches.music.misc.premium.fingerprints.MembershipSettingsParentFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.PrivacyTosFooter
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch.Companion.PrivacyTosFooter
|
|
||||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
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.instruction.TwoRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide get premium")
|
name = "Hide get premium",
|
||||||
@Description("Hides \"Get Premium\" label from the account menu or settings.")
|
description = "Hides \"Get Premium\" label from the account menu or settings.",
|
||||||
@DependsOn([SharedResourceIdPatch::class])
|
dependencies = [SharedResourceIdPatch::class],
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class HideGetPremiumPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(
|
"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,
|
AccountMenuFooterFingerprint,
|
||||||
HideGetPremiumFingerprint,
|
HideGetPremiumFingerprint,
|
||||||
MembershipSettingsParentFingerprint
|
MembershipSettingsParentFingerprint
|
||||||
@ -105,7 +114,5 @@ class HideGetPremiumPatch : BytecodePatch(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private lateinit var targetReference: Reference
|
||||||
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.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
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.misc.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide taste builder")
|
name = "Hide taste builder",
|
||||||
@Description("Hides the \"Tell us which artists you like\" card from homepage.")
|
description = "Hides the \"Tell us which artists you like\" card from homepage.",
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class TasteBuilderPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(TasteBuilderConstructorFingerprint)
|
"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) {
|
override fun execute(context: BytecodeContext) {
|
||||||
TasteBuilderConstructorFingerprint.result?.let {
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.navigation.black.fingerprints.TabLayoutFingerprint
|
import app.revanced.patches.music.navigation.black.fingerprints.TabLayoutFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_NAVIGATION
|
import app.revanced.util.integrations.Constants.MUSIC_NAVIGATION
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Enable black navigation bar")
|
name = "Enable black navigation bar",
|
||||||
@Description("Sets the navigation bar color to black.")
|
description = "Sets the navigation bar color to black.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class BlackNavigationBarPatch : BytecodePatch(
|
object BlackNavigationBarPatch : BytecodePatch(
|
||||||
listOf(TabLayoutFingerprint)
|
setOf(TabLayoutFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
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.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.navigation.component.fingerprints.TabLayoutTextFingerprint
|
import app.revanced.patches.music.navigation.component.fingerprints.TabLayoutTextFingerprint
|
||||||
import app.revanced.patches.music.utils.annotations.MusicCompatibility
|
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch
|
||||||
import app.revanced.patches.music.utils.resourceid.patch.SharedResourceIdPatch
|
import app.revanced.patches.music.utils.settings.SettingsPatch
|
||||||
import app.revanced.patches.music.utils.settings.resource.patch.SettingsPatch
|
|
||||||
import app.revanced.util.bytecode.getWideLiteralIndex
|
import app.revanced.util.bytecode.getWideLiteralIndex
|
||||||
import app.revanced.util.enum.CategoryType
|
import app.revanced.util.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_NAVIGATION
|
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.instruction.formats.Instruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide navigation bar component")
|
name = "Hide navigation bar component",
|
||||||
@Description("Hides navigation bar components.")
|
description = "Hides navigation bar components.",
|
||||||
@DependsOn(
|
dependencies = [
|
||||||
[
|
|
||||||
SettingsPatch::class,
|
SettingsPatch::class,
|
||||||
SharedResourceIdPatch::class
|
SharedResourceIdPatch::class
|
||||||
|
],
|
||||||
|
compatiblePackages = [
|
||||||
|
CompatiblePackage(
|
||||||
|
"com.google.android.apps.youtube.music",
|
||||||
|
[
|
||||||
|
"6.15.52",
|
||||||
|
"6.20.51",
|
||||||
|
"6.21.51",
|
||||||
|
"6.22.51"
|
||||||
|
]
|
||||||
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@MusicCompatibility
|
@Suppress("unused")
|
||||||
class NavigationBarComponentPatch : BytecodePatch(
|
object NavigationBarComponentPatch : BytecodePatch(
|
||||||
listOf(TabLayoutTextFingerprint)
|
setOf(TabLayoutTextFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
/**
|
/**
|
||||||
@ -135,8 +142,6 @@ class NavigationBarComponentPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private const val FLAG = "android:layout_weight"
|
||||||
const val FLAG = "android:layout_weight"
|
private const val RESOURCE_FILE_PATH = "res/layout/image_with_text_tab.xml"
|
||||||
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.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
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 app.revanced.util.bytecode.isWideLiteralExists
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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.extensions.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
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.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.enum.CategoryType
|
||||||
import app.revanced.util.integrations.Constants.MUSIC_PLAYER
|
import app.revanced.util.integrations.Constants.MUSIC_PLAYER
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
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 com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import kotlin.properties.Delegates
|
import kotlin.properties.Delegates
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Enable color match player")
|
name = "Enable color match player",
|
||||||
@Description("Matches the color of the mini player and the fullscreen player.")
|
description = "Matches the color of the mini player and the fullscreen player.",
|
||||||
@DependsOn([SettingsPatch::class])
|
dependencies = [SettingsPatch::class],
|
||||||
@MusicCompatibility
|
compatiblePackages = [
|
||||||
class ColorMatchPlayerPatch : BytecodePatch(
|
CompatiblePackage(
|
||||||
listOf(PlayerColorFingerprint)
|
"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) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
|
||||||
@ -75,11 +84,9 @@ class ColorMatchPlayerPatch : BytecodePatch(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
private var relativeIndex by Delegates.notNull<Int>()
|
||||||
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()
|
return getInstruction<ReferenceInstruction>(relativeIndex + index).reference.toString()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
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