Compare commits

..

32 Commits

Author SHA1 Message Date
semantic-release-bot
491ba809bf chore(release): 2.165.0-dev.9 [skip ci]
# [2.165.0-dev.9](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.8...v2.165.0-dev.9) (2023-03-13)

### Features

* **youtube:** bump compatibility to `18.05.40` ([#1743](https://github.com/revanced/revanced-patches/issues/1743)) ([5c0868e](5c0868e944))
2023-03-13 21:46:54 +00:00
LisoUseInAIKyrios
5c0868e944 feat(youtube): bump compatibility to 18.05.40 (#1743) 2023-03-13 22:44:50 +01:00
semantic-release-bot
af2888fd69 chore(release): 2.165.0-dev.8 [skip ci]
# [2.165.0-dev.8](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.7...v2.165.0-dev.8) (2023-03-12)

### Bug Fixes

* **twitch:** misspelling annotations ([5fd74a1](5fd74a1369))
* **youtube/return-youtube-dislike:** add missing strings ([ec5bb79](ec5bb79f97))

### Features

* **myexpenses/unlock-pro:** constrain to last working version ([66c3070](66c3070d6e))
* **reddit:** add more compatibility constraints ([6b71456](6b71456a42))
* **reddit:** bump compatibility to `2023.09.1` ([#1729](https://github.com/revanced/revanced-patches/issues/1729)) ([a66bcb1](a66bcb1d33))
* **twitch:** constraint compatibility to `14.6.1` ([#1736](https://github.com/revanced/revanced-patches/issues/1736)) ([0bc2ee1](0bc2ee11e2))
* **youtube/custom-video-buffer:** replace patch with removal notice ([#1718](https://github.com/revanced/revanced-patches/issues/1718)) ([136201c](136201cea6))
* **youtube:** bump compatibility to `18.05.40` ([#1704](https://github.com/revanced/revanced-patches/issues/1704)) ([d8c9a0f](d8c9a0f95b))
* **youtubevanced:** `general-ads` patch ([#1693](https://github.com/revanced/revanced-patches/issues/1693)) ([61830b1](61830b193c))
2023-03-12 23:27:32 +00:00
johnconner122
61830b193c feat(youtubevanced): general-ads patch (#1693) 2023-03-13 00:22:46 +01:00
LisoUseInAIKyrios
136201cea6 feat(youtube/custom-video-buffer): replace patch with removal notice (#1718)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-03-13 00:22:45 +01:00
EvadeMaster
5fd74a1369 fix(twitch): misspelling annotations 2023-03-13 00:21:42 +01:00
EvadeMaster
0bc2ee11e2 feat(twitch): constraint compatibility to 14.6.1 (#1736) 2023-03-13 00:21:41 +01:00
EvadeMaster
e9cb633350 chore(gradle): bump wrapper to 8.0.2 (#1737) 2023-03-13 00:21:41 +01:00
EvadeMaster
a66bcb1d33 feat(reddit): bump compatibility to 2023.09.1 (#1729) 2023-03-13 00:21:41 +01:00
EvadeMaster
d8c9a0f95b feat(youtube): bump compatibility to 18.05.40 (#1704) 2023-03-13 00:21:40 +01:00
LisoUseInAIKyrios
66c3070d6e feat(myexpenses/unlock-pro): constrain to last working version 2023-03-02 19:10:16 +01:00
LisousEinaiKyrios
6b71456a42 feat(reddit): add more compatibility constraints 2023-03-02 19:09:53 +01:00
LisousEinaiKyrios
ec5bb79f97 fix(youtube/return-youtube-dislike): add missing strings 2023-03-02 19:09:51 +01:00
Javier Flores
f63190ae31 chore: update gradle wrapper to 8.0.1 (#1680) 2023-02-27 01:00:50 +01:00
oSumAtrIX
263aaf1800 build: update dependencies
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-27 01:00:49 +01:00
oSumAtrIX
4c580b9fa0 refactor: remove unnecessary annotations
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-27 00:24:01 +01:00
semantic-release-bot
618f6746cc chore(release): 2.165.0-dev.7 [skip ci]
# [2.165.0-dev.7](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.6...v2.165.0-dev.7) (2023-02-26)

### Features

* **youtube/hide-autoplay-button:** do not disable autoplay button when hidden ([766172b](766172b8ff))
* **youtube:** `hide-floating-microphone-button` patch ([b379911](b379911b8b))
2023-02-26 22:17:18 +00:00
oSumAtrIX
24cb30f520 refactor(youtube/hide-timestamp): use better descriptions
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-26 23:10:36 +01:00
oSumAtrIX
b379911b8b feat(youtube): hide-floating-microphone-button patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-26 23:05:43 +01:00
oSumAtrIX
766172b8ff feat(youtube/hide-autoplay-button): do not disable autoplay button when hidden
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-26 22:38:09 +01:00
semantic-release-bot
e21ce083e7 chore(release): 2.165.0-dev.6 [skip ci]
# [2.165.0-dev.6](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.5...v2.165.0-dev.6) (2023-02-26)

### Bug Fixes

* **backdrops/pro-unlock:** constrain to most recent working app version ([#1677](https://github.com/revanced/revanced-patches/issues/1677)) ([cbd733c](cbd733c226))
2023-02-26 14:20:39 +00:00
KAZI MMT
cbd733c226 fix(backdrops/pro-unlock): constrain to most recent working app version (#1677) 2023-02-26 15:18:54 +01:00
semantic-release-bot
a7e53adaa1 chore(release): 2.165.0-dev.5 [skip ci]
# [2.165.0-dev.5](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.4...v2.165.0-dev.5) (2023-02-24)

### Features

* **youtube/general-ads:** do not hide components in library tab ([9d62835](9d62835db4))
2023-02-24 23:13:27 +00:00
oSumAtrIX
9d62835db4 feat(youtube/general-ads): do not hide components in library tab
This reverts commit 5a62eb1a28.

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-25 00:11:32 +01:00
semantic-release-bot
59647d7cb2 chore(release): 2.165.0-dev.4 [skip ci]
# [2.165.0-dev.4](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.3...v2.165.0-dev.4) (2023-02-24)

### Features

* **youtube/disable-player-popup-panels:** use better patch description ([aaaca32](aaaca326e7))
2023-02-24 23:04:24 +00:00
oSumAtrIX
aaaca326e7 feat(youtube/disable-player-popup-panels): use better patch description
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-25 00:02:13 +01:00
semantic-release-bot
f3ab06beea chore(release): 2.165.0-dev.3 [skip ci]
# [2.165.0-dev.3](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.2...v2.165.0-dev.3) (2023-02-24)

### Bug Fixes

* **instagram/hide-timeline-ads:** fix compatibility with newer versions ([#1672](https://github.com/revanced/revanced-patches/issues/1672)) ([bc43d9c](bc43d9c76f))
2023-02-24 22:52:17 +00:00
falafelp
bc43d9c76f fix(instagram/hide-timeline-ads): fix compatibility with newer versions (#1672)
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
2023-02-24 23:50:34 +01:00
semantic-release-bot
3bb9e3c504 chore(release): 2.165.0-dev.2 [skip ci]
# [2.165.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.165.0-dev.1...v2.165.0-dev.2) (2023-02-24)

### Bug Fixes

* **youtube/general-ads:** remove duplicate preference ([5ff2565](5ff256509a))
2023-02-24 12:49:37 +00:00
oSumAtrIX
5ff256509a fix(youtube/general-ads): remove duplicate preference 2023-02-24 13:47:12 +01:00
semantic-release-bot
dd16fbf0b2 chore(release): 2.165.0-dev.1 [skip ci]
# [2.165.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.164.0...v2.165.0-dev.1) (2023-02-24)

### Features

* **youtube/general-ads:** hide image shelf from search results ([e584da9](e584da9cbf))
2023-02-24 03:15:53 +00:00
oSumAtrIX
e584da9cbf feat(youtube/general-ads): hide image shelf from search results
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-24 04:14:09 +01:00
645 changed files with 6274 additions and 10759 deletions

View File

@@ -1,6 +1,6 @@
name: 🐞 Bug report name: 🐞 Bug report
description: Report a very clearly broken issue. description: Report a very clearly broken issue.
title: 'bug: ' title: 'bug: <title>'
labels: [bug] labels: [bug]
body: body:
- type: markdown - type: markdown

View File

@@ -1,6 +1,6 @@
name: ⭐ Patch Request name: ⭐ Patch Request
description: Create a detailed patch request. description: Create a detailed patch request.
title: 'feat: ' title: 'feat(patch): '
labels: [patch-request] labels: [patch-request]
body: body:
- type: textarea - type: textarea
@@ -24,7 +24,7 @@ body:
- type: textarea - type: textarea
attributes: attributes:
label: Motivation label: Motivation
description: Why should your patch request be considered? What makes it valuable to the community? description: Why should your patch request should be considered? What makes it valuable to the community?
validations: validations:
required: true required: true
- type: checkboxes - type: checkboxes
@@ -38,4 +38,4 @@ body:
- label: I have written a short but informative title. - label: I have written a short but informative title.
required: true required: true
- label: I filled out all of the requested information in this issue properly. - label: I filled out all of the requested information in this issue properly.
required: true required: true

2
.github/config.yml vendored
View File

@@ -1,2 +0,0 @@
firstPRMergeComment: >
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.

View File

@@ -21,10 +21,5 @@ jobs:
with: with:
destination_branch: 'main' destination_branch: 'main'
pr_title: 'chore: ${{ env.MESSAGE }}' pr_title: 'chore: ${{ env.MESSAGE }}'
pr_body: | pr_body: 'This pull request will ${{ env.MESSAGE }}.'
This pull request will ${{ env.MESSAGE }}.
## Dependencies before merge
- [ ] https://github.com/revanced/revanced-integrations
pr_draft: true pr_draft: true

View File

@@ -23,16 +23,23 @@ jobs:
# https://github.com/cycjimmy/semantic-release-action#private-packages # https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false persist-credentials: false
fetch-depth: 0 fetch-depth: 0
- name: Cache - name: Setup JDK
uses: actions/cache@v3 uses: actions/setup-java@v3
with: with:
path: | java-version: '17'
${{ runner.home }}/.gradle/caches distribution: 'zulu'
${{ runner.home }}/.gradle/wrapper cache: gradle
.gradle - name: Setup Node.js
build uses: actions/setup-node@v3
node_modules with:
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }} node-version: '18'
cache: 'npm'
- name: Setup Android SDK
uses: amyu/setup-android@v2
with:
cache-disabled: false
sdk-version: '33'
build-tools-version: '33.0.1'
- name: Build with Gradle - name: Build with Gradle
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
.idea/misc.xml generated
View File

@@ -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_11" project-jdk-name="azul-17" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="azul-17" project-jdk-type="JavaSDK" />
</project> </project>

View File

@@ -7,13 +7,7 @@
} }
], ],
"plugins": [ "plugins": [
[ "@semantic-release/commit-analyzer",
"@semantic-release/commit-analyzer", {
"releaseRules": [
{ "type": "build", "scope": "revanced-patcher", "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",

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,11 @@
## 🧩 ReVanced Patches ## 🧩 Patches
The official ReVanced Patches. The official Patch bundle provided by ReVanced and the community.
## 📋 List of patches in this repository
{{ table }}
> Looking for the JSON variant of this? [Click here](patches.json). > Looking for the JSON variant of this? [Click here](patches.json).
{{ table }}
## 📝 JSON Format ## 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file. This section explains the JSON format for the [patches.json](patches.json) file.
@@ -66,6 +64,7 @@ Example:
"description": "Enables a custom theme.", "description": "Enables a custom theme.",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"deprecated": false,
"options": [ "options": [
{ {
"key": "theme", "key": "theme",
@@ -92,6 +91,7 @@ Example:
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).", "description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"deprecated": false,
"options": [ "options": [
{ {
"key": "appName", "key": "appName",

372
README.md
View File

@@ -1,68 +1,67 @@
## 🧩 ReVanced Patches ## 🧩 Patches
The official ReVanced Patches. The official Patch bundle provided by ReVanced and the community.
## 📋 List of patches in this repository > Looking for the JSON variant of this? [Click here](patches.json).
### [📦 `com.google.android.youtube`](https://play.google.com/store/apps/details?id=com.google.android.youtube) ### [📦 `com.google.android.youtube`](https://play.google.com/store/apps/details?id=com.google.android.youtube)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `always-autorepeat` | Always repeats the playing video again. | 18.19.35 | | `always-autorepeat` | Always repeats the playing video again. | 18.05.40 |
| `client-spoof` | Spoofs a patched client to allow playback. | 18.19.35 | | `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `comments` | Hides components related to comments. | 18.19.35 | | `comments` | Hides components related to comments. | 18.05.40 |
| `copy-video-url` | Adds buttons in player to copy video links. | 18.19.35 | | `copy-video-url` | Adds buttons in player to copy video links. | 18.05.40 |
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all | | `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.19.35 | | `custom-video-buffer` | Lets you change the buffers of videos. | 18.05.40 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.19.35 | | `custom-video-speed` | Adds more video speed options. | 18.05.40 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.19.35 | | `debugging` | Adds debugging options. | all |
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.19.35 | | `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.05.40 |
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.19.35 | | `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.05.40 |
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.05.40 |
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.05.40 |
| `disable-zoom-haptics` | Disables haptics when zooming. | all | | `disable-zoom-haptics` | Disables haptics when zooming. | all |
| `enable-debugging` | Adds debugging options. | all | | `downloads` | Enables downloading music and videos from YouTube. | 18.05.40 |
| `external-downloads` | Adds support to download and save YouTube videos using an external app. | 18.19.35 | | `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.05.40 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.19.35 | | `general-ads` | Removes general ads. | 18.05.40 |
| `hide-ads` | Removes general ads. | 18.19.35 | | `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.05.40 |
| `hide-album-cards` | Hides the album cards below the artist description. | 18.19.35 | | `hide-album-cards` | Hides the album cards below the artist description. | 18.05.40 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.19.35 | | `hide-artist-card` | Hides the artist card below the searchbar. | 18.05.40 |
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.19.35 | | `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.05.40 |
| `hide-captions-button` | Hides the captions button on video player. | 18.19.35 | | `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.05.40 |
| `hide-captions-button` | Hides the captions button on video player. | 18.05.40 |
| `hide-cast-button` | Hides the cast button in the video player. | all | | `hide-cast-button` | Hides the cast button in the video player. | all |
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.19.35 | | `hide-create-button` | Hides the create button in the navigation bar. | 18.05.40 |
| `hide-email-address` | Hides the email address in the account switcher. | 18.19.35 | | `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.05.40 |
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.19.35 | | `hide-email-address` | Hides the email address in the account switcher. | 18.05.40 |
| `hide-filter-bar` | Hides the filter bar in video feeds. | 18.19.35 | | `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.05.40 |
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.19.35 | | `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.05.40 |
| `hide-info-cards` | Hides info cards in videos. | 18.19.35 | | `hide-info-cards` | Hides info cards in videos. | 18.05.40 |
| `hide-layout-components` | Hides general layout components. | 18.19.35 | | `hide-my-mix` | Hides mix playlists. | 18.05.40 |
| `hide-load-more-button` | Hides the button under videos that loads similar videos. | 18.19.35 | | `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | all |
| `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | 18.19.35 | | `hide-seekbar` | Hides the seekbar. | 18.05.40 |
| `hide-player-overlay` | Hides the dark background overlay from the player when player controls are visible. | all | | `hide-shorts-button` | Hides the shorts button on the navigation bar. | 18.05.40 |
| `hide-seekbar` | Hides the seekbar. | 18.19.35 | | `hide-timestamp` | Hides timestamp in video player. | 18.05.40 |
| `hide-shorts-components` | Hides components from YouTube Shorts. | 18.19.35 | | `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.05.40 |
| `hide-timestamp` | Hides timestamp in video player. | 18.19.35 | | `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.05.40 |
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.19.35 | | `hide-watermark` | Hides creator's watermarks on videos. | 18.05.40 |
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.19.35 | | `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.05.40 |
| `hide-watermark` | Hides creator's watermarks on videos. | 18.19.35 | | `minimized-playback` | Enables minimized and background playback. | 18.05.40 |
| `minimized-playback` | Enables minimized and background playback. | 18.19.35 | | `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.05.40 |
| `navigation-buttons` | Adds options to hide or change navigation buttons. | 18.19.35 | | `open-links-externally` | Open links outside of the app directly in your browser. | 18.05.40 |
| `old-quality-layout` | Enables the original video quality flyout in the video player settings. | 18.19.35 |
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.19.35 |
| `premium-heading` | Shows premium branding on the home screen. | all | | `premium-heading` | Shows premium branding on the home screen. | all |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.19.35 | | `remember-playback-rate` | Adds the ability to remember the playback rate you chose in the video playback rate flyout. | 18.05.40 |
| `remove-player-controls-background` | Removes the background from the video player controls. | 18.19.35 | | `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.05.40 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.19.35 | | `remove-player-button-background` | Removes the background from the video player buttons. | 18.05.40 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.19.35 | | `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.05.40 |
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.19.35 | | `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.05.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.19.35 | | `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.05.40 |
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.19.35 | | `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.05.40 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.19.35 | | `swipe-controls` | Adds volume and brightness swipe controls. | 18.05.40 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.05.40 |
| `theme` | Applies a custom theme. | all | | `theme` | Applies a custom theme. | all |
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.19.35 | | `video-ads` | Removes ads in the video player. | 18.05.40 |
| `video-ads` | Removes ads in the video player. | 18.19.35 |
| `video-speed` | Adds custom video speeds and ability to remember the playback speed you chose in the video playback speed flyout. | 18.19.35 |
| `wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.19.35 |
</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)
@@ -71,15 +70,15 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `background-play` | Enables playing music in the background. | all | | `background-play` | Enables playing music in the background. | all |
| `bypass-certificate-checks` | Bypasses certificate checks which prevent YouTube Music from working on Android Auto. | all |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | all | | `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | all |
| `compact-header` | Hides the music category bar at the top of the homepage. | all | | `compact-header` | Hides the music category bar at the top of the homepage. | all |
| `exclusive-audio-playback` | Enables the option to play music without video. | all | | `exclusive-audio-playback` | Enables the option to play music without video. | all |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | all | | `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.39.52 |
| `minimized-playback-music` | Enables minimized playback on Kids music. | all | | `minimized-playback-music` | Enables minimized playback on Kids music. | all |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | all |
| `music-video-ads` | Removes ads in the music player. | all | | `music-video-ads` | Removes ads in the music player. | all |
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | all |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | all | | `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | all |
| `vanced-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | all |
</details> </details>
### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill) ### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill)
@@ -88,14 +87,14 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `disable-login-requirement` | Do not force login. | all | | `disable-login-requirement` | Do not force login. | all |
| `downloads` | Removes download restrictions and changes the default path to download to. | all | | `downloads` | Removes download restrictions and changes the default path to download to. | 27.8.3 |
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all | | `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | 27.8.3 |
| `fix-google-login` | Allows logging in with a Google account. | all | | `fix-google-login` | Allows logging in with a Google account. | all |
| `hide-ads` | Removes ads from TikTok. | all | | `hide-ads` | Removes ads from TikTok. | all |
| `playback-speed` | Enables the playback speed option for all videos. | all | | `playback-speed` | Enables the playback speed option for all videos. | all |
| `settings` | Adds ReVanced settings to TikTok. | all | | `settings` | Adds ReVanced settings to TikTok. | 27.8.3 |
| `show-seekbar` | Shows progress bar for all video. | all | | `show-seekbar` | Shows progress bar for all video. | all |
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all | | `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | 27.8.3 |
</details> </details>
### [📦 `com.zhiliaoapp.musically`](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically) ### [📦 `com.zhiliaoapp.musically`](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
@@ -104,14 +103,14 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `disable-login-requirement` | Do not force login. | all | | `disable-login-requirement` | Do not force login. | all |
| `downloads` | Removes download restrictions and changes the default path to download to. | all | | `downloads` | Removes download restrictions and changes the default path to download to. | 27.8.3 |
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all | | `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | 27.8.3 |
| `fix-google-login` | Allows logging in with a Google account. | all | | `fix-google-login` | Allows logging in with a Google account. | all |
| `hide-ads` | Removes ads from TikTok. | all | | `hide-ads` | Removes ads from TikTok. | all |
| `playback-speed` | Enables the playback speed option for all videos. | all | | `playback-speed` | Enables the playback speed option for all videos. | all |
| `settings` | Adds ReVanced settings to TikTok. | all | | `settings` | Adds ReVanced settings to TikTok. | 27.8.3 |
| `show-seekbar` | Shows progress bar for all video. | all | | `show-seekbar` | Shows progress bar for all video. | all |
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all | | `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | 27.8.3 |
</details> </details>
### [📦 `tv.twitch.android.app`](https://play.google.com/store/apps/details?id=tv.twitch.android.app) ### [📦 `tv.twitch.android.app`](https://play.google.com/store/apps/details?id=tv.twitch.android.app)
@@ -119,24 +118,12 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `auto-claim-channel-points` | Automatically claim Channel Points. | 15.4.1 | | `block-audio-ads` | Blocks audio ads in streams and VODs. | 14.6.1 |
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 15.4.1 | | `block-embedded-ads` | Blocks embedded steam ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
| `block-embedded-ads` | Blocks embedded stream ads using services like TTV.lol or PurpleAdBlocker. | 15.4.1 | | `block-video-ads` | Blocks video ads in streams and VODs. | 14.6.1 |
| `block-video-ads` | Blocks video ads in streams and VODs. | 15.4.1 |
| `debug-mode` | Enables Twitch's internal debugging mode. | all | | `debug-mode` | Enables Twitch's internal debugging mode. | all |
| `settings` | Adds settings menu to Twitch. | all | | `settings` | Adds settings menu to Twitch. | all |
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | 15.4.1 | | `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
</details>
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-screenshot-popup` | Disables the popup that shows up when taking a screenshot. | all |
| `hide-ads` | Removes ads from the Reddit. | all |
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
| `sanitize-sharing-links` | Removes (tracking) query parameters from the URLs when sharing links. | all |
</details> </details>
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android) ### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
@@ -148,25 +135,7 @@ The official ReVanced Patches.
| `hide-ads` | Hides ads. | all | | `hide-ads` | Hides ads. | all |
| `hide-recommended-users` | Hides recommended users. | all | | `hide-recommended-users` | Hides recommended users. | all |
| `hide-views-stats` | Hides the view stats under tweets. | 9.71.0-release.0 | | `hide-views-stats` | Hides the view stats under tweets. | 9.71.0-release.0 |
</details> | `monochrome-icon` | Adds a monochrome icon. | all |
### [📦 `com.facebook.orca`](https://play.google.com/store/apps/details?id=com.facebook.orca)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `disable-switching-emoji-to-sticker-in-message-input-field` | Disables switching from emoji to sticker search mode in message input field | all |
| `disable-typing-indicator` | Disables the indicator while typing a message | all |
| `hide-inbox-ads` | Hides ads in inbox. | all |
</details>
### [📦 `com.laurencedawson.reddit_sync`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://redditsync/auth". | all |
| `disable-ads` | Disables ads. | all |
</details> </details>
### [📦 `com.spotify.music`](https://play.google.com/store/apps/details?id=com.spotify.music) ### [📦 `com.spotify.music`](https://play.google.com/store/apps/details?id=com.spotify.music)
@@ -174,17 +143,28 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `disable-capture-restriction` | Allows capturing Spotify's audio output while screen sharing or screen recording. | all |
| `hide-premium-navbar` | Removes the premium tab from the navbar. | all | | `hide-premium-navbar` | Removes the premium tab from the navbar. | all |
| `spotify-theme` | Applies a custom theme. | all | | `spotify-theme` | Applies a custom theme. | all |
</details> </details>
### [📦 `com.sony.songpal.mdr`](https://play.google.com/store/apps/details?id=com.sony.songpal.mdr) ### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `remove-badge-tab` | Removes the badge tab from the activity tab. | all | | `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | 2023.09.1 |
| `remove-notification-badge` | Removes the red notification badge from the activity tab. | all | | `hide-subreddit-banner` | Hides banner ads from comments on subreddits. | 2023.09.1 |
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
</details>
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `hide-ads` | Removes general ads. | all |
</details> </details>
### [📦 `at.gv.bmf.bmf2go`](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go) ### [📦 `at.gv.bmf.bmf2go`](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go)
@@ -192,8 +172,8 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `remove-bootloader-detection` | Removes the check for an unlocked bootloader. | all | | `remove-bootloader-detection` | Removes the check for an unlocked bootloader. | 2.2.0 |
| `remove-root-detection` | Removes the check for root permissions. | all | | `remove-root-detection` | Removes the check for root permissions. | 2.2.0 |
</details> </details>
### [📦 `at.gv.oe.app`](https://play.google.com/store/apps/details?id=at.gv.oe.app) ### [📦 `at.gv.oe.app`](https://play.google.com/store/apps/details?id=at.gv.oe.app)
@@ -201,72 +181,8 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `remove-root-detection` | Removes the check for root permissions and unlocked bootloader. | all | | `remove-root-detection` | Removes the check for root permissions and unlocked bootloader. | 2.5.2 |
| `spoof-signature` | Spoofs the signature of the app. | all | | `spoof-signature` | Spoofs the signature of the app. | 2.5.2 |
</details>
### [📦 `ml.docilealligator.infinityforreddit`](https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "infinity://localhost". | all |
</details>
### [📦 `free.reddit.news`](https://play.google.com/store/apps/details?id=free.reddit.news)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "dbrady://relay". | all |
</details>
### [📦 `reddit.news`](https://play.google.com/store/apps/details?id=reddit.news)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "dbrady://relay". | all |
</details>
### [📦 `com.rubenmayayo.reddit`](https://play.google.com/store/apps/details?id=com.rubenmayayo.reddit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://rubenmayayo.com". | all |
</details>
### [📦 `com.andrewshu.android.reddit`](https://play.google.com/store/apps/details?id=com.andrewshu.android.reddit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "redditisfun://auth". | all |
</details>
### [📦 `com.andrewshu.android.redditdonation`](https://play.google.com/store/apps/details?id=com.andrewshu.android.redditdonation)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "redditisfun://auth". | all |
</details>
### [📦 `com.laurencedawson.reddit_sync.pro`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync.pro)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://redditsync/auth". | all |
</details>
### [📦 `com.laurencedawson.reddit_sync.dev`](https://play.google.com/store/apps/details?id=com.laurencedawson.reddit_sync.dev)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `change-oauth-client-id` | Changes the OAuth client ID. The OAuth application type has to be "Installed app" and the redirect URI has to be set to "http://redditsync/auth". | all |
</details> </details>
### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit) ### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit)
@@ -285,28 +201,28 @@ The official ReVanced Patches.
| `enable-on-demand` | Enables listening to songs on-demand, allowing to play any song from playlists, albums or artists without limitations. This does not remove ads. | all | | `enable-on-demand` | Enables listening to songs on-demand, allowing to play any song from playlists, albums or artists without limitations. This does not remove ads. | all |
</details> </details>
### [📦 `com.nis.app`](https://play.google.com/store/apps/details?id=com.nis.app)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-ads` | Removes ads from Inshorts. | all |
</details>
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `hide-ads` | Removes general ads. | all |
</details>
### [📦 `com.instagram.android`](https://play.google.com/store/apps/details?id=com.instagram.android) ### [📦 `com.instagram.android`](https://play.google.com/store/apps/details?id=com.instagram.android)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `hide-timeline-ads` | Removes ads from the timeline. | 275.0.0.27.98 | | `hide-timeline-ads` | Removes ads from the timeline. | all |
</details>
### [📦 `org.citra.citra_emu`](https://play.google.com/store/apps/details?id=org.citra.citra_emu)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `premium-unlock` | Unlocks premium functions. | all |
</details>
### [📦 `org.citra.citra_emu.canary`](https://play.google.com/store/apps/details?id=org.citra.citra_emu.canary)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `premium-unlock` | Unlocks premium functions. | all |
</details> </details>
### [📦 `com.backdrops.wallpapers`](https://play.google.com/store/apps/details?id=com.backdrops.wallpapers) ### [📦 `com.backdrops.wallpapers`](https://play.google.com/store/apps/details?id=com.backdrops.wallpapers)
@@ -341,22 +257,6 @@ The official ReVanced Patches.
| `remove-broadcasts-restriction` | Enables starting/stopping NetGuard via broadcasts. | all | | `remove-broadcasts-restriction` | Enables starting/stopping NetGuard via broadcasts. | all |
</details> </details>
### [📦 `com.scb.phone`](https://play.google.com/store/apps/details?id=com.scb.phone)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-debugging-detection` | Removes the USB and wireless debugging checks. | all |
</details>
### [📦 `com.google.android.apps.recorder`](https://play.google.com/store/apps/details?id=com.google.android.apps.recorder)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `remove-device-restrictions` | Removes restrictions from using the app on any device. | all |
</details>
### [📦 `com.dci.dev.androidtwelvewidgets`](https://play.google.com/store/apps/details?id=com.dci.dev.androidtwelvewidgets) ### [📦 `com.dci.dev.androidtwelvewidgets`](https://play.google.com/store/apps/details?id=com.dci.dev.androidtwelvewidgets)
<details> <details>
@@ -370,7 +270,7 @@ The official ReVanced Patches.
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `unlock-plus` | Unlocks plus features. | 8.20.0 | | `unlock-plus` | Unlocks plus features. | all |
</details> </details>
### [📦 `io.yuka.android`](https://play.google.com/store/apps/details?id=io.yuka.android) ### [📦 `io.yuka.android`](https://play.google.com/store/apps/details?id=io.yuka.android)
@@ -389,30 +289,6 @@ The official ReVanced Patches.
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all | | `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
</details> </details>
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
</details>
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | 4.6377 |
</details>
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android) ### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
<details> <details>
@@ -421,22 +297,6 @@ The official ReVanced Patches.
| `unlock-pro` | Unlocks all pro features. | all | | `unlock-pro` | Unlocks all pro features. | all |
</details> </details>
### [📦 `com.vsco.cam`](https://play.google.com/store/apps/details?id=com.vsco.cam)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details>
### [📦 `com.wakdev.apps.nfctools.se`](https://play.google.com/store/apps/details?id=com.wakdev.apps.nfctools.se)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager) ### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
<details> <details>
@@ -445,20 +305,12 @@ The official ReVanced Patches.
| `unlock-pro` | Unlocks pro features. | all | | `unlock-pro` | Unlocks pro features. | all |
</details> </details>
### [📦 `com.candylink.openvpn`](https://play.google.com/store/apps/details?id=com.candylink.openvpn) ### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks premium features. | all | | `unlock-pro` | Unlocks all pro features. | all |
</details>
### [📦 `tv.trakt.trakt`](https://play.google.com/store/apps/details?id=tv.trakt.trakt)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details> </details>
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx) ### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
@@ -469,12 +321,20 @@ The official ReVanced Patches.
| `unlock-pro` | Unlocks all pro features. | all | | `unlock-pro` | Unlocks all pro features. | all |
</details> </details>
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
</details>
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task) ### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `unlock-themes` | Unlocks all themes that are inaccessible until a certain level is reached. | all | | `unlock-themes` | Unlocks all themes. | all |
</details> </details>
### [📦 `net.dinglisch.android.taskerm`](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) ### [📦 `net.dinglisch.android.taskerm`](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
@@ -487,8 +347,6 @@ The official ReVanced Patches.
> Looking for the JSON variant of this? [Click here](patches.json).
## 📝 JSON Format ## 📝 JSON Format
This section explains the JSON format for the [patches.json](patches.json) file. This section explains the JSON format for the [patches.json](patches.json) file.
@@ -547,6 +405,7 @@ Example:
"description": "Enables a custom theme.", "description": "Enables a custom theme.",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"deprecated": false,
"options": [ "options": [
{ {
"key": "theme", "key": "theme",
@@ -573,6 +432,7 @@ Example:
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).", "description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
"version": "0.0.1", "version": "0.0.1",
"excluded": false, "excluded": false,
"deprecated": false,
"options": [ "options": [
{ {
"key": "appName", "key": "appName",

View File

@@ -1,5 +1,5 @@
plugins { plugins {
kotlin("jvm") version "1.8.10" kotlin("jvm") version "1.7.0"
} }
group = "app.revanced" group = "app.revanced"
@@ -17,30 +17,13 @@ repositories {
password = githubPassword password = githubPassword
} }
} }
// Required for FlexVer-Java
maven {
url = uri("https://repo.sleeping.town")
content {
includeGroup("com.unascribed")
}
}
} }
dependencies { dependencies {
implementation("app.revanced:revanced-patcher:11.0.3") implementation("app.revanced:revanced-patcher:7.0.0")
implementation("app.revanced:multidexlib2:2.5.3-a3836654") implementation("app.revanced:multidexlib2:2.5.3-a3836654")
// Required for meta // Required for meta
implementation("com.google.code.gson:gson:2.10.1") implementation("com.google.code.gson:gson:2.10.1")
// Required for FlexVer-Java
implementation("com.unascribed:flexver-java:1.0.2")
// A dependency to the Android library unfortunately fails the build,
// which is why this is required for the patch change-oauth-client-id
compileOnly(project("dummy"))
}
kotlin {
jvmToolchain(11)
} }
tasks { tasks {

View File

@@ -1,9 +0,0 @@
plugins {
id("java")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}

View File

@@ -1,9 +0,0 @@
package android.os;
import java.io.File;
public final class Environment {
public static File getExternalStorageDirectory() {
throw new UnsupportedOperationException("Stub");
}
}

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official kotlin.code.style = official
version = 2.180.0-dev.1 version = 2.165.0-dev.9

Binary file not shown.

View File

@@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=e111cb9948407e26351227dabce49822fb88c37ee72f1d1582a69c68af2e702f distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000 networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

7
gradlew vendored
View File

@@ -85,6 +85,9 @@ done
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@@ -194,10 +197,6 @@ if "$cygwin" || "$msys" ; then
done done
fi fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command; # Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in # shell script including quotes and variable substitutions, so put them in

870
package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1 @@
include("dummy")
rootProject.name = "revanced-patches" rootProject.name = "revanced-patches"

View File

@@ -1,15 +1,11 @@
package app.revanced.extensions package app.revanced.extensions
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.Method import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
import org.jf.dexlib2.util.MethodUtil import org.jf.dexlib2.util.MethodUtil
import org.w3c.dom.Node import org.w3c.dom.Node
@@ -19,7 +15,7 @@ import org.w3c.dom.Node
* *
* @return A [PatchResultError] for the [MethodFingerprint]. * @return A [PatchResultError] for the [MethodFingerprint].
*/ */
internal fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name") fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name")
/** /**
* Find the [MutableMethod] from a given [Method] in a [MutableClass]. * Find the [MutableMethod] from a given [Method] in a [MutableClass].
@@ -27,7 +23,7 @@ internal fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to res
* @param method The [Method] to find. * @param method The [Method] to find.
* @return The [MutableMethod]. * @return The [MutableMethod].
*/ */
internal fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first { fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
MethodUtil.methodSignaturesMatch(it, method) MethodUtil.methodSignaturesMatch(it, method)
} }
@@ -36,7 +32,7 @@ internal fun MutableClass.findMutableMethodOf(method: Method) = this.methods.fir
* *
* @param transform the transformation function. original method goes in, transformed method goes out * @param transform the transformation function. original method goes in, transformed method goes out
*/ */
internal fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) { fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
val transformedMethods = methods.map { it.transform() } val transformedMethods = methods.map { it.transform() }
methods.clear() methods.clear()
methods.addAll(transformedMethods) methods.addAll(transformedMethods)
@@ -45,40 +41,4 @@ internal fun MutableClass.transformMethods(transform: MutableMethod.() -> Mutabl
internal fun Node.doRecursively(action: (Node) -> Unit) { internal fun Node.doRecursively(action: (Node) -> Unit) {
action(this) action(this)
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action) for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
} }
internal fun MutableMethod.injectHideViewCall(
insertIndex: Int,
viewRegister: Int,
classDescriptor: String,
targetMethod: String
) = addInstruction(
insertIndex,
"invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V"
)
internal fun Method.findIndexForIdResource(resourceName: String): Int {
fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single {
it.type == "id" && it.name == resourceName
}.id
return indexOfFirstConstantInstructionValue(getIdResourceId(resourceName))
}
/**
* @return the first constant instruction with the value, or -1 if not found.
*/
fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int {
return implementation?.let {
it.instructions.indexOfFirst { instruction ->
instruction.opcode == Opcode.CONST && (instruction as WideLiteralInstruction).wideLiteral == constantValue
}
} ?: -1
}
/**
* @return if the method contains a constant with the given value.
*/
fun Method.containsConstantInstructionValue(constantValue: Long): Boolean {
return indexOfFirstConstantInstructionValue(constantValue) >= 0
}

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.patch.Patch
import app.revanced.patcher.util.patch.PatchBundle import app.revanced.patcher.util.patch.PatchBundle
import java.io.File import java.io.File
internal typealias PatchBundlePatches = List<Class<out Patch<Context>>> typealias PatchBundlePatches = List<Class<out Patch<Context>>>
internal interface PatchesFileGenerator { internal interface PatchesFileGenerator {
fun generate(bundle: PatchBundlePatches) fun generate(bundle: PatchBundlePatches)

View File

@@ -5,7 +5,6 @@ import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.description import app.revanced.patcher.extensions.PatchExtensions.description
import app.revanced.patcher.extensions.PatchExtensions.patchName import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.patch.Patch import app.revanced.patcher.patch.Patch
import com.unascribed.flexver.FlexVerComparator
import java.io.File import java.io.File
internal class ReadmeGenerator : PatchesFileGenerator { internal class ReadmeGenerator : PatchesFileGenerator {
@@ -38,8 +37,9 @@ internal class ReadmeGenerator : PatchesFileGenerator {
} }
}.let { commonMap -> }.let { commonMap ->
commonMap.maxByOrNull { it.value }?.value?.let { commonMap.maxByOrNull { it.value }?.value?.let {
commonMap.entries.filter { mostCommon -> mostCommon.value == it } // This is not foolproof, because for example v1.0.0-dev.0 will be returned instead of v1.0.0-release.
.maxOfWith(FlexVerComparator::compare, Map.Entry<String, Int>::key) // Unfortunately this can not be solved easily because versioning can be complex.
commonMap.entries.filter { mostCommon -> mostCommon.value == it }.maxBy { it.key }.key
} ?: "all" } ?: "all"
} }

View File

@@ -1,45 +0,0 @@
package app.revanced.patches.all.activity.exportAll.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.Patch
@Patch(false)
@Name("export-all-activities")
@Description("Makes all app activities exportable.")
@Version("0.0.1")
class ExportAllActivitiesPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { editor ->
val document = editor.file
val activities = document.getElementsByTagName("activity")
for(i in 0..activities.length) {
activities.item(i)?.apply {
val exportedAttribute = attributes.getNamedItem(EXPORTED_FLAG)
if (exportedAttribute != null) {
if (exportedAttribute.nodeValue != "true")
exportedAttribute.nodeValue = "true"
}
// Reason why the attribute is added in the case it does not exist:
// https://github.com/revanced/revanced-patches/pull/1751/files#r1141481604
else document.createAttribute(EXPORTED_FLAG)
.apply { value = "true" }
.let(attributes::setNamedItem)
}
}
}
return PatchResultSuccess()
}
private companion object {
const val EXPORTED_FLAG = "android:exported"
}
}

View File

@@ -4,7 +4,6 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.* import app.revanced.util.patch.*
import org.jf.dexlib2.iface.ClassDef import org.jf.dexlib2.iface.ClassDef
@@ -16,7 +15,6 @@ import java.util.*
@Name("spoof-wifi-connection") @Name("spoof-wifi-connection")
@Description("Spoofs an existing Wi-Fi connection.") @Description("Spoofs an existing Wi-Fi connection.")
@Version("0.0.1") @Version("0.0.1")
@RequiresIntegrations
internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
private companion object { private companion object {

View File

@@ -1,30 +0,0 @@
package app.revanced.patches.all.misc.debugging.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch
import org.w3c.dom.Element
@Patch(false)
@Name("enable-android-debugging")
@Description("Enables Android debugging capabilities.")
@Version("0.0.1")
class EnableAndroidDebuggingPatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { dom ->
val applicationNode = dom
.file
.getElementsByTagName("application")
.item(0) as Element
// set application as debuggable
applicationNode.setAttribute("android:debuggable", "true")
}
return PatchResultSuccess()
}
}

View File

@@ -1,50 +0,0 @@
package app.revanced.patches.all.misc.packagename.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.Patch
import org.w3c.dom.Element
@Patch(false)
@Name("change-package-name")
@Description("Changes the package name.")
@Version("0.0.1")
class ChangePackageNamePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
packageName?.let { packageName ->
val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$")
if (!packageName.matches(packageNameRegex))
return PatchResultError("Invalid package name")
var originalPackageName: String
context.xmlEditor["AndroidManifest.xml"].use { editor ->
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
originalPackageName = manifest.getAttribute("package")
}
if (!originalPackageName.matches(packageNameRegex))
return PatchResultError("Failed to get the original package name")
context["AndroidManifest.xml"].apply {
readText().replace(originalPackageName, packageName).let(::writeText)
}
} ?: return PatchResultError("No package name provided")
return PatchResultSuccess()
}
companion object : OptionsContainer() {
var packageName: String? by option(
PatchOption.StringOption(
key = "packageName",
default = null,
title = "Package name",
description = "The name of the package to rename of the app.",
)
)
}
}

View File

@@ -1,66 +0,0 @@
package app.revanced.patches.all.screencapture.removerestriction.bytecode.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.all.screencapture.removerestriction.resource.patch.RemoveCaptureRestrictionResourcePatch
import app.revanced.util.patch.*
import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.iface.instruction.Instruction
@Patch(false)
@Name("remove-screen-capture-restriction")
@Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.")
@Version("0.0.1")
@DependsOn([RemoveCaptureRestrictionResourcePatch::class])
@RequiresIntegrations
internal class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
// Information about method calls we want to replace
enum class MethodCall(
override val definedClassName: String,
override val methodName: String,
override val methodParams: Array<String>,
override val returnType: String
): IMethodCall {
SetAllowedCapturePolicySingle(
"Landroid/media/AudioAttributes\$Builder;",
"setAllowedCapturePolicy",
arrayOf("I"),
"Landroid/media/AudioAttributes\$Builder;",
),
SetAllowedCapturePolicyGlobal(
"Landroid/media/AudioManager;",
"setAllowedCapturePolicy",
arrayOf("I"),
"V",
);
}
override fun filterMap(
classDef: ClassDef,
method: Method,
instruction: Instruction,
instructionIndex: Int
) = filterMapInstruction35c<MethodCall>(
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
classDef,
instruction,
instructionIndex
)
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
val (methodType, instruction, instructionIndex) = entry
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
}
private companion object {
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
}
}

View File

@@ -4,7 +4,6 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.patch.annotations.RequiresIntegrations
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.util.patch.* import app.revanced.util.patch.*
import org.jf.dexlib2.iface.ClassDef import org.jf.dexlib2.iface.ClassDef
@@ -16,7 +15,6 @@ import java.util.*
@Name("remove-screenshot-restriction") @Name("remove-screenshot-restriction")
@Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.") @Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.")
@Version("0.0.1") @Version("0.0.1")
@RequiresIntegrations
internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() { internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
private companion object { private companion object {

View File

@@ -11,8 +11,5 @@ object ProUnlockFingerprint : MethodFingerprint(
Opcode.MOVE_RESULT, Opcode.MOVE_RESULT,
Opcode.IF_EQZ Opcode.IF_EQZ
), ),
customFingerprint = { methodDef, _ -> customFingerprint = { it.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;" && it.name == "lambda\$existPurchase\$0" }
methodDef.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;"
&& methodDef.name == "lambda\$existPurchase\$0"
}
) )

View File

@@ -1,14 +1,15 @@
package app.revanced.patches.backdrops.misc.pro.patch package app.revanced.patches.backdrops.misc.pro.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
@@ -24,20 +25,17 @@ class ProUnlockPatch : BytecodePatch(
listOf(ProUnlockFingerprint) listOf(ProUnlockFingerprint)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
ProUnlockFingerprint.result?.let { result -> val result = ProUnlockFingerprint.result ?: return PatchResultError("${ProUnlockFingerprint.name} not found")
val registerIndex = result.scanResult.patternScanResult!!.endIndex - 1
result.mutableMethod.apply { val moveRegisterInstruction = result.mutableMethod.instruction(result.scanResult.patternScanResult!!.endIndex - 1)
val register = getInstruction<OneRegisterInstruction>(registerIndex).registerA val register = (moveRegisterInstruction as OneRegisterInstruction).registerA
addInstruction(
result.scanResult.patternScanResult!!.endIndex,
"""
const/4 v$register, 0x1
"""
)
}
} ?: return ProUnlockFingerprint.toErrorResult() result.mutableMethod.addInstructions(
result.scanResult.patternScanResult!!.endIndex,
"""
const/4 v$register, 0x1
"""
)
return PatchResultSuccess() return PatchResultSuccess()
} }

View File

@@ -1,8 +0,0 @@
package app.revanced.patches.candylinkvpn.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.candylink.openvpn")])
@Target(AnnotationTarget.CLASS)
internal annotation class UnlockProCompatibility

View File

@@ -1,11 +0,0 @@
package app.revanced.patches.candylinkvpn.fingereprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsPremiumPurchasedFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ ->
methodDef.definingClass.endsWith("PreferenceProvider;") &&
methodDef.name == "isPremiumPurchased"
}
) {
}

View File

@@ -1,35 +0,0 @@
package app.revanced.patches.candylinkvpn.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility
import app.revanced.patches.candylinkvpn.fingereprints.IsPremiumPurchasedFingerprint
@Patch
@Name("unlock-pro")
@Description("Unlocks premium features.")
@UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch(
listOf(IsPremiumPurchasedFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
) ?: return IsPremiumPurchasedFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,7 @@
package app.revanced.patches.citra.misc.premium.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("org.citra.citra_emu"), Package("org.citra.citra_emu.canary")])
internal annotation class PremiumUnlockCompatbility

View File

@@ -0,0 +1,7 @@
package app.revanced.patches.citra.misc.premium.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PremiumUnlockFingerprint : MethodFingerprint(
customFingerprint = { it.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && it.name == "isPremiumActive" }
)

View File

@@ -0,0 +1,37 @@
package app.revanced.patches.citra.misc.premium.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.citra.misc.premium.annotations.PremiumUnlockCompatbility
import app.revanced.patches.citra.misc.premium.fingerprints.PremiumUnlockFingerprint
@Patch
@Name("premium-unlock")
@Description("Unlocks premium functions.")
@PremiumUnlockCompatbility
@Version("0.0.1")
class PremiumUnlockPatch : BytecodePatch(
listOf(PremiumUnlockFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
val result = PremiumUnlockFingerprint.result ?: return PatchResultError("${PremiumUnlockFingerprint.name} not found")
result.mutableMethod.addInstructions(
0,
"""
const v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -2,29 +2,12 @@ package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
object BootStateFingerprint : MethodFingerprint( object BootStateFingerprint : MethodFingerprint(
"Z", "Z",
accessFlags = AccessFlags.PUBLIC.value, access = AccessFlags.PUBLIC.value,
opcodes = listOf( strings = listOf("Boot state of device: %s"),
Opcode.INVOKE_DIRECT, customFingerprint = { methodDef ->
Opcode.MOVE_RESULT_OBJECT, methodDef.definingClass.endsWith("/AttestationHelper;")
Opcode.CONST_4, }
Opcode.NEW_ARRAY,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_4,
Opcode.APUT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_STATIC,
Opcode.SGET_OBJECT,
Opcode.IF_EQ,
Opcode.SGET_OBJECT,
Opcode.IF_NE,
Opcode.GOTO,
Opcode.MOVE,
Opcode.RETURN
)
) )

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object BootloaderDetectionFingerprint : MethodFingerprint(
"Z",
access = AccessFlags.PUBLIC.value,
strings = listOf("Creation of attestation key succeeded", "Creation of attestation key failed"),
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/AttestationHelper;")
}
)

View File

@@ -1,11 +0,0 @@
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
object CreateKeyFingerprint : MethodFingerprint(
"Z",
accessFlags = AccessFlags.PUBLIC.value,
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
)

View File

@@ -5,13 +5,13 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootloaderDetectionFingerprint
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
@@ -21,11 +21,11 @@ import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionC
@DetectionCompatibility @DetectionCompatibility
@Version("0.0.1") @Version("0.0.1")
class BootloaderDetectionPatch : BytecodePatch( class BootloaderDetectionPatch : BytecodePatch(
listOf(CreateKeyFingerprint, BootStateFingerprint) listOf(BootloaderDetectionFingerprint, BootStateFingerprint)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint -> arrayOf(BootloaderDetectionFingerprint, BootStateFingerprint).forEach { fingerprint ->
fingerprint.result?.mutableMethod?.addInstructions( fingerprint.result?.mutableMethod?.addInstruction(
0, 0,
""" """
const/4 v0, 0x1 const/4 v0, 0x1
@@ -33,7 +33,6 @@ class BootloaderDetectionPatch : BytecodePatch(
""" """
) ?: return fingerprint.toErrorResult() ) ?: return fingerprint.toErrorResult()
} }
return PatchResultSuccess() return PatchResultSuccess()
} }
} }

View File

@@ -1,22 +1,10 @@
package app.revanced.patches.finanzonline.detection.root.fingerprints package app.revanced.patches.finanzonline.detection.root.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
object RootDetectionFingerprint : MethodFingerprint( object RootDetectionFingerprint : MethodFingerprint(
"L", "L",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC, customFingerprint = { methodDef ->
parameters = listOf("L"), methodDef.definingClass == "Lat/gv/bmf/bmf2go/tools/utils/z;"
opcodes = listOf( }
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.RETURN_OBJECT
)
) )

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -29,7 +29,6 @@ class RootDetectionPatch : BytecodePatch(
return-object v0 return-object v0
""" """
) ?: return RootDetectionFingerprint.toErrorResult() ) ?: return RootDetectionFingerprint.toErrorResult()
return PatchResultSuccess() return PatchResultSuccess()
} }
} }

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.finanzonline.detection.shared.annotations
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility([Package("at.gv.bmf.bmf2go")]) @Compatibility([Package("at.gv.bmf.bmf2go", arrayOf("2.2.0"))])
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
internal annotation class DetectionCompatibility internal annotation class DetectionCompatibility

View File

@@ -1,12 +0,0 @@
package app.revanced.patches.googlerecorder.restrictions.fingereprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object OnApplicationCreateFingerprint : MethodFingerprint(
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
customFingerprint = custom@{ methodDef, classDef ->
if (methodDef.name != "onCreate") return@custom false
classDef.type.endsWith("RecorderApplication;")
}
)

View File

@@ -1,45 +0,0 @@
package app.revanced.patches.googlerecorder.restrictions.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.googlerecorder.restrictions.fingereprints.OnApplicationCreateFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@Name("remove-device-restrictions")
@Description("Removes restrictions from using the app on any device.")
@Compatibility([Package("com.google.android.apps.recorder")])
@Version("0.0.1")
class RemoveDeviceRestrictions : BytecodePatch(
listOf(OnApplicationCreateFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
OnApplicationCreateFingerprint.result?.let {
val featureStringIndex = it.scanResult.stringsScanResult!!.matches.first().index
it.mutableMethod.apply {
// Remove check for device restrictions.
removeInstructions(featureStringIndex - 2, 5)
val featureAvailableRegister = getInstruction<OneRegisterInstruction>(featureStringIndex).registerA
// Override "isPixelDevice()" to return true.
addInstruction(featureStringIndex, "const/4 v$featureAvailableRegister, 0x1")
}
} ?: return OnApplicationCreateFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -3,7 +3,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object PrimaryAdsFingerprint : MethodFingerprint( object PrimaryAdsFingerprint : MethodFingerprint(
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled" methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
} }
) )

View File

@@ -4,8 +4,8 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.extensions.removeInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions import app.revanced.patcher.extensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess

View File

@@ -4,5 +4,5 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CheckProFingerprint : MethodFingerprint( object CheckProFingerprint : MethodFingerprint(
"Z", "Z",
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")} customFingerprint = { it.definingClass.endsWith("IPSPurchaseRepository;")}
) )

View File

@@ -4,7 +4,8 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.removeInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess

View File

@@ -5,8 +5,8 @@ import org.jf.dexlib2.AccessFlags
object RootDetectionFingerprint : MethodFingerprint( object RootDetectionFingerprint : MethodFingerprint(
"V", "V",
accessFlags = AccessFlags.PUBLIC.value, access = AccessFlags.PUBLIC.value,
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;") methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
} }
) )

View File

@@ -1,10 +1,8 @@
package app.revanced.patches.idaustria.detection.root.patch package app.revanced.patches.idaustria.detection.root.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.*
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -21,7 +19,7 @@ class RootDetectionPatch : BytecodePatch(
listOf(RootDetectionFingerprint) listOf(RootDetectionFingerprint)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void") RootDetectionFingerprint.result!!.mutableMethod.addInstructions(0, "return-void")
return PatchResultSuccess() return PatchResultSuccess()
} }
} }

View File

@@ -3,6 +3,6 @@ package app.revanced.patches.idaustria.detection.shared.annotations
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility([Package("at.gv.oe.app")]) @Compatibility([Package("at.gv.oe.app", arrayOf("2.5.2"))])
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
internal annotation class DetectionCompatibility internal annotation class DetectionCompatibility

View File

@@ -6,8 +6,8 @@ import org.jf.dexlib2.AccessFlags
object SpoofSignatureFingerprint : MethodFingerprint( object SpoofSignatureFingerprint : MethodFingerprint(
"L", "L",
parameters = listOf("L"), parameters = listOf("L"),
accessFlags = AccessFlags.PRIVATE.value, access = AccessFlags.PRIVATE.value,
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey" methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey"
} }
) )

View File

@@ -1,10 +1,8 @@
package app.revanced.patches.idaustria.detection.signature.patch package app.revanced.patches.idaustria.detection.signature.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.*
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess

View File

@@ -1,9 +0,0 @@
package app.revanced.patches.inshorts.ad.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.nis.app")])
@Target(AnnotationTarget.CLASS)
internal annotation class HideAdsCompatibility

View File

@@ -1,8 +0,0 @@
package app.revanced.patches.inshorts.ad.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object InshortsAdsFingerprint : MethodFingerprint(
"V",
strings = listOf("GoogleAdLoader","exception in requestAd"),
)

View File

@@ -1,38 +0,0 @@
package app.revanced.patches.inshorts.ad.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
@Patch
@Name("hide-ads")
@Description("Removes ads from Inshorts.")
@HideAdsCompatibility
@Version("0.0.1")
class HideAdsPatch : BytecodePatch(
listOf(InshortsAdsFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
InshortsAdsFingerprint.result?.let { result ->
result.apply {
mutableMethod.addInstruction(
0,
"""
return-void
"""
)
}
} ?: return InshortsAdsFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -4,18 +4,17 @@ import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.ClassDef
import org.jf.dexlib2.iface.Method import org.jf.dexlib2.iface.Method
abstract class MediaAdFingerprint( abstract class MediaAdFingerprint(
returnType: String? = "Z", returnType: String? = "Z",
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL, access: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
parameters: Iterable<String>? = listOf(), parameters: Iterable<String>? = listOf(),
opcodes: Iterable<Opcode>?, opcodes: Iterable<Opcode>?,
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null customFingerprint: ((methodDef: Method) -> Boolean)? = null
) : MethodFingerprint( ) : MethodFingerprint(
returnType, returnType,
accessFlags, access,
parameters, parameters,
opcodes, opcodes,
customFingerprint = customFingerprint customFingerprint = customFingerprint

View File

@@ -14,7 +14,7 @@ object PaidPartnershipAdFingerprint : MediaAdFingerprint(
Opcode.IPUT_BOOLEAN, Opcode.IPUT_BOOLEAN,
Opcode.IPUT_BOOLEAN Opcode.IPUT_BOOLEAN
), ),
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("ClipsEditMetadataController;") methodDef.definingClass.endsWith("ClipsEditMetadataController;")
} }
) { ) {

View File

@@ -3,9 +3,9 @@ package app.revanced.patches.instagram.patches.ads.timeline.patch
import app.revanced.extensions.toErrorResult import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.* import app.revanced.patcher.annotation.*
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction import app.revanced.patcher.extensions.removeInstruction
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.PatchResult import app.revanced.patcher.patch.PatchResult
@@ -24,7 +24,7 @@ import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@Name("hide-timeline-ads") @Name("hide-timeline-ads")
@Description("Removes ads from the timeline.") @Description("Removes ads from the timeline.")
@Compatibility([Package("com.instagram.android", arrayOf("275.0.0.27.98"))]) @Compatibility([Package("com.instagram.android")])
@Version("0.0.1") @Version("0.0.1")
class HideTimelineAdsPatch : BytecodePatch( class HideTimelineAdsPatch : BytecodePatch(
listOf( listOf(
@@ -55,8 +55,8 @@ class HideTimelineAdsPatch : BytecodePatch(
val scanStart = scanResult.patternScanResult!!.startIndex val scanStart = scanResult.patternScanResult!!.startIndex
val jumpIndex = scanStart - 1 val jumpIndex = scanStart - 1
val mediaInstanceRegister = mutableMethod.getInstruction<FiveRegisterInstruction>(scanStart).registerC val mediaInstanceRegister = (mutableMethod.instruction(scanStart) as FiveRegisterInstruction).registerC
val freeRegister = mutableMethod.getInstruction<OneRegisterInstruction>(jumpIndex).registerA val freeRegister = (mutableMethod.instruction(jumpIndex) as OneRegisterInstruction).registerA
val returnFalseLabel = "an_ad" val returnFalseLabel = "an_ad"
@@ -77,12 +77,14 @@ class HideTimelineAdsPatch : BytecodePatch(
val insertIndex = scanStart + 3 val insertIndex = scanStart + 3
mutableMethod.addInstructionsWithLabels( mutableMethod.addInstructions(
insertIndex, insertIndex,
checkForAdInstructions, checkForAdInstructions,
ExternalLabel( listOf(
returnFalseLabel, ExternalLabel(
mutableMethod.getInstruction(mutableMethod.implementation!!.instructions.size - 2 /* return false = ad */) returnFalseLabel,
mutableMethod.instruction(mutableMethod.implementation!!.instructions.size - 2 /* return false = ad */)
)
) )
) )
@@ -91,10 +93,10 @@ class HideTimelineAdsPatch : BytecodePatch(
// region Jump to checks for ads from previous patch. // region Jump to checks for ads from previous patch.
mutableMethod.apply { mutableMethod.apply {
addInstructionsWithLabels( addInstructions(
jumpIndex + 1, jumpIndex + 1,
"if-nez v$freeRegister, :start_check", "if-nez v$freeRegister, :start_check",
ExternalLabel("start_check", getInstruction(insertIndex)) listOf(ExternalLabel("start_check", instruction(insertIndex)))
) )
}.removeInstruction(jumpIndex) }.removeInstruction(jumpIndex)

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess

View File

@@ -1,24 +0,0 @@
package app.revanced.patches.memegenerator.detection.license.fingerprint
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object LicenseValidationFingerprint : MethodFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf("Landroid/content/Context;"),
opcodes = listOf(
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_WIDE,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_WIDE,
Opcode.CMP_LONG,
Opcode.IF_GEZ,
Opcode.CONST_4,
Opcode.RETURN,
Opcode.CONST_4,
Opcode.RETURN
)
)

View File

@@ -1,31 +0,0 @@
package app.revanced.patches.memegenerator.detection.license.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint
@Description("Disables Firebase license validation.")
@Version("0.0.1")
class LicenseValidationPatch : BytecodePatch(
listOf(LicenseValidationFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
LicenseValidationFingerprint.result?.apply {
mutableMethod.replaceInstructions(
0,
"""
const/4 p0, 0x1
return p0
"""
)
} ?: throw LicenseValidationFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -1,35 +0,0 @@
package app.revanced.patches.memegenerator.detection.signature.fingerprint
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@FuzzyPatternScanMethod(2)
object VerifySignatureFingerprint : MethodFingerprint(
returnType = "Z",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
parameters = listOf("Landroid/app/Activity;"),
opcodes = listOf(
Opcode.SGET_OBJECT,
Opcode.IF_NEZ,
Opcode.INVOKE_STATIC,
Opcode.CONST_4,
Opcode.CONST_4,
Opcode.SGET_OBJECT,
Opcode.ARRAY_LENGTH,
Opcode.IF_GE,
Opcode.AGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.SGET_OBJECT,
Opcode.IF_EQZ,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.CONST_4,
Opcode.RETURN,
Opcode.ADD_INT_LIT8
),
)

View File

@@ -1,31 +0,0 @@
package app.revanced.patches.memegenerator.detection.signature.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patches.memegenerator.detection.signature.fingerprint.VerifySignatureFingerprint
@Description("Disables detection of incorrect signature.")
@Version("0.0.1")
class SignatureVerificationPatch : BytecodePatch(
listOf(VerifySignatureFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
VerifySignatureFingerprint.result?.apply {
mutableMethod.replaceInstructions(
0,
"""
const/4 p0, 0x1
return p0
"""
)
} ?: throw VerifySignatureFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -1,17 +0,0 @@
package app.revanced.patches.memegenerator.misc.pro.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.zombodroid.MemeGenerator", arrayOf(
"4.6364",
"4.6370",
"4.6375",
"4.6377",
)
)]
)
@Target(AnnotationTarget.CLASS)
internal annotation class UnlockProCompatibility

View File

@@ -1,22 +0,0 @@
package app.revanced.patches.memegenerator.misc.pro.fingerprint
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
object IsFreeVersionFingerprint : MethodFingerprint(
returnType = "Ljava/lang/Boolean;",
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
strings = listOf("free"),
parameters = listOf("Landroid/content/Context;"),
opcodes = listOf(
Opcode.SGET,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ
)
)

View File

@@ -1,45 +0,0 @@
package app.revanced.patches.memegenerator.misc.pro.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.memegenerator.detection.license.patch.LicenseValidationPatch
import app.revanced.patches.memegenerator.detection.signature.patch.SignatureVerificationPatch
import app.revanced.patches.memegenerator.misc.pro.annotations.UnlockProCompatibility
import app.revanced.patches.memegenerator.misc.pro.fingerprint.IsFreeVersionFingerprint
@Patch
@Name("unlock-pro")
@Description("Unlocks pro features.")
@DependsOn([
SignatureVerificationPatch::class,
LicenseValidationPatch::class
])
@UnlockProCompatibility
@Version("0.0.1")
class UnlockProVersionPatch : BytecodePatch(
listOf(
IsFreeVersionFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
IsFreeVersionFingerprint.result?.apply {
mutableMethod.replaceInstructions(0,
"""
sget-object p0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
return-object p0
"""
)
} ?: throw IsFreeVersionFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -1,18 +0,0 @@
package app.revanced.patches.messenger.ads.inbox.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object LoadInboxAdsFingerprint : MethodFingerprint(
returnType = "V",
strings = listOf(
"ads_load_begin",
"inbox_ads_fetch_start"
),
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
customFingerprint = { methodDef, _ ->
methodDef.definingClass == "Lcom/facebook/messaging/business/inboxads/plugins/inboxads/itemsupplier/InboxAdsItemSupplierImplementation;"
}
)

View File

@@ -1,29 +0,0 @@
package app.revanced.patches.messenger.ads.inbox.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.*
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.messenger.ads.inbox.fingerprints.LoadInboxAdsFingerprint
@Patch
@Name("hide-inbox-ads")
@Description("Hides ads in inbox.")
@Compatibility([Package("com.facebook.orca")])
@Version("0.0.1")
class HideInboxAdsPatch : BytecodePatch(
listOf(LoadInboxAdsFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
LoadInboxAdsFingerprint.result?.mutableMethod?.apply {
this.replaceInstruction(0, "return-void")
} ?: return LoadInboxAdsFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -1,15 +0,0 @@
package app.revanced.patches.messenger.inputfield.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.dexbacked.value.DexBackedStringEncodedValue
object SendTypingIndicatorFingerprint : MethodFingerprint(
returnType = "V",
parameters = listOf(),
customFingerprint = { methodDef, classDef ->
methodDef.name == "run" && classDef.fields.any {
it.name == "__redex_internal_original_name"
&& (it.initialValue as? DexBackedStringEncodedValue)?.value == "ConversationTypingContext\$sendActiveStateRunnable\$1"
}
}
)

View File

@@ -1,18 +0,0 @@
package app.revanced.patches.messenger.inputfield.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
returnType = "V",
parameters = listOf("L", "Z"),
strings = listOf("afterTextChanged", "expression_search"),
opcodes = listOf(
Opcode.IGET_OBJECT,
Opcode.IF_EQZ,
Opcode.CONST_STRING,
Opcode.GOTO,
Opcode.CONST_STRING,
Opcode.GOTO
)
)

View File

@@ -1,37 +0,0 @@
package app.revanced.patches.messenger.inputfield.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.*
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.messenger.inputfield.fingerprints.SwitchMessangeInputEmojiButtonFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@Name("disable-switching-emoji-to-sticker-in-message-input-field")
@Description("Disables switching from emoji to sticker search mode in message input field")
@Compatibility([Package("com.facebook.orca")])
@Version("0.0.1")
class DisableSwitchingEmojiToStickerInMessageInputField : BytecodePatch(listOf(SwitchMessangeInputEmojiButtonFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
SwitchMessangeInputEmojiButtonFingerprint.result?.let {
val setStringIndex = it.scanResult.patternScanResult!!.startIndex + 2
it.mutableMethod.apply {
val targetRegister = getInstruction<OneRegisterInstruction>(setStringIndex).registerA
replaceInstruction(
setStringIndex,
"const-string v$targetRegister, \"expression\""
)
}
} ?: throw SwitchMessangeInputEmojiButtonFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -1,29 +0,0 @@
package app.revanced.patches.messenger.inputfield.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.messenger.inputfield.fingerprints.SendTypingIndicatorFingerprint
@Patch
@Name("disable-typing-indicator")
@Description("Disables the indicator while typing a message")
@Compatibility([Package("com.facebook.orca")])
@Version("0.0.1")
class DisableTypingIndicator : BytecodePatch(listOf(SendTypingIndicatorFingerprint)) {
override fun execute(context: BytecodeContext): PatchResult {
SendTypingIndicatorFingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void")
?: throw SendTypingIndicatorFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -13,7 +13,7 @@ object UnlockProFingerprint : MethodFingerprint(
Opcode.IGET_BOOLEAN, Opcode.IGET_BOOLEAN,
Opcode.RETURN Opcode.RETURN
), ),
customFingerprint = { methodDef, _ -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("MainActivity;") methodDef.definingClass.endsWith("MainActivity;")
} }
) )

View File

@@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
@@ -24,9 +24,10 @@ class UnlockProPatch : BytecodePatch(
UnlockProFingerprint.result!!.mutableMethod.addInstructions( UnlockProFingerprint.result!!.mutableMethod.addInstructions(
0, 0,
""" """
const/4 v0, 0x1 const/4 v0, 0x1
return v0
""" return v0
"""
) )
return PatchResultSuccess() return PatchResultSuccess()
} }

View File

@@ -1,8 +1,8 @@
package app.revanced.patches.music.annotations package app.revanced.patches.music.ad.video.annotations
import app.revanced.patcher.annotation.Compatibility import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")]) @Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
internal annotation class MusicCompatibility internal annotation class MusicVideoAdsCompatibility

View File

@@ -4,32 +4,33 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.addInstructions
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.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
import app.revanced.patches.music.annotations.MusicCompatibility
@Patch @Patch
@Name("music-video-ads") @Name("music-video-ads")
@Description("Removes ads in the music player.") @Description("Removes ads in the music player.")
@MusicCompatibility @MusicVideoAdsCompatibility
@Version("0.0.1") @Version("0.0.1")
class MusicVideoAdsPatch : BytecodePatch( class MusicVideoAdsPatch : BytecodePatch(
listOf(ShowMusicVideoAdsConstructorFingerprint) listOf(
ShowMusicVideoAdsConstructorFingerprint
)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef) ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
val result = ShowMusicVideoAdsFingerprint.result!! val result = ShowMusicVideoAdsFingerprint.result!!
result.mutableMethod.addInstruction( result.mutableMethod.addInstructions(
result.scanResult.patternScanResult!!.startIndex, result.scanResult.patternScanResult!!.startIndex, """
"""
const/4 p1, 0x0 const/4 p1, 0x0
""" """
) )

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.audio.codecs.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class CodecsUnlockCompatibility

View File

@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.toInstruction import app.revanced.patcher.util.smali.toInstruction
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint import app.revanced.patches.music.audio.codecs.fingerprints.CodecsLockFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@@ -18,7 +18,7 @@ import org.jf.dexlib2.Opcode
@Patch @Patch
@Name("codecs-unlock") @Name("codecs-unlock")
@Description("Adds more audio codec options. The new audio codecs usually result in better audio quality.") @Description("Adds more audio codec options. The new audio codecs usually result in better audio quality.")
@MusicCompatibility @CodecsUnlockCompatibility
@Version("0.0.1") @Version("0.0.1")
class CodecsUnlockPatch : BytecodePatch( class CodecsUnlockPatch : BytecodePatch(
listOf( listOf(

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.audio.exclusiveaudio.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class ExclusiveAudioCompatibility

View File

@@ -4,22 +4,24 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
@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 @ExclusiveAudioCompatibility
@Version("0.0.1") @Version("0.0.1")
class ExclusiveAudioPatch : BytecodePatch( class ExclusiveAudioPatch : BytecodePatch(
listOf(AudioOnlyEnablerFingerprint) listOf(
AudioOnlyEnablerFingerprint
)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.layout.compactheader.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class CompactHeaderCompatibility

View File

@@ -4,22 +4,24 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
@Patch(false) @Patch(false)
@Name("compact-header") @Name("compact-header")
@Description("Hides the music category bar at the top of the homepage.") @Description("Hides the music category bar at the top of the homepage.")
@MusicCompatibility @CompactHeaderCompatibility
@Version("0.0.1") @Version("0.0.1")
class CompactHeaderPatch : BytecodePatch( class CompactHeaderPatch : BytecodePatch(
listOf(CompactHeaderConstructorFingerprint) listOf(
CompactHeaderConstructorFingerprint
)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
val result = CompactHeaderConstructorFingerprint.result!! val result = CompactHeaderConstructorFingerprint.result!!

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.layout.minimizedplayback.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class MinimizedPlaybackCompatibility

View File

@@ -4,28 +4,29 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
@Patch @Patch
@Name("minimized-playback-music") @Name("minimized-playback-music")
@Description("Enables minimized playback on Kids music.") @Description("Enables minimized playback on Kids music.")
@MusicCompatibility @MinimizedPlaybackCompatibility
@Version("0.0.1") @Version("0.0.1")
class MinimizedPlaybackPatch : BytecodePatch( class MinimizedPlaybackPatch : BytecodePatch(
listOf(MinimizedPlaybackManagerFingerprint) listOf(
MinimizedPlaybackManagerFingerprint
)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstruction( MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstructions(
0, 0, """
"""
return-void return-void
""" """
) )
return PatchResultSuccess() return PatchResultSuccess()

View File

@@ -0,0 +1,31 @@
package app.revanced.patches.music.layout.premium.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[Package(
"com.google.android.apps.youtube.music",
arrayOf(
"5.14.53",
"5.16.51",
"5.17.51",
"5.21.52",
"5.22.54",
"5.23.50",
"5.25.51",
"5.25.52",
"5.26.52",
"5.27.51",
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51",
"5.36.51",
"5.38.53",
"5.39.52"
)
)]
)
@Target(AnnotationTarget.CLASS)
internal annotation class HideGetPremiumCompatibility

View File

@@ -4,24 +4,26 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction import app.revanced.patcher.extensions.replaceInstruction
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.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
@Patch @Patch
@Name("hide-get-premium") @Name("hide-get-premium")
@Description("Removes all \"Get Premium\" evidences from the avatar menu.") @Description("Removes all \"Get Premium\" evidences from the avatar menu.")
@MusicCompatibility @HideGetPremiumCompatibility
@Version("0.0.1") @Version("0.0.1")
class HideGetPremiumPatch : BytecodePatch( class HideGetPremiumPatch : BytecodePatch(
listOf(HideGetPremiumParentFingerprint) listOf(
HideGetPremiumParentFingerprint
)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
val parentResult = HideGetPremiumParentFingerprint.result!! val parentResult = HideGetPremiumParentFingerprint.result!!
@@ -31,19 +33,17 @@ class HideGetPremiumPatch : BytecodePatch(
val parentMethod = parentResult.mutableMethod val parentMethod = parentResult.mutableMethod
parentMethod.replaceInstruction( parentMethod.replaceInstruction(
startIndex, startIndex, """
""" const/4 v1, 0x0
const/4 v1, 0x0 """
"""
) )
val result = HideGetPremiumFingerprint.result!! val result = HideGetPremiumFingerprint.result!!
val method = result.mutableMethod val method = result.mutableMethod
method.addInstruction( method.addInstructions(
startIndex, startIndex, """
""" const/16 v0, 0x8
const/16 v0, 0x8 """
"""
) )
return PatchResultSuccess() return PatchResultSuccess()

View File

@@ -0,0 +1,13 @@
package app.revanced.patches.music.layout.tastebuilder.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
/**
* -- Note 2022-08-05 --
* Since 5.17.xx the tastebuilder component is dismissible, so this patch is less useful
* also it is partly litho now
*/
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class RemoveTasteBuilderCompatibility

View File

@@ -0,0 +1,34 @@
package app.revanced.patches.music.layout.tastebuilder.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
object TasteBuilderConstructorFingerprint : MethodFingerprint(
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CONST,
Opcode.CONST_4,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.CHECK_CAST,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.CONST
)
)

View File

@@ -0,0 +1,41 @@
package app.revanced.patches.music.layout.tastebuilder.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
import app.revanced.patches.music.layout.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
@Patch
@Name("tasteBuilder-remover")
@Description("Removes the \"Tell us which artists you like\" card from the home screen.")
@RemoveTasteBuilderCompatibility
@Version("0.0.1")
class RemoveTasteBuilderPatch : BytecodePatch(
listOf(
TasteBuilderConstructorFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
val result = TasteBuilderConstructorFingerprint.result!!
val method = result.mutableMethod
val insertIndex = result.scanResult.patternScanResult!!.endIndex - 8
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
method.addInstructions(
insertIndex, """
const/16 v1, 0x8
invoke-virtual {v${register}, v1}, Landroid/view/View;->setVisibility(I)V
"""
)
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.layout.upgradebutton.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class RemoveUpgradeButtonCompatibility

View File

@@ -4,13 +4,13 @@ import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.toInstructions import app.revanced.patcher.util.smali.toInstructions
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction22t import org.jf.dexlib2.builder.instruction.BuilderInstruction22t
@@ -21,10 +21,12 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Patch @Patch
@Name("upgrade-button-remover") @Name("upgrade-button-remover")
@Description("Removes the upgrade tab from the pivot bar.") @Description("Removes the upgrade tab from the pivot bar.")
@MusicCompatibility @RemoveUpgradeButtonCompatibility
@Version("0.0.1") @Version("0.0.1")
class RemoveUpgradeButtonPatch : BytecodePatch( class RemoveUpgradeButtonPatch : BytecodePatch(
listOf(PivotBarConstructorFingerprint) listOf(
PivotBarConstructorFingerprint
)
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
val result = PivotBarConstructorFingerprint.result!! val result = PivotBarConstructorFingerprint.result!!

View File

@@ -1,9 +0,0 @@
package app.revanced.patches.music.misc.androidauto.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CheckCertificateFingerprint : MethodFingerprint(
returnType = "Z",
parameters = listOf("Ljava/lang/String;"),
strings = listOf("X509", "Failed to get public key.", "Failed to get certificate.")
)

View File

@@ -1,39 +0,0 @@
package app.revanced.patches.music.misc.androidauto.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.annotations.MusicCompatibility
import app.revanced.patches.music.misc.androidauto.fingerprints.CheckCertificateFingerprint
@Patch
@Name("bypass-certificate-checks")
@Description("Bypasses certificate checks which prevent YouTube Music from working on Android Auto.")
@MusicCompatibility
@Version("0.0.1")
class BypassCertificateChecksPatch : BytecodePatch(
listOf(CheckCertificateFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
CheckCertificateFingerprint.result?.let { result ->
val noMatchIndex = result.scanResult.stringsScanResult!!.matches.first().index
result.mutableMethod.apply {
val isPartnerIndex = noMatchIndex + 2
replaceInstruction(isPartnerIndex, "const/4 p1, 0x1")
addInstruction(isPartnerIndex + 1, "return p1")
}
} ?: return CheckCertificateFingerprint.toErrorResult()
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.misc.microg.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class MusicMicroGPatchCompatibility

View File

@@ -1,65 +1,65 @@
package app.revanced.patches.music.misc.microg.patch.bytecode package app.revanced.patches.music.misc.microg.patch.bytecode
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import app.revanced.patches.music.misc.microg.fingerprints.* import app.revanced.patches.music.misc.microg.fingerprints.*
import app.revanced.patches.music.misc.microg.patch.resource.MicroGResourcePatch import app.revanced.patches.music.misc.microg.patch.resource.MusicMicroGResourcePatch
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
import app.revanced.patches.youtube.misc.microg.shared.Constants import app.revanced.patches.youtube.misc.microg.shared.Constants
import app.revanced.util.microg.MicroGBytecodeHelper import app.revanced.util.microg.MicroGBytecodeHelper
@Patch @Patch
@DependsOn([MicroGResourcePatch::class]) @DependsOn([MusicMicroGResourcePatch::class])
@Name("vanced-microg-support") @Name("music-microg-support")
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.") @Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
@MusicCompatibility @MusicMicroGPatchCompatibility
@Version("0.0.2") @Version("0.0.2")
class MicroGBytecodePatch : BytecodePatch( class MusicMicroGBytecodePatch : BytecodePatch(
listOf( listOf(
ServiceCheckFingerprint, ServiceCheckFingerprint,
GooglePlayUtilityFingerprint, GooglePlayUtilityFingerprint,
CastDynamiteModuleFingerprint, CastDynamiteModuleFingerprint,
CastDynamiteModuleV2Fingerprint, CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint, CastContextFetchFingerprint,
PrimeFingerprint, PrimeFingerprint,
) )
) { ) {
// NOTE: the previous patch also replaced the following strings, but it seems like they are not needed: // NOTE: the previous patch also replaced the following strings, but it seems like they are not needed:
// - "com.google.android.gms.chimera.GmsIntentOperationService", // - "com.google.android.gms.chimera.GmsIntentOperationService",
// - "com.google.android.gms.phenotype.internal.IPhenotypeCallbacks", // - "com.google.android.gms.phenotype.internal.IPhenotypeCallbacks",
// - "com.google.android.gms.phenotype.internal.IPhenotypeService", // - "com.google.android.gms.phenotype.internal.IPhenotypeService",
// - "com.google.android.gms.phenotype.PACKAGE_NAME", // - "com.google.android.gms.phenotype.PACKAGE_NAME",
// - "com.google.android.gms.phenotype.UPDATE", // - "com.google.android.gms.phenotype.UPDATE",
// - "com.google.android.gms.phenotype", // - "com.google.android.gms.phenotype",
override fun execute(context: BytecodeContext) = override fun execute(context: BytecodeContext) =
// apply common microG patch // apply common microG patch
MicroGBytecodeHelper.patchBytecode( MicroGBytecodeHelper.patchBytecode(
context, context,
arrayOf( arrayOf(
MicroGBytecodeHelper.packageNameTransform( MicroGBytecodeHelper.packageNameTransform(
Constants.PACKAGE_NAME, Constants.PACKAGE_NAME,
Constants.REVANCED_PACKAGE_NAME Constants.REVANCED_PACKAGE_NAME
) )
), ),
MicroGBytecodeHelper.PrimeMethodTransformationData( MicroGBytecodeHelper.PrimeMethodTransformationData(
PrimeFingerprint, PrimeFingerprint,
MUSIC_PACKAGE_NAME, MUSIC_PACKAGE_NAME,
REVANCED_MUSIC_PACKAGE_NAME REVANCED_MUSIC_PACKAGE_NAME
), ),
listOf( listOf(
ServiceCheckFingerprint, ServiceCheckFingerprint,
GooglePlayUtilityFingerprint, GooglePlayUtilityFingerprint,
CastDynamiteModuleFingerprint, CastDynamiteModuleFingerprint,
CastDynamiteModuleV2Fingerprint, CastDynamiteModuleV2Fingerprint,
CastContextFetchFingerprint CastContextFetchFingerprint
) )
).let { PatchResultSuccess() } ).let { PatchResultSuccess() }
} }

View File

@@ -7,7 +7,7 @@ import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patches.music.annotations.MusicCompatibility import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
@@ -16,11 +16,11 @@ import app.revanced.patches.music.misc.microg.shared.Constants.SPOOFED_PACKAGE_S
import app.revanced.util.microg.MicroGManifestHelper import app.revanced.util.microg.MicroGManifestHelper
import app.revanced.util.microg.MicroGResourceHelper import app.revanced.util.microg.MicroGResourceHelper
@Name("microg-resource-patch") @Name("music-microg-resource-patch")
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.") @Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
@MusicCompatibility @MusicMicroGPatchCompatibility
@Version("0.0.2") @Version("0.0.2")
class MicroGResourcePatch : ResourcePatch { class MusicMicroGResourcePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult { override fun execute(context: ResourceContext): PatchResult {
// update manifest // update manifest
MicroGResourceHelper.patchManifest( MicroGResourceHelper.patchManifest(

View File

@@ -0,0 +1,8 @@
package app.revanced.patches.music.premium.backgroundplay.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.google.android.apps.youtube.music")])
@Target(AnnotationTarget.CLASS)
internal annotation class BackgroundPlayCompatibility

Some files were not shown because too many files have changed in this diff Show More