Compare commits

...

75 Commits

Author SHA1 Message Date
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
semantic-release-bot
2afdb1a70d chore(release): 2.140.0 [skip ci]
# [2.140.0](https://github.com/revanced/revanced-patches/compare/v2.139.0...v2.140.0) (2022-12-05)

### Features

* **music:** bump compatibility to v5.34.51 ([9a7e36c](127ab85d5e))
2022-12-05 20:46:00 +00:00
oSumAtrIX
127ab85d5e feat(music): bump compatibility to v5.34.51 2022-12-05 21:43:49 +01:00
semantic-release-bot
817a6a9f87 chore(release): 2.139.0 [skip ci]
# [2.139.0](https://github.com/revanced/revanced-patches/compare/v2.138.0...v2.139.0) (2022-12-05)

### Features

* **youtube/return-youtube-dislike:** improve settings labels ([#1203](https://github.com/revanced/revanced-patches/issues/1203)) ([7913046](18b39a448e))
2022-12-05 12:53:00 +00:00
LisousEinaiKyrios
18b39a448e feat(youtube/return-youtube-dislike): improve settings labels (#1203) 2022-12-05 13:50:49 +01:00
semantic-release-bot
13e74c9946 chore(release): 2.138.0 [skip ci]
# [2.138.0](https://github.com/revanced/revanced-patches/compare/v2.137.0...v2.138.0) (2022-12-05)

### Features

* **youtube/debugging:** print stack traces ([4289a49](d77c9fec15))
2022-12-05 05:36:21 +00:00
oSumAtrIX
d77c9fec15 feat(youtube/debugging): print stack traces 2022-12-05 06:34:01 +01:00
semantic-release-bot
27c66f7d12 chore(release): 2.137.0 [skip ci]
# [2.137.0](https://github.com/revanced/revanced-patches/compare/v2.136.0...v2.137.0) (2022-12-03)

### Features

* **youtube/return-youtube-dislike:** show dislike as a percentage ([#1185](https://github.com/revanced/revanced-patches/issues/1185)) ([e5cb571](ad3041635f))
2022-12-03 16:25:19 +00:00
LisousEinaiKyrios
ad3041635f feat(youtube/return-youtube-dislike): show dislike as a percentage (#1185)
Co-authored-by: LisousEinaiKyrios <>
2022-12-03 17:23:28 +01:00
semantic-release-bot
8ff56f557c chore(release): 2.136.0 [skip ci]
# [2.136.0](https://github.com/revanced/revanced-patches/compare/v2.135.0...v2.136.0) (2022-12-02)

### Bug Fixes

* syntax error in compatiblity annotation ([#1181](https://github.com/revanced/revanced-patches/issues/1181)) ([23bf905](6369b24f64))

### Features

* **youtube:** drop support for compatibility of old versions ([2e3d004](f1960310b6))
2022-12-02 14:20:41 +00:00
Robert
6369b24f64 fix: syntax error in compatiblity annotation (#1181) 2022-12-02 15:19:16 +01:00
oSumAtrIX
f1960310b6 feat(youtube): drop support for compatibility of old versions 2022-12-02 05:07:41 +01:00
semantic-release-bot
0aaa2a40ec chore(release): 2.135.0 [skip ci]
# [2.135.0](https://github.com/revanced/revanced-patches/compare/v2.134.1...v2.135.0) (2022-12-02)

### Features

* sort README patch table by amount of patches per package ([791dcb5](9d6c99930b))
2022-12-02 03:36:42 +00:00
oSumAtrIX
9d6c99930b feat: sort README patch table by amount of patches per package 2022-12-02 04:35:06 +01:00
semantic-release-bot
d50a58900c chore(release): 2.134.1 [skip ci]
## [2.134.1](https://github.com/revanced/revanced-patches/compare/v2.134.0...v2.134.1) (2022-12-02)

### Bug Fixes

* **youtube:** swipe gesture on home screen ([f7644ae](f057ba8eab)), closes [#610](https://github.com/revanced/revanced-patches/issues/610)
2022-12-02 03:07:15 +00:00
oSumAtrIX
139f9a88eb chore: bump patcher dependency version 2022-12-02 04:04:49 +01:00
oSumAtrIX
f057ba8eab fix(youtube): swipe gesture on home screen
Fixes #610
2022-12-02 04:04:49 +01:00
semantic-release-bot
7bd544e171 refactor: move patches to correct package 2022-12-02 04:04:48 +01:00
semantic-release-bot
796d4dc407 chore(release): 2.134.0 [skip ci]
# [2.134.0](https://github.com/revanced/revanced-patches/compare/v2.133.0...v2.134.0) (2022-12-02)

### Bug Fixes

* **anytracker:** syntax error in fingerprint ([#1165](https://github.com/revanced/revanced-patches/issues/1165)) ([4f757ac](f63cfb52b0))

### Features

* **anytracker:** `unlock-premium` patch ([#1165](https://github.com/revanced/revanced-patches/issues/1165)) ([041fb72](583ec5d8e3))
2022-12-02 01:38:22 +00:00
oSumAtrIX
99f6363606 chore: bump patcher dependency version 2022-12-02 02:35:34 +01:00
oSumAtrIX
f63cfb52b0 fix(anytracker): syntax error in fingerprint (#1165) 2022-12-02 02:19:04 +01:00
oSumAtrIX
583ec5d8e3 feat(anytracker): unlock-premium patch (#1165)
Co-authored-by: FineFindus <63370021+FineFindus@users.noreply.github.com>
2022-12-01 22:48:33 +01:00
semantic-release-bot
b675adef30 chore(release): 2.133.0 [skip ci]
# [2.133.0](https://github.com/revanced/revanced-patches/compare/v2.132.0...v2.133.0) (2022-12-01)

### Features

* **moneymanager:** `unlock-premium` patch ([#1173](https://github.com/revanced/revanced-patches/issues/1173)) ([4da1d53](a08fe535b1))
2022-12-01 17:51:15 +00:00
johnconner122
a08fe535b1 feat(moneymanager): unlock-premium patch (#1173)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-01 18:49:40 +01:00
semantic-release-bot
7e5c963e36 chore(release): 2.132.0 [skip ci]
# [2.132.0](https://github.com/revanced/revanced-patches/compare/v2.131.0...v2.132.0) (2022-12-01)

### Features

* **sleepasandroid:** `unlock-premium` patch ([#1172](https://github.com/revanced/revanced-patches/issues/1172)) ([9d9d938](05ea840b8f))
* **twitch:** remove `block-embedded-ads` patch ([#1164](https://github.com/revanced/revanced-patches/issues/1164)) ([403e887](da4b80c5dd))
2022-12-01 17:20:22 +00:00
aliveoutside
05ea840b8f feat(sleepasandroid): unlock-premium patch (#1172)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-12-01 18:18:43 +01:00
Ushie
da4b80c5dd feat(twitch): remove block-embedded-ads patch (#1164) 2022-11-30 22:36:21 +01:00
semantic-release-bot
4ca19b7fd2 chore(release): 2.131.0 [skip ci]
# [2.131.0](https://github.com/revanced/revanced-patches/compare/v2.130.0...v2.131.0) (2022-11-30)

### Features

* **twitch/block-embedded-ads:** `block-embedded-ads` patch support ([#1160](https://github.com/revanced/revanced-patches/issues/1160)) ([69590fd](260b395426))
2022-11-30 14:11:58 +00:00
Tim Schneeberger
260b395426 feat(twitch/block-embedded-ads): block-embedded-ads patch support (#1160) 2022-11-30 15:10:07 +01:00
semantic-release-bot
b4d8dbcc3d chore(release): 2.130.0 [skip ci]
# [2.130.0](https://github.com/revanced/revanced-patches/compare/v2.129.0...v2.130.0) (2022-11-29)

### Features

* **youtube/enable-wide-searchbar:** bump compatibility to v17.45.36 ([5451a52](7180914df1))
2022-11-29 00:46:01 +00:00
oSumAtrIX
7180914df1 feat(youtube/enable-wide-searchbar): bump compatibility to v17.45.36 2022-11-29 01:44:18 +01:00
semantic-release-bot
748b14d547 chore(release): 2.129.0 [skip ci]
# [2.129.0](https://github.com/revanced/revanced-patches/compare/v2.128.0...v2.129.0) (2022-11-28)

### Features

* **youtube/hide-create-button:** bump compatibility to v17.45.36 ([37e9df2](d9d4d1f38c))
* **youtube/hide-shorts-button:** bump compatibility to v17.45.36 ([e5e33f2](0f73a9dd5e))
2022-11-28 23:57:26 +00:00
oSumAtrIX
d9d4d1f38c feat(youtube/hide-create-button): bump compatibility to v17.45.36 2022-11-29 00:55:34 +01:00
oSumAtrIX
0f73a9dd5e feat(youtube/hide-shorts-button): bump compatibility to v17.45.36 2022-11-29 00:55:31 +01:00
semantic-release-bot
fafcd751b2 chore(release): 2.128.0 [skip ci]
# [2.128.0](https://github.com/revanced/revanced-patches/compare/v2.127.0...v2.128.0) (2022-11-28)

### Features

* **twitch:** settings for patches ([#1142](https://github.com/revanced/revanced-patches/issues/1142)) ([02bb641](ea7b3f5529))
2022-11-28 23:22:34 +00:00
Tim Schneeberger
ea7b3f5529 feat(twitch): settings for patches (#1142) 2022-11-29 00:20:58 +01:00
semantic-release-bot
4935c00aa5 chore(release): 2.127.0 [skip ci]
# [2.127.0](https://github.com/revanced/revanced-patches/compare/v2.126.1...v2.127.0) (2022-11-28)

### Features

* **twitch:** `settings` patch ([#1075](https://github.com/revanced/revanced-patches/issues/1075)) ([632a083](06098713bb))
2022-11-28 22:52:01 +00:00
Tim Schneeberger
06098713bb feat(twitch): settings patch (#1075)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-11-28 23:50:04 +01:00
Tim Schneeberger
eb505d802a refactor: abstract settings patch (#1109)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2022-11-28 20:13:34 +01:00
semantic-release-bot
e8b7cdfa35 chore(release): 2.126.1 [skip ci]
## [2.126.1](https://github.com/revanced/revanced-patches/compare/v2.126.0...v2.126.1) (2022-11-28)

### Bug Fixes

* **youtube/custom-video-speed:** fuzzy scan on fingerprint  ([#1135](https://github.com/revanced/revanced-patches/issues/1135)) ([920e72a](986951dc8a))
2022-11-28 10:58:11 +00:00
FineFindus
986951dc8a fix(youtube/custom-video-speed): fuzzy scan on fingerprint (#1135) 2022-11-28 11:56:12 +01:00
d4rkk3y
b88fda959c refactor(tiktok): simplify names (#1085) 2022-11-28 03:11:32 +01:00
semantic-release-bot
96c36dca74 chore(release): 2.126.0 [skip ci]
# [2.126.0](https://github.com/revanced/revanced-patches/compare/v2.125.0...v2.126.0) (2022-11-28)

### Features

* **backdrops:** `pro-unlock` patch ([#1121](https://github.com/revanced/revanced-patches/issues/1121)) ([285169e](4ce3fd4ff7))
2022-11-28 01:38:21 +00:00
josesilveiraa
4ce3fd4ff7 feat(backdrops): pro-unlock patch (#1121) 2022-11-28 02:36:39 +01:00
209 changed files with 8593 additions and 1052 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: jobs:
release: release:
name: Release name: Release
runs-on: ubuntu-18.04 runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -22,18 +22,25 @@ jobs:
uses: actions/setup-java@v3 uses: actions/setup-java@v3
with: with:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'zulu'
cache: gradle cache: gradle
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'npm'
- name: Setup Android SDK - 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 - name: Build with Gradle
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build clean generateMeta run: ./gradlew generateMeta clean --no-daemon
- name: Install Android build-tools
run: sdkmanager "build-tools;32.0.0"
- name: Setup semantic-release - 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 - name: Release
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View File

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

View File

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

View File

@@ -1,3 +1,215 @@
# [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)
### Features
* **music:** bump compatibility to v5.34.51 ([fc0c92e](https://github.com/revanced/revanced-patches/commit/fc0c92e2b68a2d93a02f4577aeb864955b1b5701))
# [2.139.0](https://github.com/revanced/revanced-patches/compare/v2.138.0...v2.139.0) (2022-12-05)
### Features
* **youtube/return-youtube-dislike:** improve settings labels ([#1203](https://github.com/revanced/revanced-patches/issues/1203)) ([fb4a612](https://github.com/revanced/revanced-patches/commit/fb4a612592d82857b0e892a6f5d135dbd657c44d))
# [2.138.0](https://github.com/revanced/revanced-patches/compare/v2.137.0...v2.138.0) (2022-12-05)
### Features
* **youtube/debugging:** print stack traces ([9cea382](https://github.com/revanced/revanced-patches/commit/9cea382750456434d0547351ee7d4013eac9de9c))
# [2.137.0](https://github.com/revanced/revanced-patches/compare/v2.136.0...v2.137.0) (2022-12-03)
### Features
* **youtube/return-youtube-dislike:** show dislike as a percentage ([#1185](https://github.com/revanced/revanced-patches/issues/1185)) ([cbbab0b](https://github.com/revanced/revanced-patches/commit/cbbab0b4069534a2032258f9a09e9690fc68c291))
# [2.136.0](https://github.com/revanced/revanced-patches/compare/v2.135.0...v2.136.0) (2022-12-02)
### Bug Fixes
* syntax error in compatiblity annotation ([#1181](https://github.com/revanced/revanced-patches/issues/1181)) ([0830c7e](https://github.com/revanced/revanced-patches/commit/0830c7ed1064757cf6354b426549275ece55408e))
### Features
* **youtube:** drop support for compatibility of old versions ([7413aad](https://github.com/revanced/revanced-patches/commit/7413aad6d215f24a66ba9a33917c73dbdb0b7bc3))
# [2.135.0](https://github.com/revanced/revanced-patches/compare/v2.134.1...v2.135.0) (2022-12-02)
### Features
* sort README patch table by amount of patches per package ([40cb14e](https://github.com/revanced/revanced-patches/commit/40cb14e1838aee5b49b60094cd134ed7e1726c3f))
## [2.134.1](https://github.com/revanced/revanced-patches/compare/v2.134.0...v2.134.1) (2022-12-02)
### Bug Fixes
* **youtube:** swipe gesture on home screen ([9294084](https://github.com/revanced/revanced-patches/commit/929408406b53d8b0db69f092c3e191791b9fa8ee)), closes [#610](https://github.com/revanced/revanced-patches/issues/610)
# [2.134.0](https://github.com/revanced/revanced-patches/compare/v2.133.0...v2.134.0) (2022-12-02)
### Bug Fixes
* **anytracker:** syntax error in fingerprint ([#1165](https://github.com/revanced/revanced-patches/issues/1165)) ([46ad786](https://github.com/revanced/revanced-patches/commit/46ad786b1488814494080ca48cff27c361c47ca1))
### Features
* **anytracker:** `unlock-premium` patch ([#1165](https://github.com/revanced/revanced-patches/issues/1165)) ([e7ed324](https://github.com/revanced/revanced-patches/commit/e7ed324bb5216037be0646a698e7e808fbf03e4e))
# [2.133.0](https://github.com/revanced/revanced-patches/compare/v2.132.0...v2.133.0) (2022-12-01)
### Features
* **moneymanager:** `unlock-premium` patch ([#1173](https://github.com/revanced/revanced-patches/issues/1173)) ([438c1bc](https://github.com/revanced/revanced-patches/commit/438c1bca684c7d47bd5a401b4dccbaddef604650))
# [2.132.0](https://github.com/revanced/revanced-patches/compare/v2.131.0...v2.132.0) (2022-12-01)
### Features
* **sleepasandroid:** `unlock-premium` patch ([#1172](https://github.com/revanced/revanced-patches/issues/1172)) ([580ddcd](https://github.com/revanced/revanced-patches/commit/580ddcdf1f8ef4a525f772630b3c085b706e4dc7))
* **twitch:** remove `block-embedded-ads` patch ([#1164](https://github.com/revanced/revanced-patches/issues/1164)) ([ecc1eae](https://github.com/revanced/revanced-patches/commit/ecc1eaef4daa7dfecb7913c378188b2b4685e610))
# [2.131.0](https://github.com/revanced/revanced-patches/compare/v2.130.0...v2.131.0) (2022-11-30)
### Features
* **twitch/block-embedded-ads:** `block-embedded-ads` patch support ([#1160](https://github.com/revanced/revanced-patches/issues/1160)) ([641d33f](https://github.com/revanced/revanced-patches/commit/641d33fc7e213031124491bb468fb382267769aa))
# [2.130.0](https://github.com/revanced/revanced-patches/compare/v2.129.0...v2.130.0) (2022-11-29)
### Features
* **youtube/enable-wide-searchbar:** bump compatibility to v17.45.36 ([66ce54c](https://github.com/revanced/revanced-patches/commit/66ce54c9921e6fbf5bbe52d73b0182352181f2b8))
# [2.129.0](https://github.com/revanced/revanced-patches/compare/v2.128.0...v2.129.0) (2022-11-28)
### Features
* **youtube/hide-create-button:** bump compatibility to v17.45.36 ([751f604](https://github.com/revanced/revanced-patches/commit/751f6047ba1589593d881ad523727d00dfb2609b))
* **youtube/hide-shorts-button:** bump compatibility to v17.45.36 ([51bfa7a](https://github.com/revanced/revanced-patches/commit/51bfa7afd1720d958847a44ae636de722311a199))
# [2.128.0](https://github.com/revanced/revanced-patches/compare/v2.127.0...v2.128.0) (2022-11-28)
### Features
* **twitch:** settings for patches ([#1142](https://github.com/revanced/revanced-patches/issues/1142)) ([ed56f94](https://github.com/revanced/revanced-patches/commit/ed56f94f12c3bee46ab370b2e3b7890d1181d53d))
# [2.127.0](https://github.com/revanced/revanced-patches/compare/v2.126.1...v2.127.0) (2022-11-28)
### Features
* **twitch:** `settings` patch ([#1075](https://github.com/revanced/revanced-patches/issues/1075)) ([6e95b86](https://github.com/revanced/revanced-patches/commit/6e95b86e50cb09b60d82b456d4650218436ed154))
## [2.126.1](https://github.com/revanced/revanced-patches/compare/v2.126.0...v2.126.1) (2022-11-28)
### Bug Fixes
* **youtube/custom-video-speed:** fuzzy scan on fingerprint ([#1135](https://github.com/revanced/revanced-patches/issues/1135)) ([7b2cf56](https://github.com/revanced/revanced-patches/commit/7b2cf5698b85f7e2a901f6085c53d042660dc5c7))
# [2.126.0](https://github.com/revanced/revanced-patches/compare/v2.125.0...v2.126.0) (2022-11-28)
### Features
* **backdrops:** `pro-unlock` patch ([#1121](https://github.com/revanced/revanced-patches/issues/1121)) ([76b5449](https://github.com/revanced/revanced-patches/commit/76b5449c61c97e8ad9f87fb7173c9819815744ba))
# [2.125.0](https://github.com/revanced/revanced-patches/compare/v2.124.0...v2.125.0) (2022-11-26) # [2.125.0](https://github.com/revanced/revanced-patches/compare/v2.124.0...v2.125.0) (2022-11-26)

264
README.md
View File

@@ -4,73 +4,160 @@ The official Patch bundle provided by ReVanced and the community.
> Looking for the JSON variant of this? [Click here](patches.json). > Looking for the JSON variant of this? [Click here](patches.json).
### 📦 `ginlemon.iconpackstudio` ### [📦 `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 |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `unlock-pro` | Unlocks all pro features. | all | | `always-autorepeat` | Always repeats the playing video again. | 17.45.36 |
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `comments` | Hides components related to comments. | 17.45.36 |
| `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. | 17.45.36 |
| `custom-video-speed` | Adds more video speed options. | 17.45.36 |
| `debugging` | Adds debugging options. | all |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.45.36 |
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.45.36 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.45.36 |
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.45.36 |
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
| `downloads` | Enables downloading music and videos from YouTube. | 17.45.36 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.45.36 |
| `general-ads` | Removes general ads. | 17.45.36 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.45.36 |
| `hide-album-cards` | Hides the album cards below the artist description. | 17.45.36 |
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.45.36 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.45.36 |
| `hide-captions-button` | Hides the captions button on video player. | 17.45.36 |
| `hide-cast-button` | Hides the cast button in the video player. | all |
| `hide-create-button` | Hides the create button in the navigation bar. | 17.45.36 |
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.45.36 |
| `hide-email-address` | Hides the email address in the account switcher. | 17.45.36 |
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.45.36 |
| `hide-info-cards` | Hides info-cards in videos. | 17.45.36 |
| `hide-my-mix` | Hides mix playlists. | 17.45.36 |
| `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 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 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 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.45.36 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.45.36 |
| `settings` | Adds settings for ReVanced to YouTube. | all |
| `sponsorblock` | Integrate SponsorBlock. | 17.45.36 |
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.45.36 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.45.36 |
| `theme` | Applies a custom theme. | all |
| `video-ads` | Removes ads in the video player. | 17.45.36 |
</details> </details>
### 📦 `org.citra.citra_emu` ### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `premium-unlock` | Unlocks premium functions. | all | | `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> </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> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `tiktok-ads` | Removes ads from TikTok. | all | | `disable-login-requirement` | Do not force login. | all |
| `tiktok-speed` | Enables the playback speed option for all videos. | all | | `downloads` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all | | `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all | | `fix-google-login` | Allows logging in with a Google account. | all |
| `tiktok-settings` | Adds settings for ReVanced to TikTok. | all | | `hide-ads` | Removes ads from TikTok. | all |
| `tiktok-force-login` | Do not force login. | all | | `playback-speed` | Enables the playback speed option for all videos. | all |
| `tiktok-web-login` | Allows logging in with a Google account. | 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 | | `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
</details> </details>
### 📦 `com.zhiliaoapp.musically` ### [📦 `com.zhiliaoapp.musically`](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `tiktok-ads` | Removes ads from TikTok. | all | | `disable-login-requirement` | Do not force login. | all |
| `tiktok-speed` | Enables the playback speed option for all videos. | all | | `downloads` | Removes download restrictions and changes the default path to download to. | all |
| `tiktok-download` | Removes download restrictions and changes the default path to download to. | all | | `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
| `tiktok-seekbar` | Show progress bar for all video. | all | | `fix-google-login` | Allows logging in with a Google account. | all |
| `tiktok-settings` | Adds settings for ReVanced to TikTok. | all | | `hide-ads` | Removes ads from TikTok. | all |
| `tiktok-force-login` | Do not force login. | all | | `playback-speed` | Enables the playback speed option for all videos. | all |
| `tiktok-web-login` | Allows logging in with a Google account. | 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 | | `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
| `tiktok-feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
</details> </details>
### 📦 `com.twitter.android` ### [📦 `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`](https://play.google.com/store/apps/details?id=com.spotify.music)
<details>
| 💊 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 |
| `spotify-theme` | Applies a custom theme. | all |
</details>
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all | | `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
| `monochrome-icon` | Adds a monochrome icon. | all | | `monochrome-icon` | Adds a monochrome icon. | all |
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
</details> </details>
### 📦 `de.dwd.warnapp` ### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all | | `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
</details> </details>
### 📦 `com.myprog.hexedit` ### [📦 `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 |
</details>
### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -78,95 +165,47 @@ The official Patch bundle provided by ReVanced and the community.
| `disable-ads` | Disables ads in HexEditor. | all | | `disable-ads` | Disables ads in HexEditor. | all |
</details> </details>
### 📦 `com.spotify.music` ### [📦 `org.citra.citra_emu`](https://play.google.com/store/apps/details?id=org.citra.citra_emu)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `spotify-theme` | Applies a custom theme. | all | | `premium-unlock` | Unlocks premium functions. | all |
| `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 |
</details> </details>
### 📦 `com.google.android.youtube` ### [📦 `org.citra.citra_emu.canary`](https://play.google.com/store/apps/details?id=org.citra.citra_emu.canary)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.45.36 | | `premium-unlock` | Unlocks premium functions. | all |
| `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 |
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.43.36 |
| `hide-captions-button` | Hides the captions button on video player. | 17.45.36 |
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.43.36 |
| `hide-create-button` | Hides the create button in the navigation bar. | 17.43.36 |
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.45.36 |
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.45.36 |
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.45.36 |
| `hide-cast-button` | Hides the cast button in the video player. | all |
| `sponsorblock` | Integrate SponsorBlock. | 17.45.36 |
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.45.36 |
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.45.36 |
| `hide-album-cards` | Hides the album cards below the artist description. | 17.45.36 |
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.45.36 |
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.45.36 |
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.45.36 |
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.45.36 |
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.45.36 |
| `comments` | Hides components related to comments. | 17.45.36 |
| `theme` | Applies a custom theme. | all |
| `hide-email-address` | Hides the email address in the account switcher. | 17.45.36 |
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.45.36 |
| `hide-watermark` | Hides creator's watermarks on videos. | 17.45.36 |
| `hide-info-cards` | Hides info-cards in videos. | 17.45.36 |
| `hide-my-mix` | Hides mix playlists. | 17.45.36 |
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
| `premium-heading` | Shows premium branding on the home screen. | all |
| `old-quality-layout` | Enables the original quality flyout menu. | 17.45.36 |
| `general-ads` | Removes general ads. | 17.45.36 |
| `video-ads` | Removes ads in the video player. | 17.45.36 |
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.45.36 |
| `downloads` | Enables downloading music and videos from YouTube. | 17.45.36 |
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.45.36 |
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
| `settings` | Adds settings for ReVanced to YouTube. | all |
| `open-links-directly` | Bypasses redirect links and allows opening links directly. | 17.45.36 |
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.45.36 |
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.45.36 |
| `debugging` | Adds debugging options. | all |
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
| `always-autorepeat` | Always repeats the playing video again. | 17.45.36 |
| `minimized-playback` | Enables minimized and background playback. | 17.45.36 |
| `custom-video-speed` | Adds more video speed options. | 17.45.36 |
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.45.36 |
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.45.36 |
</details> </details>
### 📦 `com.vanced.android.youtube` ### [📦 `com.backdrops.wallpapers`](https://play.google.com/store/apps/details?id=com.backdrops.wallpapers)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all | | `pro-unlock` | Unlocks pro-only functions. | all |
</details> </details>
### 📦 `com.ticktick.task` ### [📦 `de.dwd.warnapp`](https://play.google.com/store/apps/details?id=de.dwd.warnapp)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `unlock-themes` | Unlocks all themes. | all | | `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
</details> </details>
### 📦 `com.crunchyroll.crunchyroid` ### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `enable-downloads` | Enables downloads for Crunchyroll. | all | | `unlock-pro` | Unlocks all pro features. | all |
</details> </details>
### 📦 `org.totschnig.myexpenses` ### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -174,18 +213,7 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all professional features. | all | | `unlock-pro` | Unlocks all professional features. | all |
</details> </details>
### 📦 `tv.twitch.android.app` ### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
| `block-audio-ads` | Blocks audio ads in streams and VODs. | all |
| `block-video-ads` | Blocks video ads in streams and VODs. | all |
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
</details>
### 📦 `co.windyapp.android`
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -193,41 +221,15 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all pro features. | all | | `unlock-pro` | Unlocks all pro features. | all |
</details> </details>
### 📦 `com.garzotto.pflotsh.ecmwf_a` ### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:| |:--------:|:--------------:|:-----------------:|
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 | | `unlock-pro` | Unlocks pro features. | all |
</details> </details>
### 📦 `com.google.android.apps.youtube.music` ### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.31.50 |
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.31.50 |
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.31.50 |
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.31.50 |
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.31.50 |
| `music-video-ads` | Removes ads in the music player. | 5.31.50 |
| `background-play` | Enables playing music in the background. | 5.31.50 |
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.31.50 |
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.31.50 |
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.31.50 |
</details>
### 📦 `com.reddit.frontpage`
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
</details>
### 📦 `com.awedea.nyx`
<details> <details>
| 💊 Patch | 📜 Description | 🏹 Target Version | | 💊 Patch | 📜 Description | 🏹 Target Version |
@@ -235,6 +237,14 @@ The official Patch bundle provided by ReVanced and the community.
| `unlock-pro` | Unlocks all pro features. | all | | `unlock-pro` | Unlocks all pro features. | all |
</details> </details>
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
<details>
| 💊 Patch | 📜 Description | 🏹 Target Version |
|:--------:|:--------------:|:-----------------:|
| `unlock-themes` | Unlocks all themes. | all |
</details>
## 📝 JSON Format ## 📝 JSON Format

View File

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

View File

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

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,12 +1,22 @@
package app.revanced.extensions 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
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 org.jf.dexlib2.iface.Method import org.jf.dexlib2.iface.Method
import org.jf.dexlib2.util.MethodUtil import org.jf.dexlib2.util.MethodUtil
import org.w3c.dom.Node import org.w3c.dom.Node
// TODO: populate this to all patches
/**
* Convert a [MethodFingerprint] to a [PatchResultError].
*
* @return A [PatchResultError] for the [MethodFingerprint].
*/
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].
* *
@@ -17,19 +27,6 @@ fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
MethodUtil.methodSignaturesMatch(it, method) 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 * apply a transform to all methods of the class
* *

View File

@@ -24,8 +24,8 @@ fun generateText(bundle: Bundle) {
} }
} }
for (pkg in packages) { 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("<details>\n")
output.appendLine(TABLE_HEADER) 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

@@ -0,0 +1,7 @@
package app.revanced.patches.backdrops.misc.pro.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.backdrops.wallpapers")])
internal annotation class ProUnlockCompatibility

View File

@@ -0,0 +1,15 @@
package app.revanced.patches.backdrops.misc.pro.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.Opcode
object ProUnlockFingerprint : MethodFingerprint(
opcodes = listOf(
Opcode.INVOKE_VIRTUAL,
Opcode.MOVE_RESULT_OBJECT,
Opcode.INVOKE_INTERFACE,
Opcode.MOVE_RESULT,
Opcode.IF_EQZ
),
customFingerprint = { it.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;" && it.name == "lambda\$existPurchase\$0" }
)

View File

@@ -0,0 +1,42 @@
package app.revanced.patches.backdrops.misc.pro.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.extensions.instruction
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.Patch
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch
@Name("pro-unlock")
@Description("Unlocks pro-only functions.")
@ProUnlockCompatibility
@Version("0.0.1")
class ProUnlockPatch : BytecodePatch(
listOf(ProUnlockFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
val result = ProUnlockFingerprint.result ?: return PatchResultError("${ProUnlockFingerprint.name} not found")
val moveRegisterInstruction = result.mutableMethod.instruction(result.scanResult.patternScanResult!!.endIndex - 1)
val register = (moveRegisterInstruction as OneRegisterInstruction).registerA
result.mutableMethod.addInstructions(
result.scanResult.patternScanResult!!.endIndex,
"""
const/4 v$register, 0x1
"""
)
return PatchResultSuccess()
}
}

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.Compatibility
import app.revanced.patcher.annotation.Package import app.revanced.patcher.annotation.Package
@Compatibility([Package("org.citra.citra_emu")]) @Compatibility([Package("org.citra.citra_emu"), Package("org.citra.citra_emu.canary")])
internal annotation class PremiumUnlockCompatbility internal annotation class PremiumUnlockCompatbility

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

@@ -0,0 +1,9 @@
package app.revanced.patches.moneymanager.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("com.ithebk.expensemanager")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class UnlockProCompatibility

View File

@@ -0,0 +1,19 @@
package app.revanced.patches.moneymanager.fingerprints
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 UnlockProFingerprint : MethodFingerprint(
"Z",
AccessFlags.STATIC or AccessFlags.SYNTHETIC,
parameters = listOf("L"),
opcodes = listOf(
Opcode.IGET_BOOLEAN,
Opcode.RETURN
),
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("MainActivity;")
}
)

View File

@@ -0,0 +1,34 @@
package app.revanced.patches.moneymanager.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.moneymanager.annotations.UnlockProCompatibility
import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint
@Patch
@Name("unlock-pro")
@Description("Unlocks pro features.")
@UnlockProCompatibility
@Version("0.0.1")
class UnlockProPatch : BytecodePatch(
listOf(UnlockProFingerprint)
) {
override fun execute(context: BytecodeContext): PatchResult {
UnlockProFingerprint.result!!.mutableMethod.addInstructions(
0,
"""
const/4 v0, 0x1
return v0
"""
)
return PatchResultSuccess()
}
}

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [Package(
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.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") "com.google.android.apps.youtube.music",
arrayOf(
"5.14.53",
"5.16.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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -10,7 +10,21 @@ import app.revanced.patcher.annotation.Package
*/ */
@Compatibility( @Compatibility(
[Package( [Package(
"com.google.android.apps.youtube.music", arrayOf("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") "com.google.android.apps.youtube.music",
arrayOf(
"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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -5,7 +5,24 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [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") "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"
)
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -1,6 +1,6 @@
package app.revanced.patches.shared.settings package app.revanced.patches.shared.settings.preference
import app.revanced.patches.shared.settings.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.StringResource
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.shared.settings package app.revanced.patches.shared.settings.preference
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -1,6 +1,6 @@
package app.revanced.patches.shared.settings package app.revanced.patches.shared.settings.preference
import app.revanced.patches.shared.settings.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.StringResource
import org.w3c.dom.Element import org.w3c.dom.Element
import org.w3c.dom.Node import org.w3c.dom.Node

View File

@@ -1,6 +1,6 @@
package app.revanced.patches.shared.settings package app.revanced.patches.shared.settings.preference
import app.revanced.patches.shared.settings.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.StringResource
/** /**
* Preference * Preference

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.shared.settings package app.revanced.patches.shared.settings.preference
/** /**
* Resource * Resource

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.shared.settings package app.revanced.patches.shared.settings.preference
enum class SummaryType(val type: String) { enum class SummaryType(val type: String) {
DEFAULT("summary"), ON("summaryOn"), OFF("summaryOff") DEFAULT("summary"), ON("summaryOn"), OFF("summaryOff")

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BaseResource import app.revanced.patches.shared.settings.preference.BaseResource
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element
@@ -19,11 +19,13 @@ internal data class ArrayResource(
override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element { override fun serialize(ownerDocument: Document, resourceCallback: ((IResource) -> Unit)?): Element {
return super.serialize(ownerDocument, resourceCallback).apply { return super.serialize(ownerDocument, resourceCallback).apply {
setAttribute("name", name)
items.forEach { item -> items.forEach { item ->
setAttribute("name", item.also { resourceCallback?.invoke(it) }.name) resourceCallback?.invoke(item)
this.appendChild(ownerDocument.createElement("item").also { itemNode -> this.appendChild(ownerDocument.createElement("item").also { itemNode ->
itemNode.textContent = item.value itemNode.textContent = "@string/${item.name}"
}) })
} }
} }

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
enum class InputType(val type: String) { enum class InputType(val type: String) {
STRING("text"), STRING("text"),

View File

@@ -1,9 +1,9 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BasePreference import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.addDefault import app.revanced.patches.shared.settings.preference.addDefault
import app.revanced.patches.shared.settings.addSummary import app.revanced.patches.shared.settings.preference.addSummary
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -1,8 +1,8 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BasePreference import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.addSummary import app.revanced.patches.shared.settings.preference.addSummary
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BasePreference import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element
@@ -15,7 +15,7 @@ import org.w3c.dom.Element
internal open class PreferenceCategory( internal open class PreferenceCategory(
key: String, key: String,
title: StringResource, title: StringResource,
val preferences: List<BasePreference> var preferences: List<BasePreference>
) : BasePreference(key, title) { ) : BasePreference(key, title) {
override val tag: String = "PreferenceCategory" override val tag: String = "PreferenceCategory"

View File

@@ -1,8 +1,8 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BasePreference import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.addSummary import app.revanced.patches.shared.settings.preference.addSummary
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element
@@ -17,7 +17,7 @@ import org.w3c.dom.Element
internal open class PreferenceScreen( internal open class PreferenceScreen(
key: String, key: String,
title: StringResource, title: StringResource,
val preferences: List<BasePreference>, var preferences: List<BasePreference>,
val summary: StringResource? = null val summary: StringResource? = null
) : BasePreference(key, title) { ) : BasePreference(key, title) {
override val tag: String = "PreferenceScreen" override val tag: String = "PreferenceScreen"

View File

@@ -1,7 +1,7 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BaseResource import app.revanced.patches.shared.settings.preference.BaseResource
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -1,10 +1,10 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.* import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.BasePreference import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.addDefault
import app.revanced.patches.shared.settings.addDefault import app.revanced.patches.shared.settings.preference.addSummary
import app.revanced.patches.shared.settings.addSummary import app.revanced.patches.shared.settings.preference.SummaryType
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -1,9 +1,9 @@
package app.revanced.patches.shared.settings.impl package app.revanced.patches.shared.settings.preference.impl
import app.revanced.patches.shared.settings.BasePreference import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.IResource import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.addDefault import app.revanced.patches.shared.settings.preference.addDefault
import app.revanced.patches.shared.settings.addSummary import app.revanced.patches.shared.settings.preference.addSummary
import org.w3c.dom.Document import org.w3c.dom.Document
import org.w3c.dom.Element import org.w3c.dom.Element

View File

@@ -0,0 +1,135 @@
package app.revanced.patches.shared.settings.resource.patch
import app.revanced.patcher.data.DomFileEditor
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.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.IResource
import app.revanced.patches.shared.settings.preference.addPreference
import app.revanced.patches.shared.settings.preference.addResource
import app.revanced.patches.shared.settings.preference.impl.ArrayResource
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.util.resources.ResourceUtils
import app.revanced.util.resources.ResourceUtils.copyResources
import org.w3c.dom.Node
/**
* Abstract settings resource patch
*
* @param preferenceFileName Name of the settings preference xml file
* @param sourceDirectory Source directory to copy the preference template from
*/
abstract class AbstractSettingsResourcePatch(
private val preferenceFileName: String,
private val sourceDirectory: String,
) : ResourcePatch {
override fun execute(context: ResourceContext): PatchResult {
/*
* used for self-restart
*/
context.xmlEditor["AndroidManifest.xml"].use { editor ->
editor.file.getElementsByTagName("manifest").item(0).also {
it.appendChild(it.ownerDocument.createElement("uses-permission").also { element ->
element.setAttribute("android:name", "android.permission.SCHEDULE_EXACT_ALARM")
})
}
}
/* copy preference template from source dir */
context.copyResources(
sourceDirectory,
ResourceUtils.ResourceGroup(
"xml", "$preferenceFileName.xml"
)
)
/* prepare xml editors */
stringsEditor = context.xmlEditor["res/values/strings.xml"]
arraysEditor = context.xmlEditor["res/values/arrays.xml"]
revancedPreferencesEditor = context.xmlEditor["res/xml/$preferenceFileName.xml"]
return PatchResultSuccess()
}
internal companion object {
private var revancedPreferenceNode: Node? = null
private var stringsNode: Node? = null
private var arraysNode: Node? = null
private var strings = mutableListOf<StringResource>()
private var revancedPreferencesEditor: DomFileEditor? = null
set(value) {
field = value
revancedPreferenceNode = value.getNode("PreferenceScreen")
}
private var stringsEditor: DomFileEditor? = null
set(value) {
field = value
stringsNode = value.getNode("resources")
}
private var arraysEditor: DomFileEditor? = null
set(value) {
field = value
arraysNode = value.getNode("resources")
}
/**
* Add a new string to the resources.
*
* @param identifier The key of the string.
* @param value The value of the string.
* @throws IllegalArgumentException if the string already exists.
*/
fun addString(identifier: String, value: String, formatted: Boolean) =
StringResource(identifier, value, formatted).include()
/**
* Add an array to the resources.
*
* @param arrayResource The array resource to add.
*/
fun addArray(arrayResource: ArrayResource) =
arraysNode!!.addResource(arrayResource) { it.include() }
/**
* Add a preference to the settings.
*
* @param preference The preference to add.
*/
fun addPreference(preference: BasePreference) =
revancedPreferenceNode!!.addPreference(preference) { it.include() }
/**
* Add a new resource to the resources.
*
* @throws IllegalArgumentException if the resource already exists.
*/
internal fun IResource.include() {
when (this) {
is StringResource -> {
if (strings.any { it.name == name }) return
strings.add(this)
}
is ArrayResource -> addArray(this)
else -> throw NotImplementedError("Unsupported resource type")
}
}
internal fun DomFileEditor?.getNode(tagName: String) = this!!.file.getElementsByTagName(tagName).item(0)
}
override fun close() {
// merge all strings, skip duplicates
strings.forEach {
stringsNode!!.addResource(it)
}
revancedPreferencesEditor?.close()
stringsEditor?.close()
arraysEditor?.close()
}
}

View File

@@ -0,0 +1,89 @@
package app.revanced.patches.shared.settings.util
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.preference.impl.StringResource
import java.io.Closeable
internal abstract class AbstractPreferenceScreen(
private val root: MutableList<Screen> = mutableListOf()
) : Closeable {
override fun close() {
if (root.isEmpty())
return
for (preference in root.sortedBy { it.title }) {
commit(preference.transform())
}
}
/**
* Finalize and insert root preference into resource patch
*/
abstract fun commit(screen: PreferenceScreen)
open inner class Screen(
key: String,
title: String,
val summary: String? = null,
preferences: MutableList<BasePreference> = mutableListOf(),
val categories: MutableList<Category> = mutableListOf()
) : BasePreferenceCollection(key, title, preferences) {
override fun transform(): PreferenceScreen {
return PreferenceScreen(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value } +
categories.sortedBy { it.title }.map { it.transform() },
summary?.let { summary ->
StringResource("${key}_summary", summary)
}
)
}
private fun ensureScreenInserted() {
// Add to screens if not yet done
if(!this@AbstractPreferenceScreen.root.contains(this))
this@AbstractPreferenceScreen.root.add(this)
}
fun addPreferences(vararg preferences: BasePreference) {
ensureScreenInserted()
this.preferences.addAll(preferences)
}
open inner class Category(
key: String,
title: String,
preferences: MutableList<BasePreference> = mutableListOf()
): BasePreferenceCollection(key, title, preferences) {
override fun transform(): PreferenceCategory {
return PreferenceCategory(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value }
)
}
fun addPreferences(vararg preferences: BasePreference) {
ensureScreenInserted()
// Add to categories if not yet done
if(!this@Screen.categories.contains(this))
this@Screen.categories.add(this)
this.preferences.addAll(preferences)
}
}
}
abstract class BasePreferenceCollection(
val key: String,
val title: String,
val preferences: MutableList<BasePreference> = mutableListOf()
) {
abstract fun transform(): BasePreference
}
}

View File

@@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class TiktokAdsCompatibility internal annotation class HideAdsCompatibility

View File

@@ -10,7 +10,7 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError 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.tiktok.ad.annotations.TiktokAdsCompatibility import app.revanced.patches.tiktok.ad.annotations.HideAdsCompatibility
import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint import app.revanced.patches.tiktok.ad.fingerprints.ConvertHelpFeedItemListFingerprint
import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint import app.revanced.patches.tiktok.ad.fingerprints.FeedItemListCloneFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@@ -19,11 +19,11 @@ import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
import org.jf.dexlib2.iface.reference.FieldReference import org.jf.dexlib2.iface.reference.FieldReference
@Patch @Patch
@Name("tiktok-ads") @Name("hide-ads")
@Description("Removes ads from TikTok.") @Description("Removes ads from TikTok.")
@TiktokAdsCompatibility @HideAdsCompatibility
@Version("0.0.1") @Version("0.0.1")
class TiktokAdsPatch : BytecodePatch( class HideAdsPatch : BytecodePatch(
listOf( listOf(
FeedItemListCloneFingerprint, FeedItemListCloneFingerprint,
ConvertHelpFeedItemListFingerprint ConvertHelpFeedItemListFingerprint

View File

@@ -12,19 +12,19 @@ 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.tiktok.feedfilter.annotations.FeedFilterCompatibility import app.revanced.patches.tiktok.feedfilter.annotations.FeedFilterCompatibility
import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint import app.revanced.patches.tiktok.feedfilter.fingerprints.FeedApiServiceLIZFingerprint
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@Patch @Patch
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class]) @DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("tiktok-feed-filter") @Name("feed-filter")
@Description("Filters tiktok videos: removing ads, removing livestreams.") @Description("Filters tiktok videos: removing ads, removing livestreams.")
@FeedFilterCompatibility @FeedFilterCompatibility
@Version("0.0.1") @Version("0.0.1")
class TiktokFeedFilter : BytecodePatch( class FeedFilterPatch : BytecodePatch(
listOf( listOf(
FeedApiServiceLIZFingerprint, FeedApiServiceLIZFingerprint,
SettingsStatusLoadFingerprint SettingsStatusLoadFingerprint

View File

@@ -21,17 +21,17 @@ import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonS
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2 import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint2
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3 import app.revanced.patches.tiktok.interaction.downloads.fingerprints.ACLCommonShareFingerprint3
import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint import app.revanced.patches.tiktok.interaction.downloads.fingerprints.DownloadPathParentFingerprint
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction import org.jf.dexlib2.iface.instruction.ReferenceInstruction
import org.jf.dexlib2.iface.reference.StringReference import org.jf.dexlib2.iface.reference.StringReference
@Patch @Patch
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class]) @DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("tiktok-download") @Name("downloads")
@Description("Removes download restrictions and changes the default path to download to.") @Description("Removes download restrictions and changes the default path to download to.")
@DownloadsCompatibility @DownloadsCompatibility
@Version("0.0.1") @Version("0.0.1")

View File

@@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class SeekbarCompatibility internal annotation class ShowSeekbarCompatibility

View File

@@ -10,18 +10,18 @@ import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError 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.tiktok.interaction.seekbar.annotations.SeekbarCompatibility import app.revanced.patches.tiktok.interaction.seekbar.annotations.ShowSeekbarCompatibility
import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.AwemeGetVideoControlFingerprint import app.revanced.patches.tiktok.interaction.seekbar.fingerprints.AwemeGetVideoControlFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
import org.jf.dexlib2.builder.instruction.BuilderInstruction22c import org.jf.dexlib2.builder.instruction.BuilderInstruction22c
@Patch @Patch
@Name("tiktok-seekbar") @Name("show-seekbar")
@Description("Show progress bar for all video.") @Description("Shows progress bar for all video.")
@SeekbarCompatibility @ShowSeekbarCompatibility
@Version("0.0.1") @Version("0.0.1")
class TiktokSeekbarPatch : BytecodePatch( class ShowSeekbarPatch : BytecodePatch(
listOf( listOf(
AwemeGetVideoControlFingerprint AwemeGetVideoControlFingerprint
) )

View File

@@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class SpeedCompatibility internal annotation class PlaybackSpeedCompatibility

View File

@@ -11,16 +11,16 @@ 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.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.interaction.speed.annotations.SpeedCompatibility import app.revanced.patches.tiktok.interaction.speed.annotations.PlaybackSpeedCompatibility
import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint import app.revanced.patches.tiktok.interaction.speed.fingerprints.SpeedControlParentFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
@Patch @Patch
@Name("tiktok-speed") @Name("playback-speed")
@Description("Enables the playback speed option for all videos.") @Description("Enables the playback speed option for all videos.")
@SpeedCompatibility @PlaybackSpeedCompatibility
@Version("0.0.1") @Version("0.0.1")
class SpeedPatch : BytecodePatch( class PlaybackSpeedPatch : BytecodePatch(
listOf( listOf(
SpeedControlParentFingerprint SpeedControlParentFingerprint
) )

View File

@@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class TikTokIntegrationsCompatibility internal annotation class IntegrationsCompatibility

View File

@@ -1,13 +1,13 @@
package app.revanced.patches.tiktok.misc.integrations.patch package app.revanced.patches.tiktok.misc.integrations.patch
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
import app.revanced.patches.tiktok.misc.integrations.annotations.TikTokIntegrationsCompatibility import app.revanced.patches.tiktok.misc.integrations.annotations.IntegrationsCompatibility
import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint import app.revanced.patches.tiktok.misc.integrations.fingerprints.InitFingerprint
import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch import app.revanced.patches.shared.integrations.patch.AbstractIntegrationsPatch
@Name("tiktok-integrations") @Name("integrations")
@TikTokIntegrationsCompatibility @IntegrationsCompatibility
class TikTokIntegrationsPatch : AbstractIntegrationsPatch( class IntegrationsPatch : AbstractIntegrationsPatch(
"Lapp/revanced/tiktok/utils/ReVancedUtils;", "Lapp/revanced/tiktok/utils/ReVancedUtils;",
listOf(InitFingerprint) listOf(InitFingerprint)
) )

View File

@@ -0,0 +1,14 @@
package app.revanced.patches.tiktok.misc.login.disablerequirement.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[
Package("com.ss.android.ugc.trill"),
Package("com.zhiliaoapp.musically")
]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class DisableLoginRequirementCompatibility

View File

@@ -1,7 +1,6 @@
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object MandatoryLoginServiceFingerprint : MethodFingerprint( object MandatoryLoginServiceFingerprint : MethodFingerprint(
customFingerprint = { methodDef -> customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/MandatoryLoginService;") && methodDef.definingClass.endsWith("/MandatoryLoginService;") &&

View File

@@ -1,12 +1,12 @@
package app.revanced.patches.tiktok.misc.forcelogin.fingerprints package app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints
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.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import app.revanced.patches.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility
@Name("mandatory-login-service-fingerprint2") @Name("mandatory-login-service-fingerprint2")
@DisableForceLoginCompatibility @DisableLoginRequirementCompatibility
@Version("0.0.1") @Version("0.0.1")
object MandatoryLoginServiceFingerprint2 : MethodFingerprint( object MandatoryLoginServiceFingerprint2 : MethodFingerprint(
customFingerprint = { methodDef -> customFingerprint = { methodDef ->

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.tiktok.misc.forcelogin.patch package app.revanced.patches.tiktok.misc.login.disablerequirement.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
@@ -9,16 +9,16 @@ 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.tiktok.misc.forcelogin.annotations.DisableForceLoginCompatibility import app.revanced.patches.tiktok.misc.login.disablerequirement.annotations.DisableLoginRequirementCompatibility
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint
import app.revanced.patches.tiktok.misc.forcelogin.fingerprints.MandatoryLoginServiceFingerprint2 import app.revanced.patches.tiktok.misc.login.disablerequirement.fingerprints.MandatoryLoginServiceFingerprint2
@Patch @Patch
@Name("tiktok-force-login") @Name("disable-login-requirement")
@Description("Do not force login.") @Description("Do not force login.")
@DisableForceLoginCompatibility @DisableLoginRequirementCompatibility
@Version("0.0.1") @Version("0.0.1")
class DisableForceLoginPatch : BytecodePatch( class DisableLoginRequirementPatch : BytecodePatch(
listOf( listOf(
MandatoryLoginServiceFingerprint, MandatoryLoginServiceFingerprint,
MandatoryLoginServiceFingerprint2 MandatoryLoginServiceFingerprint2

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.tiktok.misc.forcelogin.annotations package app.revanced.patches.tiktok.misc.login.fixgoogle.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
@@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class DisableForceLoginCompatibility internal annotation class FixGoogleLoginCompatibility

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.tiktok.misc.loginfallback.fingerprints package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.tiktok.misc.loginfallback.fingerprints package app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints
import app.revanced.patcher.extensions.or import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint

View File

@@ -1,4 +1,4 @@
package app.revanced.patches.tiktok.misc.loginfallback.patch package app.revanced.patches.tiktok.misc.login.fixgoogle.patch
import app.revanced.patcher.annotation.Description import app.revanced.patcher.annotation.Description
import app.revanced.patcher.annotation.Name import app.revanced.patcher.annotation.Name
@@ -9,16 +9,16 @@ 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.tiktok.misc.loginfallback.annotations.TikTokWebLoginCompatibility import app.revanced.patches.tiktok.misc.login.fixgoogle.annotations.FixGoogleLoginCompatibility
import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleAuthAvailableFingerprint import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleAuthAvailableFingerprint
import app.revanced.patches.tiktok.misc.loginfallback.fingerprints.GoogleOneTapAuthAvailableFingerprint import app.revanced.patches.tiktok.misc.login.fixgoogle.fingerprints.GoogleOneTapAuthAvailableFingerprint
@Patch @Patch
@Name("tiktok-web-login") @Name("fix-google-login")
@Description("Allows logging in with a Google account.") @Description("Allows logging in with a Google account.")
@TikTokWebLoginCompatibility @FixGoogleLoginCompatibility
@Version("0.0.1") @Version("0.0.1")
class TikTokLoginFallbackPatch : BytecodePatch( class FixGoogleLoginPatch : BytecodePatch(
listOf( listOf(
GoogleOneTapAuthAvailableFingerprint, GoogleOneTapAuthAvailableFingerprint,
GoogleAuthAvailableFingerprint GoogleAuthAvailableFingerprint

View File

@@ -1,14 +0,0 @@
package app.revanced.patches.tiktok.misc.loginfallback.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility(
[
Package("com.ss.android.ugc.trill"),
Package("com.zhiliaoapp.musically")
]
)
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class TikTokWebLoginCompatibility

View File

@@ -11,4 +11,4 @@ import app.revanced.patcher.annotation.Package
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME) @Retention(AnnotationRetention.RUNTIME)
internal annotation class TikTokSettingsCompatibility internal annotation class SettingsCompatibility

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 package app.revanced.patches.tiktok.misc.settings.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
@@ -7,39 +8,41 @@ import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.extensions.instruction import app.revanced.patcher.extensions.instruction
import app.revanced.patcher.extensions.replaceInstruction 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.BytecodePatch
import app.revanced.patcher.patch.PatchResult import app.revanced.patcher.patch.PatchResult
import app.revanced.patcher.patch.PatchResultError import app.revanced.patcher.patch.PatchResultError
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.tiktok.misc.integrations.patch.TikTokIntegrationsPatch import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.annotations.TikTokSettingsCompatibility 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.AdPersonalizationActivityOnCreateFingerprint
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsOnViewCreatedFingerprint
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
import org.jf.dexlib2.iface.instruction.ReferenceInstruction 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.instruction.formats.Instruction35c
import org.jf.dexlib2.iface.reference.StringReference import org.jf.dexlib2.iface.reference.StringReference
import org.jf.dexlib2.iface.reference.TypeReference import org.jf.dexlib2.iface.reference.TypeReference
@Patch @Patch
@DependsOn([TikTokIntegrationsPatch::class]) @DependsOn([IntegrationsPatch::class])
@Name("tiktok-settings") @Name("settings")
@Description("Adds settings for ReVanced to TikTok.") @Description("Adds ReVanced settings to TikTok.")
@TikTokSettingsCompatibility @SettingsCompatibility
@Version("0.0.1") @Version("0.0.1")
class TikTokSettingsPatch : BytecodePatch( class SettingsPatch : BytecodePatch(
listOf( listOf(
AdPersonalizationActivityOnCreateFingerprint, AdPersonalizationActivityOnCreateFingerprint,
SettingsOnViewCreatedFingerprint, SettingsOnViewCreatedFingerprint,
AboutOnClickMethodFingerprint
) )
) { ) {
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
SettingsOnViewCreatedFingerprint.result?.let {
AboutViewFingerprint.resolve(context, it.method, it.classDef)
}
// Patch Settings UI to add 'Revanced Settings'. // Patch Settings UI to add 'Revanced Settings'.
val targetIndexes = findOptionsOnClickIndex() val targetIndexes = findOptionsOnClickIndex()
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) { with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) {
@@ -72,29 +75,21 @@ class TikTokSettingsPatch : BytecodePatch(
private fun findOptionsOnClickIndex(): IntArray { private fun findOptionsOnClickIndex(): IntArray {
val results = IntArray(2) val results = IntArray(2)
var found = 0 SettingsOnViewCreatedFingerprint.result?.apply {
with(SettingsOnViewCreatedFingerprint.result!!.mutableMethod) { for ((index, instruction) in mutableMethod.implementation!!.instructions.withIndex()) {
for ((index, instruction) in implementation!!.instructions.withIndex()) {
// Old UI settings option to replace to 'Revanced Settings' // Old UI settings option to replace to 'Revanced Settings'
if (instruction.opcode == Opcode.CONST_STRING) { if (instruction.opcode == Opcode.CONST_STRING) {
val string = ((instruction as ReferenceInstruction).reference as StringReference).string val string = ((instruction as ReferenceInstruction).reference as StringReference).string
if (string == "copyright_policy") { if (string == "copyright_policy") {
results[0] = index - 2 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 return results
} }

View File

@@ -14,9 +14,9 @@ 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.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.tiktok.misc.integrations.patch.TikTokIntegrationsPatch import app.revanced.patches.tiktok.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint import app.revanced.patches.tiktok.misc.settings.fingerprints.SettingsStatusLoadFingerprint
import app.revanced.patches.tiktok.misc.settings.patch.TikTokSettingsPatch import app.revanced.patches.tiktok.misc.settings.patch.SettingsPatch
import app.revanced.patches.tiktok.misc.spoof.sim.annotations.SpoofSimCompatibility import app.revanced.patches.tiktok.misc.spoof.sim.annotations.SpoofSimCompatibility
import org.jf.dexlib2.Opcode import org.jf.dexlib2.Opcode
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
@@ -24,7 +24,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
import org.jf.dexlib2.iface.reference.MethodReference import org.jf.dexlib2.iface.reference.MethodReference
@Patch(false) @Patch(false)
@DependsOn([TikTokIntegrationsPatch::class, TikTokSettingsPatch::class]) @DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("sim-spoof") @Name("sim-spoof")
@Description("Spoofs the information which is retrieved from the sim-card.") @Description("Spoofs the information which is retrieved from the sim-card.")
@SpoofSimCompatibility @SpoofSimCompatibility

View File

@@ -4,15 +4,23 @@ 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.addInstruction 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.PatchResultSuccess import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch 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.audio.annotations.AudioAdsCompatibility import app.revanced.patches.twitch.ad.audio.annotations.AudioAdsCompatibility
import app.revanced.patches.twitch.ad.audio.fingerprints.AudioAdsPresenterPlayFingerprint import app.revanced.patches.twitch.ad.audio.fingerprints.AudioAdsPresenterPlayFingerprint
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@Patch @Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("block-audio-ads") @Name("block-audio-ads")
@Description("Blocks audio ads in streams and VODs.") @Description("Blocks audio ads in streams and VODs.")
@AudioAdsCompatibility @AudioAdsCompatibility
@@ -23,9 +31,37 @@ class AudioAdsPatch : BytecodePatch(
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
// Block playAds call // Block playAds call
with(AudioAdsPresenterPlayFingerprint.result!!) { with(AudioAdsPresenterPlayFingerprint.result!!) {
mutableMethod.addInstruction(0, "return-void") mutableMethod.addInstructions(
0,
"""
invoke-static { }, Lapp/revanced/twitch/patches/AudioAdsPatch;->shouldBlockAudioAds()Z
move-result v0
if-eqz v0, :show_audio_ads
return-void
""",
listOf(ExternalLabel("show_audio_ads", mutableMethod.instruction(0)))
)
} }
SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences(
SwitchPreference(
"revanced_block_audio_ads",
StringResource(
"revanced_block_audio_ads",
"Block audio ads"
),
true,
StringResource(
"revanced_block_audio_ads_on",
"Audio ads are blocked"
),
StringResource(
"revanced_block_audio_ads_off",
"Audio ads are unblocked"
),
)
)
return PatchResultSuccess() return PatchResultSuccess()
} }
} }

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.twitch.ad.embedded.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
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 package app.revanced.patches.twitch.ad.video.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object AdsManagerFingerprint : MethodFingerprint( object GetReadyToShowAdFingerprint : MethodFingerprint(
customFingerprint = { method -> customFingerprint = { method ->
method.definingClass.endsWith("AdsManagerImpl;") && method.name == "playAds" method.definingClass.endsWith("/StreamDisplayAdsPresenter;") && method.name == "getReadyToShowAdOrAbort"
} }
) )

View File

@@ -4,56 +4,145 @@ 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.addInstruction
import app.revanced.patcher.extensions.addInstructions import app.revanced.patcher.extensions.addInstructions
import app.revanced.patcher.patch.BytecodePatch import app.revanced.patcher.extensions.instruction
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.DependsOn
import app.revanced.patcher.patch.annotations.Patch 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.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.CheckAdEligibilityLambdaFingerprint
import app.revanced.patches.twitch.ad.video.fingerprints.ContentConfigShowAdsFingerprint 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
@Patch @Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("block-video-ads") @Name("block-video-ads")
@Description("Blocks video ads in streams and VODs.") @Description("Blocks video ads in streams and VODs.")
@VideoAdsCompatibility @VideoAdsCompatibility
@Version("0.0.1") @Version("0.0.1")
class VideoAdsPatch : BytecodePatch( class VideoAdsPatch : AbstractAdPatch(
"Lapp/revanced/twitch/patches/VideoAdsPatch;->shouldBlockVideoAds()Z",
"show_video_ads",
listOf( listOf(
ContentConfigShowAdsFingerprint, ContentConfigShowAdsFingerprint,
AdsManagerFingerprint, CheckAdEligibilityLambdaFingerprint,
CheckAdEligibilityLambdaFingerprint GetReadyToShowAdFingerprint
) )
) { ) {
override fun execute(context: BytecodeContext): PatchResult { 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 // Pretend our player is ineligible for all ads
with(CheckAdEligibilityLambdaFingerprint.result!!) { with(CheckAdEligibilityLambdaFingerprint.result!!) {
mutableMethod.addInstructions( mutableMethod.addInstructions(
0, 0,
""" """
const/4 v0, 0 ${createConditionInstructions()}
const/4 v0, 0
invoke-static {v0}, Lio/reactivex/Single;->just(Ljava/lang/Object;)Lio/reactivex/Single; invoke-static {v0}, Lio/reactivex/Single;->just(Ljava/lang/Object;)Lio/reactivex/Single;
move-result-object p0 move-result-object p0
return-object p0 return-object p0
""",
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)))
) )
} }
// Spoof showAds JSON field // Spoof showAds JSON field
with(ContentConfigShowAdsFingerprint.result!!) { with(ContentConfigShowAdsFingerprint.result!!) {
mutableMethod.addInstructions(0, """ mutableMethod.addInstructions(0, """
${createConditionInstructions()}
const/4 v0, 0 const/4 v0, 0
:$skipLabelName
return v0 return v0
""" """
) )
} }
// Block playAds call SettingsPatch.PreferenceScreen.ADS.CLIENT_SIDE.addPreferences(
with(AdsManagerFingerprint.result!!) { SwitchPreference(
mutableMethod.addInstruction(0, "return-void") "revanced_block_video_ads",
} StringResource(
"revanced_block_video_ads",
"Block video ads"
),
true,
StringResource(
"revanced_block_video_ads_on",
"Video ads are blocked"
),
StringResource(
"revanced_block_video_ads_off",
"Video ads are unblocked"
),
)
)
return PatchResultSuccess() return PatchResultSuccess()
} }

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.twitch.chat.antidelete.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object ChatUtilCreateDeletedSpanFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/ChatUtil\$Companion;") && methodDef.name == "createDeletedSpanFromChatMessageSpan"
}
)

View File

@@ -6,13 +6,19 @@ import app.revanced.patcher.annotation.Version
import app.revanced.patcher.data.BytecodeContext import app.revanced.patcher.data.BytecodeContext
import app.revanced.patcher.extensions.* import app.revanced.patcher.extensions.*
import app.revanced.patcher.patch.* import app.revanced.patcher.patch.*
import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patcher.util.smali.ExternalLabel
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.chat.antidelete.annotations.ShowDeletedMessagesCompatibility import app.revanced.patches.twitch.chat.antidelete.annotations.ShowDeletedMessagesCompatibility
import app.revanced.patches.twitch.chat.antidelete.fingerprints.* import app.revanced.patches.twitch.chat.antidelete.fingerprints.*
import org.jf.dexlib2.Opcode import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.builder.instruction.BuilderInstruction10x import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@Patch @Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("show-deleted-messages") @Name("show-deleted-messages")
@Description("Shows deleted chat messages behind a clickable spoiler.") @Description("Shows deleted chat messages behind a clickable spoiler.")
@ShowDeletedMessagesCompatibility @ShowDeletedMessagesCompatibility
@@ -21,25 +27,77 @@ class ShowDeletedMessagesPatch : BytecodePatch(
listOf( listOf(
SetHasModAccessFingerprint, SetHasModAccessFingerprint,
DeletedMessageClickableSpanCtorFingerprint, DeletedMessageClickableSpanCtorFingerprint,
ChatUtilCreateDeletedSpanFingerprint
) )
) { ) {
private fun createSpoilerConditionInstructions(register: String = "v0") = """
invoke-static {}, Lapp/revanced/twitch/patches/ShowDeletedMessagesPatch;->shouldUseSpoiler()Z
move-result $register
if-eqz $register, :no_spoiler
"""
override fun execute(context: BytecodeContext): PatchResult { override fun execute(context: BytecodeContext): PatchResult {
// Force set hasModAccess member to true in constructor // Spoiler mode: Force set hasModAccess member to true in constructor
with(DeletedMessageClickableSpanCtorFingerprint.result!!.mutableMethod) { with(DeletedMessageClickableSpanCtorFingerprint.result!!.mutableMethod) {
addInstructions( addInstructions(
implementation!!.instructions.lastIndex, /* place in front of return-void */ implementation!!.instructions.lastIndex, /* place in front of return-void */
""" """
${createSpoilerConditionInstructions()}
const/4 v0, 1 const/4 v0, 1
iput-boolean v0, p0, $definingClass->hasModAccess:Z iput-boolean v0, p0, $definingClass->hasModAccess:Z
""" """,
listOf(ExternalLabel("no_spoiler", instruction(implementation!!.instructions.lastIndex)))
) )
} }
// Disable setHasModAccess setter // Spoiler mode: Disable setHasModAccess setter
with(SetHasModAccessFingerprint.result!!.mutableMethod.implementation!!) { with(SetHasModAccessFingerprint.result!!) {
addInstruction(0, BuilderInstruction10x(Opcode.RETURN_VOID)) mutableMethod.addInstruction(0, "return-void")
} }
// Cross-out mode: Reformat span of deleted message
with(ChatUtilCreateDeletedSpanFingerprint.result!!) {
mutableMethod.addInstructions(
0,
"""
invoke-static {p2}, Lapp/revanced/twitch/patches/ShowDeletedMessagesPatch;->reformatDeletedMessage(Landroid/text/Spanned;)Landroid/text/Spanned;
move-result-object v0
if-eqz v0, :no_reformat
return-object v0
""",
listOf(ExternalLabel("no_reformat", mutableMethod.instruction(0)))
)
}
SettingsPatch.PreferenceScreen.CHAT.GENERAL.addPreferences(
ListPreference(
"revanced_show_deleted_messages",
StringResource(
"revanced_show_deleted_messages_title",
"Show deleted messages"
),
ArrayResource(
"revanced_deleted_messages",
listOf(
StringResource("revanced_deleted_messages_hide", "Do not show deleted messages"),
StringResource("revanced_deleted_messages_spoiler", "Hide deleted messages behind a spoiler"),
StringResource("revanced_deleted_messages_cross_out", "Show deleted messages as crossed-out text")
)
),
ArrayResource(
"revanced_deleted_messages_values",
listOf(
StringResource("key_revanced_deleted_messages_hide", "hide"),
StringResource("key_revanced_deleted_messages_spoiler", "spoiler"),
StringResource("key_revanced_deleted_messages_cross_out", "cross-out")
)
),
"cross-out"
)
)
SettingsPatch.addString("revanced_deleted_msg", "message deleted")
return PatchResultSuccess() return PatchResultSuccess()
} }
} }

View File

@@ -8,13 +8,19 @@ 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.DependsOn
import app.revanced.patcher.patch.annotations.Patch import app.revanced.patcher.patch.annotations.Patch
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.twitch.debug.annotations.DebugModeCompatibility import app.revanced.patches.twitch.debug.annotations.DebugModeCompatibility
import app.revanced.patches.twitch.debug.fingerprints.IsDebugConfigEnabledFingerprint import app.revanced.patches.twitch.debug.fingerprints.IsDebugConfigEnabledFingerprint
import app.revanced.patches.twitch.debug.fingerprints.IsOmVerificationEnabledFingerprint import app.revanced.patches.twitch.debug.fingerprints.IsOmVerificationEnabledFingerprint
import app.revanced.patches.twitch.debug.fingerprints.ShouldShowDebugOptionsFingerprint import app.revanced.patches.twitch.debug.fingerprints.ShouldShowDebugOptionsFingerprint
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.twitch.misc.settings.bytecode.patch.SettingsPatch
@Patch(false) @Patch(false)
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
@Name("debug-mode") @Name("debug-mode")
@Description("Enables Twitch's internal debugging mode.") @Description("Enables Twitch's internal debugging mode.")
@DebugModeCompatibility @DebugModeCompatibility
@@ -37,13 +43,34 @@ class DebugModePatch : BytecodePatch(
addInstructions( addInstructions(
0, 0,
""" """
const/4 v0, 0x1 invoke-static {}, Lapp/revanced/twitch/patches/DebugModePatch;->isDebugModeEnabled()Z
move-result v0
return v0 return v0
""" """
) )
} }
} }
} }
SettingsPatch.PreferenceScreen.MISC.OTHER.addPreferences(
SwitchPreference(
"revanced_debug_mode",
StringResource(
"revanced_debug_mode_enable",
"Enable debug mode"
),
false,
StringResource(
"revanced_debug_mode_on",
"Debug mode is enabled (not recommended)"
),
StringResource(
"revanced_debug_mode_off",
"Debug mode is disabled"
),
)
)
return PatchResultSuccess() return PatchResultSuccess()
} }
} }

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.twitch.misc.settings.annotations
import app.revanced.patcher.annotation.Compatibility
import app.revanced.patcher.annotation.Package
@Compatibility([Package("tv.twitch.android.app")])
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
internal annotation class SettingsCompatibility

View File

@@ -0,0 +1,196 @@
package app.revanced.patches.twitch.misc.settings.bytecode.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.*
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprintResult
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.patcher.util.proxy.mutableTypes.MutableField.Companion.toMutable
import app.revanced.patcher.util.smali.ExternalLabel
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.util.AbstractPreferenceScreen
import app.revanced.patches.twitch.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.twitch.misc.settings.annotations.SettingsCompatibility
import app.revanced.patches.twitch.misc.settings.components.CustomPreferenceCategory
import app.revanced.patches.twitch.misc.settings.fingerprints.*
import app.revanced.patches.twitch.misc.settings.resource.patch.SettingsResourcePatch
import org.jf.dexlib2.AccessFlags
import org.jf.dexlib2.immutable.ImmutableField
@Patch
@DependsOn([IntegrationsPatch::class, SettingsResourcePatch::class])
@Name("settings")
@Description("Adds settings menu to Twitch.")
@SettingsCompatibility
@Version("0.0.1")
class SettingsPatch : BytecodePatch(
listOf(
SettingsActivityOnCreateFingerprint,
SettingsMenuItemEnumFingerprint,
MenuGroupsUpdatedFingerprint,
MenuGroupsOnClickFingerprint
)
) {
override fun execute(context: BytecodeContext): PatchResult {
// Hook onCreate to handle fragment creation
with(SettingsActivityOnCreateFingerprint.result!!) {
val insertIndex = mutableMethod.implementation!!.instructions.size - 2
mutableMethod.addInstructions(
insertIndex,
"""
invoke-static {p0}, $SETTINGS_HOOKS_CLASS->handleSettingsCreation(Landroidx/appcompat/app/AppCompatActivity;)Z
move-result v0
if-eqz v0, :no_rv_settings_init
return-void
""",
listOf(ExternalLabel("no_rv_settings_init", mutableMethod.instruction(insertIndex)))
)
}
// Create new menu item for settings menu
with(SettingsMenuItemEnumFingerprint.result!!) {
injectMenuItem(
REVANCED_SETTINGS_MENU_ITEM_NAME,
REVANCED_SETTINGS_MENU_ITEM_ID,
REVANCED_SETTINGS_MENU_ITEM_TITLE_RES,
REVANCED_SETTINGS_MENU_ITEM_ICON_RES
)
}
// Intercept settings menu creation and add new menu item
with(MenuGroupsUpdatedFingerprint.result!!) {
mutableMethod.addInstructions(
0,
"""
sget-object v0, $MENU_ITEM_ENUM_CLASS->$REVANCED_SETTINGS_MENU_ITEM_NAME:$MENU_ITEM_ENUM_CLASS
invoke-static {p1, v0}, $SETTINGS_HOOKS_CLASS->handleSettingMenuCreation(Ljava/util/List;Ljava/lang/Object;)Ljava/util/List;
move-result-object p1
"""
)
}
// Intercept onclick events for the settings menu
with(MenuGroupsOnClickFingerprint.result!!) {
val insertIndex = 0
mutableMethod.addInstructions(
insertIndex,
"""
invoke-static {p1}, $SETTINGS_HOOKS_CLASS->handleSettingMenuOnClick(Ljava/lang/Enum;)Z
move-result p2
if-eqz p2, :no_rv_settings_onclick
sget-object p1, $MENU_DISMISS_EVENT_CLASS->INSTANCE:$MENU_DISMISS_EVENT_CLASS
invoke-virtual {p0, p1}, Ltv/twitch/android/core/mvp/viewdelegate/RxViewDelegate;->pushEvent(Ltv/twitch/android/core/mvp/viewdelegate/ViewDelegateEvent;)V
return-void
""",
listOf(ExternalLabel("no_rv_settings_onclick", mutableMethod.instruction(insertIndex)))
)
}
addString("revanced_settings", "ReVanced Settings", false)
addString("revanced_reboot_message", "Twitch needs to restart to apply your changes. Restart now?", false)
addString("revanced_reboot", "Restart", false)
addString("revanced_cancel", "Cancel", false)
return PatchResultSuccess()
}
internal companion object {
fun addString(identifier: String, value: String, formatted: Boolean = true) =
SettingsResourcePatch.addString(identifier, value, formatted)
fun addPreferenceScreen(preferenceScreen: app.revanced.patches.shared.settings.preference.impl.PreferenceScreen) =
SettingsResourcePatch.addPreferenceScreen(preferenceScreen)
/* Private members */
private const val REVANCED_SETTINGS_MENU_ITEM_NAME = "RevancedSettings"
private const val REVANCED_SETTINGS_MENU_ITEM_ID = 0x7
private const val REVANCED_SETTINGS_MENU_ITEM_TITLE_RES = "revanced_settings"
private const val REVANCED_SETTINGS_MENU_ITEM_ICON_RES = "ic_settings"
private const val MENU_ITEM_ENUM_CLASS = "Ltv/twitch/android/feature/settings/menu/SettingsMenuItem;"
private const val MENU_DISMISS_EVENT_CLASS = "Ltv/twitch/android/feature/settings/menu/SettingsMenuViewDelegate\$Event\$OnDismissClicked;"
private const val INTEGRATIONS_PACKAGE = "app/revanced/twitch"
private const val SETTINGS_HOOKS_CLASS = "L$INTEGRATIONS_PACKAGE/settingsmenu/SettingsHooks;"
private const val REVANCED_UTILS_CLASS = "L$INTEGRATIONS_PACKAGE/utils/ReVancedUtils;"
private fun MethodFingerprintResult.injectMenuItem(
name: String,
value: Int,
titleResourceName: String,
iconResourceName: String
) {
// Add new static enum member field
mutableClass.staticFields.add(
ImmutableField(
mutableMethod.definingClass,
name,
MENU_ITEM_ENUM_CLASS,
AccessFlags.PUBLIC or AccessFlags.FINAL or AccessFlags.ENUM or AccessFlags.STATIC,
null,
null,
null
).toMutable()
)
// Add initializer for the new enum member
mutableMethod.addInstructions(
mutableMethod.implementation!!.instructions.size - 4,
"""
new-instance v0, $MENU_ITEM_ENUM_CLASS
const-string v1, "$titleResourceName"
invoke-static {v1}, $REVANCED_UTILS_CLASS->getStringId(Ljava/lang/String;)I
move-result v1
const-string v3, "$iconResourceName"
invoke-static {v3}, $REVANCED_UTILS_CLASS->getDrawableId(Ljava/lang/String;)I
move-result v3
const-string v4, "$name"
const/4 v5, $value
invoke-direct {v0, v4, v5, v1, v3}, $MENU_ITEM_ENUM_CLASS-><init>(Ljava/lang/String;III)V
sput-object v0, $MENU_ITEM_ENUM_CLASS->$name:$MENU_ITEM_ENUM_CLASS
"""
)
}
}
/**
* Preference screens patches should add their settings to.
*/
internal object PreferenceScreen : AbstractPreferenceScreen() {
val ADS = CustomScreen("ads", "Ads", "Ad blocking settings")
val CHAT = CustomScreen("chat", "Chat", "Chat settings")
val MISC = CustomScreen("misc", "Misc", "Miscellaneous patches")
internal class CustomScreen(key: String, title: String, summary: String) : Screen(key, title, summary) {
/* Categories */
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. */
override fun transform(): PreferenceCategory {
return CustomPreferenceCategory(
key,
StringResource("${key}_title", title),
preferences.sortedBy { it.title.value }
)
}
}
}
override fun commit(screen: app.revanced.patches.shared.settings.preference.impl.PreferenceScreen) {
addPreferenceScreen(screen)
}
}
override fun close() = PreferenceScreen.close()
}

View File

@@ -0,0 +1,20 @@
package app.revanced.patches.twitch.misc.settings.components
import app.revanced.patches.shared.settings.preference.BasePreference
import app.revanced.patches.shared.settings.preference.impl.PreferenceCategory
import app.revanced.patches.shared.settings.preference.impl.StringResource
/**
* Customized preference category for Twitch.
*
* @param key The key of the preference.
* @param title The title of the preference.
* @param preferences Child preferences of this category.
*/
internal open class CustomPreferenceCategory(
key: String,
title: StringResource,
preferences: List<BasePreference>
) : PreferenceCategory(key, title, preferences) {
override val tag: String = "app.revanced.twitch.settingsmenu.preference.CustomPreferenceCategory"
}

View File

@@ -0,0 +1,15 @@
package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.extensions.or
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
import org.jf.dexlib2.AccessFlags
object MenuGroupsOnClickFingerprint : MethodFingerprint(
"V",
AccessFlags.PRIVATE or AccessFlags.STATIC or AccessFlags.FINAL,
listOf("L", "L", "L"),
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/SettingsMenuViewDelegate;")
&& methodDef.name.contains("render")
}
)

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object MenuGroupsUpdatedFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/SettingsMenuPresenter\$Event\$MenuGroupsUpdated;")
&& methodDef.name == "<init>"
}
)

View File

@@ -0,0 +1,10 @@
package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SettingsActivityOnCreateFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/SettingsActivity;") &&
methodDef.name == "onCreate"
}
)

View File

@@ -0,0 +1,9 @@
package app.revanced.patches.twitch.misc.settings.fingerprints
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
object SettingsMenuItemEnumFingerprint : MethodFingerprint(
customFingerprint = { methodDef ->
methodDef.definingClass.endsWith("/SettingsMenuItem;") && methodDef.name == "<clinit>"
}
)

View File

@@ -0,0 +1,44 @@
package app.revanced.patches.twitch.misc.settings.resource.patch
import app.revanced.patcher.annotation.Name
import app.revanced.patcher.annotation.Version
import app.revanced.patches.shared.settings.preference.impl.ArrayResource
import app.revanced.patches.shared.settings.preference.impl.PreferenceScreen
import app.revanced.patches.shared.settings.resource.patch.AbstractSettingsResourcePatch
import app.revanced.patches.twitch.misc.settings.annotations.SettingsCompatibility
@Name("settings-resource-patch")
@SettingsCompatibility
@Version("0.0.1")
class SettingsResourcePatch : AbstractSettingsResourcePatch(
"revanced_prefs",
"twitch/settings"
) {
internal companion object {
/* Companion delegates */
/**
* Add a new string to the resources.
*
* @param identifier The key of the string.
* @param value The value of the string.
* @throws IllegalArgumentException if the string already exists.
*/
fun addString(identifier: String, value: String, formatted: Boolean) =
AbstractSettingsResourcePatch.addString(identifier, value, formatted)
/**
* Add an array to the resources.
*
* @param arrayResource The array resource to add.
*/
fun addArray(arrayResource: ArrayResource) = AbstractSettingsResourcePatch.addArray(arrayResource)
/**
* Add a preference to the settings.
*
* @param preferenceScreen The name of the preference screen.
*/
fun addPreferenceScreen(preferenceScreen: PreferenceScreen) = AbstractSettingsResourcePatch.addPreference(preferenceScreen)
}
}

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [Package(
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36", "17.45.36") "com.google.android.youtube", arrayOf("17.45.36")
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -17,14 +17,14 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
import app.revanced.patches.youtube.ad.general.bytecode.fingerprints.ReelConstructorFingerprint import app.revanced.patches.youtube.ad.general.bytecode.fingerprints.ReelConstructorFingerprint
import app.revanced.patches.youtube.ad.general.resource.patch.GeneralAdsResourcePatch import app.revanced.patches.youtube.ad.general.resource.patch.GeneralAdsResourcePatch
import app.revanced.patches.youtube.misc.fix.verticalscroll.patch.VerticalScrollPatch
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
import org.jf.dexlib2.iface.instruction.formats.Instruction31i import org.jf.dexlib2.iface.instruction.formats.Instruction31i
import org.jf.dexlib2.iface.instruction.formats.Instruction35c import org.jf.dexlib2.iface.instruction.formats.Instruction35c
import java.util.*
@Patch @Patch
@DependsOn([GeneralAdsResourcePatch::class]) @DependsOn([GeneralAdsResourcePatch::class, VerticalScrollPatch::class])
@Name("general-ads") @Name("general-ads")
@Description("Removes general ads.") @Description("Removes general ads.")
@GeneralAdsCompatibility @GeneralAdsCompatibility

View File

@@ -7,10 +7,10 @@ import app.revanced.patcher.patch.PatchResultSuccess
import app.revanced.patcher.patch.ResourcePatch import app.revanced.patcher.patch.ResourcePatch
import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.DependsOn
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
import app.revanced.patches.shared.settings.impl.InputType import app.revanced.patches.shared.settings.preference.impl.InputType
import app.revanced.patches.shared.settings.impl.StringResource import app.revanced.patches.shared.settings.preference.impl.StringResource
import app.revanced.patches.shared.settings.impl.SwitchPreference import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
import app.revanced.patches.shared.settings.impl.TextPreference import app.revanced.patches.shared.settings.preference.impl.TextPreference
import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility import app.revanced.patches.youtube.ad.general.annotation.GeneralAdsCompatibility
import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch import app.revanced.patches.youtube.misc.litho.filter.patch.LithoFilterPatch
import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatch
@@ -187,7 +187,7 @@ class GeneralAdsResourcePatch : ResourcePatch {
"Chapter teasers are shown" "Chapter teasers are shown"
) )
), ),
app.revanced.patches.shared.settings.impl.PreferenceScreen( app.revanced.patches.shared.settings.preference.impl.PreferenceScreen(
"revanced_adremover_custom", "revanced_adremover_custom",
StringResource("revanced_adremover_custom_title", "Custom filter"), StringResource("revanced_adremover_custom_title", "Custom filter"),
listOf( listOf(

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [Package(
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36", "17.45.36") "com.google.android.youtube", arrayOf("17.45.36")
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

@@ -12,13 +12,13 @@ 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.patcher.util.smali.ExternalLabel 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.youtube.ad.video.annotations.VideoAdsCompatibility import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
import app.revanced.patches.youtube.ad.video.fingerprints.LoadVideoAdsFingerprint import app.revanced.patches.youtube.ad.video.fingerprints.LoadVideoAdsFingerprint
import app.revanced.patches.youtube.misc.fix.playback.patch.FixPlaybackPatch
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import app.revanced.patches.youtube.misc.playback.fix.patch.FixPlaybackPatch
import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch import app.revanced.patches.youtube.misc.settings.bytecode.patch.SettingsPatch
import app.revanced.patches.shared.settings.impl.StringResource
import app.revanced.patches.shared.settings.impl.SwitchPreference
@Patch @Patch
@DependsOn([IntegrationsPatch::class, SettingsPatch::class, FixPlaybackPatch::class]) @DependsOn([IntegrationsPatch::class, SettingsPatch::class, FixPlaybackPatch::class])

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [Package(
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36", "17.45.36") "com.google.android.youtube", arrayOf("17.45.36")
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

View File

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

View File

@@ -5,7 +5,7 @@ import app.revanced.patcher.annotation.Package
@Compatibility( @Compatibility(
[Package( [Package(
"com.google.android.youtube", arrayOf("17.36.37", "17.41.37", "17.42.35", "17.43.36", "17.45.36") "com.google.android.youtube", arrayOf("17.45.36")
)] )]
) )
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)

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