mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 18:03:55 +01:00
Compare commits
354 Commits
v2.191.0-d
...
v3.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6202072061 | ||
|
|
f03e57b112 | ||
|
|
e2e0efd7ae | ||
|
|
a4a4822ed8 | ||
|
|
6b35561394 | ||
|
|
19f74bcdb1 | ||
|
|
dbe123c93c | ||
|
|
693d8a0f56 | ||
|
|
6a03c1f8c3 | ||
|
|
e820724111 | ||
|
|
ba58edbd7f | ||
|
|
a6d7c633f5 | ||
|
|
17f44ca780 | ||
|
|
3bd66406cc | ||
|
|
536b354fd6 | ||
|
|
e6a1573c59 | ||
|
|
d63288cc3e | ||
|
|
aaad91333f | ||
|
|
a98c178ca7 | ||
|
|
4672118e88 | ||
|
|
5587a5c869 | ||
|
|
55bc7ecbae | ||
|
|
9c82801e71 | ||
|
|
d3acdead51 | ||
|
|
f909df8047 | ||
|
|
6e24952d10 | ||
|
|
080b357a79 | ||
|
|
0ceb163ffa | ||
|
|
60340ccc7b | ||
|
|
fad9d2b54f | ||
|
|
4349d630a9 | ||
|
|
d43ea315d5 | ||
|
|
04c91ae28c | ||
|
|
51aeb0b24d | ||
|
|
c63cc2c3bf | ||
|
|
81d12c21b2 | ||
|
|
b1307cf09b | ||
|
|
18481c66c4 | ||
|
|
8c5487c467 | ||
|
|
a96572001b | ||
|
|
a6267fd00f | ||
|
|
35ac0913c9 | ||
|
|
240696d573 | ||
|
|
b16d64dd58 | ||
|
|
d271ee40ad | ||
|
|
8f49b7ecf5 | ||
|
|
15702c92b3 | ||
|
|
71633b7f1d | ||
|
|
45e55b48e5 | ||
|
|
f2753b2999 | ||
|
|
6268d14212 | ||
|
|
576563a27b | ||
|
|
6cb43c3326 | ||
|
|
89300e1f42 | ||
|
|
094ffd1b34 | ||
|
|
7f15bb4c20 | ||
|
|
20081ef27e | ||
|
|
7df2cd0373 | ||
|
|
bab4d54019 | ||
|
|
96bb0909c6 | ||
|
|
9457ecc2a9 | ||
|
|
469b6f3ad5 | ||
|
|
3cd1939063 | ||
|
|
2575825adf | ||
|
|
798360f7b9 | ||
|
|
b9101caba9 | ||
|
|
b16c86db36 | ||
|
|
943331de02 | ||
|
|
acaf657397 | ||
|
|
3e455ae7c2 | ||
|
|
0715e4c723 | ||
|
|
51ab7a65a0 | ||
|
|
2757572442 | ||
|
|
521d3a08c8 | ||
|
|
5282ccf4f3 | ||
|
|
e74f7d96d7 | ||
|
|
54b23da0b4 | ||
|
|
368b4a56f4 | ||
|
|
56b0a6295f | ||
|
|
3eb1d66716 | ||
|
|
529eef6efd | ||
|
|
d9e902d07a | ||
|
|
a9fdeb152d | ||
|
|
114378db68 | ||
|
|
97bb4d55e6 | ||
|
|
4d04e954a6 | ||
|
|
4ae80c2c59 | ||
|
|
705614a9df | ||
|
|
f87e5db3f6 | ||
|
|
4e17b78ba0 | ||
|
|
85aed52c25 | ||
|
|
3cf76488c0 | ||
|
|
2c5881771e | ||
|
|
78929c4216 | ||
|
|
bae71512c0 | ||
|
|
e249216430 | ||
|
|
175f792e58 | ||
|
|
0c1ece3dc5 | ||
|
|
cadbbd2fd8 | ||
|
|
e2004161c2 | ||
|
|
601e517d69 | ||
|
|
448ae5247d | ||
|
|
c05cc49665 | ||
|
|
5bc1c86f37 | ||
|
|
7aef6f3522 | ||
|
|
3a99f31551 | ||
|
|
d4b0a598cb | ||
|
|
eda326f5e5 | ||
|
|
ba34d2e28f | ||
|
|
b298ff3093 | ||
|
|
17ab263bc9 | ||
|
|
aaf9eae08b | ||
|
|
4e128b6de0 | ||
|
|
d9a4fdc991 | ||
|
|
f5ea64aac6 | ||
|
|
ede18f1d59 | ||
|
|
10f61a3fc7 | ||
|
|
07938bdadc | ||
|
|
c415e38530 | ||
|
|
7d710ecd62 | ||
|
|
e66623160d | ||
|
|
7ca42e6206 | ||
|
|
bdf42e649c | ||
|
|
7b9438f70f | ||
|
|
97899b73d2 | ||
|
|
2ccba1e370 | ||
|
|
e4b6e1bd26 | ||
|
|
db5ed08600 | ||
|
|
e1dc067bdb | ||
|
|
8c98a6065d | ||
|
|
826f5b7006 | ||
|
|
6aca8d518f | ||
|
|
a0cfa1f3e0 | ||
|
|
1a00ed958e | ||
|
|
0eb2c19787 | ||
|
|
94fff54bae | ||
|
|
0441dc946a | ||
|
|
524ed552a3 | ||
|
|
2532bff8e5 | ||
|
|
7236dee006 | ||
|
|
f9b7c31ba9 | ||
|
|
14017311f0 | ||
|
|
79c2f04383 | ||
|
|
1468edfbc8 | ||
|
|
8ec276aac9 | ||
|
|
4a7d723290 | ||
|
|
0f242a6aaa | ||
|
|
2fb76f779b | ||
|
|
278f204463 | ||
|
|
943235f770 | ||
|
|
3e224e6379 | ||
|
|
58e923f5f8 | ||
|
|
b1047dcdb9 | ||
|
|
8acc23cb9b | ||
|
|
afd2766b0d | ||
|
|
b09b59493b | ||
|
|
0496a814d3 | ||
|
|
e2ef688824 | ||
|
|
7832787c7f | ||
|
|
e671258572 | ||
|
|
01e8938227 | ||
|
|
e73e1a2898 | ||
|
|
82949a098c | ||
|
|
fd83834788 | ||
|
|
4874853cda | ||
|
|
0756f81547 | ||
|
|
47f96563a9 | ||
|
|
2e9be4ea8f | ||
|
|
d76d96c1aa | ||
|
|
d5e226b449 | ||
|
|
340dc59f74 | ||
|
|
a75014b390 | ||
|
|
3740494f1b | ||
|
|
7529d9d3ed | ||
|
|
98483ba1e8 | ||
|
|
ddbd7a83b5 | ||
|
|
acd9a735df | ||
|
|
c044ed65b8 | ||
|
|
38bcdf9327 | ||
|
|
f49f8b47e3 | ||
|
|
d2cd6258a9 | ||
|
|
fec25103c5 | ||
|
|
704e097b4e | ||
|
|
ea419a6e5f | ||
|
|
312dc1eb6f | ||
|
|
7dc8ec9f34 | ||
|
|
9564fd2b7c | ||
|
|
124380f738 | ||
|
|
777b6f6160 | ||
|
|
358b367408 | ||
|
|
68eee9b5e2 | ||
|
|
dc7bf5c760 | ||
|
|
b3fcb0e92b | ||
|
|
fb3cd9a3ad | ||
|
|
2a047ed1b6 | ||
|
|
0d1ab25cb5 | ||
|
|
87185171da | ||
|
|
d9c3748314 | ||
|
|
c14642a34b | ||
|
|
af2df3edd9 | ||
|
|
b5a7258f74 | ||
|
|
28fa499974 | ||
|
|
5fa89b6846 | ||
|
|
9588a47880 | ||
|
|
0dc06768d9 | ||
|
|
a04232ea91 | ||
|
|
49b47fa772 | ||
|
|
daf125a863 | ||
|
|
9121e0519b | ||
|
|
b352f48cb1 | ||
|
|
51844222c8 | ||
|
|
87877a8f2f | ||
|
|
bff07aa5b8 | ||
|
|
c575751dd4 | ||
|
|
8c53a6ab82 | ||
|
|
c1df94ae0b | ||
|
|
f8c0286b15 | ||
|
|
d59431ed74 | ||
|
|
44e35bf8aa | ||
|
|
1d90346f19 | ||
|
|
ab84dc78b9 | ||
|
|
be5df4d076 | ||
|
|
f73594c7e2 | ||
|
|
99cf7ca173 | ||
|
|
6ad9225f3e | ||
|
|
540e6d63d1 | ||
|
|
a8b0781d76 | ||
|
|
e398968762 | ||
|
|
cf8e8a44e4 | ||
|
|
42aea0c9ca | ||
|
|
d735520421 | ||
|
|
debb07ae21 | ||
|
|
2fe71a18ea | ||
|
|
5b6e015e64 | ||
|
|
b4d33a1dcf | ||
|
|
ecb92d3f68 | ||
|
|
caf1e6b211 | ||
|
|
07d98ab3f7 | ||
|
|
5bd5f87315 | ||
|
|
fa0b788111 | ||
|
|
bd10651c3b | ||
|
|
2d65ef676d | ||
|
|
0424cea8f0 | ||
|
|
f5acbe4315 | ||
|
|
992d85ded8 | ||
|
|
f25d085d25 | ||
|
|
002cc9d810 | ||
|
|
2919eb26e6 | ||
|
|
3b5141d4b4 | ||
|
|
fd2daa37b1 | ||
|
|
9ff6f84642 | ||
|
|
9417b67e74 | ||
|
|
f41e657191 | ||
|
|
883f69ee9a | ||
|
|
a7cf7e6d70 | ||
|
|
23dec85068 | ||
|
|
936c98c709 | ||
|
|
ba92f2e5d9 | ||
|
|
1f5c1d48a2 | ||
|
|
7d9ddc9203 | ||
|
|
0e0ea5d064 | ||
|
|
4ba1ddde8f | ||
|
|
5b09ef79a8 | ||
|
|
cd544669b2 | ||
|
|
7d50a7b178 | ||
|
|
e153e97ed2 | ||
|
|
224142ba19 | ||
|
|
8c5239d6b5 | ||
|
|
43533f6c09 | ||
|
|
f77d743a92 | ||
|
|
27a346d74b | ||
|
|
5138197358 | ||
|
|
2e7ab38a3d | ||
|
|
47e1bcbafa | ||
|
|
d83ef1ed59 | ||
|
|
3f397dabf7 | ||
|
|
1d23dcb3ea | ||
|
|
be335adeb9 | ||
|
|
7422617dc5 | ||
|
|
b07887800b | ||
|
|
0c5d846192 | ||
|
|
ff6daf55e0 | ||
|
|
2d33ba68b3 | ||
|
|
f703c9ab81 | ||
|
|
9546d12218 | ||
|
|
b2b5594f6a | ||
|
|
bf628dc0ea | ||
|
|
5f2536814d | ||
|
|
99bc87909e | ||
|
|
928df2428d | ||
|
|
3e9e1e2577 | ||
|
|
5ebec9b424 | ||
|
|
0204ff67a9 | ||
|
|
7d2a707030 | ||
|
|
26e0e4cd1d | ||
|
|
40f0a8cd0d | ||
|
|
47c858ef4e | ||
|
|
b17cd14d7d | ||
|
|
c7383bdf67 | ||
|
|
01e36428a0 | ||
|
|
187c1eb14a | ||
|
|
acadac3049 | ||
|
|
bf5c197eb8 | ||
|
|
73e8b3f81b | ||
|
|
1c2f499b1c | ||
|
|
32599ab13d | ||
|
|
19519d1d06 | ||
|
|
2ff70e8b8f | ||
|
|
1e21b0b572 | ||
|
|
18180745bc | ||
|
|
aa89b8d20c | ||
|
|
287648cf1e | ||
|
|
c4554b3564 | ||
|
|
1532d899b4 | ||
|
|
8ac18e6e23 | ||
|
|
54aa358b9f | ||
|
|
147d0eef34 | ||
|
|
fb60603782 | ||
|
|
18a2a4ceb4 | ||
|
|
7d822ddbec | ||
|
|
e74e65364a | ||
|
|
ef241671bd | ||
|
|
096fc12123 | ||
|
|
f166bd7ea7 | ||
|
|
df43cea4f8 | ||
|
|
444b196f41 | ||
|
|
884bf29804 | ||
|
|
144fabe571 | ||
|
|
98b7dcc600 | ||
|
|
e34119188a | ||
|
|
3433acfb1b | ||
|
|
3f4cfec2ae | ||
|
|
9ea14935ee | ||
|
|
7d7f179e76 | ||
|
|
f09c35dc3d | ||
|
|
8e318b81dd | ||
|
|
aaf5b5abe1 | ||
|
|
0c7c1de164 | ||
|
|
b7b0e076e7 | ||
|
|
04d42f8d5b | ||
|
|
fd2c4d13a6 | ||
|
|
ece4e3ba37 | ||
|
|
8c8dff9078 | ||
|
|
fe3a6fd4a4 | ||
|
|
2a340d21d7 | ||
|
|
ce6a9fc1ec | ||
|
|
632b50e1fe | ||
|
|
2957d3791a | ||
|
|
f894561817 | ||
|
|
04bc0f54e3 | ||
|
|
3fc64530c5 | ||
|
|
74df205be5 | ||
|
|
a09797710e | ||
|
|
5f43afcbaf |
73
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
73
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
@@ -1,73 +0,0 @@
|
|||||||
name: 🐞 Bug report
|
|
||||||
description: Report a very clearly broken issue.
|
|
||||||
title: 'bug: '
|
|
||||||
labels: [bug]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
# ReVanced bug report
|
|
||||||
|
|
||||||
Important to note that your issue may have already been reported before. Please check for existing issues [here](https://github.com/revanced/revanced-patches/labels/bug).
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: Type
|
|
||||||
options:
|
|
||||||
- Error while patching
|
|
||||||
- Error at runtime
|
|
||||||
- Cosmetic
|
|
||||||
- Other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Bug description
|
|
||||||
description: How did you find the bug? Any additional details that might help?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Steps to reproduce
|
|
||||||
description: Add the steps to reproduce this bug including your environment.
|
|
||||||
placeholder: Step 1. Download some files. Step 2. ...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Relevant log output
|
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. Capture crash logs by running `logcat | grep AndroidRuntime`.
|
|
||||||
render: shell
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Screenshots or videos
|
|
||||||
description: Add screenshots or videos that show the bug here.
|
|
||||||
placeholder: Drag and drop the screenshots/videos into this box.
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Solution
|
|
||||||
description: If applicable, add a possible solution.
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Additional context
|
|
||||||
description: Add additional context here.
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
- type: checkboxes
|
|
||||||
id: acknowledgements
|
|
||||||
attributes:
|
|
||||||
label: Acknowledgements
|
|
||||||
description: Your issue will be closed if you haven't done these steps.
|
|
||||||
options:
|
|
||||||
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
|
||||||
required: true
|
|
||||||
- label: I have written a short but informative title.
|
|
||||||
required: true
|
|
||||||
- label: I filled out all of the requested information in this issue properly.
|
|
||||||
required: true
|
|
||||||
110
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
110
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
name: 🐞 Bug report
|
||||||
|
description: Report a bug or an issue.
|
||||||
|
title: 'bug: '
|
||||||
|
labels: ['Bug report']
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
<p align="center">
|
||||||
|
<picture>
|
||||||
|
<source
|
||||||
|
width="256px"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
width="256px"
|
||||||
|
src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||||
|
>
|
||||||
|
</picture>
|
||||||
|
<br>
|
||||||
|
<a href="https://revanced.app/">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||||
|
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="http://revanced.app/discord">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://reddit.com/r/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://t.me/app_revanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://x.com/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://www.youtube.com/@ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Continuing the legacy of Vanced
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# ReVanced Patches bug report
|
||||||
|
|
||||||
|
Before creating a new bug report, please keep the following in mind:
|
||||||
|
|
||||||
|
- **Do not submit a duplicate bug report**: You can review existing bug reports [here](https://github.com/ReVanced/revanced-patches/labels/Bug%20report).
|
||||||
|
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md).
|
||||||
|
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Bug description
|
||||||
|
description: |
|
||||||
|
- Describe your bug in detail
|
||||||
|
- Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...)
|
||||||
|
- Add images and videos if possible
|
||||||
|
- List used patches if applicable
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Error logs
|
||||||
|
description: Exceptions can be captured by running `logcat | grep AndroidRuntime` in a shell.
|
||||||
|
render: shell
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Solution
|
||||||
|
description: If applicable, add a possible solution to the bug.
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add additional context here.
|
||||||
|
- type: checkboxes
|
||||||
|
id: acknowledgements
|
||||||
|
attributes:
|
||||||
|
label: Acknowledgements
|
||||||
|
description: Your bug report will be closed if you don't follow the checklist below.
|
||||||
|
options:
|
||||||
|
- label: This issue is not a duplicate of an existing bug report.
|
||||||
|
required: true
|
||||||
|
- label: I have chosen an appropriate title.
|
||||||
|
required: true
|
||||||
|
- label: All requested information has been provided properly.
|
||||||
|
required: true
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +1,5 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: 📃 Documentation
|
|
||||||
url: https://github.com/revanced/revanced-documentation/
|
|
||||||
about: Don't know how or where to start? Check out our documentation!
|
|
||||||
- name: 🗨 Discussions
|
- name: 🗨 Discussions
|
||||||
url: https://github.com/revanced/revanced-suggestions/discussions
|
url: https://github.com/revanced/revanced-suggestions/discussions
|
||||||
about: Got something you think should change or be added? Search for or start a new discussion!
|
about: Have something unspecific to ReVanced Patches in mind? Search for or start a new discussion!
|
||||||
106
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
106
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
name: ⭐ Feature request
|
||||||
|
description: Create a detailed request for a new feature.
|
||||||
|
title: 'feat: '
|
||||||
|
labels: ['Feature request']
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
<p align="center">
|
||||||
|
<picture>
|
||||||
|
<source
|
||||||
|
width="256px"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
width="256px"
|
||||||
|
src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||||
|
>
|
||||||
|
</picture>
|
||||||
|
<br>
|
||||||
|
<a href="https://revanced.app/">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||||
|
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="http://revanced.app/discord">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://reddit.com/r/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://t.me/app_revanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://x.com/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://www.youtube.com/@ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Continuing the legacy of Vanced
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# ReVanced Patches feature request
|
||||||
|
|
||||||
|
Before creating a new feature request, please keep the following in mind:
|
||||||
|
|
||||||
|
- **Do not submit a duplicate feature request**: You can review existing feature requests [here](https://github.com/ReVanced/revanced-patches/labels/Feature%20request).
|
||||||
|
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md).
|
||||||
|
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Feature description
|
||||||
|
description: |
|
||||||
|
- Describe your feature in detail
|
||||||
|
- Add images, videos, links, examples, references, etc. if possible
|
||||||
|
- Add the target application name in case you request a new patch
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Motivation
|
||||||
|
description: |
|
||||||
|
A strong motivation is necessary for a feature request to be considered.
|
||||||
|
|
||||||
|
- Why should this feature be implemented?
|
||||||
|
- What is the explicit use case?
|
||||||
|
- What are the benefits?
|
||||||
|
- What makes this feature important?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: acknowledgements
|
||||||
|
attributes:
|
||||||
|
label: Acknowledgements
|
||||||
|
description: Your feature request will be closed if you don't follow the checklist below.
|
||||||
|
options:
|
||||||
|
- label: This issue is not a duplicate of an existing feature request.
|
||||||
|
required: true
|
||||||
|
- label: I have chosen an appropriate title.
|
||||||
|
required: true
|
||||||
|
- label: All requested information has been provided properly.
|
||||||
|
required: true
|
||||||
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
@@ -1,41 +0,0 @@
|
|||||||
name: ⭐ Patch Request
|
|
||||||
description: Create a detailed patch request.
|
|
||||||
title: 'feat: '
|
|
||||||
labels: [patch-request]
|
|
||||||
body:
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Application
|
|
||||||
description: Which application is this patch for?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Issue
|
|
||||||
description: What is the issue this patch should solve?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Patch
|
|
||||||
description: "Describe the patch you'd like to see in detail."
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Motivation
|
|
||||||
description: Why should your patch request be considered? What makes it valuable to the community?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: checkboxes
|
|
||||||
id: acknowledgements
|
|
||||||
attributes:
|
|
||||||
label: Acknowledgements
|
|
||||||
description: Your issue will be closed if you haven't done these steps.
|
|
||||||
options:
|
|
||||||
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
|
||||||
required: true
|
|
||||||
- label: I have written a short but informative title.
|
|
||||||
required: true
|
|
||||||
- label: I filled out all of the requested information in this issue properly.
|
|
||||||
required: true
|
|
||||||
2
.github/config.yml
vendored
2
.github/config.yml
vendored
@@ -1,2 +1,2 @@
|
|||||||
firstPRMergeComment: >
|
firstPRMergeComment: >
|
||||||
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.
|
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) to receive a role for your contribution.
|
||||||
|
|||||||
7
.github/workflows/pull_request.yml
vendored
7
.github/workflows/pull_request.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: PR to main
|
name: Open a PR to main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pull-request:
|
pull-request:
|
||||||
@@ -15,7 +15,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Open pull request
|
- name: Open pull request
|
||||||
uses: repo-sync/pull-request@v2
|
uses: repo-sync/pull-request@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -17,27 +17,31 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Make sure the release step uses its own credentials:
|
# Make sure the release step uses its own credentials:
|
||||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Cache
|
|
||||||
|
- name: Cache Node modules
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ runner.home }}/.gradle/caches
|
|
||||||
${{ runner.home }}/.gradle/wrapper
|
|
||||||
.gradle
|
|
||||||
node_modules
|
node_modules
|
||||||
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
key: npm-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: burrunan/gradle-cache-action@v1
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew generateMeta clean
|
run: ./gradlew generateMeta clean
|
||||||
|
|
||||||
- name: Setup semantic-release
|
- name: Setup semantic-release
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||||
|
|||||||
1292
CHANGELOG.md
1292
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
125
CONTRIBUTING.md
Normal file
125
CONTRIBUTING.md
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<p align="center">
|
||||||
|
<picture>
|
||||||
|
<source
|
||||||
|
width="256px"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
width="256px"
|
||||||
|
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||||
|
>
|
||||||
|
</picture>
|
||||||
|
<br>
|
||||||
|
<a href="https://revanced.app/">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||||
|
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="http://revanced.app/discord">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://reddit.com/r/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://t.me/app_revanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://x.com/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://www.youtube.com/@ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Continuing the legacy of Vanced
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# 👋 Contribution guidelines
|
||||||
|
|
||||||
|
This document describes how to contribute to ReVanced Patches.
|
||||||
|
|
||||||
|
## 📖 Resources to help you get started
|
||||||
|
|
||||||
|
* The [documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs) provides the fundamentals of patches
|
||||||
|
and everything necessary to create your own patch from scratch
|
||||||
|
* [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
|
||||||
|
* [Issues](https://github.com/ReVanced/revanced-patches/issues) are where we keep track of bugs and feature requests
|
||||||
|
|
||||||
|
## 🙏 Submitting a feature request
|
||||||
|
|
||||||
|
Features can be requested by opening an issue using the
|
||||||
|
[Feature request issue template](https://github.com/ReVanced/revanced-patches/issues/new?assignees=&labels=Feature+request&projects=&template=feature-request.yml&title=feat%3A+).
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> Requests can be accepted or rejected at the discretion of maintainers of ReVanced Patches.
|
||||||
|
> Good motivation has to be provided for a request to be accepted.
|
||||||
|
|
||||||
|
## 🐞 Submitting a bug report
|
||||||
|
|
||||||
|
If you encounter a bug while using ReVanced Patches, open an issue using the
|
||||||
|
[Bug report issue template](https://github.com/ReVanced/revanced-patches/issues/new?assignees=&labels=Bug+report&projects=&template=bug-report.yml&title=bug%3A+).
|
||||||
|
|
||||||
|
## 🧑⚖️ Guidelines for requesting or contributing patches
|
||||||
|
|
||||||
|
To maintain a high-quality and ethical collection of patches, the following guidelines for requesting
|
||||||
|
or contributing patches are effective as of September 14, 2023. Any patches present prior to this date
|
||||||
|
are unaffected by this change.
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
> We generally adhere to the guidelines outlined below. However, we may make exceptions
|
||||||
|
> in specific cases based on our discretion. Pull requests for patches that deviate from the guidelines
|
||||||
|
> will be evaluated individually. While a patch may not align with our general guidelines,
|
||||||
|
> we will consider its acceptance on a case-by-case basis, taking into account its impact on user experience
|
||||||
|
> and ethical considerations. We reserve the right to make exceptions for patches that provide significant value.
|
||||||
|
|
||||||
|
✅ Examples for acceptable patches include:
|
||||||
|
|
||||||
|
* Customizations: Feel free to contribute patches that allow users to personalize their experience
|
||||||
|
* Ad-Blocking: Patches aimed at enhancing user privacy and blocking intrusive advertisements are appreciated
|
||||||
|
* Feature additions: Patches that add new features or change behaviour to the app are welcome
|
||||||
|
|
||||||
|
❌ Examples for unacceptable patches include:
|
||||||
|
|
||||||
|
* Payment circumvention: We do not accept patches that exist solely to bypass payment for the app or any of its features
|
||||||
|
* Malicious patches: Patches that are malicious in nature are not allowed
|
||||||
|
|
||||||
|
|
||||||
|
## 📝 How to contribute
|
||||||
|
|
||||||
|
1. Before contributing, it is recommended to open an issue to discuss your change
|
||||||
|
with the maintainers of ReVanced Patches. This will help you determine whether your change is acceptable
|
||||||
|
and whether it is worth your time to implement it
|
||||||
|
2. Development happens on the `dev` branch. Fork the repository and create your branch from `dev`
|
||||||
|
3. Commit your changes. In case you are contributing a new patch, make sure to follow the conventions for patches
|
||||||
|
described in the [documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs)
|
||||||
|
4. Submit a pull request to the `dev` branch of the repository and reference issues
|
||||||
|
that your pull request closes in the description of your pull request
|
||||||
|
5. Our team will review your pull request and provide feedback. Once your pull request is approved,
|
||||||
|
it will be merged into the `dev` branch and will be included in the next release of ReVanced Patches
|
||||||
|
|
||||||
|
❤️ Thank you for considering contributing to ReVanced Patches,
|
||||||
|
ReVanced
|
||||||
110
README.md
110
README.md
@@ -1,3 +1,109 @@
|
|||||||
## 🧩 ReVanced Patches
|
<p align="center">
|
||||||
|
<picture>
|
||||||
|
<source
|
||||||
|
width="256px"
|
||||||
|
media="(prefers-color-scheme: dark)"
|
||||||
|
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
width="256px"
|
||||||
|
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||||
|
>
|
||||||
|
</picture>
|
||||||
|
<br>
|
||||||
|
<a href="https://revanced.app/">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://github.com/ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||||
|
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="http://revanced.app/discord">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://reddit.com/r/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://t.me/app_revanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://x.com/revancedapp">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<a href="https://www.youtube.com/@ReVanced">
|
||||||
|
<picture>
|
||||||
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Continuing the legacy of Vanced
|
||||||
|
</p>
|
||||||
|
|
||||||
Patches for ReVanced.
|
# 🧩 ReVanced Patches
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
This repository contains a collection of ReVanced Patches.
|
||||||
|
|
||||||
|
## ❓ About
|
||||||
|
|
||||||
|
Patches are small modifications to Android apps that allow you to change the behaviour of or add new features,
|
||||||
|
block ads, customize the appearance, and much more.
|
||||||
|
|
||||||
|
## 💪 Features
|
||||||
|
|
||||||
|
Some of the features the patches provide are:
|
||||||
|
|
||||||
|
* 🚫 **Block ads**: Say goodbye to ads
|
||||||
|
* ⭐ **Customize your app**: Personalize the appearance of apps with various layouts and themes
|
||||||
|
* 🪄 **Add new features**: Extend the functionality of apps with lots of new features
|
||||||
|
* ⚙️ **Miscellaneous and general purpose**: Rename packages, enable debugging, disable screen capture restrictions,
|
||||||
|
export activities, etc.
|
||||||
|
* ✨ **And much more!**
|
||||||
|
|
||||||
|
For a full list of all available patches, visit [revanced.app/patches](https://revanced.app/patches).
|
||||||
|
|
||||||
|
## 🚀 How to get started
|
||||||
|
|
||||||
|
You can use [ReVanced CLI](https://github.com/ReVanced/revanced-cli) or [ReVanced Manager](https://github.com/ReVanced/revanced-manager) to use ReVanced Patches.
|
||||||
|
|
||||||
|
## 📚 Everything else
|
||||||
|
|
||||||
|
### 📙 Contributing
|
||||||
|
|
||||||
|
Thank you for considering contributing to ReVanced Patches. You can find the contribution guidelines [here](CONTRIBUTING.md).
|
||||||
|
|
||||||
|
### 📃 Documentation
|
||||||
|
|
||||||
|
The documentation provides the fundamentals of patches and everything necessary to create your own patch from scratch.
|
||||||
|
You can find it [here](https://github.com/ReVanced/revanced-patches/tree/docs/docs).
|
||||||
|
|
||||||
|
### 🛠️ Building
|
||||||
|
|
||||||
|
In order to build ReVanced Patches, you can follow the [ReVanced documentation](https://github.com/ReVanced/revanced-documentation).
|
||||||
|
|
||||||
|
## 📜 Licence
|
||||||
|
|
||||||
|
ReVanced Patches is licensed under the GPLv3 licence. Please see the [licence file](LICENSE) for more information.
|
||||||
|
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify ReVanced patches as long as you track changes/dates in source files.
|
||||||
|
Any modifications to ReVanced Patches must also be made available under the GPL along with build & install instructions.
|
||||||
|
|||||||
1670
api/revanced-patches.api
Normal file
1670
api/revanced-patches.api
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 11 KiB |
1
assets/revanced-logo/revanced-logo.svg
Normal file
1
assets/revanced-logo/revanced-logo.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 800 800" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Logo"><g id="Ring"><circle id="Ring-Background" serif:id="Ring Background" cx="400" cy="400" r="400" style="fill:#1b1b1b;"/><path id="Ring1" serif:id="Ring" d="M400,0c220.766,0 400,179.234 400,400c-0,220.766 -179.234,400 -400,400c-220.766,-0 -400,-179.234 -400,-400c0,-220.766 179.234,-400 400,-400Zm-0,36c200.897,-0 364,163.103 364,364c0,200.897 -163.103,364 -364,364c-200.897,0 -364,-163.103 -364,-364c-0,-200.897 163.103,-364 364,-364Z" style="fill:url(#_Linear1);"/></g><g id="Shape"><path id="V-Shape" serif:id="V Shape" d="M538.74,269.872c1.481,-3.382 1.157,-7.283 -0.863,-10.373c-2.021,-3.091 -5.464,-4.954 -9.156,-4.954c-5.148,0 -10.435,0 -14.165,0c-3.1,0 -5.907,1.834 -7.153,4.672c-12.468,28.396 -78.273,178.273 -100.25,228.328c-1.246,2.838 -4.053,4.671 -7.154,4.671c-3.1,0 -5.907,-1.833 -7.153,-4.671c-21.977,-50.055 -87.782,-199.932 -100.25,-228.328c-1.246,-2.838 -4.053,-4.672 -7.153,-4.672c-3.73,0 -9.017,0 -14.164,0c-3.693,0 -7.135,1.863 -9.156,4.954c-2.02,3.09 -2.344,6.991 -0.863,10.373c23.557,53.766 101.872,232.519 117.871,269.034c1.743,3.979 5.674,6.549 10.018,6.549c6.293,-0 15.408,-0 21.701,-0c4.344,-0 8.275,-2.57 10.018,-6.549c15.999,-36.515 94.315,-215.268 117.872,-269.034Z" style="fill:#fff;"/><path id="Diamond" d="M408.119,395.312c-1.675,2.901 -4.77,4.688 -8.119,4.688c-3.349,-0 -6.444,-1.787 -8.119,-4.688c-16.997,-29.44 -56.156,-97.264 -73.153,-126.704c-1.675,-2.901 -1.675,-6.474 0,-9.375c1.675,-2.901 4.77,-4.688 8.119,-4.688c33.995,0 112.311,0 146.306,0c3.349,0 6.444,1.787 8.119,4.688c1.675,2.901 1.675,6.474 -0,9.375c-16.997,29.44 -56.156,97.264 -73.153,126.704Z" style="fill:url(#_Linear2);"/></g></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(4.89859e-14,800,-800,4.89859e-14,400.001,3.31681e-10)"><stop offset="0" style="stop-color:#f04e98;stop-opacity:1"/><stop offset="0.5" style="stop-color:#5f65d4;stop-opacity:1"/><stop offset="1" style="stop-color:#4e98f0;stop-opacity:1"/></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.77155e-14,289.317,-282.535,1.73003e-14,400,254.545)"><stop offset="0" style="stop-color:#f04e98;stop-opacity:1"/><stop offset="0.5" style="stop-color:#5f65d4;stop-opacity:1"/><stop offset="1" style="stop-color:#4e98f0;stop-opacity:1"/></linearGradient></defs></svg>
|
||||||
|
After Width: | Height: | Size: 2.8 KiB |
118
build.gradle.kts
118
build.gradle.kts
@@ -1,5 +1,9 @@
|
|||||||
|
import org.gradle.kotlin.dsl.support.listFilesOrdered
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.8.20"
|
kotlin("jvm") version "1.9.10"
|
||||||
|
alias(libs.plugins.binary.compatibility.validator)
|
||||||
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "app.revanced"
|
group = "app.revanced"
|
||||||
@@ -8,32 +12,18 @@ repositories {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
google()
|
google()
|
||||||
maven {
|
maven { url = uri("https://jitpack.io") }
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
|
||||||
credentials {
|
|
||||||
username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
|
||||||
password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Required for FlexVer-Java
|
|
||||||
maven {
|
|
||||||
url = uri("https://repo.sleeping.town")
|
|
||||||
content {
|
|
||||||
includeGroup("com.unascribed")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("app.revanced:revanced-patcher:14.2.1")
|
implementation(libs.revanced.patcher)
|
||||||
implementation("com.android.tools.smali:smali:3.0.3")
|
implementation(libs.smali)
|
||||||
// Required because build fails without it.
|
// TODO: Required because build fails without it. Find a way to remove this dependency.
|
||||||
// TODO: Find a way to remove this dependency.
|
implementation(libs.guava)
|
||||||
implementation("com.google.guava:guava:32.1.2-jre")
|
|
||||||
// Used in JsonGenerator.
|
// Used in JsonGenerator.
|
||||||
implementation("com.google.code.gson:gson:2.10.1")
|
implementation(libs.gson)
|
||||||
// A dependency to the Android library unfortunately fails the build,
|
|
||||||
// which is why this is required for the patch change-oauth-client-id.
|
// A dependency to the Android library unfortunately fails the build, which is why this is required.
|
||||||
compileOnly(project("dummy"))
|
compileOnly(project("dummy"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,41 +31,93 @@ kotlin {
|
|||||||
jvmToolchain(11)
|
jvmToolchain(11)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(Jar::class) {
|
||||||
|
exclude("app/revanced/meta")
|
||||||
|
|
||||||
|
manifest {
|
||||||
|
attributes["Name"] = "ReVanced Patches"
|
||||||
|
attributes["Description"] = "Patches for ReVanced."
|
||||||
|
attributes["Version"] = version
|
||||||
|
attributes["Timestamp"] = System.currentTimeMillis().toString()
|
||||||
|
attributes["Source"] = "git@github.com:revanced/revanced-patches.git"
|
||||||
|
attributes["Author"] = "ReVanced"
|
||||||
|
attributes["Contact"] = "contact@revanced.app"
|
||||||
|
attributes["Origin"] = "https://revanced.app"
|
||||||
|
attributes["License"] = "GNU General Public License v3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
register<DefaultTask>("generateBundle") {
|
register<DefaultTask>("generateBundle") {
|
||||||
description = "Generate dex files from build and bundle them in the jar file"
|
description = "Generate dex files from build and bundle them in the jar file"
|
||||||
|
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
val d8 = File(System.getenv("ANDROID_HOME")).resolve("build-tools")
|
||||||
val d8 = "${androidHome}/build-tools/33.0.1/d8"
|
.listFilesOrdered().last().resolve("d8").absolutePath
|
||||||
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
|
||||||
val work = layout.buildDirectory.dir("libs").get().asFile
|
val artifacts = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
||||||
|
val workingDirectory = layout.buildDirectory.dir("libs").get().asFile
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
workingDir = work
|
workingDir = workingDirectory
|
||||||
commandLine = listOf(d8, input)
|
commandLine = listOf(d8, artifacts)
|
||||||
}
|
}
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
workingDir = work
|
workingDir = workingDirectory
|
||||||
commandLine = listOf("zip", "-u", input, "classes.dex")
|
commandLine = listOf("zip", "-u", artifacts, "classes.dex")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
register<JavaExec>("generateMeta") {
|
register<JavaExec>("generateMeta") {
|
||||||
description = "Generate metadata for this bundle"
|
description = "Generate metadata for this bundle"
|
||||||
|
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
||||||
}
|
}
|
||||||
// Dummy task to fix the Gradle semantic-release plugin.
|
|
||||||
// Remove this if you forked it to support building only.
|
// Required to run tasks because Gradle semantic-release plugin runs the publish task.
|
||||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||||
register<DefaultTask>("publish") {
|
named("publish") {
|
||||||
group = "publish"
|
dependsOn("generateBundle")
|
||||||
description = "Dummy task"
|
dependsOn("generateMeta")
|
||||||
dependsOn(named("generateBundle"), named("generateMeta"))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("revanced-patches-publication") {
|
||||||
|
from(components["java"])
|
||||||
|
|
||||||
|
pom {
|
||||||
|
name = "ReVanced Patches"
|
||||||
|
description = "Patches for ReVanced."
|
||||||
|
url = "https://revanced.app"
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name = "GNU General Public License v3.0"
|
||||||
|
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id = "ReVanced"
|
||||||
|
name = "ReVanced"
|
||||||
|
email = "contact@revanced.app"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection = "scm:git:git://github.com/revanced/revanced-patches.git"
|
||||||
|
developerConnection = "scm:git:git@github.com:revanced/revanced-patches.git"
|
||||||
|
url = "https://github.com/revanced/revanced-patches"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.191.0-dev.2
|
version = 3.0.0-dev.10
|
||||||
|
|||||||
15
gradle/libs.versions.toml
Normal file
15
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[versions]
|
||||||
|
revanced-patcher = "19.1.0"
|
||||||
|
smali = "3.0.3"
|
||||||
|
guava = "32.1.2-jre"
|
||||||
|
gson = "2.10.1"
|
||||||
|
binary-compatibility-validator = "0.13.2"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
||||||
|
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||||
|
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||||
|
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
|
||||||
7
gradle/wrapper/gradle-wrapper.properties
vendored
7
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||||
networkTimeout=10000
|
distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dist
|
||||||
8499
package-lock.json
generated
8499
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-backmerge": "^3.1.0",
|
"@saithodev/semantic-release-backmerge": "^3.2.1",
|
||||||
"@semantic-release/changelog": "^6.0.2",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"gradle-semantic-release-plugin": "^1.7.6",
|
"gradle-semantic-release-plugin": "^1.8.0",
|
||||||
"semantic-release": "^20.1.0"
|
"semantic-release": "^22.0.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,9 @@
|
|||||||
include("dummy")
|
include("dummy")
|
||||||
|
|
||||||
rootProject.name = "revanced-patches"
|
rootProject.name = "revanced-patches"
|
||||||
|
|
||||||
|
buildCache {
|
||||||
|
local {
|
||||||
|
isEnabled = "CI" !in System.getenv()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,108 +0,0 @@
|
|||||||
package app.revanced.extensions
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.patch.PatchException
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.shared.mapping.misc.patch.ResourceMappingPatch
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
|
||||||
import org.w3c.dom.Node
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The [PatchException] of failing to resolve a [MethodFingerprint].
|
|
||||||
*
|
|
||||||
* @return The [PatchException].
|
|
||||||
*/
|
|
||||||
val MethodFingerprint.exception
|
|
||||||
get() = PatchException("Failed to resolve $name")
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
|
||||||
*
|
|
||||||
* @param method The [Method] to find.
|
|
||||||
* @return The [MutableMethod].
|
|
||||||
*/
|
|
||||||
fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
|
|
||||||
MethodUtil.methodSignaturesMatch(it, method)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* apply a transform to all methods of the class.
|
|
||||||
*
|
|
||||||
* @param transform the transformation function. original method goes in, transformed method goes out.
|
|
||||||
*/
|
|
||||||
fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
|
|
||||||
val transformedMethods = methods.map { it.transform() }
|
|
||||||
methods.clear()
|
|
||||||
methods.addAll(transformedMethods)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Node.doRecursively(action: (Node) -> Unit) {
|
|
||||||
action(this)
|
|
||||||
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun MutableMethod.injectHideViewCall(
|
|
||||||
insertIndex: Int,
|
|
||||||
viewRegister: Int,
|
|
||||||
classDescriptor: String,
|
|
||||||
targetMethod: String
|
|
||||||
) = addInstruction(
|
|
||||||
insertIndex,
|
|
||||||
"invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V"
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the index of the first constant instruction with the id of the given resource name.
|
|
||||||
*
|
|
||||||
* @param resourceName the name of the resource to find the id for.
|
|
||||||
* @return the index of the first constant instruction with the id of the given resource name, or -1 if not found.
|
|
||||||
*/
|
|
||||||
fun Method.findIndexForIdResource(resourceName: String): Int {
|
|
||||||
fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single {
|
|
||||||
it.type == "id" && it.name == resourceName
|
|
||||||
}.id
|
|
||||||
|
|
||||||
return indexOfFirstConstantInstructionValue(getIdResourceId(resourceName))
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the index of the first constant instruction with the given value.
|
|
||||||
*
|
|
||||||
* @return the first constant instruction with the value, or -1 if not found.
|
|
||||||
*/
|
|
||||||
fun Method.indexOfFirstConstantInstructionValue(constantValue: Long): Int {
|
|
||||||
return implementation?.let {
|
|
||||||
it.instructions.indexOfFirst { instruction ->
|
|
||||||
instruction.opcode == Opcode.CONST && (instruction as WideLiteralInstruction).wideLiteral == constantValue
|
|
||||||
}
|
|
||||||
} ?: -1
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the method contains a constant with the given value.
|
|
||||||
*
|
|
||||||
* @return if the method contains a constant with the given value.
|
|
||||||
*/
|
|
||||||
fun Method.containsConstantInstructionValue(constantValue: Long): Boolean {
|
|
||||||
return indexOfFirstConstantInstructionValue(constantValue) >= 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +1,49 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
import app.revanced.patcher.PatchSet
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
import app.revanced.patcher.patch.Patch
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.include
|
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.options
|
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
|
||||||
import app.revanced.patcher.patch.PatchOption
|
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal class JsonGenerator : PatchesFileGenerator {
|
internal class JsonGenerator : PatchesFileGenerator {
|
||||||
override fun generate(bundle: PatchBundlePatches) {
|
override fun generate(patches: PatchSet) = patches.map {
|
||||||
val patches = bundle.map {
|
JsonPatch(
|
||||||
JsonPatch(
|
it.name!!,
|
||||||
it.patchName,
|
it.description,
|
||||||
it.description ?: "This patch has no description.",
|
it.compatiblePackages,
|
||||||
!it.include,
|
it.use,
|
||||||
it.options?.map { option ->
|
it.requiresIntegrations,
|
||||||
JsonPatch.Option(
|
it.options.values.map { option ->
|
||||||
option.key,
|
JsonPatch.Option(
|
||||||
option.title,
|
option.key,
|
||||||
option.description,
|
option.default,
|
||||||
option.required,
|
option.values,
|
||||||
option.let { listOption ->
|
option.title,
|
||||||
if (listOption is PatchOption.ListOption<*>) {
|
option.description,
|
||||||
listOption.options.toMutableList().toTypedArray()
|
option.required
|
||||||
} else null
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}?.toTypedArray() ?: emptyArray(),
|
}.let {
|
||||||
it.dependencies?.map { dep ->
|
File("patches.json").writeText(GsonBuilder().serializeNulls().create().toJson(it))
|
||||||
dep.java.patchName
|
|
||||||
}?.toTypedArray() ?: emptyArray(),
|
|
||||||
it.compatiblePackages?.map { pkg ->
|
|
||||||
JsonPatch.CompatiblePackage(pkg.name, pkg.versions)
|
|
||||||
}?.toTypedArray() ?: emptyArray()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
val json = File("patches.json")
|
|
||||||
json.writeText(GsonBuilder().serializeNulls().create().toJson(patches))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("unused")
|
||||||
private class JsonPatch(
|
private class JsonPatch(
|
||||||
val name: String,
|
val name: String? = null,
|
||||||
val description: String,
|
val description: String? = null,
|
||||||
val excluded: Boolean,
|
val compatiblePackages: Set<Patch.CompatiblePackage>? = null,
|
||||||
val options: Array<Option>,
|
val use: Boolean = true,
|
||||||
val dependencies: Array<String>,
|
val requiresIntegrations: Boolean = false,
|
||||||
val compatiblePackages: Array<CompatiblePackage>,
|
val options: List<Option>
|
||||||
) {
|
) {
|
||||||
class CompatiblePackage(
|
|
||||||
val name: String,
|
|
||||||
val versions: Array<String>,
|
|
||||||
)
|
|
||||||
|
|
||||||
class Option(
|
class Option(
|
||||||
val key: String,
|
val key: String,
|
||||||
val title: String,
|
val default: Any?,
|
||||||
val description: String,
|
val values: Map<String, Any?>?,
|
||||||
|
val title: String?,
|
||||||
|
val description: String?,
|
||||||
val required: Boolean,
|
val required: Boolean,
|
||||||
val choices: Array<*>?,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,11 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.PatchBundleLoader
|
import app.revanced.patcher.PatchBundleLoader
|
||||||
import app.revanced.patcher.patch.PatchClass
|
import app.revanced.patcher.PatchSet
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal typealias PatchBundlePatches = List<PatchClass>
|
|
||||||
|
|
||||||
internal interface PatchesFileGenerator {
|
internal interface PatchesFileGenerator {
|
||||||
fun generate(bundle: PatchBundlePatches)
|
fun generate(patches: PatchSet)
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
package app.revanced.patches.all.activity.exportall.patch
|
package app.revanced.patches.all.activity.exportall
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(
|
||||||
@Name("Export all activities")
|
name = "Export all activities",
|
||||||
@Description("Makes all app activities exportable.")
|
description = "Makes all app activities exportable.",
|
||||||
class ExportAllActivitiesPatch : ResourcePatch {
|
use = false
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object ExportAllActivitiesPatch : ResourcePatch() {
|
||||||
|
private const val EXPORTED_FLAG = "android:exported"
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
val document = editor.file
|
val document = editor.file
|
||||||
@@ -32,8 +34,4 @@ class ExportAllActivitiesPatch : ResourcePatch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
|
||||||
const val EXPORTED_FLAG = "android:exported"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,29 +1,46 @@
|
|||||||
package app.revanced.patches.all.connectivity.wifi.spoof.patch
|
package app.revanced.patches.all.connectivity.wifi.spoof
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.util.patch.*
|
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||||
|
import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||||
|
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||||
|
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(
|
||||||
@Name("Spoof wifi connection")
|
name = "Spoof Wi-Fi connection",
|
||||||
@Description("Spoofs an existing Wi-Fi connection.")
|
description = "Spoofs an existing Wi-Fi connection.",
|
||||||
@RequiresIntegrations
|
use = false,
|
||||||
class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
requiresIntegrations = true
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
private companion object {
|
override fun filterMap(
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
classDef: ClassDef,
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "${INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX};"
|
method: Method,
|
||||||
|
instruction: Instruction,
|
||||||
|
instructionIndex: Int
|
||||||
|
) = filterMapInstruction35c<MethodCall>(
|
||||||
|
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
||||||
|
classDef,
|
||||||
|
instruction,
|
||||||
|
instructionIndex
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
||||||
|
val (methodType, instruction, instructionIndex) = entry
|
||||||
|
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
enum class MethodCall(
|
private enum class MethodCall(
|
||||||
override val definedClassName: String,
|
override val definedClassName: String,
|
||||||
override val methodName: String,
|
override val methodName: String,
|
||||||
override val methodParams: Array<String>,
|
override val methodParams: Array<String>,
|
||||||
@@ -186,21 +203,4 @@ class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>()
|
|||||||
"V",
|
"V",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun filterMap(
|
|
||||||
classDef: ClassDef,
|
|
||||||
method: Method,
|
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
) = filterMapInstruction35c<MethodCall>(
|
|
||||||
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
|
||||||
classDef,
|
|
||||||
instruction,
|
|
||||||
instructionIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
|
||||||
val (methodType, instruction, instructionIndex) = entry
|
|
||||||
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,18 @@
|
|||||||
package app.revanced.patches.all.interaction.gestures.patch
|
package app.revanced.patches.all.interaction.gestures
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Predictive back gesture",
|
||||||
|
description = "Enables the predictive back gesture introduced on Android 13.",
|
||||||
|
use = false
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object PredictiveBackGesturePatch : ResourcePatch() {
|
||||||
|
private const val FLAG = "android:enableOnBackInvokedCallback"
|
||||||
|
|
||||||
@Patch(false)
|
|
||||||
@Name("Predictive back gesture")
|
|
||||||
@Description("Enables the predictive back gesture introduced on Android 13.")
|
|
||||||
class PredictiveBackGesturePatch : ResourcePatch {
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
val document = editor.file
|
val document = editor.file
|
||||||
@@ -20,12 +23,7 @@ class PredictiveBackGesturePatch : ResourcePatch {
|
|||||||
document.createAttribute(FLAG)
|
document.createAttribute(FLAG)
|
||||||
.apply { value = "true" }
|
.apply { value = "true" }
|
||||||
.let(attributes::setNamedItem)
|
.let(attributes::setNamedItem)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
|
||||||
const val FLAG = "android:enableOnBackInvokedCallback"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
package app.revanced.patches.all.misc.debugging.patch
|
package app.revanced.patches.all.misc.debugging
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.*
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(
|
||||||
@Name("Enable android debugging")
|
name = "Enable Android debugging",
|
||||||
@Description("Enables Android debugging capabilities. This can slow down the app.")
|
description = "Enables Android debugging capabilities. This can slow down the app.",
|
||||||
class EnableAndroidDebuggingPatch : ResourcePatch {
|
use = false
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object EnableAndroidDebuggingPatch : ResourcePatch() {
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||||
val applicationNode = dom
|
val applicationNode = dom
|
||||||
@@ -22,5 +23,4 @@ class EnableAndroidDebuggingPatch : ResourcePatch {
|
|||||||
applicationNode.setAttribute("android:debuggable", "true")
|
applicationNode.setAttribute("android:debuggable", "true")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
package app.revanced.patches.all.misc.network.patch
|
package app.revanced.patches.all.misc.network
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patches.all.misc.debugging.EnableAndroidDebuggingPatch
|
||||||
import app.revanced.patches.all.misc.debugging.patch.EnableAndroidDebuggingPatch
|
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(
|
||||||
@Name("Override certificate pinning")
|
name = "Override certificate pinning",
|
||||||
@Description("Overrides certificate pinning, allowing to inspect traffic via a proxy.")
|
description = "Overrides certificate pinning, allowing to inspect traffic via a proxy.",
|
||||||
@DependsOn([EnableAndroidDebuggingPatch::class])
|
dependencies = [EnableAndroidDebuggingPatch::class],
|
||||||
class OverrideCertificatePinningPatch : ResourcePatch {
|
use = false
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object OverrideCertificatePinningPatch : ResourcePatch() {
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
val resXmlDirectory = context["res/xml"]
|
val resXmlDirectory = context["res/xml"]
|
||||||
|
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package app.revanced.patches.all.misc.packagename
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||||
|
import app.revanced.patcher.patch.options.PatchOptionException
|
||||||
|
import org.w3c.dom.Element
|
||||||
|
import java.io.Closeable
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Change package name",
|
||||||
|
description = "Appends \".revanced\" to the package name by default.",
|
||||||
|
use = false
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object ChangePackageNamePatch : ResourcePatch(), Closeable {
|
||||||
|
private val packageNameOption = stringPatchOption(
|
||||||
|
key = "packageName",
|
||||||
|
default = "Default",
|
||||||
|
values = mapOf("Default" to "Default"),
|
||||||
|
title = "Package name",
|
||||||
|
description = "The name of the package to rename the app to.",
|
||||||
|
required = true
|
||||||
|
) {
|
||||||
|
it == "Default" || it!!.matches(Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$"))
|
||||||
|
}
|
||||||
|
|
||||||
|
private lateinit var context: ResourceContext
|
||||||
|
|
||||||
|
override fun execute(context: ResourceContext) {
|
||||||
|
this.context = context
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the package name to use.
|
||||||
|
* If this is called multiple times, the first call will set the package name.
|
||||||
|
*
|
||||||
|
* @param fallbackPackageName The package name to use if the user has not already specified a package name.
|
||||||
|
* @return The package name that was set.
|
||||||
|
* @throws PatchOptionException.ValueValidationException If the package name is invalid.
|
||||||
|
*/
|
||||||
|
fun setOrGetFallbackPackageName(fallbackPackageName: String): String {
|
||||||
|
val packageName = this.packageNameOption.value!!
|
||||||
|
|
||||||
|
return if (packageName == this.packageNameOption.default)
|
||||||
|
fallbackPackageName.also { this.packageNameOption.value = it }
|
||||||
|
else
|
||||||
|
packageName
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun close() = context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
|
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
||||||
|
val originalPackageName = manifest.getAttribute("package")
|
||||||
|
|
||||||
|
var replacementPackageName = this.packageNameOption.value
|
||||||
|
if (replacementPackageName == this.packageNameOption.default)
|
||||||
|
replacementPackageName = "$originalPackageName.revanced"
|
||||||
|
|
||||||
|
manifest.setAttribute("package", replacementPackageName)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
package app.revanced.patches.all.misc.packagename.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.*
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import org.w3c.dom.Element
|
|
||||||
|
|
||||||
@Patch(false)
|
|
||||||
@Name("Change package name")
|
|
||||||
@Description("Changes the package name. Appends \".revanced\" to the package name by default.")
|
|
||||||
class ChangePackageNamePatch : ResourcePatch {
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
val packageNameToUse = packageName ?: getDefaultPackageName(context)
|
|
||||||
|
|
||||||
val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$")
|
|
||||||
if (!packageNameToUse.matches(packageNameRegex))
|
|
||||||
throw PatchException("Invalid package name")
|
|
||||||
|
|
||||||
val originalPackageName = getOriginalPackageName(context)
|
|
||||||
|
|
||||||
context["AndroidManifest.xml"].apply {
|
|
||||||
readText().replace(originalPackageName, packageNameToUse).let(::writeText)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getDefaultPackageName(context: ResourceContext): String {
|
|
||||||
val originalPackageName = getOriginalPackageName(context)
|
|
||||||
return "$originalPackageName.revanced"
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getOriginalPackageName(context: ResourceContext): String {
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
|
||||||
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
|
||||||
return manifest.getAttribute("package")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object : OptionsContainer() {
|
|
||||||
var packageName: String? by option(
|
|
||||||
PatchOption.StringOption(
|
|
||||||
key = "packageName",
|
|
||||||
default = null,
|
|
||||||
title = "Package name",
|
|
||||||
description = "The name of the package to rename the app to.",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
package app.revanced.util.patch
|
package app.revanced.patches.all.misc.transformation
|
||||||
|
|
||||||
import app.revanced.extensions.findMutableMethodOf
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
|
import app.revanced.util.findMutableMethodOf
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
|
||||||
|
@Suppress("MemberVisibilityCanBePrivate")
|
||||||
abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
||||||
|
|
||||||
abstract fun filterMap(
|
abstract fun filterMap(
|
||||||
@@ -20,7 +21,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
|||||||
abstract fun transform(mutableMethod: MutableMethod, entry: T)
|
abstract fun transform(mutableMethod: MutableMethod, entry: T)
|
||||||
|
|
||||||
// Returns the patch indices as a Sequence, which will execute lazily.
|
// Returns the patch indices as a Sequence, which will execute lazily.
|
||||||
private fun findPatchIndices(classDef: ClassDef, method: Method): Sequence<T>? {
|
fun findPatchIndices(classDef: ClassDef, method: Method): Sequence<T>? {
|
||||||
return method.implementation?.instructions?.asSequence()?.withIndex()?.mapNotNull { (index, instruction) ->
|
return method.implementation?.instructions?.asSequence()?.withIndex()?.mapNotNull { (index, instruction) ->
|
||||||
filterMap(classDef, method, instruction, index)
|
filterMap(classDef, method, instruction, index)
|
||||||
}
|
}
|
||||||
@@ -35,11 +36,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
|||||||
// Since the Sequence executes lazily,
|
// Since the Sequence executes lazily,
|
||||||
// using any() results in only calling
|
// using any() results in only calling
|
||||||
// filterMap until the first index has been found.
|
// filterMap until the first index has been found.
|
||||||
val patchIndices = findPatchIndices(classDef, method)
|
if (findPatchIndices(classDef, method)?.any() == true) add(method)
|
||||||
|
|
||||||
if (patchIndices?.any() == true) {
|
|
||||||
add(method)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,9 +52,7 @@ abstract class AbstractTransformInstructionsPatch<T> : BytecodePatch() {
|
|||||||
val patchIndices = findPatchIndices(mutableClass, mutableMethod)?.toCollection(ArrayDeque())
|
val patchIndices = findPatchIndices(mutableClass, mutableMethod)?.toCollection(ArrayDeque())
|
||||||
?: return@methods
|
?: return@methods
|
||||||
|
|
||||||
while (!patchIndices.isEmpty()) {
|
while (!patchIndices.isEmpty()) transform(mutableMethod, patchIndices.removeLast())
|
||||||
transform(mutableMethod, patchIndices.removeLast())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.revanced.util.patch
|
package app.revanced.patches.all.misc.transformation
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
@@ -67,6 +67,7 @@ inline fun <reified E> fromMethodReference(methodReference: MethodReference)
|
|||||||
search.definedClassName == methodReference.definingClass
|
search.definedClassName == methodReference.definingClass
|
||||||
&& search.methodName == methodReference.name
|
&& search.methodName == methodReference.name
|
||||||
&& methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams)
|
&& methodReference.parameterTypes.toTypedArray().contentEquals(search.methodParams)
|
||||||
|
&& search.returnType == methodReference.returnType
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <reified E> filterMapInstruction35c(
|
inline fun <reified E> filterMapInstruction35c(
|
||||||
@@ -1,26 +1,27 @@
|
|||||||
package app.revanced.patches.all.screencapture.removerestriction.bytecode.patch
|
package app.revanced.patches.all.screencapture.removerestriction
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.all.screencapture.removerestriction.resource.patch.RemoveCaptureRestrictionResourcePatch
|
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||||
import app.revanced.util.patch.IMethodCall
|
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||||
import app.revanced.util.patch.Instruction35cInfo
|
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||||
import app.revanced.util.patch.filterMapInstruction35c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
|
||||||
@Patch(false)
|
@Patch(
|
||||||
@Name("Remove screen capture restriction")
|
name = "Remove screen capture restriction",
|
||||||
@Description("Removes the restriction of capturing audio from apps that normally wouldn't allow it.")
|
description = "Removes the restriction of capturing audio from apps that normally wouldn't allow it.",
|
||||||
@DependsOn([RemoveCaptureRestrictionResourcePatch::class])
|
dependencies = [RemoveCaptureRestrictionResourcePatch::class],
|
||||||
@RequiresIntegrations
|
use = false,
|
||||||
class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
requiresIntegrations = true
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
|
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
enum class MethodCall(
|
enum class MethodCall(
|
||||||
override val definedClassName: String,
|
override val definedClassName: String,
|
||||||
@@ -58,10 +59,4 @@ class RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruc
|
|||||||
val (methodType, instruction, instructionIndex) = entry
|
val (methodType, instruction, instructionIndex) = entry
|
||||||
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
private companion object {
|
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
|
||||||
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package app.revanced.patches.all.screencapture.removerestriction.resource.patch
|
package app.revanced.patches.all.screencapture.removerestriction
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
@Description("Sets allowAudioPlaybackCapture in manifest to true.")
|
@Patch(description = "Sets allowAudioPlaybackCapture in manifest to true.")
|
||||||
internal class RemoveCaptureRestrictionResourcePatch : ResourcePatch {
|
internal object RemoveCaptureRestrictionResourcePatch : ResourcePatch() {
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
// create an xml editor instance
|
// create an xml editor instance
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package app.revanced.patches.all.screenshot.removerestriction
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
|
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||||
|
import app.revanced.patches.all.misc.transformation.IMethodCall
|
||||||
|
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
||||||
|
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
||||||
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove screenshot restriction",
|
||||||
|
description = "Removes the restriction of taking screenshots in apps that normally wouldn't allow it.",
|
||||||
|
use = false,
|
||||||
|
requiresIntegrations = true,
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
|
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
||||||
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
super.execute(context)
|
||||||
|
ModifyLayoutParamsFlags().execute(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun filterMap(
|
||||||
|
classDef: ClassDef,
|
||||||
|
method: Method,
|
||||||
|
instruction: Instruction,
|
||||||
|
instructionIndex: Int
|
||||||
|
) = filterMapInstruction35c<MethodCall>(
|
||||||
|
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
||||||
|
classDef,
|
||||||
|
instruction,
|
||||||
|
instructionIndex
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
||||||
|
val (methodType, instruction, instructionIndex) = entry
|
||||||
|
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Information about method calls we want to replace
|
||||||
|
enum class MethodCall(
|
||||||
|
override val definedClassName: String,
|
||||||
|
override val methodName: String,
|
||||||
|
override val methodParams: Array<String>,
|
||||||
|
override val returnType: String
|
||||||
|
): IMethodCall {
|
||||||
|
AddFlags(
|
||||||
|
"Landroid/view/Window;",
|
||||||
|
"addFlags",
|
||||||
|
arrayOf("I"),
|
||||||
|
"V",
|
||||||
|
),
|
||||||
|
SetFlags(
|
||||||
|
"Landroid/view/Window;",
|
||||||
|
"setFlags",
|
||||||
|
arrayOf("I", "I"),
|
||||||
|
"V",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class ModifyLayoutParamsFlags : AbstractTransformInstructionsPatch<Pair<Instruction22c, Int>>() {
|
||||||
|
override fun filterMap(
|
||||||
|
classDef: ClassDef,
|
||||||
|
method: Method,
|
||||||
|
instruction: Instruction,
|
||||||
|
instructionIndex: Int
|
||||||
|
): Pair<Instruction22c, Int>? {
|
||||||
|
if (instruction.opcode != Opcode.IPUT) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
val instruction22c = instruction as Instruction22c
|
||||||
|
val fieldReference = instruction22c.reference as FieldReference
|
||||||
|
|
||||||
|
if (fieldReference.definingClass != "Landroid/view/WindowManager\$LayoutParams;"
|
||||||
|
|| fieldReference.name != "flags"
|
||||||
|
|| fieldReference.type != "I") {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
return Pair(instruction22c, instructionIndex)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun transform(mutableMethod: MutableMethod, entry: Pair<Instruction22c, Int>) {
|
||||||
|
val (instruction, index) = entry
|
||||||
|
val register = instruction.registerA
|
||||||
|
|
||||||
|
mutableMethod.addInstructions(
|
||||||
|
index,
|
||||||
|
"and-int/lit16 v$register, v$register, -0x2001"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
package app.revanced.patches.all.screenshot.removerestriction.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
|
||||||
import app.revanced.util.patch.IMethodCall
|
|
||||||
import app.revanced.util.patch.Instruction35cInfo
|
|
||||||
import app.revanced.util.patch.filterMapInstruction35c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|
||||||
|
|
||||||
@Patch(false)
|
|
||||||
@Name("Remove screenshot restriction")
|
|
||||||
@Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.")
|
|
||||||
@RequiresIntegrations
|
|
||||||
class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
|
||||||
|
|
||||||
private companion object {
|
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
|
||||||
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
|
||||||
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
|
||||||
}
|
|
||||||
|
|
||||||
// Information about method calls we want to replace
|
|
||||||
enum class MethodCall(
|
|
||||||
override val definedClassName: String,
|
|
||||||
override val methodName: String,
|
|
||||||
override val methodParams: Array<String>,
|
|
||||||
override val returnType: String
|
|
||||||
): IMethodCall {
|
|
||||||
SetFlags(
|
|
||||||
"Landroid/view/Window;",
|
|
||||||
"setFlags",
|
|
||||||
arrayOf("I", "I"),
|
|
||||||
"V",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun filterMap(
|
|
||||||
classDef: ClassDef,
|
|
||||||
method: Method,
|
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
) = filterMapInstruction35c<MethodCall>(
|
|
||||||
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
|
||||||
classDef,
|
|
||||||
instruction,
|
|
||||||
instructionIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
|
||||||
val (methodType, instruction, instructionIndex) = entry
|
|
||||||
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package app.revanced.patches.all.telephony.sim.spoof
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patcher.patch.options.PatchOption
|
||||||
|
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||||
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
|
import app.revanced.patches.all.misc.transformation.AbstractTransformInstructionsPatch
|
||||||
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
import com.android.tools.smali.dexlib2.immutable.reference.ImmutableMethodReference
|
||||||
|
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Spoof SIM country",
|
||||||
|
description = "Spoofs country information returned by the SIM card provider.",
|
||||||
|
use = false,
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object SpoofSimCountryPatch : AbstractTransformInstructionsPatch<Pair<Int, String>>() {
|
||||||
|
private val isoValidator: PatchOption<String>.(String?) -> Boolean =
|
||||||
|
{ it: String? -> it?.uppercase() in Locale.getISOCountries() || it == null }
|
||||||
|
|
||||||
|
private val networkCountryIso by stringPatchOption(
|
||||||
|
"networkCountryIso",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"Network ISO Country Code",
|
||||||
|
"ISO-3166-1 alpha-2 country code equivalent of the MCC (Mobile Country Code) " +
|
||||||
|
"of the current registered operator or the cell nearby.",
|
||||||
|
validator = isoValidator
|
||||||
|
)
|
||||||
|
|
||||||
|
private val simCountryIso by stringPatchOption(
|
||||||
|
"simCountryIso",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"Sim ISO Country Code",
|
||||||
|
"ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code.",
|
||||||
|
validator = isoValidator
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun filterMap(
|
||||||
|
classDef: ClassDef,
|
||||||
|
method: Method,
|
||||||
|
instruction: Instruction,
|
||||||
|
instructionIndex: Int
|
||||||
|
): Pair<Int, String>? {
|
||||||
|
if (instruction !is ReferenceInstruction) return null
|
||||||
|
|
||||||
|
val reference = instruction.reference as? MethodReference ?: return null
|
||||||
|
|
||||||
|
val match = MethodCall.entries.firstOrNull { search ->
|
||||||
|
MethodUtil.methodSignaturesMatch(reference, search.reference)
|
||||||
|
} ?: return null
|
||||||
|
|
||||||
|
val iso = when (match) {
|
||||||
|
MethodCall.NetworkCountryIso -> networkCountryIso
|
||||||
|
MethodCall.SimCountryIso -> simCountryIso
|
||||||
|
}?.lowercase()
|
||||||
|
|
||||||
|
return iso?.let { instructionIndex to it }
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun transform(
|
||||||
|
mutableMethod: MutableMethod,
|
||||||
|
entry: Pair<Int, String>
|
||||||
|
) = transformMethodCall(entry, mutableMethod)
|
||||||
|
|
||||||
|
private fun transformMethodCall(
|
||||||
|
entry: Pair<Int, String>,
|
||||||
|
mutableMethod: MutableMethod
|
||||||
|
) {
|
||||||
|
val (instructionIndex, methodCallValue) = entry
|
||||||
|
|
||||||
|
val register = mutableMethod.getInstruction<OneRegisterInstruction>(instructionIndex + 1).registerA
|
||||||
|
|
||||||
|
mutableMethod.replaceInstruction(
|
||||||
|
instructionIndex + 1,
|
||||||
|
"const-string v$register, \"$methodCallValue\""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum class MethodCall(
|
||||||
|
val reference: MethodReference
|
||||||
|
) {
|
||||||
|
NetworkCountryIso(
|
||||||
|
ImmutableMethodReference(
|
||||||
|
"Landroid/telephony/TelephonyManager;",
|
||||||
|
"getNetworkCountryIso",
|
||||||
|
emptyList(),
|
||||||
|
"Ljava/lang/String;"
|
||||||
|
)
|
||||||
|
),
|
||||||
|
SimCountryIso(
|
||||||
|
ImmutableMethodReference(
|
||||||
|
"Landroid/telephony/TelephonyManager;",
|
||||||
|
"getSimCountryIso",
|
||||||
|
emptyList(),
|
||||||
|
"Ljava/lang/String;"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +1,22 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro.patch
|
package app.revanced.patches.backdrops.misc.pro
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Pro unlock")
|
name = "Pro unlock",
|
||||||
@Description("Unlocks pro-only functions.")
|
compatiblePackages = [CompatiblePackage("com.backdrops.wallpapers", ["4.52"])]
|
||||||
@ProUnlockCompatibility
|
)
|
||||||
class ProUnlockPatch : BytecodePatch(
|
@Suppress("unused")
|
||||||
listOf(ProUnlockFingerprint)
|
object ProUnlockPatch : BytecodePatch(
|
||||||
|
setOf(ProUnlockFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
ProUnlockFingerprint.result?.let { result ->
|
ProUnlockFingerprint.result?.let { result ->
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
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", arrayOf("4.52"))])
|
|
||||||
internal annotation class ProUnlockCompatibility
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ProUnlockFingerprint : MethodFingerprint(
|
internal object ProUnlockFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
package app.revanced.patches.candylinkvpn.patch
|
package app.revanced.patches.candylinkvpn
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.candylinkvpn.annotations.UnlockProCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
|
import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Unlock pro")
|
name = "Unlock pro",
|
||||||
@Description("Unlocks premium features.")
|
compatiblePackages = [CompatiblePackage("com.candylink.openvpn")]
|
||||||
@UnlockProCompatibility
|
)
|
||||||
class UnlockProPatch : BytecodePatch(
|
@Suppress("unused")
|
||||||
listOf(IsPremiumPurchasedFingerprint)
|
object UnlockProPatch : BytecodePatch(
|
||||||
|
setOf(IsPremiumPurchasedFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
|
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.candylinkvpn.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.candylink.openvpn")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class UnlockProCompatibility
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.candylinkvpn.fingerprints
|
package app.revanced.patches.candylinkvpn.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
internal object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("PreferenceProvider;") &&
|
methodDef.definingClass.endsWith("PreferenceProvider;") &&
|
||||||
methodDef.name == "isPremiumPurchased"
|
methodDef.name == "isPremiumPurchased"
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package app.revanced.patches.cieid.restrictions.root
|
||||||
|
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.cieid.restrictions.root.fingerprints.CheckRootFingerprint
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Bypass root checks",
|
||||||
|
description = "Removes the restriction to use the app with root permissions or on a custom ROM.",
|
||||||
|
compatiblePackages = [CompatiblePackage("it.ipzs.cieid")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object BypassRootChecksPatch : BytecodePatch(
|
||||||
|
setOf(CheckRootFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
CheckRootFingerprint.result?.mutableMethod?.addInstruction(1, "return-void")
|
||||||
|
?: throw CheckRootFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.cieid.restrictions.root.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
|
internal object CheckRootFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.definingClass == "Lit/ipzs/cieid/BaseActivity;" && methodDef.name == "onResume"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object IsUserSuperMethodFingerprint : MethodFingerprint(
|
|
||||||
returnType = "Ljava/lang/Object",
|
|
||||||
parameters = listOf("Ljava/lang/Object"),
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
strings = listOf("user"),
|
|
||||||
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
|
||||||
)
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object UserSerializationMethodFingerprint : MethodFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
|
||||||
strings = listOf(
|
|
||||||
"betaStatus",
|
|
||||||
"coachOutfit",
|
|
||||||
"globalAmbassadorStatus",
|
|
||||||
),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.MOVE_FROM16,
|
|
||||||
Opcode.IPUT_BOOLEAN,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchException
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.duolingo.unlocksuper.fingerprints.IsUserSuperMethodFingerprint
|
|
||||||
import app.revanced.patches.duolingo.unlocksuper.fingerprints.UserSerializationMethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Unlock Duolingo Super")
|
|
||||||
@Description("Unlocks Duolingo Super features.")
|
|
||||||
@Compatibility([Package("com.duolingo")])
|
|
||||||
class UnlockDuolingoSuperPatch : BytecodePatch(
|
|
||||||
listOf(UserSerializationMethodFingerprint, IsUserSuperMethodFingerprint)
|
|
||||||
) {
|
|
||||||
|
|
||||||
/* First find the reference to the isUserSuper field, then patch the instruction that assigns it to false.
|
|
||||||
* This strategy is used because the method that sets the isUserSuper field is difficult to fingerprint reliably.
|
|
||||||
*/
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
// Find the reference to the isUserSuper field.
|
|
||||||
val isUserSuperReference = IsUserSuperMethodFingerprint
|
|
||||||
.result
|
|
||||||
?.mutableMethod
|
|
||||||
?.getInstructions()
|
|
||||||
?.filterIsInstance<BuilderInstruction22c>()
|
|
||||||
?.firstOrNull { it.opcode == Opcode.IGET_BOOLEAN }
|
|
||||||
?.reference
|
|
||||||
?: throw IsUserSuperMethodFingerprint.exception
|
|
||||||
|
|
||||||
// Patch the instruction that assigns isUserSuper to true.
|
|
||||||
UserSerializationMethodFingerprint
|
|
||||||
.result
|
|
||||||
?.mutableMethod
|
|
||||||
?.apply {
|
|
||||||
replaceInstructions(
|
|
||||||
indexOfReference(isUserSuperReference) - 1,
|
|
||||||
"const/4 v2, 0x1"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
?: throw UserSerializationMethodFingerprint.exception
|
|
||||||
}
|
|
||||||
|
|
||||||
private companion object {
|
|
||||||
private fun MutableMethod.indexOfReference(reference: Reference) = getInstructions()
|
|
||||||
.filterIsInstance<BuilderInstruction22c>()
|
|
||||||
.filter { it.opcode == Opcode.IPUT_BOOLEAN }.indexOfFirst { it.reference == reference }.let {
|
|
||||||
if (it == -1) throw PatchException("Could not find index of instruction with supplied reference.")
|
|
||||||
else it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package app.revanced.patches.facebook.ads.story
|
||||||
|
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.facebook.ads.story.fingerprints.AdsInsertionFingerprint
|
||||||
|
import app.revanced.patches.facebook.ads.story.fingerprints.FetchMoreAdsFingerprint
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Hide story ads",
|
||||||
|
description = "Hides the ads in the Facebook app stories.",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.facebook.katana")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object HideStoryAdsPatch : BytecodePatch(
|
||||||
|
setOf(FetchMoreAdsFingerprint, AdsInsertionFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) =
|
||||||
|
setOf(FetchMoreAdsFingerprint, AdsInsertionFingerprint).forEach { fingerprint ->
|
||||||
|
fingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void")
|
||||||
|
?: throw fingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package app.revanced.patches.facebook.ads.story.fingerprints
|
||||||
|
|
||||||
|
internal object AdsInsertionFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptAdsInsertion\$1")
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package app.revanced.patches.facebook.ads.story.fingerprints
|
||||||
|
|
||||||
|
internal object FetchMoreAdsFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptFetchMoreAds\$1")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package app.revanced.patches.facebook.ads.story.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.iface.value.StringEncodedValue
|
||||||
|
|
||||||
|
internal abstract class FieldMethodFingerprint(fieldValue: String) : MethodFingerprint(
|
||||||
|
returnType = "V",
|
||||||
|
parameters = listOf(),
|
||||||
|
customFingerprint = { methodDef, classDef ->
|
||||||
|
methodDef.name == "run" && classDef.fields.any any@{ field ->
|
||||||
|
if (field.name != "__redex_internal_original_name") return@any false
|
||||||
|
(field.initialValue as? StringEncodedValue)?.value == fieldValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.patch
|
package app.revanced.patches.finanzonline.detection.bootloader
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
|
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
|
||||||
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint
|
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint
|
||||||
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
|
|
||||||
|
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Remove bootloader detection")
|
name = "Remove bootloader detection",
|
||||||
@Description("Removes the check for an unlocked bootloader.")
|
description = "Removes the check for an unlocked bootloader.",
|
||||||
@DetectionCompatibility
|
compatiblePackages = [CompatiblePackage("at.gv.bmf.bmf2go")]
|
||||||
class BootloaderDetectionPatch : BytecodePatch(
|
)
|
||||||
listOf(CreateKeyFingerprint, BootStateFingerprint)
|
@Suppress("unused")
|
||||||
|
object BootloaderDetectionPatch : BytecodePatch(
|
||||||
|
setOf(CreateKeyFingerprint, BootStateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint ->
|
arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint ->
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
||||||
object BootStateFingerprint : MethodFingerprint(
|
internal object BootStateFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
||||||
object CreateKeyFingerprint : MethodFingerprint(
|
internal object CreateKeyFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
|
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.root.patch
|
package app.revanced.patches.finanzonline.detection.root
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint
|
import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
|
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Remove root detection")
|
name = "Remove root detection",
|
||||||
@Description("Removes the check for root permissions.")
|
description = "Removes the check for root permissions.",
|
||||||
@DetectionCompatibility
|
compatiblePackages = [CompatiblePackage("at.gv.bmf.bmf2go")]
|
||||||
class RootDetectionPatch : BytecodePatch(
|
)
|
||||||
listOf(RootDetectionFingerprint)
|
@Suppress("unused")
|
||||||
|
object RootDetectionPatch : BytecodePatch(
|
||||||
|
setOf(RootDetectionFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
RootDetectionFingerprint.result?.mutableMethod?.addInstructions(
|
RootDetectionFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.root.fingerprints
|
package app.revanced.patches.finanzonline.detection.root.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
internal object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.shared.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("at.gv.bmf.bmf2go")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class DetectionCompatibility
|
|
||||||
@@ -1,25 +1,24 @@
|
|||||||
package app.revanced.patches.googlerecorder.restrictions.patch
|
package app.revanced.patches.googlerecorder.restrictions
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint
|
import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Remove device restrictions")
|
name = "Remove device restrictions",
|
||||||
@Description("Removes restrictions from using the app on any device.")
|
description = "Removes restrictions from using the app on any device. Requires mounting patched app over original.",
|
||||||
@Compatibility([Package("com.google.android.apps.recorder")])
|
compatiblePackages = [CompatiblePackage("com.google.android.apps.recorder")]
|
||||||
class RemoveDeviceRestrictions : BytecodePatch(
|
)
|
||||||
listOf(OnApplicationCreateFingerprint)
|
@Suppress("unused")
|
||||||
|
object RemoveDeviceRestrictions : BytecodePatch(
|
||||||
|
setOf(OnApplicationCreateFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
OnApplicationCreateFingerprint.result?.let {
|
OnApplicationCreateFingerprint.result?.let {
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.googlerecorder.restrictions.fingerprints
|
package app.revanced.patches.googlerecorder.restrictions.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object OnApplicationCreateFingerprint : MethodFingerprint(
|
internal object OnApplicationCreateFingerprint : MethodFingerprint(
|
||||||
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
||||||
customFingerprint = custom@{ methodDef, classDef ->
|
customFingerprint = custom@{ methodDef, classDef ->
|
||||||
if (methodDef.name != "onCreate") return@custom false
|
if (methodDef.name != "onCreate") return@custom false
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package app.revanced.patches.hexeditor.ad
|
||||||
|
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Disable ads",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.myprog.hexedit")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object DisableAdsPatch : BytecodePatch(
|
||||||
|
setOf(PrimaryAdsFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) = PrimaryAdsFingerprint.result?.mutableMethod?.replaceInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
) ?: throw PrimaryAdsFingerprint.exception
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package app.revanced.patches.hexeditor.ad.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility(
|
|
||||||
[
|
|
||||||
Package("com.myprog.hexedit")
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class HexEditorAdsCompatibility
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.hexeditor.ad.fingerprints
|
package app.revanced.patches.hexeditor.ad.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object PrimaryAdsFingerprint : MethodFingerprint(
|
internal object PrimaryAdsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
package app.revanced.patches.hexeditor.ad.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility
|
|
||||||
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Disable ads")
|
|
||||||
@Description("Disables ads in HexEditor.")
|
|
||||||
@HexEditorAdsCompatibility
|
|
||||||
class HexEditorAdsPatch : BytecodePatch(
|
|
||||||
listOf(
|
|
||||||
PrimaryAdsFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
val method = PrimaryAdsFingerprint.result!!.mutableMethod
|
|
||||||
|
|
||||||
method.replaceInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,19 @@
|
|||||||
package app.revanced.patches.iconpackstudio.misc.pro.patch
|
package app.revanced.patches.iconpackstudio.misc.pro
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Unlock pro")
|
name = "Unlock pro",
|
||||||
@Description("Unlocks all pro features.")
|
compatiblePackages = [CompatiblePackage("ginlemon.iconpackstudio")]
|
||||||
@UnlockProCompatibility
|
)
|
||||||
class UnlockProPatch : BytecodePatch(
|
@Suppress("unused")
|
||||||
listOf(
|
object UnlockProPatch : BytecodePatch(
|
||||||
CheckProFingerprint
|
setOf(CheckProFingerprint)
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = CheckProFingerprint.result!!.mutableMethod
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.iconpackstudio.misc.pro.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("ginlemon.iconpackstudio")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class UnlockProCompatibility
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
|
package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object CheckProFingerprint : MethodFingerprint(
|
internal object CheckProFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.root
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.idaustria.detection.root.fingerprints.AttestationSupportedCheckFingerprint
|
||||||
|
import app.revanced.patches.idaustria.detection.root.fingerprints.BootloaderCheckFingerprint
|
||||||
|
import app.revanced.patches.idaustria.detection.root.fingerprints.RootCheckFingerprint
|
||||||
|
import app.revanced.util.returnEarly
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Remove root detection",
|
||||||
|
description = "Removes the check for root permissions and unlocked bootloader.",
|
||||||
|
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object RootDetectionPatch : BytecodePatch(
|
||||||
|
setOf(AttestationSupportedCheckFingerprint, BootloaderCheckFingerprint, RootCheckFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) = listOf(
|
||||||
|
AttestationSupportedCheckFingerprint,
|
||||||
|
BootloaderCheckFingerprint,
|
||||||
|
RootCheckFingerprint
|
||||||
|
).returnEarly(true)
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
internal object AttestationSupportedCheckFingerprint : MethodFingerprint(
|
||||||
|
"V",
|
||||||
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.name == "attestationSupportCheck" &&
|
||||||
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
internal object BootloaderCheckFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.name == "bootloaderCheck" &&
|
||||||
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root.fingerprints
|
package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
internal object RootCheckFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
|
methodDef.name == "rootCheck" &&
|
||||||
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root.patch
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint
|
|
||||||
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Remove root detection")
|
|
||||||
@Description("Removes the check for root permissions and unlocked bootloader.")
|
|
||||||
@DetectionCompatibility
|
|
||||||
class RootDetectionPatch : BytecodePatch(
|
|
||||||
listOf(RootDetectionFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) =
|
|
||||||
RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.idaustria.detection.shared.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("at.gv.oe.app")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class DetectionCompatibility
|
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
package app.revanced.patches.idaustria.detection.signature.patch
|
package app.revanced.patches.idaustria.detection.signature
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Spoof signature")
|
name = "Spoof signature",
|
||||||
@Description("Spoofs the signature of the app.")
|
description = "Spoofs the signature of the app.",
|
||||||
@DetectionCompatibility
|
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
|
||||||
class SpoofSignaturePatch : BytecodePatch(
|
)
|
||||||
listOf(SpoofSignatureFingerprint)
|
@Suppress("unused")
|
||||||
|
object SpoofSignaturePatch : BytecodePatch(
|
||||||
|
setOf(SpoofSignatureFingerprint)
|
||||||
) {
|
) {
|
||||||
companion object {
|
private const val EXPECTED_SIGNATURE =
|
||||||
const val EXPECTED_SIGNATURE = "OpenSSLRSAPublicKey{modulus=ac3e6fd6050aa7e0d6010ae58190404cd89a56935b44f6fee" +
|
"OpenSSLRSAPublicKey{modulus=ac3e6fd6050aa7e0d6010ae58190404cd89a56935b44f6fee" +
|
||||||
"067c149768320026e10b24799a1339e414605e448e3f264444a327b9ae292be2b62ad567dd1800dbed4a88f718a33dc6db6b" +
|
"067c149768320026e10b24799a1339e414605e448e3f264444a327b9ae292be2b62ad567dd1800dbed4a88f718a33dc6db6b" +
|
||||||
"f5178aa41aa0efff8a3409f5ca95dbfccd92c7b4298966df806ea7a0204a00f0e745f6d9f13bdf24f3df715d7b62c1600906" +
|
"f5178aa41aa0efff8a3409f5ca95dbfccd92c7b4298966df806ea7a0204a00f0e745f6d9f13bdf24f3df715d7b62c1600906" +
|
||||||
"15de1c8a956b9286764985a3b3c060963c435fb9481a5543aaf0671fc2dba6c5c2b17d1ef1d85137f14dc9bbdf3490288087" +
|
"15de1c8a956b9286764985a3b3c060963c435fb9481a5543aaf0671fc2dba6c5c2b17d1ef1d85137f14dc9bbdf3490288087" +
|
||||||
@@ -28,7 +28,6 @@ class SpoofSignaturePatch : BytecodePatch(
|
|||||||
"0def55be2c1f6f9c72c92fb45d7e0a9ac571cb38f0a9a37bb33ea06f223fde8c7a92e8c47769e386f9799776e8f110c21df2" +
|
"0def55be2c1f6f9c72c92fb45d7e0a9ac571cb38f0a9a37bb33ea06f223fde8c7a92e8c47769e386f9799776e8f110c21df2" +
|
||||||
"77ef1be61b2c01ebdabddcbf53cc4b6fd9a3c445606ee77b3758162c80ad8f8137b3c6864e92db904807dcb2be9d7717dd21" +
|
"77ef1be61b2c01ebdabddcbf53cc4b6fd9a3c445606ee77b3758162c80ad8f8137b3c6864e92db904807dcb2be9d7717dd21" +
|
||||||
"bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}"
|
"bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}"
|
||||||
}
|
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions(
|
SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package app.revanced.patches.idaustria.detection.signature.fingerprints
|
package app.revanced.patches.idaustria.detection.signature.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object SpoofSignatureFingerprint : MethodFingerprint(
|
internal object SpoofSignatureFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
accessFlags = AccessFlags.PRIVATE.value,
|
accessFlags = AccessFlags.PRIVATE.value,
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
package app.revanced.patches.inshorts.ad.patch
|
package app.revanced.patches.inshorts.ad
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide ads")
|
name = "Hide ads",
|
||||||
@Description("Removes ads from Inshorts.")
|
compatiblePackages = [CompatiblePackage("com.nis.app")]
|
||||||
@HideAdsCompatibility
|
)
|
||||||
class HideAdsPatch : BytecodePatch(
|
@Suppress("unused")
|
||||||
listOf(InshortsAdsFingerprint)
|
object HideAdsPatch : BytecodePatch(
|
||||||
|
setOf(InshortsAdsFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
InshortsAdsFingerprint.result?.let { result ->
|
InshortsAdsFingerprint.result?.let { result ->
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package app.revanced.patches.inshorts.ad.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.nis.app")])
|
|
||||||
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class HideAdsCompatibility
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.inshorts.ad.fingerprints
|
package app.revanced.patches.inshorts.ad.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object InshortsAdsFingerprint : MethodFingerprint(
|
internal object InshortsAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
strings = listOf("GoogleAdLoader","exception in requestAd"),
|
strings = listOf("GoogleAdLoader","exception in requestAd"),
|
||||||
)
|
)
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.patch
|
package app.revanced.patches.instagram.patches.ads.timeline
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.*
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ShowAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ShowAdFingerprint
|
||||||
@@ -19,12 +18,14 @@ import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.Shop
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Hide timeline ads")
|
name = "Hide timeline ads",
|
||||||
@Description("Removes ads from the timeline.")
|
description = "Removes ads from the timeline.",
|
||||||
@Compatibility([Package("com.instagram.android", arrayOf("275.0.0.27.98"))])
|
compatiblePackages = [CompatiblePackage("com.instagram.android", ["275.0.0.27.98"])]
|
||||||
class HideTimelineAdsPatch : BytecodePatch(
|
)
|
||||||
listOf(
|
@Suppress("unused")
|
||||||
|
object HideTimelineAdsPatch : BytecodePatch(
|
||||||
|
setOf(
|
||||||
ShowAdFingerprint,
|
ShowAdFingerprint,
|
||||||
MediaFingerprint,
|
MediaFingerprint,
|
||||||
PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes.
|
PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes.
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
object MediaFingerprint : MethodFingerprint(
|
internal object MediaFingerprint : MethodFingerprint(
|
||||||
strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata")
|
strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
package app.revanced.patches.instagram.patches.ads.timeline.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.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ShowAdFingerprint : MethodFingerprint(
|
internal object ShowAdFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
listOf("L", "L", "Z", "Z"),
|
listOf("L", "L", "Z", "Z"),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
|||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
internal object GenericMediaAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_INTERFACE,
|
Opcode.INVOKE_INTERFACE,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
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.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
|
||||||
abstract class MediaAdFingerprint(
|
internal abstract class MediaAdFingerprint(
|
||||||
returnType: String? = "Z",
|
returnType: String? = "Z",
|
||||||
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters: Iterable<String>? = listOf(),
|
parameters: Iterable<String>? = listOf(),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
internal object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
||||||
"V",
|
"V",
|
||||||
null,
|
null,
|
||||||
listOf("L", "L"),
|
listOf("L", "L"),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
|||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object ShoppingAdFingerprint : MediaAdFingerprint(
|
internal object ShoppingAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IF_EQZ,
|
Opcode.IF_EQZ,
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
package app.revanced.patches.irplus.ad.patch
|
package app.revanced.patches.irplus.ad
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
import app.revanced.patches.irplus.ad.annotations.IrplusAdsCompatibility
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
||||||
|
|
||||||
|
|
||||||
@Patch
|
@Patch(
|
||||||
@Name("Remove ads")
|
name = "Remove ads",
|
||||||
@Description("Removes all ads from the app.")
|
compatiblePackages = [CompatiblePackage("net.binarymode.android.irplus")]
|
||||||
@IrplusAdsCompatibility
|
)
|
||||||
class IrplusAdsPatch : BytecodePatch(
|
@Suppress("unused")
|
||||||
listOf(IrplusAdsFingerprint)
|
object RemoveAdsPatch : BytecodePatch(
|
||||||
|
setOf(IrplusAdsFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.irplus.ad.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("net.binarymode.android.irplus")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class IrplusAdsCompatibility
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package app.revanced.patches.irplus.ad.fingerprints
|
package app.revanced.patches.irplus.ad.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.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IrplusAdsFingerprint : MethodFingerprint(
|
internal object IrplusAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
listOf("L", "Z"),
|
listOf("L", "Z"),
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.login
|
||||||
|
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.lightroom.misc.login.fingerprints.IsLoggedInFingerprint
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Disable mandatory login",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.adobe.lrmobile")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object DisableMandatoryLoginPatch : BytecodePatch(
|
||||||
|
setOf(IsLoggedInFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
IsLoggedInFingerprint.result?.mutableMethod?.apply {
|
||||||
|
val index = implementation!!.instructions.lastIndex - 1
|
||||||
|
// Set isLoggedIn = true.
|
||||||
|
replaceInstruction(index, "const/4 v0, 0x1")
|
||||||
|
} ?: throw IsLoggedInFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.login.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.adobe.lrmobile",)])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class DisableMandatoryLoginCompatibility
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.lightroom.misc.login.fingerprint
|
package app.revanced.patches.lightroom.misc.login.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.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object IsLoggedInFingerprint : MethodFingerprint(
|
internal object IsLoggedInFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.login.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.lightroom.misc.login.annotations.DisableMandatoryLoginCompatibility
|
|
||||||
import app.revanced.patches.lightroom.misc.login.fingerprint.IsLoggedInFingerprint
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Disable mandatory login")
|
|
||||||
@DisableMandatoryLoginCompatibility
|
|
||||||
class DisableMandatoryLoginPatch : BytecodePatch(listOf(IsLoggedInFingerprint)) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
IsLoggedInFingerprint.result?.mutableMethod?.apply {
|
|
||||||
val index = implementation!!.instructions.lastIndex - 1
|
|
||||||
// Set isLoggedIn = true.
|
|
||||||
replaceInstruction(index, "const/4 v0, 0x1")
|
|
||||||
} ?: throw IsLoggedInFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package app.revanced.patches.lightroom.misc.premium
|
||||||
|
|
||||||
|
import app.revanced.util.exception
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
||||||
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.lightroom.misc.premium.fingerprints.HasPurchasedFingerprint
|
||||||
|
|
||||||
|
@Patch(
|
||||||
|
name = "Unlock premium",
|
||||||
|
compatiblePackages = [CompatiblePackage("com.adobe.lrmobile")]
|
||||||
|
)
|
||||||
|
@Suppress("unused")
|
||||||
|
object UnlockPremiumPatch : BytecodePatch(
|
||||||
|
setOf(HasPurchasedFingerprint)
|
||||||
|
){
|
||||||
|
override fun execute(context: BytecodeContext) {
|
||||||
|
// Set hasPremium = true.
|
||||||
|
HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1")
|
||||||
|
?: throw HasPurchasedFingerprint.exception
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.premium.annotations
|
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Compatibility
|
|
||||||
import app.revanced.patcher.annotation.Package
|
|
||||||
|
|
||||||
@Compatibility([Package("com.adobe.lrmobile")])
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
|
||||||
internal annotation class UnlockPremiumCompatibility
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package app.revanced.patches.lightroom.misc.premium.fingerprint
|
package app.revanced.patches.lightroom.misc.premium.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object HasPurchasedFingerprint : MethodFingerprint(
|
internal object HasPurchasedFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.premium.patch
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patches.lightroom.misc.premium.annotations.UnlockPremiumCompatibility
|
|
||||||
import app.revanced.patches.lightroom.misc.premium.fingerprint.HasPurchasedFingerprint
|
|
||||||
|
|
||||||
@Patch
|
|
||||||
@Name("Unlock premium")
|
|
||||||
@Description("Unlocks premium features.")
|
|
||||||
@UnlockPremiumCompatibility
|
|
||||||
class UnlockPremiumPatch : BytecodePatch(listOf(HasPurchasedFingerprint)) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
// Set hasPremium = true.
|
|
||||||
HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1")
|
|
||||||
?: throw HasPurchasedFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
package app.revanced.patches.memegenerator.detection.license.patch
|
package app.revanced.patches.memegenerator.detection.license
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.util.exception
|
||||||
import app.revanced.patcher.annotation.Description
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patches.memegenerator.detection.license.fingerprint.LicenseValidationFingerprint
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
|
import app.revanced.patches.memegenerator.detection.license.fingerprints.LicenseValidationFingerprint
|
||||||
|
|
||||||
@Description("Disables Firebase license validation.")
|
@Patch(description = "Disables Firebase license validation.")
|
||||||
class LicenseValidationPatch : BytecodePatch(
|
object LicenseValidationPatch : BytecodePatch(
|
||||||
listOf(LicenseValidationFingerprint)
|
setOf(LicenseValidationFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
LicenseValidationFingerprint.result?.apply {
|
LicenseValidationFingerprint.result?.apply {
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user