Compare commits

...

34 Commits

Author SHA1 Message Date
semantic-release-bot
8bb97f9b5f chore(release): 2.145.0-dev.2 [skip ci]
# [2.145.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.145.0-dev.1...v2.145.0-dev.2) (2022-12-18)

### Features

* **twitter/timeline-ads:** add clarifying notice to description ([f577380](f577380796))
2022-12-18 07:35:26 +00:00
oSumAtrIX
f577380796 feat(twitter/timeline-ads): add clarifying notice to description 2022-12-18 07:37:38 +01:00
semantic-release-bot
ed7b86072c chore(release): 2.145.0-dev.1 [skip ci]
# [2.145.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0-dev.1) (2022-12-18)

### Bug Fixes

* **tiktok/settings:** make compatible with newer versions ([c90069f](c90069f9c5))

### Features

* **crunchyroll:** remove `enable-downloads` patch ([df2a051](df2a051724))
* **youtube-music:** bump compatibility to 5.36.51 ([6831b3c](6831b3ce25))
2022-12-18 01:42:41 +00:00
oSumAtrIX
c90069f9c5 fix(tiktok/settings): make compatible with newer versions 2022-12-18 02:39:54 +01:00
oSumAtrIX
df2a051724 feat(crunchyroll): remove enable-downloads patch 2022-12-18 02:39:54 +01:00
FineFindus
6831b3ce25 feat(youtube-music): bump compatibility to 5.36.51 2022-12-18 02:39:28 +01:00
oSumAtrIX
c201f6dc2c chore: merge branch dev to main (#1276) 2022-12-15 23:43:43 +01:00
oSumAtrIX
9849df5814 ci: clean after running task generateMeta 2022-12-15 23:40:39 +01:00
semantic-release-bot
677fd639b7 chore(release): 2.144.0 [skip ci]
# [2.144.0](https://github.com/revanced/revanced-patches/compare/v2.143.0...v2.144.0) (2022-12-15)

### Features

* **citra:** add compatibility for canary package ([#1256](https://github.com/revanced/revanced-patches/issues/1256)) ([76b6c15](76b6c1561a))
* link packages to Google PlayStore ([#1272](https://github.com/revanced/revanced-patches/issues/1272)) ([2ef3625](2ef3625cac))
2022-12-15 20:56:43 +00:00
oSumAtrIX
63b63a394d chore: merge branch dev to main (#1268) 2022-12-15 21:53:26 +01:00
oSumAtrIX
936780038b ci: do not release on build commit type 2022-12-15 19:47:31 +01:00
semantic-release-bot
6c4c834587 chore(release): 2.144.0-dev.2 [skip ci]
# [2.144.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.144.0-dev.1...v2.144.0-dev.2) (2022-12-15)

### Features

* link packages to Google PlayStore ([#1272](https://github.com/revanced/revanced-patches/issues/1272)) ([2ef3625](2ef3625cac))
2022-12-15 14:08:49 +00:00
afn
2ef3625cac feat: link packages to Google PlayStore (#1272) 2022-12-15 15:06:55 +01:00
semantic-release-bot
10107919bd chore(release): 2.144.0-dev.1 [skip ci]
# [2.144.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.143.0...v2.144.0-dev.1) (2022-12-15)

### Features

* **citra:** add compatibility for canary package ([#1256](https://github.com/revanced/revanced-patches/issues/1256)) ([76b6c15](76b6c1561a))
2022-12-15 00:21:41 +00:00
FineFindus
76b6c1561a feat(citra): add compatibility for canary package (#1256) 2022-12-15 01:15:08 +01:00
semantic-release-bot
73023cd45e chore(release): 2.143.0 [skip ci]
# [2.143.0](https://github.com/revanced/revanced-patches/compare/v2.142.0...v2.143.0) (2022-12-14)

### Bug Fixes

* **predictive-back-gesture:** create attribute, if it does not exist ([e6e5864](e6e5864450))

### Features

* **sleepasandroid:** remove `unlock-premium` patch ([#1253](https://github.com/revanced/revanced-patches/issues/1253)) ([9432211](943221173e))
2022-12-14 00:06:53 +00:00
oSumAtrIX
456c6ce2bf chore: merge branch dev to main (#1254)
chore: merge branch `dev` to `main`
2022-12-14 01:04:17 +01:00
semantic-release-bot
d32782962f chore(release): 2.143.0-dev.2 [skip ci]
# [2.143.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.143.0-dev.1...v2.143.0-dev.2) (2022-12-14)

### Bug Fixes

* **predictive-back-gesture:** create attribute, if it does not exist ([e6e5864](e6e5864450))
2022-12-14 00:01:51 +00:00
oSumAtrIX
0fe7cacb31 ci: only back-merge from main branch to dev 2022-12-14 00:59:12 +01:00
oSumAtrIX
e6e5864450 fix(predictive-back-gesture): create attribute, if it does not exist 2022-12-14 00:47:03 +01:00
semantic-release-bot
a767f77b72 chore(release): 2.143.0-dev.1 [skip ci]
# [2.143.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.142.0...v2.143.0-dev.1) (2022-12-13)

### Features

* **sleepasandroid:** remove `unlock-premium` patch ([#1253](https://github.com/revanced/revanced-patches/issues/1253)) ([9432211](943221173e))
2022-12-13 23:31:44 +00:00
oSumAtrIX
3dc88e2578 ci: back-merge releases back into dev branch 2022-12-14 00:28:02 +01:00
oSumAtrIX
2df07cad36 chore: bump patcher dependency version 2022-12-14 00:25:33 +01:00
Jiří Richter
943221173e feat(sleepasandroid): remove unlock-premium patch (#1253) 2022-12-14 00:25:17 +01:00
semantic-release-bot
6ff3f3c974 chore(release): 2.142.0 [skip ci]
# [2.142.0](https://github.com/revanced/revanced-patches/compare/v2.141.0...v2.142.0) (2022-12-11)

### Features

* `predictive-back-gesture` patch ([#1236](https://github.com/revanced/revanced-patches/issues/1236)) ([170c5da](170c5daa33))
* **twitch/block-embedded-ads:** `block-embedded-ads` patch ([#1166](https://github.com/revanced/revanced-patches/issues/1166)) ([9af1fef](9af1fef0b7))
2022-12-11 04:11:04 +00:00
oSumAtrIX
e4c2bb9d39 chore: merge branch dev to main (#1235) 2022-12-11 05:08:31 +01:00
oSumAtrIX
67e2e00cdc ci: open pull requests to merge dev to main 2022-12-11 04:53:14 +01:00
bennett-sh
170c5daa33 feat: predictive-back-gesture patch (#1236)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-11 04:52:31 +01:00
oSumAtrIX
ce1099cd9c refactor: move ResourceUtils.mergeStrings to correct class 2022-12-11 04:52:30 +01:00
Ushie
9af1fef0b7 feat(twitch/block-embedded-ads): block-embedded-ads patch (#1166)
Co-authored-by: Tim Schneeberger <tim.schneeberger@outlook.de>
2022-12-11 04:52:19 +01:00
oSumAtrIX
a421da53f3 ci: refactor release workflow 2022-12-11 04:52:19 +01:00
semantic-release-bot
6a49b617fd chore(release): 2.141.0 [skip ci]
# [2.141.0](https://github.com/revanced/revanced-patches/compare/v2.140.0...v2.141.0) (2022-12-09)

### Bug Fixes

* inconsistencies in preference switches ([#1207](https://github.com/revanced/revanced-patches/issues/1207)) ([d5bff77](d5bff774ed))

### Features

* **youtube/return-youtube-dislike:** simplify preference descriptions ([#1216](https://github.com/revanced/revanced-patches/issues/1216)) ([72dacd7](72dacd7c9d))
2022-12-09 17:37:35 +00:00
Lisouseinaikyrios
d5bff774ed fix: inconsistencies in preference switches (#1207)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-09 18:11:16 +01:00
Lisouseinaikyrios
72dacd7c9d feat(youtube/return-youtube-dislike): simplify preference descriptions (#1216) 2022-12-06 23:30:15 +01:00
68 changed files with 6760 additions and 428 deletions

24
.github/workflows/pull_request.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: PR to main
on:
push:
branches:
- dev
workflow_dispatch:
env:
MESSAGE: merge branch \`${{ github.head_ref || github.ref_name }}\` to \`main\`
jobs:
pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Open pull request
uses: repo-sync/pull-request@v2
with:
destination_branch: 'main'
pr_title: 'chore: ${{ env.MESSAGE }}'
pr_body: 'This pull request will ${{ env.MESSAGE }}.'
pr_draft: true

View File

@@ -12,7 +12,7 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -22,18 +22,25 @@ jobs:
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
distribution: 'zulu'
cache: gradle
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'npm'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
uses: amyu/setup-android@v2
with:
cache-disabled: false
sdk-version: '33'
build-tools-version: '33.0.1'
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build clean generateMeta
- name: Install Android build-tools
run: sdkmanager "build-tools;32.0.0"
run: ./gradlew generateMeta clean --no-daemon
- name: Setup semantic-release
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
run: npm install semantic-release @saithodev/semantic-release-backmerge @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View File

@@ -118,3 +118,6 @@ gradle-app.setting
# Ignore vscode config
.vscode/
# Dependency directories
node_modules/

View File

@@ -7,11 +7,7 @@
}
],
"plugins": [
["@semantic-release/commit-analyzer", {
"releaseRules": [
{"type": "build", "release": "patch"}
]
}],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
@@ -21,7 +17,7 @@
"assets": [
"README.md",
"CHANGELOG.md",
"gradle.properties",
"gradle.properties",X
"patches.json"
]
}
@@ -38,6 +34,12 @@
}
]
}
],
[
"@saithodev/semantic-release-backmerge",
{
"branches": [{from: "main", to: "dev"}]
}
]
]
}

View File

@@ -1,3 +1,91 @@
# [2.145.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.145.0-dev.1...v2.145.0-dev.2) (2022-12-18)
### Features
* **twitter/timeline-ads:** add clarifying notice to description ([ed2f1f3](https://github.com/revanced/revanced-patches/commit/ed2f1f307fdad6128dc618815b9f8b24a5b99a66))
# [2.145.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.144.0...v2.145.0-dev.1) (2022-12-18)
### Bug Fixes
* **tiktok/settings:** make compatible with newer versions ([c88740d](https://github.com/revanced/revanced-patches/commit/c88740dc2bf040747d9704d5bed52a7b533c22d6))
### Features
* **crunchyroll:** remove `enable-downloads` patch ([2ac1546](https://github.com/revanced/revanced-patches/commit/2ac15460f5734fc2c6d2d78d34083a8e6b2f7012))
* **youtube-music:** bump compatibility to 5.36.51 ([c4a3099](https://github.com/revanced/revanced-patches/commit/c4a3099c1ca39431fba9beb94cc2b43e260561d9))
# [2.144.0](https://github.com/revanced/revanced-patches/compare/v2.143.0...v2.144.0) (2022-12-15)
### Features
* **citra:** add compatibility for canary package ([#1256](https://github.com/revanced/revanced-patches/issues/1256)) ([42ec021](https://github.com/revanced/revanced-patches/commit/42ec0218d829ea15759f83562d24588ce97cb646))
* link packages to Google PlayStore ([#1272](https://github.com/revanced/revanced-patches/issues/1272)) ([97892e0](https://github.com/revanced/revanced-patches/commit/97892e01044c74916375aeebcc094d3304e14f4e))
# [2.144.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.144.0-dev.1...v2.144.0-dev.2) (2022-12-15)
### Features
* link packages to Google PlayStore ([#1272](https://github.com/revanced/revanced-patches/issues/1272)) ([97892e0](https://github.com/revanced/revanced-patches/commit/97892e01044c74916375aeebcc094d3304e14f4e))
# [2.144.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.143.0...v2.144.0-dev.1) (2022-12-15)
### Features
* **citra:** add compatibility for canary package ([#1256](https://github.com/revanced/revanced-patches/issues/1256)) ([42ec021](https://github.com/revanced/revanced-patches/commit/42ec0218d829ea15759f83562d24588ce97cb646))
# [2.143.0](https://github.com/revanced/revanced-patches/compare/v2.142.0...v2.143.0) (2022-12-14)
### Bug Fixes
* **predictive-back-gesture:** create attribute, if it does not exist ([c00e771](https://github.com/revanced/revanced-patches/commit/c00e7717053f806e3b5b3f0bf0ca9c2da07c289b))
### Features
* **sleepasandroid:** remove `unlock-premium` patch ([#1253](https://github.com/revanced/revanced-patches/issues/1253)) ([414f503](https://github.com/revanced/revanced-patches/commit/414f503e493f2dc27edf134f5db723da77636d81))
# [2.143.0-dev.2](https://github.com/revanced/revanced-patches/compare/v2.143.0-dev.1...v2.143.0-dev.2) (2022-12-14)
### Bug Fixes
* **predictive-back-gesture:** create attribute, if it does not exist ([c00e771](https://github.com/revanced/revanced-patches/commit/c00e7717053f806e3b5b3f0bf0ca9c2da07c289b))
# [2.143.0-dev.1](https://github.com/revanced/revanced-patches/compare/v2.142.0...v2.143.0-dev.1) (2022-12-13)
### Features
* **sleepasandroid:** remove `unlock-premium` patch ([#1253](https://github.com/revanced/revanced-patches/issues/1253)) ([414f503](https://github.com/revanced/revanced-patches/commit/414f503e493f2dc27edf134f5db723da77636d81))
# [2.142.0](https://github.com/revanced/revanced-patches/compare/v2.141.0...v2.142.0) (2022-12-11)
### Features
* `predictive-back-gesture` patch ([#1236](https://github.com/revanced/revanced-patches/issues/1236)) ([11b59f7](https://github.com/revanced/revanced-patches/commit/11b59f767c94514d49a84593618ff9d2aace2636))
* **twitch/block-embedded-ads:** `block-embedded-ads` patch ([#1166](https://github.com/revanced/revanced-patches/issues/1166)) ([018606e](https://github.com/revanced/revanced-patches/commit/018606e9832c43836b6b8f4fbd623adb8876d162))
# [2.141.0](https://github.com/revanced/revanced-patches/compare/v2.140.0...v2.141.0) (2022-12-09)
### Bug Fixes
* inconsistencies in preference switches ([#1207](https://github.com/revanced/revanced-patches/issues/1207)) ([b6ea5a4](https://github.com/revanced/revanced-patches/commit/b6ea5a43b3eec6a06c7514cd79569b97a2b7d333))
### Features
* **youtube/return-youtube-dislike:** simplify preference descriptions ([#1216](https://github.com/revanced/revanced-patches/issues/1216)) ([514b5da](https://github.com/revanced/revanced-patches/commit/514b5da9a7de6f8d0b0d00ec6269f836df3e9333))
# [2.140.0](https://github.com/revanced/revanced-patches/compare/v2.139.0...v2.140.0) (2022-12-05)

125
README.md
View File

@@ -4,7 +4,7 @@ The official Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json).
### 📦 `com.google.android.youtube`
### [📦 `com.google.android.youtube`](https://play.google.com/store/apps/details?id=com.google.android.youtube)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -39,12 +39,12 @@ The official Patch bundle provided by ReVanced and the community.
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.45.36 |
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.45.36 |
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.45.36 |
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.45.36 |
| `hide-watch-in-vr` | Hides the Watch in VR option in the player settings flyout panel. | 17.45.36 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.45.36 |
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.45.36 |
| `minimized-playback` | Enables minimized and background playback. | 17.45.36 |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.45.36 |
| `open-links-directly` | Bypasses redirect links and allows opening links directly. | 17.45.36 |
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 17.45.36 |
| `open-links-directly` | Bypasses URL redirects and opens links directly inside YouTube app. | 17.45.36 |
| `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. | 17.45.36 |
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.45.36 |
@@ -58,24 +58,24 @@ The official Patch bundle provided by ReVanced and the community.
| `video-ads` | Removes ads in the video player. | 17.45.36 |
</details>
### 📦 `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)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `background-play` | Enables playing music in the background. | 5.34.51 |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.34.51 |
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.34.51 |
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.34.51 |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.34.51 |
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.34.51 |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.34.51 |
| `music-video-ads` | Removes ads in the music player. | 5.34.51 |
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.34.51 |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.34.51 |
| `background-play` | Enables playing music in the background. | 5.36.51 |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.36.51 |
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.36.51 |
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.36.51 |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.36.51 |
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.36.51 |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.36.51 |
| `music-video-ads` | Removes ads in the music player. | 5.36.51 |
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.36.51 |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.36.51 |
</details>
### 📦 `com.ss.android.ugc.trill`
### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -86,12 +86,12 @@ The official Patch bundle provided by ReVanced and the community.
| `fix-google-login` | Allows logging in with a Google account. | all |
| `hide-ads` | Removes ads from TikTok. | all |
| `playback-speed` | Enables the playback speed option for all videos. | all |
| `settings` | Adds settings for ReVanced to TikTok. | all |
| `settings` | Adds ReVanced settings to TikTok. | all |
| `show-seekbar` | Shows progress bar for all video. | all |
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
</details>
### 📦 `com.zhiliaoapp.musically`
### [📦 `com.zhiliaoapp.musically`](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -102,24 +102,25 @@ The official Patch bundle provided by ReVanced and the community.
| `fix-google-login` | Allows logging in with a Google account. | all |
| `hide-ads` | Removes ads from TikTok. | all |
| `playback-speed` | Enables the playback speed option for all videos. | all |
| `settings` | Adds settings for ReVanced to TikTok. | all |
| `settings` | Adds ReVanced settings to TikTok. | all |
| `show-seekbar` | Shows progress bar for all video. | all |
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
</details>
### 📦 `tv.twitch.android.app`
### [📦 `tv.twitch.android.app`](https://play.google.com/store/apps/details?id=tv.twitch.android.app)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `block-audio-ads` | Blocks audio ads in streams and VODs. | all |
| `block-embedded-ads` | Blocks embedded steam ads using services like TTV.lol or PurpleAdBlocker. | all |
| `block-video-ads` | Blocks video ads in streams and VODs. | all |
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
| `settings` | Adds settings menu to Twitch. | all |
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
</details>
### 📦 `com.spotify.music`
### [📦 `com.spotify.music`](https://play.google.com/store/apps/details?id=com.spotify.music)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -129,17 +130,17 @@ The official Patch bundle provided by ReVanced and the community.
| `spotify-theme` | Applies a custom theme. | all |
</details>
### 📦 `com.twitter.android`
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
| `monochrome-icon` | Adds a monochrome icon. | all |
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
| `timeline-ads` | Removes ads from the Twitter timeline. Might require clearing app data to remove already cached ads. | all |
</details>
### 📦 `com.reddit.frontpage`
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -148,7 +149,7 @@ The official Patch bundle provided by ReVanced and the community.
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
</details>
### 📦 `com.vanced.android.youtube`
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -156,7 +157,7 @@ The official Patch bundle provided by ReVanced and the community.
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
</details>
### 📦 `com.myprog.hexedit`
### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -164,23 +165,7 @@ The official Patch bundle provided by ReVanced and the community.
| `disable-ads` | Disables ads in HexEditor. | all |
</details>
### 📦 `com.crunchyroll.crunchyroid`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `enable-downloads` | Enables downloads for Crunchyroll. | all |
</details>
### 📦 `com.garzotto.pflotsh.ecmwf_a`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 |
</details>
### 📦 `org.citra.citra_emu`
### [📦 `org.citra.citra_emu`](https://play.google.com/store/apps/details?id=org.citra.citra_emu)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -188,7 +173,15 @@ The official Patch bundle provided by ReVanced and the community.
| `premium-unlock` | Unlocks premium functions. | all |
</details>
### 📦 `com.backdrops.wallpapers`
### [📦 `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>
### [📦 `com.backdrops.wallpapers`](https://play.google.com/store/apps/details?id=com.backdrops.wallpapers)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -196,7 +189,7 @@ The official Patch bundle provided by ReVanced and the community.
| `pro-unlock` | Unlocks pro-only functions. | all |
</details>
### 📦 `de.dwd.warnapp`
### [📦 `de.dwd.warnapp`](https://play.google.com/store/apps/details?id=de.dwd.warnapp)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -204,23 +197,7 @@ The official Patch bundle provided by ReVanced and the community.
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
</details>
### 📦 `com.urbandroid.sleep`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-premium` | Unlocks all premium features. | all |
</details>
### 📦 `com.shervinkoushan.anyTracker`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-premium` | Unlocks all premium features. | all |
</details>
### 📦 `ginlemon.iconpackstudio`
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -228,15 +205,7 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### 📦 `com.ithebk.expensemanager`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details>
### 📦 `org.totschnig.myexpenses`
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -244,7 +213,7 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all professional features. | all |
</details>
### 📦 `co.windyapp.android`
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -252,7 +221,15 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### 📦 `com.awedea.nyx`
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks pro features. | all |
</details>
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -260,7 +237,7 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all pro features. | all |
</details>
### 📦 `com.ticktick.task`
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |

View File

@@ -20,7 +20,7 @@ repositories {
}
dependencies {
implementation("app.revanced:revanced-patcher:6.3.0")
implementation("app.revanced:revanced-patcher:6.3.1")
implementation("app.revanced:multidexlib2:2.5.2.r2")
// Required for meta
implementation("com.google.code.gson:gson:2.10")
@@ -33,7 +33,7 @@ tasks {
doLast {
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
val d8 = "${androidHome}/build-tools/32.0.0/d8"
val d8 = "${androidHome}/build-tools/33.0.1/d8"
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
val work = File("${buildDir}/libs")

View File

@@ -1,2 +1,2 @@
kotlin.code.style = official
version = 2.140.0
version = 2.145.0-dev.2

6107
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

8
package.json Normal file
View File

@@ -0,0 +1,8 @@
{
"devDependencies": {
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/git": "^10.0.1",
"gradle-semantic-release-plugin": "^1.7.4",
"semantic-release": "^19.0.5"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,5 @@
package app.revanced.extensions
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.patch.PatchResultError
@@ -28,19 +27,6 @@ fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
MethodUtil.methodSignaturesMatch(it, method)
}
/**
* traverse the class hierarchy starting from the given root class
*
* @param targetClass the class to start traversing the class hierarchy from
* @param callback function that is called for every class in the hierarchy
*/
fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
callback(targetClass)
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
traverseClassHierarchy(it, callback)
}
}
/**
* apply a transform to all methods of the class
*

View File

@@ -25,7 +25,7 @@ fun generateText(bundle: Bundle) {
}
for (pkg in packages.entries.sortedByDescending { it.value.size }) {
output.appendLine("### \uD83D\uDCE6 `${pkg.key}`")
output.appendLine("### [\uD83D\uDCE6 `${pkg.key}`](https://play.google.com/store/apps/details?id=${pkg.key})")
output.appendLine("<details>\n")
output.appendLine(TABLE_HEADER)

View File

@@ -0,0 +1,37 @@
package app.revanced.patches.all.interaction.gestures.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
@Name("predictive-back-gesture")
@Description("Enables the predictive back gesture introduced on Android 13.")
@Version("0.0.1")
class PredictiveBackGesturePatch : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
context.xmlEditor["AndroidManifest.xml"].use { editor ->
val document = editor.file
with(document.getElementsByTagName("application").item(0)) {
if (attributes.getNamedItem(FLAG) != null) return@with
document.createAttribute(FLAG)
.apply { value = "true" }
.let(attributes::setNamedItem)
}
}
return PatchResultSuccess()
}
private companion object {
const val FLAG = "android:enableOnBackInvokedCallback"
}
}

View File

@@ -3,5 +3,5 @@ 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")])
internal annotation class PremiumUnlockCompatbility
@Compatibility([Package("org.citra.citra_emu"), Package("org.citra.citra_emu.canary")])
internal annotation class PremiumUnlockCompatbility

View File

@@ -1,13 +0,0 @@
package app.revanced.patches.crunchyroll.downloads.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[
Package("com.crunchyroll.crunchyroid")
]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class DownloadsCompatibility

View File

@@ -1,23 +0,0 @@
package app.revanced.patches.crunchyroll.downloads.fingerprints
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.Opcode
@Name("downloads-fingerprint")
@DownloadsCompatibility
@Version("0.0.1")
object DownloadsFingerprint : MethodFingerprint(
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, null,
opcodes = listOf(
Opcode.CONST_STRING,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.RETURN
),
strings = listOf("offline_viewing"),
)

View File

@@ -1,37 +0,0 @@
package app.revanced.patches.crunchyroll.downloads.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.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.crunchyroll.downloads.annotations.DownloadsCompatibility
import app.revanced.patches.crunchyroll.downloads.fingerprints.DownloadsFingerprint
@Patch
@Name("enable-downloads")
@Description("Enables downloads for Crunchyroll.")
@DownloadsCompatibility
@Version("0.0.1")
class DownloadsPatch : BytecodePatch(
listOf(
DownloadsFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
with(DownloadsFingerprint.result!!.mutableMethod) {
val index = implementation!!.instructions.lastIndex
replaceInstruction(
index - 1,
"""
const/4 v0, 0x1
"""
)
}
return PatchResultSuccess()
}
}

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -19,7 +19,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -22,7 +22,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -20,7 +20,8 @@ import app.revanced.patcher.annotation.Package
"5.28.52",
"5.29.52",
"5.31.50",
"5.34.51"
"5.34.51",
"5.36.51"
)
)]
)

View File

@@ -25,7 +25,7 @@ internal data class ArrayResource(
resourceCallback?.invoke(item)
this.appendChild(ownerDocument.createElement("item").also { itemNode ->
itemNode.textContent = item.value
itemNode.textContent = "@string/${item.name}"
})
}
}

View File

@@ -92,7 +92,7 @@ abstract class AbstractSettingsResourcePatch(
* @param arrayResource The array resource to add.
*/
fun addArray(arrayResource: ArrayResource) =
arraysNode!!.addResource(arrayResource)
arraysNode!!.addResource(arrayResource) { it.include() }
/**
* Add a preference to the settings.

View File

@@ -1,8 +0,0 @@
package app.revanced.patches.sleepasandroid.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object IsTrialFingerprint : MethodFingerprint(
"Z",
customFingerprint = { it.name == "isTrial" }
)

View File

@@ -1,36 +0,0 @@
package app.revanced.patches.sleepasandroid.patch
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
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.sleepasandroid.annotations.UnlockPremiumCompatibility
import app.revanced.patches.sleepasandroid.fingerprints.IsTrialFingerprint
@Patch
@Name("unlock-premium")
@Description("Unlocks all premium features.")
@UnlockPremiumCompatibility
class UnlockPremiumPatch : BytecodePatch(
listOf(
IsTrialFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
val method = IsTrialFingerprint.result!!.mutableMethod
method.addInstructions(
0,
"""
const/4 v0, 0x0
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -1,12 +0,0 @@
package app.revanced.patches.tiktok.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object AboutOnClickMethodFingerprint : MethodFingerprint(
strings = listOf(
"//setting/about",
"enter_from",
"settings_page",
"enter_settings_about"
)
)

View File

@@ -0,0 +1,39 @@
package app.revanced.patches.tiktok.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
@FuzzyPatternScanMethod(4)
object AboutViewFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.MOVE,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.NEW_INSTANCE,
Opcode.CONST,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_STATIC,
Opcode.MOVE_RESULT_OBJECT,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.CONST_4,
Opcode.CONST_STRING,
Opcode.INVOKE_DIRECT_RANGE,
Opcode.INVOKE_DIRECT,
Opcode.IPUT_OBJECT,
Opcode.CONST,
Opcode.SGET_OBJECT,
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ,
Opcode.CONST
)
)

View File

@@ -1,5 +1,6 @@
package app.revanced.patches.tiktok.misc.settings.patch
import app.revanced.extensions.toErrorResult
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
@@ -7,6 +8,7 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.extensions.replaceInstruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
@@ -15,13 +17,12 @@ import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.annotations.SettingsCompatibility
import app.revanced.patches.tiktok.misc.settings.fingerprints.AboutOnClickMethodFingerprint
import app.revanced.patches.tiktok.misc.settings.fingerprints.AboutViewFingerprint
import app.revanced.patches.tiktok.misc.settings.fingerprints.AdPersonalizationActivityOnCreateFingerprint
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint
import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
import org.jf.dexlib2.iface.instruction.formats.Instruction35c
import org.jf.dexlib2.iface.reference.StringReference
import org.jf.dexlib2.iface.reference.TypeReference
@@ -29,17 +30,19 @@ import org.jf.dexlib2.iface.reference.TypeReference
@Patch
@DependsOn([IntegrationsPatch::class])
@Name("settings")
@Description("Adds settings for ReVanced to TikTok.")
@Description("Adds ReVanced settings to TikTok.")
@SettingsCompatibility
@Version("0.0.1")
class SettingsPatch : BytecodePatch(
listOf(
AdPersonalizationActivityOnCreateFingerprint,
SettingsOnViewCreatedFingerprint,
AboutOnClickMethodFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
SettingsOnViewCreatedFingerprint.result?.let {
AboutViewFingerprint.resolve(context, it.method, it.classDef)
}
// Patch Settings UI to add 'Revanced Settings'.
val targetIndexes = findOptionsOnClickIndex()
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
@@ -72,29 +75,21 @@ class SettingsPatch : BytecodePatch(
private fun findOptionsOnClickIndex(): IntArray {
val results = IntArray(2)
var found = 0
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
for ((index, instruction) in implementation!!.instructions.withIndex()) {
SettingsOnViewCreatedFingerprint.result?.apply {
for ((index, instruction) in mutableMethod.implementation!!.instructions.withIndex()) {
// Old UI settings option to replace to 'Revanced Settings'
if (instruction.opcode == Opcode.CONST_STRING) {
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
if (string == "copyright_policy") {
results[0] = index - 2
found++
break
}
}
// New UI settings option to replace to 'Revanced Settings'
if (instruction.opcode == Opcode.NEW_INSTANCE) {
val onClickClass = ((instruction as Instruction21c).reference as TypeReference).type
if (onClickClass == AboutOnClickMethodFingerprint.result!!.mutableMethod.definingClass) {
results[1] = index
found++
}
}
if (found > 1) break
}
}
// New UI settings option to replace to 'Revanced Settings'
results[1] = AboutViewFingerprint.result!!.scanResult.patternScanResult!!.startIndex
} ?: throw SettingsOnViewCreatedFingerprint.toErrorResult()
return results
}

View File

@@ -1,9 +1,10 @@
package app.revanced.patches.sleepasandroid.annotations
package app.revanced.patches.twitch.ad.embedded.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.urbandroid.sleep")])
@Compatibility([Package("tv.twitch.android.app")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class UnlockPremiumCompatibility
internal annotation class EmbeddedAdsCompatibility

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.twitch.ad.embedded.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object CreateUsherClientFingerprint : MethodFingerprint(
customFingerprint = { method ->
method.definingClass.endsWith("Ltv/twitch/android/network/OkHttpClientFactory;") && method.name == "buildOkHttpClient"
}
)

View File

@@ -0,0 +1,78 @@
package app.revanced.patches.twitch.ad.embedded.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.MethodFingerprintExtensions.name
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.settings.preference.impl.ArrayResource
import app.revanced.patches.shared.settings.preference.impl.ListPreference
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.twitch.ad.embedded.annotations.EmbeddedAdsCompatibility
import app.revanced.patches.twitch.ad.embedded.fingerprints.CreateUsherClientFingerprint
import app.revanced.patches.twitch.ad.video.patch.VideoAdsPatch
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@Patch
@DependsOn([VideoAdsPatch::class, IntegrationsPatch::class, SettingsPatch::class])
@Name("block-embedded-ads")
@Description("Blocks embedded steam ads using services like TTV.lol or PurpleAdBlocker.")
@EmbeddedAdsCompatibility
@Version("0.0.1")
class EmbeddedAdsPatch : BytecodePatch(
listOf(CreateUsherClientFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
val result = CreateUsherClientFingerprint.result ?: return PatchResultError("${CreateUsherClientFingerprint.name} not found")
// Inject OkHttp3 application interceptor
result.mutableMethod.addInstructions(
3,
"""
invoke-static {}, Lapp/revanced/twitch/patches/EmbeddedAdsPatch;->createRequestInterceptor()Lapp/revanced/twitch/api/RequestInterceptor;
move-result-object v2
invoke-virtual {v0, v2}, Lokhttp3/OkHttpClient${"$"}Builder;->addInterceptor(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient${"$"}Builder;
"""
)
SettingsPatch.PreferenceScreen.ADS.SURESTREAM.addPreferences(
ListPreference(
"revanced_block_embedded_ads",
StringResource(
"revanced_block_embedded_ads",
"Block embedded video ads"
),
ArrayResource(
"revanced_hls_proxies",
listOf(
StringResource("revanced_proxy_disabled", "Disabled"),
StringResource("revanced_proxy_ttv_lol", "TTV LOL proxy"),
StringResource("revanced_proxy_purpleadblock", "PurpleAdBlock proxy"),
)
),
ArrayResource(
"revanced_hls_proxies_values",
listOf(
StringResource("key_revanced_proxy_disabled", "disabled"),
StringResource("key_revanced_proxy_ttv_lol", "ttv-lol"),
StringResource("key_revanced_proxy_purpleadblock", "purpleadblock")
)
),
"ttv-lol"
)
)
SettingsPatch.addString("revanced_embedded_ads_service_unavailable", "%s is unavailable. Ads may show. Try switching to another ad block service in settings.")
SettingsPatch.addString("revanced_embedded_ads_service_failed", "%s server returned an error. Ads may show. Try switching to another ad block service in settings.")
return PatchResultSuccess()
}
}

View File

@@ -0,0 +1,51 @@
package app.revanced.patches.twitch.ad.shared.util
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.util.smali.ExternalLabel
abstract class AbstractAdPatch(
val conditionCall: String,
val skipLabelName: String,
internal val fingerprints: Iterable<MethodFingerprint>? = null,
) : BytecodePatch(fingerprints) {
protected fun createConditionInstructions(register: String = "v0") = """
invoke-static { }, $conditionCall
move-result $register
if-eqz $register, :$skipLabelName
"""
protected data class ReturnMethod(val returnType: Char = 'V', val value: String = "")
protected fun BytecodeContext.blockMethods(clazz: String, vararg methodNames: String, returnMethod: ReturnMethod = ReturnMethod()): Boolean {
return with(findClass(clazz)?.mutableClass) {
this ?: return false
this.methods.filter { methodNames.contains(it.name) }.forEach {
val retIntructions = when(returnMethod.returnType) {
'V' -> "return-void"
'Z' -> """
const/4 v0, ${returnMethod.value}
return v0
"""
else -> throw NotImplementedError()
}
it.addInstructions(
0,
"""
${createConditionInstructions("v0")}
$retIntructions
""",
listOf(ExternalLabel(skipLabelName, it.instruction(0)))
)
}
true
}
}
}

View File

@@ -1,10 +1,9 @@
package app.revanced.patches.twitch.ad.video.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object AdsManagerFingerprint : MethodFingerprint(
object GetReadyToShowAdFingerprint : MethodFingerprint(
customFingerprint = { method ->
method.definingClass.endsWith("AdsManagerImpl;") && method.name == "playAds"
method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
}
)

View File

@@ -6,7 +6,6 @@ import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction
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
@@ -14,10 +13,11 @@ import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.twitch.ad.shared.util.AbstractAdPatch
import app.revanced.patches.twitch.ad.video.annotations.VideoAdsCompatibility
import app.revanced.patches.twitch.ad.video.fingerprints.AdsManagerFingerprint
import app.revanced.patches.twitch.ad.video.fingerprints.CheckAdEligibilityLambdaFingerprint
import app.revanced.patches.twitch.ad.video.fingerprints.ContentConfigShowAdsFingerprint
import app.revanced.patches.twitch.ad.video.fingerprints.GetReadyToShowAdFingerprint
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@@ -27,20 +27,63 @@ import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@Description("Blocks video ads in streams and VODs.")
@VideoAdsCompatibility
@Version("0.0.1")
class VideoAdsPatch : BytecodePatch(
class VideoAdsPatch : AbstractAdPatch(
"Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",
"show_video_ads",
listOf(
ContentConfigShowAdsFingerprint,
AdsManagerFingerprint,
CheckAdEligibilityLambdaFingerprint
CheckAdEligibilityLambdaFingerprint,
GetReadyToShowAdFingerprint
)
) {
private fun createConditionInstructions(register: String = "v0") = """
invoke-static { }, Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z
move-result $register
if-eqz $register, :show_video_ads
"""
override fun execute(context: BytecodeContext): PatchResult {
/* Amazon ads SDK */
context.blockMethods(
"Lcom/amazon/ads/video/player/AdsManagerImpl;",
"playAds"
)
/* Twitch ads manager */
context.blockMethods(
"Ltv/twitch/android/shared/ads/VideoAdManager;",
"checkAdEligibilityAndRequestAd", "requestAd", "requestAds"
)
/* Various ad presenters */
context.blockMethods(
"Ltv/twitch/android/shared/ads/AdsPlayerPresenter;",
"requestAd", "requestFirstAd", "requestFirstAdIfEligible", "requestMidroll", "requestAdFromMultiAdFormatEvent"
)
context.blockMethods(
"Ltv/twitch/android/shared/ads/AdsVodPlayerPresenter;",
"requestAd", "requestFirstAd",
)
context.blockMethods(
"Ltv/twitch/android/feature/theatre/ads/AdEdgeAllocationPresenter;",
"parseAdAndCheckEligibility", "requestAdsAfterEligibilityCheck", "showAd", "bindMultiAdFormatAllocation"
)
/* A/B ad testing experiments */
context.blockMethods(
"Ltv/twitch/android/provider/experiments/helpers/DisplayAdsExperimentHelper;",
"areDisplayAdsEnabled",
returnMethod = ReturnMethod('Z', "0")
)
context.blockMethods(
"Ltv/twitch/android/shared/ads/tracking/MultiFormatAdsTrackingExperiment;",
"shouldUseMultiAdFormatTracker", "shouldUseVideoAdTracker",
returnMethod = ReturnMethod('Z', "0")
)
context.blockMethods(
"Ltv/twitch/android/shared/ads/MultiformatAdsExperiment;",
"shouldDisableClientSideLivePreroll", "shouldDisableClientSideVodPreroll",
returnMethod = ReturnMethod('Z', "1")
)
// Pretend our player is ineligible for all ads
with(CheckAdEligibilityLambdaFingerprint.result!!) {
mutableMethod.addInstructions(
@@ -52,7 +95,22 @@ class VideoAdsPatch : BytecodePatch(
move-result-object p0
return-object p0
""",
listOf(ExternalLabel("show_video_ads", mutableMethod.instruction(0)))
listOf(ExternalLabel(skipLabelName, mutableMethod.instruction(0)))
)
}
with(GetReadyToShowAdFingerprint.result!!) {
val adFormatDeclined = "Ltv/twitch/android/shared/display/ads/theatre/StreamDisplayAdsPresenter\$Action\$AdFormatDeclined;"
mutableMethod.addInstructions(
0,
"""
${createConditionInstructions()}
sget-object p2, $adFormatDeclined->INSTANCE:$adFormatDeclined
invoke-static {p1, p2}, Ltv/twitch/android/core/mvp/presenter/StateMachineKt;->plus(Ltv/twitch/android/core/mvp/presenter/PresenterState;Ltv/twitch/android/core/mvp/presenter/PresenterAction;)Ltv/twitch/android/core/mvp/presenter/StateAndAction;
move-result-object p1
return-object p1
""",
listOf(ExternalLabel(skipLabelName, mutableMethod.instruction(0)))
)
}
@@ -61,24 +119,12 @@ class VideoAdsPatch : BytecodePatch(
mutableMethod.addInstructions(0, """
${createConditionInstructions()}
const/4 v0, 0
:show_video_ads
:$skipLabelName
return v0
"""
)
}
// Block playAds call
with(AdsManagerFingerprint.result!!) {
mutableMethod.addInstructions(
0,
"""
${createConditionInstructions()}
return-void
""",
listOf(ExternalLabel("show_video_ads", mutableMethod.instruction(0)))
)
}
SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences(
SwitchPreference(
"revanced_block_video_ads",

View File

@@ -173,6 +173,7 @@ class SettingsPatch : BytecodePatch(
val GENERAL = CustomCategory("general", "General settings")
val OTHER = CustomCategory("other", "Other settings")
val CLIENT_SIDE = CustomCategory("client_ads", "Client-side ads")
val SURESTREAM = CustomCategory("surestream_ads", "Server-side surestream ads")
internal inner class CustomCategory(key: String, title: String) : Screen.Category(key, title) {
/* For Twitch, we need to load our CustomPreferenceCategory class instead of the default one. */

View File

@@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.reference.StringReference
@Patch
@Name("timeline-ads")
@Description("Removes ads from the Twitter timeline.")
@Description("Removes ads from the Twitter timeline. Might require clearing app data to remove already cached ads.")
@TimelineAdsCompatibility
@Version("0.0.1")
class TimelineAdsPatch : BytecodePatch(

View File

@@ -8,18 +8,14 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.shared.settings.preference.impl.TextPreference
import app.revanced.patches.shared.settings.preference.impl.InputType
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.preference.impl.*
import app.revanced.patches.youtube.interaction.downloads.annotation.DownloadsCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import app.revanced.patches.youtube.misc.playercontrols.resource.patch.BottomControlsResourcePatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.util.resources.ResourceUtils
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
import app.revanced.util.resources.ResourceUtils.copyResources
import app.revanced.util.resources.ResourceUtils.mergeStrings
@Name("downloads-resource-patch")
@DependsOn([BottomControlsResourcePatch::class, FixLocaleConfigErrorPatch::class, SettingsPatch::class])
@@ -37,8 +33,8 @@ class DownloadsResourcePatch : ResourcePatch {
"revanced_downloads",
StringResource("revanced_downloads_enabled_title", "Show download button"),
true,
StringResource("revanced_downloads_enabled_summary_on", "Download button is visible"),
StringResource("revanced_downloads_enabled_summary_off", "Download button is hidden")
StringResource("revanced_downloads_enabled_summary_on", "Download button is shown"),
StringResource("revanced_downloads_enabled_summary_off", "Download button is not shown")
),
TextPreference(
"revanced_downloads_package_name",

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.youtube.interaction.swipecontrols.patch.bytecode
import app.revanced.extensions.transformMethods
import app.revanced.extensions.traverseClassHierarchy
import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
@@ -11,10 +10,11 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.TypeUtil.traverseClassHierarchy
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMutable
import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint
import app.revanced.patches.youtube.interaction.swipecontrols.annotation.SwipeControlsCompatibility
import app.revanced.patches.youtube.interaction.swipecontrols.fingerprints.SwipeControlsHostActivityFingerprint
import app.revanced.patches.shared.fingerprints.WatchWhileActivityFingerprint
import app.revanced.patches.youtube.interaction.swipecontrols.patch.resource.SwipeControlsResourcePatch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.playertype.patch.PlayerTypeHookPatch

View File

@@ -38,11 +38,11 @@ class HideAutoplayButtonPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_autoplay_button_enabled",
StringResource("revanced_autoplay_button_enabled_title", "Show autoplay button"),
false,
StringResource("revanced_autoplay_button_summary_on", "Autoplay button is shown"),
StringResource("revanced_autoplay_button_summary_off", "Autoplay button is hidden")
"revanced_hide_autoplay_button",
StringResource("revanced_hide_autoplay_button_title", "Hide autoplay button"),
true,
StringResource("revanced_hide_autoplay_button_summary_on", "Autoplay button is hidden"),
StringResource("revanced_hide_autoplay_button_summary_off", "Autoplay button is shown")
)
)

View File

@@ -31,46 +31,46 @@ class HideButtonsPatch : ResourcePatch {
StringResource("revanced_hide_buttons_title", "Hide action buttons"),
listOf(
SwitchPreference(
"revanced_like_button",
StringResource("revanced_like_button_title", "Hide like button"),
"revanced_hide_like_button",
StringResource("revanced_hide_like_button_title", "Hide like button"),
false,
StringResource("revanced_like_button_on", "Like button is hidden"),
StringResource("revanced_like_button_off", "Like button is shown")
StringResource("revanced_hide_like_button_summary_on", "Like button is hidden"),
StringResource("revanced_hide_like_button_summary_off", "Like button is shown")
),
SwitchPreference(
"revanced_dislike_button",
StringResource("revanced_dislike_button_title", "Hide dislike button"),
"revanced_hide_dislike_button",
StringResource("revanced_hide_dislike_button_title", "Hide dislike button"),
false,
StringResource("revanced_dislike_button_on", "Dislike button is hidden"),
StringResource("revanced_dislike_button_off", "Dislike button is shown")
StringResource("revanced_hide_dislike_button_summary_on", "Dislike button is hidden"),
StringResource("revanced_hide_dislike_button_summary_off", "Dislike button is shown")
),
SwitchPreference(
"revanced_download_button",
StringResource("revanced_download_button_title", "Hide download button"),
"revanced_hide_download_button",
StringResource("revanced_hide_download_button_title", "Hide download button"),
false,
StringResource("revanced_download_button_on", "Download button is hidden"),
StringResource("revanced_download_button_off", "Download button is shown")
StringResource("revanced_hide_download_button_summary_on", "Download button is hidden"),
StringResource("revanced_hide_download_button_summary_off", "Download button is shown")
),
SwitchPreference(
"revanced_playlist_button",
StringResource("revanced_playlist_button_title", "Hide playlist button"),
"revanced_hide_playlist_button",
StringResource("revanced_hide_playlist_button_title", "Hide playlist button"),
false,
StringResource("revanced_playlist_button_on", "Playlist button is hidden"),
StringResource("revanced_playlist_button_off", "Playlist button is shown")
StringResource("revanced_hide_playlist_button_summary_on", "Playlist button is hidden"),
StringResource("revanced_hide_playlist_button_summary_off", "Playlist button is shown")
),
SwitchPreference(
"revanced_action_button",
StringResource("revanced_action_button_title", "Hide create, clip and thanks buttons"),
"revanced_hide_action_button",
StringResource("revanced_hide_action_button_title", "Hide create, clip and thanks buttons"),
true,
StringResource("revanced_action_button_on", "Buttons are hidden"),
StringResource("revanced_action_button_off", "Buttons are shown")
StringResource("revanced_hide_action_button_summary_on", "Buttons are hidden"),
StringResource("revanced_hide_action_button_summary_off", "Buttons are shown")
),
SwitchPreference(
"revanced_share_button",
StringResource("revanced_share_button_title", "Hide share button"),
"revanced_hide_share_button",
StringResource("revanced_hide_share_button_title", "Hide share button"),
false,
StringResource("revanced_share_button_on", "Share button is hidden"),
StringResource("revanced_share_button_off", "Share button is shown")
StringResource("revanced_hide_share_button_summary_on", "Share button is hidden"),
StringResource("revanced_hide_share_button_summaryoff", "Share button is shown")
),
),
StringResource("revanced_hide_buttons_summary", "Hide or show buttons under videos")

View File

@@ -27,11 +27,11 @@ class HideCastButtonPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_cast_button_enabled",
StringResource("revanced_cast_button_enabled_title", "Show cast button"),
false,
StringResource("revanced_cast_button_summary_on", "Cast button is shown"),
StringResource("revanced_cast_button_summary_off", "Cast button is hidden")
"revanced_hide_cast_button",
StringResource("revanced_hide_cast_button_title", "Hide cast button"),
true,
StringResource("revanced_hide_cast_button_summary_on", "Cast button is hidden"),
StringResource("revanced_hide_cast_button_summary_off", "Cast button is shown")
)
)

View File

@@ -31,7 +31,7 @@ class CommentsResourcePatch : ResourcePatch {
listOf(
SwitchPreference(
"revanced_hide_comments_section",
StringResource("revanced_hide_comments_section_title", "Remove comments section"),
StringResource("revanced_hide_comments_section_title", "Hide comments section"),
false,
StringResource("revanced_hide_comments_section_summary_on", "Comment section is hidden"),
StringResource("revanced_hide_comments_section_summary_off", "Comment section is shown")

View File

@@ -35,11 +35,11 @@ class FullscreenPanelsRemoverPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_fullscreen_panels_enabled",
StringResource("revanced_fullscreen_panels_enabled_title", "Show fullscreen panels"),
false,
StringResource("revanced_fullscreen_panels_summary_on", "Fullscreen panels are shown"),
StringResource("revanced_fullscreen_panels_summary_off", "Fullscreen panels are hidden")
"revanced_hide_fullscreen_panels",
StringResource("revanced_hide_fullscreen_panels_title", "Hide fullscreen panels"),
true,
StringResource("revanced_hide_fullscreen_panels_summary_on", "Fullscreen panels are hidden"),
StringResource("revanced_hide_fullscreen_panels_summary_off", "Fullscreen panels are shown")
)
)

View File

@@ -26,10 +26,10 @@ class AlbumCardsResourcePatch : ResourcePatch {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_album_cards",
StringResource("revanced_hide_album_cards_title", "Hide the album cards"),
StringResource("revanced_hide_album_cards_title", "Hide album cards"),
false,
StringResource("revanced_hide_album_cards_summary_on", "Album cards is hidden"),
StringResource("revanced_hide_album_cards_summary_off", "Album cards is visible")
StringResource("revanced_hide_album_cards_summary_on", "Music album cards are hidden"),
StringResource("revanced_hide_album_cards_summary_off", "Music album cards are shown")
)
)

View File

@@ -26,10 +26,10 @@ class CrowdfundingBoxResourcePatch : ResourcePatch {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_crowdfunding_box",
StringResource("revanced_hide_crowdfunding_box_title", "Hide the crowdfunding box"),
StringResource("revanced_hide_crowdfunding_box_title", "Hide crowdfunding box"),
false,
StringResource("revanced_hide_crowdfunding_box_summary_on", "Crowdfunding box is hidden"),
StringResource("revanced_hide_crowdfunding_box_summary_off", "Crowdfunding box is visible")
StringResource("revanced_hide_crowdfunding_box_summary_off", "Crowdfunding box is shown")
)
)

View File

@@ -35,11 +35,11 @@ class MixPlaylistsPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_mix_playlists_hidden",
StringResource("revanced_mix_playlists_title", "Hide mix playlists"),
"revanced_hide_mix_playlists",
StringResource("revanced_hide_mix_playlists_title", "Hide mix playlists"),
false,
StringResource("revanced_mix_playlists_summary_on", "Mix playlists are hidden"),
StringResource("revanced_mix_playlists_summary_off", "Mix playlists are shown")
StringResource("revanced_hide_mix_playlists_summary_on", "Mix playlists are hidden"),
StringResource("revanced_hide_mix_playlists_summary_off", "Mix playlists are shown")
)
)

View File

@@ -36,7 +36,7 @@ class HideTimeAndSeekbarPatch : BytecodePatch(
StringResource("revanced_hide_time_and_seekbar_title", "Hide time and seekbar"),
false,
StringResource("revanced_hide_time_and_seekbar_summary_on", "Time and seekbar are hidden"),
StringResource("revanced_hide_time_and_seekbar_summary_off", "Time and seekbar are visible")
StringResource("revanced_hide_time_and_seekbar_summary_off", "Time and seekbar are shown")
)
)

View File

@@ -21,9 +21,11 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
@Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("old-quality-layout")
@Description("Enables the original quality flyout menu.")
@Description("Enables the original video quality flyout in the video player settings")
@OldQualityLayoutCompatibility
@Version("0.0.1")
// new ReVanced users have no idea what it means to use the "old quality layout menu"
// maybe rename this patch to better describe what it provides (ie: user-selectable-video-resolution )
class OldQualityLayoutPatch : BytecodePatch(
listOf(QualityMenuViewInflateFingerprint)
) {
@@ -31,10 +33,10 @@ class OldQualityLayoutPatch : BytecodePatch(
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_use_old_style_quality_settings",
StringResource("revanced_old_style_quality_settings_enabled_title", "Use old quality layout"),
StringResource("revanced_old_style_quality_settings_enabled_title", "Use old video quality player menu"),
true,
StringResource("revanced_old_style_quality_settings_summary_on", "Old quality settings are shown"),
StringResource("revanced_old_style_quality_settings_summary_off", "New quality settings are shown")
StringResource("revanced_old_style_quality_settings_summary_on", "Old video quality menu is used"),
StringResource("revanced_old_style_quality_settings_summary_off", "Old video quality menu is not used")
)
)

View File

@@ -26,10 +26,10 @@ class HideEmailAddressResourcePatch : ResourcePatch {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_email_address",
StringResource("revanced_hide_email_address_title", "Hide the email address"),
StringResource("revanced_hide_email_address_title", "Hide email in account switcher"),
false,
StringResource("revanced_hide_email_address_summary_on", "Email address is hidden"),
StringResource("revanced_hide_email_address_summary_off", "Email address is visible")
StringResource("revanced_hide_email_address_summary_off", "Email address is shown")
)
)

View File

@@ -37,11 +37,11 @@ class CreateButtonRemoverPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_create_button_enabled",
StringResource("revanced_create_button_enabled_title", "Show create button"),
false,
StringResource("revanced_create_button_summary_on", "Create button is shown"),
StringResource("revanced_create_button_summary_off", "Create button is hidden")
"revanced_hide_create_button",
StringResource("revanced_hide_create_button_title", "Hide create button"),
true,
StringResource("revanced_hide_create_button_summary_on", "Create button is hidden"),
StringResource("revanced_hide_create_button_summary_off", "Create button is shown")
)
)

View File

@@ -37,11 +37,11 @@ class ShortsButtonRemoverPatch : BytecodePatch() {
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_shorts_button_enabled",
StringResource("revanced_shorts_button_enabled_title", "Show shorts button"),
false,
StringResource("revanced_shorts_button_summary_on", "Shorts button is shown"),
StringResource("revanced_shorts_button_summary_off", "Shorts button is hidden")
"revanced_hide_shorts_button",
StringResource("revanced_hide_shorts_button_title", "Hide shorts button"),
true,
StringResource("revanced_hide_shorts_button_summary_on", "Shorts button is hidden"),
StringResource("revanced_hide_shorts_button_summary_off", "Shorts button is shown")
)
)

View File

@@ -29,11 +29,11 @@ class HideReelsPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_reel_button_enabled",
StringResource("revanced_reel_button_enabled_title", "Show reels button"),
false,
StringResource("revanced_reel_button_summary_on", "Reels button is shown"),
StringResource("revanced_reel_button_summary_off", "Reels button is hidden")
"revanced_hide_reel_button",
StringResource("revanced_hide_reel_button_title", "Hide reels button"),
true,
StringResource("revanced_hide_reel_button_summary_on", "Reels button is hidden"),
StringResource("revanced_hide_reel_button_summary_off", "Reels button is shown")
)
)

View File

@@ -8,12 +8,12 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.settings.preference.impl.Preference
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.youtube.layout.returnyoutubedislike.annotations.ReturnYouTubeDislikeCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.shared.settings.preference.impl.Preference
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
import app.revanced.util.resources.ResourceUtils.mergeStrings
@DependsOn([FixLocaleConfigErrorPatch::class, SettingsPatch::class])
@Name("return-youtube-dislike-resource-patch")

View File

@@ -7,16 +7,16 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.shared.settings.preference.impl.Preference
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.youtube.layout.sponsorblock.annotations.SponsorBlockCompatibility
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.util.resources.ResourceUtils
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
import app.revanced.util.resources.ResourceUtils.copyResources
import app.revanced.util.resources.ResourceUtils.copyXmlNode
import app.revanced.util.resources.ResourceUtils.mergeStrings
@Name("sponsorblock-resource-patch")
@SponsorBlockCompatibility

View File

@@ -20,7 +20,7 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
@Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("hide-watch-in-vr")
@Description("Hides the Watch in VR option from the player settings flyout panel.")
@Description("Hides the Watch in VR option in the player settings flyout panel.")
@WatchinVRCompatibility
@Version("0.0.1")
class WatchinVRPatch : BytecodePatch(
@@ -32,10 +32,10 @@ class WatchinVRPatch : BytecodePatch(
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_hide_watch_in_vr",
StringResource("revanced_hide_watch_in_vr_title", "Hide Watch in VR option"),
StringResource("revanced_hide_watch_in_vr_title", "Hide watch in VR"),
false,
StringResource("revanced_hide_watch_in_vr_summary_on", "Watch in VR option is hidden"),
StringResource("revanced_hide_watch_in_vr_summary_off", "Watch in VR option is shown")
StringResource("revanced_hide_watch_in_vr_summary_on", "Watch in VR player setting is hidden"),
StringResource("revanced_hide_watch_in_vr_summary_off", "Watch in VR player setting is shown")
)
)

View File

@@ -35,11 +35,11 @@ class HideWatermarkPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
SwitchPreference(
"revanced_branding_watermark_enabled",
StringResource("revanced_branding_watermark_enabled_title", "Show branding watermark"),
false,
StringResource("revanced_branding_watermark_summary_on", "Branding watermark is shown"),
StringResource("revanced_branding_watermark_summary_off", "Branding watermark is hidden")
"revanced_hide_video_watermark",
StringResource("revanced_hide_video_watermark_title", "Hide creator watermark on videos"),
true,
StringResource("revanced_hide_video_watermark_summary_on", "Watermark is hidden"),
StringResource("revanced_hide_video_watermark_summary_off", "Watermark is shown")
)
)

View File

@@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
@Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("open-links-directly")
@Description("Bypasses redirect links and allows opening links directly.")
@Description("Bypasses URL redirects and opens links directly inside YouTube app.")
@OpenLinksDirectlyCompatibility
@Version("0.0.1")
class OpenLinksDirectlyPatch : BytecodePatch(
@@ -37,10 +37,10 @@ class OpenLinksDirectlyPatch : BytecodePatch(
SettingsPatch.PreferenceScreen.MISC.addPreferences(
SwitchPreference(
"revanced_uri_redirect",
StringResource("revanced_uri_redirect_title", "Open links directly"),
StringResource("revanced_uri_redirect_title", "Open YouTube links inside app"),
true,
StringResource("revanced_uri_redirect_summary_on", "Enabled"),
StringResource("revanced_uri_redirect_summary_off", "Disabled")
StringResource("revanced_uri_redirect_summary_on", "Links opened inside YouTube ReVanced"),
StringResource("revanced_uri_redirect_summary_off", "Links opened in web browser")
)
)

View File

@@ -38,16 +38,16 @@ class RememberVideoQualityPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult {
SettingsPatch.PreferenceScreen.MISC.addPreferences(
SwitchPreference(
"revanced_remember_video_quality_selection",
StringResource("revanced_remember_video_quality_selection_title", "Remember current video quality"),
false,
"revanced_remember_video_quality_last_selected",
StringResource("revanced_remember_video_quality_last_selected_title", "Remember video quality changes"),
true,
StringResource(
"revanced_remember_video_quality_selection_summary_on",
"The current video quality will not change"
"revanced_remember_video_quality_last_selected_summary_on",
"Quality changes apply to all videos"
),
StringResource(
"revanced_remember_video_quality_selection_summary_off",
"Video quality will be remembered until a new quality is chosen"
"revanced_remember_video_quality_last_selected_summary_off",
"Quality changes only apply to the current video and are reverted back to the last remembered quality for future playbacks"
)
)
)

View File

@@ -1,7 +1,7 @@
package app.revanced.util.microg
import app.revanced.patcher.data.ResourceContext
import app.revanced.util.resources.ResourceUtils.Settings.mergeStrings
import app.revanced.util.resources.ResourceUtils.mergeStrings
/**
* Helper class for applying resource patches needed for the microg-support patches.

View File

@@ -2,8 +2,8 @@ package app.revanced.util.resources
import app.revanced.patcher.data.DomFileEditor
import app.revanced.patcher.data.ResourceContext
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import org.w3c.dom.Node
import java.nio.file.Files
import java.nio.file.StandardCopyOption
@@ -11,26 +11,21 @@ import java.nio.file.StandardCopyOption
internal object ResourceUtils {
/**
* Settings related utilities
* Merge strings. This manages [StringResource]s automatically.
* @param host The hosting xml resource. Needs to be a valid strings.xml resource.
*/
internal object Settings {
/**
* Merge strings. This handles [StringResource]s automatically.
* @param host The hosting xml resource. Needs to be a valid strings.xml resource.
*/
internal fun ResourceContext.mergeStrings(host: String) {
this.iterateXmlNodeChildren(host, "resources") {
// TODO: figure out why this is needed
if (!it.hasAttributes()) return@iterateXmlNodeChildren
internal fun ResourceContext.mergeStrings(host: String) {
this.iterateXmlNodeChildren(host, "resources") {
// TODO: figure out why this is needed
if (!it.hasAttributes()) return@iterateXmlNodeChildren
val attributes = it.attributes
val key = attributes.getNamedItem("name")!!.nodeValue!!
val value = it.textContent!!
val attributes = it.attributes
val key = attributes.getNamedItem("name")!!.nodeValue!!
val value = it.textContent!!
val formatted = attributes.getNamedItem("formatted") == null
val formatted = attributes.getNamedItem("formatted") == null
SettingsPatch.addString(key, value, formatted)
}
SettingsPatch.addString(key, value, formatted)
}
}

View File

@@ -4,8 +4,8 @@
<string name="revanced_ryd_enable_summary_off">Dislikes are not shown</string>
<string name="revanced_ryd_dislike_percentage_title">Dislikes as percentage</string>
<string name="revanced_ryd_dislike_percentage_summary_on">Dislikes shown as percentage of all votes</string>
<string name="revanced_ryd_dislike_percentage_summary_off">Dislikes shown as number of dislike votes</string>
<string name="revanced_ryd_dislike_percentage_summary_on">Dislikes shown as percentage</string>
<string name="revanced_ryd_dislike_percentage_summary_off">Dislikes shown as number</string>
<string name="revanced_ryd_attribution_title">ReturnYouTubeDislike.com</string>
<string name="revanced_ryd_attribution_summary">Dislike data is provided by the Return YouTube Dislike API. Tap here to learn more.</string>