mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-07 18:03:55 +01:00
Compare commits
477 Commits
v5.0.2-dev
...
v2.140.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
715d34400e | ||
|
|
cbfa7ce531 | ||
|
|
376053ea62 | ||
|
|
1d166b14d2 | ||
|
|
3dd0640a56 | ||
|
|
2686deeefe | ||
|
|
126a13269e | ||
|
|
60be0670df | ||
|
|
9a7e36cc26 | ||
|
|
67c7ece771 | ||
|
|
79130468bd | ||
|
|
1510365ae7 | ||
|
|
4289a49176 | ||
|
|
81634fa36b | ||
|
|
e5cb571bb8 | ||
|
|
35e8832af3 | ||
|
|
23bf905055 | ||
|
|
2e3d004027 | ||
|
|
cf33d30353 | ||
|
|
791dcb5c4a | ||
|
|
19546fb745 | ||
|
|
e0bf8fb403 | ||
|
|
f7644ae7d2 | ||
|
|
0965bb82f4 | ||
|
|
9c2e30d8d8 | ||
|
|
3a9078b1d8 | ||
|
|
4f757acaff | ||
|
|
041fb72603 | ||
|
|
af84aeb3d0 | ||
|
|
4da1d53e81 | ||
|
|
cb9786c4de | ||
|
|
9d9d938129 | ||
|
|
403e887503 | ||
|
|
401ebd073b | ||
|
|
69590fdf00 | ||
|
|
18f1222dae | ||
|
|
5451a52374 | ||
|
|
85e337c6ee | ||
|
|
37e9df2c7d | ||
|
|
e5e33f2323 | ||
|
|
a882d59235 | ||
|
|
02bb641469 | ||
|
|
54310c8114 | ||
|
|
632a083363 | ||
|
|
2e278d4f91 | ||
|
|
4f7911a190 | ||
|
|
920e72a9d6 | ||
|
|
059d2a9cbb | ||
|
|
2e72e15fb1 | ||
|
|
285169e27e | ||
|
|
aaa5bbf5d9 | ||
|
|
b3796d6551 | ||
|
|
801effdeb1 | ||
|
|
7a07f579ed | ||
|
|
e6e8f5d284 | ||
|
|
537c709965 | ||
|
|
20a7edff72 | ||
|
|
746c8242a6 | ||
|
|
526b312ae5 | ||
|
|
f736cfbc59 | ||
|
|
10329c24e6 | ||
|
|
8487688816 | ||
|
|
aafd89f1be | ||
|
|
7f9fb09fac | ||
|
|
0bfa4a7957 | ||
|
|
5988f6360b | ||
|
|
0973e74ec5 | ||
|
|
8196f26c54 | ||
|
|
91fa3bb306 | ||
|
|
5836d18dcf | ||
|
|
ded80febd4 | ||
|
|
1a822a5962 | ||
|
|
5ee123f0af | ||
|
|
ee6534c4b9 | ||
|
|
2f8b9110f6 | ||
|
|
efaf394d5b | ||
|
|
d65f44dbd2 | ||
|
|
df5646d1c3 | ||
|
|
879f9c5a61 | ||
|
|
557e270b39 | ||
|
|
e3ed9b44b8 | ||
|
|
5a904ce9be | ||
|
|
b7f4380ec1 | ||
|
|
bfda80c6ec | ||
|
|
b099d8b60b | ||
|
|
34045ea018 | ||
|
|
e9d5a5e0c7 | ||
|
|
ee966d88a2 | ||
|
|
e05dd024a2 | ||
|
|
a2717d1fa7 | ||
|
|
160cd3aa6e | ||
|
|
58f98a2b31 | ||
|
|
ec2419b047 | ||
|
|
79e6fcb8d5 | ||
|
|
ed70e8accc | ||
|
|
974a042e76 | ||
|
|
ebfac83aad | ||
|
|
b315b6f1c5 | ||
|
|
478ef397a1 | ||
|
|
8909a06bdf | ||
|
|
1381c3b3f2 | ||
|
|
5e28da188b | ||
|
|
e1c7d7a335 | ||
|
|
c0123af0b3 | ||
|
|
f4188fa996 | ||
|
|
3f2383c9e6 | ||
|
|
7caebd54f2 | ||
|
|
4a96d58415 | ||
|
|
5b161e4263 | ||
|
|
96d27675a7 | ||
|
|
a48af3c320 | ||
|
|
d64673ce03 | ||
|
|
33b7ec8709 | ||
|
|
e29803fd8a | ||
|
|
bfcf7a6dc4 | ||
|
|
b8b9ab6ef5 | ||
|
|
9c3d48c0ab | ||
|
|
c9564ee9aa | ||
|
|
1e0037e044 | ||
|
|
9fa40d8a57 | ||
|
|
fb9e091634 | ||
|
|
4fad9bc1cd | ||
|
|
a586d1c658 | ||
|
|
0849006601 | ||
|
|
a7eda355cd | ||
|
|
2612f55476 | ||
|
|
12b7308d60 | ||
|
|
2f626a34df | ||
|
|
82b33ff47f | ||
|
|
2e06b8d83f | ||
|
|
e85e6746c0 | ||
|
|
f72fd91082 | ||
|
|
816d8fed87 | ||
|
|
8beb6c4250 | ||
|
|
b40787f0c3 | ||
|
|
125fdfd7aa | ||
|
|
38eceb743f | ||
|
|
b5cb30c28a | ||
|
|
47fdda85ce | ||
|
|
bd5c64dbd7 | ||
|
|
e20e8896a2 | ||
|
|
3394b022c1 | ||
|
|
1866e1daa2 | ||
|
|
a30085fc56 | ||
|
|
303732ecfa | ||
|
|
534014094f | ||
|
|
cdc7086796 | ||
|
|
a2a3a887bb | ||
|
|
66f8061dfc | ||
|
|
f10d32f141 | ||
|
|
c2e5bd3139 | ||
|
|
8966b91f01 | ||
|
|
393f5105fb | ||
|
|
5a56fa11ac | ||
|
|
74da7c078b | ||
|
|
4d305b19c9 | ||
|
|
1d5fb1bfec | ||
|
|
8285b37b8d | ||
|
|
40cc03c3b9 | ||
|
|
56642b3b15 | ||
|
|
42c291160b | ||
|
|
f838ebbe8f | ||
|
|
df843686ce | ||
|
|
6887f92823 | ||
|
|
cbce50cef3 | ||
|
|
e77184730d | ||
|
|
2004d7951e | ||
|
|
7ab3c999a9 | ||
|
|
b9e875ce0d | ||
|
|
e9279c0921 | ||
|
|
03b9b94d85 | ||
|
|
d3e8a5508e | ||
|
|
8aba027794 | ||
|
|
1cb7129b70 | ||
|
|
fc6226d61d | ||
|
|
1a0012082a | ||
|
|
d2e6c45a56 | ||
|
|
a22750f66f | ||
|
|
c769c42465 | ||
|
|
895b4808fc | ||
|
|
324d0221d8 | ||
|
|
56b7a7d908 | ||
|
|
11a550a91f | ||
|
|
ba82fb8fc9 | ||
|
|
e348d96e85 | ||
|
|
2bf9a5420d | ||
|
|
04cdc9dd24 | ||
|
|
74f7d57971 | ||
|
|
836fb06c6b | ||
|
|
9a257c3f1f | ||
|
|
57cb30df48 | ||
|
|
622acc0d48 | ||
|
|
a17d929f75 | ||
|
|
54e8dd1c0d | ||
|
|
d906cd64d1 | ||
|
|
d45279feb2 | ||
|
|
823beebbc3 | ||
|
|
2ddc846878 | ||
|
|
03b565cf77 | ||
|
|
b45de8d048 | ||
|
|
297db08f9d | ||
|
|
c5e5323be4 | ||
|
|
ba515d26cb | ||
|
|
ec2a8cec87 | ||
|
|
1e26d6affa | ||
|
|
84e826f0a3 | ||
|
|
a13fdbd2a0 | ||
|
|
cb43f95720 | ||
|
|
c37b8cd60a | ||
|
|
d54a4b9c00 | ||
|
|
a5b5e78ee0 | ||
|
|
1af14e9f44 | ||
|
|
d93f5ee271 | ||
|
|
8a9dd2b7e1 | ||
|
|
86e09c5389 | ||
|
|
3c733e937c | ||
|
|
a764e07427 | ||
|
|
5c6d62fba8 | ||
|
|
9a6ba89616 | ||
|
|
19f67f8ec7 | ||
|
|
dac833f693 | ||
|
|
0b22819737 | ||
|
|
a890753d42 | ||
|
|
c6a01df05c | ||
|
|
2d2e62232b | ||
|
|
140805854c | ||
|
|
f1b836832c | ||
|
|
3829a10f21 | ||
|
|
942aaacdb5 | ||
|
|
38d1f6d125 | ||
|
|
48778cf8b2 | ||
|
|
d28e51f02e | ||
|
|
b0df5480fb | ||
|
|
a583188a82 | ||
|
|
ac66364ccf | ||
|
|
c7c27f75fd | ||
|
|
ef095b111a | ||
|
|
09026ae727 | ||
|
|
d5fbf100ed | ||
|
|
128699f629 | ||
|
|
1772dcf73b | ||
|
|
8873aedbd0 | ||
|
|
9f9ad19622 | ||
|
|
961e973fd6 | ||
|
|
24f52e9586 | ||
|
|
19eccb7c8b | ||
|
|
6618e53d00 | ||
|
|
2c4224579d | ||
|
|
6f4c37ce84 | ||
|
|
a297c1c90e | ||
|
|
6a275126ad | ||
|
|
038041f8ec | ||
|
|
f2eeec5d36 | ||
|
|
f344603a34 | ||
|
|
f11f370d6e | ||
|
|
5711cd8a4c | ||
|
|
40d2275355 | ||
|
|
7131e2c0df | ||
|
|
39da5b7cce | ||
|
|
37a78f1b78 | ||
|
|
fe6f3bdb27 | ||
|
|
70f6637035 | ||
|
|
2b6bbba0d5 | ||
|
|
ede21501ac | ||
|
|
91e2f882e0 | ||
|
|
3d7256429c | ||
|
|
ebe922db47 | ||
|
|
8b75c9ea34 | ||
|
|
7f78d6fb76 | ||
|
|
4e76029199 | ||
|
|
2774c0f60a | ||
|
|
26282ecace | ||
|
|
24bfab82a9 | ||
|
|
b7a7391588 | ||
|
|
4ddf6687ca | ||
|
|
bbf5ccfc93 | ||
|
|
7dc72e7716 | ||
|
|
c5a772b6b9 | ||
|
|
5b8e3ced59 | ||
|
|
87cf71aa36 | ||
|
|
de95ff1a2e | ||
|
|
c4f4d4aae1 | ||
|
|
27b9d2f44e | ||
|
|
47d4b90ffb | ||
|
|
6653c924b1 | ||
|
|
eb5850b1fd | ||
|
|
eb900b108f | ||
|
|
2524b0a24d | ||
|
|
ca88b01ee1 | ||
|
|
805d301dac | ||
|
|
b47dc2fc1e | ||
|
|
6c8f4474e9 | ||
|
|
2de0923a94 | ||
|
|
632323a904 | ||
|
|
97a624c644 | ||
|
|
9ed8f94b35 | ||
|
|
21b948bf3a | ||
|
|
b744c37fc3 | ||
|
|
fe0774566b | ||
|
|
88940dd47b | ||
|
|
c4b26d8b8a | ||
|
|
36a4544fec | ||
|
|
c5840920ae | ||
|
|
a699184650 | ||
|
|
81e86c4710 | ||
|
|
0c10bfbddd | ||
|
|
523b62970f | ||
|
|
9f45c0779e | ||
|
|
ee3a9c5c72 | ||
|
|
51c50a7495 | ||
|
|
468ec3e6d6 | ||
|
|
922ca7abf7 | ||
|
|
f251ae72e4 | ||
|
|
f40125a88f | ||
|
|
8b3ab045f8 | ||
|
|
aa0bff14d9 | ||
|
|
986a3961c4 | ||
|
|
e5c9d43329 | ||
|
|
d82a947511 | ||
|
|
459963c5b6 | ||
|
|
0f631762ba | ||
|
|
56ffbf3635 | ||
|
|
97c46c9099 | ||
|
|
78f0200a0d | ||
|
|
950f7e2f8c | ||
|
|
fcc3172a09 | ||
|
|
4070744bcd | ||
|
|
ce16d8ff94 | ||
|
|
0125b09d2f | ||
|
|
95a04ba2e9 | ||
|
|
61df23c1d2 | ||
|
|
76c9640aba | ||
|
|
741d0055d7 | ||
|
|
f506bff1c5 | ||
|
|
6a1482871a | ||
|
|
fa849b67c6 | ||
|
|
c1651f606f | ||
|
|
f874a995d8 | ||
|
|
0ccfb2009b | ||
|
|
0620304a3f | ||
|
|
a30805b8b6 | ||
|
|
5b0a6afb9f | ||
|
|
35f1323a04 | ||
|
|
5b6791a65f | ||
|
|
9c86429871 | ||
|
|
f36c8a0970 | ||
|
|
8f8bceec84 | ||
|
|
148ed02347 | ||
|
|
8f4cdbbcc0 | ||
|
|
9f1a329370 | ||
|
|
ccb90e90b9 | ||
|
|
c4ac4447ce | ||
|
|
fd0a45ff1f | ||
|
|
ac52a1e354 | ||
|
|
543b5875fd | ||
|
|
2a7222f9d8 | ||
|
|
4933e58876 | ||
|
|
ce300785c7 | ||
|
|
751fa459fb | ||
|
|
624215d19b | ||
|
|
b41c0dccc3 | ||
|
|
818724fdab | ||
|
|
5f22b9baa6 | ||
|
|
64dbaaee5e | ||
|
|
0e0705444d | ||
|
|
e54bcff050 | ||
|
|
fc8101b7c5 | ||
|
|
5c99bd6820 | ||
|
|
aab339a2f3 | ||
|
|
504eb9d5be | ||
|
|
9c39cdbccc | ||
|
|
3d2ef9cda8 | ||
|
|
f4a4479c77 | ||
|
|
a506bf5ab1 | ||
|
|
4ab255e3cb | ||
|
|
a2edfaceee | ||
|
|
b8a2f675a9 | ||
|
|
e89fb11e51 | ||
|
|
721c2b12f8 | ||
|
|
33dc796af7 | ||
|
|
2e373a367e | ||
|
|
70cb450b96 | ||
|
|
20ed9ba0b3 | ||
|
|
d4475b7d7b | ||
|
|
85c7cde379 | ||
|
|
0332b58f98 | ||
|
|
b0c9710cf3 | ||
|
|
72b9f873b4 | ||
|
|
319b475b77 | ||
|
|
e75233cdab | ||
|
|
f9ee67b4dc | ||
|
|
aa25e499f7 | ||
|
|
f3a42f50dd | ||
|
|
0f60d07cfb | ||
|
|
2066d58d2f | ||
|
|
7390e1f224 | ||
|
|
f0e6c51f44 | ||
|
|
f4390ad4e3 | ||
|
|
d706bb6470 | ||
|
|
77373a7d05 | ||
|
|
b942f81b8b | ||
|
|
1e78ea6c77 | ||
|
|
667e5e49e6 | ||
|
|
acc61aa28c | ||
|
|
5c6085d855 | ||
|
|
2427c58147 | ||
|
|
7518e94c51 | ||
|
|
460bfd317d | ||
|
|
7444876559 | ||
|
|
e514f341ce | ||
|
|
99ccd772a3 | ||
|
|
a3f7d54355 | ||
|
|
f1364157f1 | ||
|
|
ae8a1d2fcf | ||
|
|
9fd7e086f5 | ||
|
|
34e5a1933a | ||
|
|
8d7e1eeb2d | ||
|
|
23f49a8821 | ||
|
|
c8f136bd3e | ||
|
|
5ec16f6dbd | ||
|
|
aacfd120ba | ||
|
|
f042aa1101 | ||
|
|
9d29a26d2f | ||
|
|
b789081e21 | ||
|
|
f88bb0db9b | ||
|
|
dbfac48d6e | ||
|
|
c3de990991 | ||
|
|
94a2a04414 | ||
|
|
ee196ba43b | ||
|
|
4caf5af78b | ||
|
|
162337c150 | ||
|
|
3b31f2aeef | ||
|
|
8c0afaa99f | ||
|
|
b95181b0f2 | ||
|
|
453093ebd1 | ||
|
|
256af93db8 | ||
|
|
634956e1be | ||
|
|
33fe6da43d | ||
|
|
054809e64f | ||
|
|
d6f969e0cf | ||
|
|
1f9a5188b2 | ||
|
|
133f7a8bda | ||
|
|
00a0f67bf4 | ||
|
|
046f647361 | ||
|
|
f2684947f0 | ||
|
|
0183800e0f | ||
|
|
1b9e8335d2 | ||
|
|
ae306cbdda | ||
|
|
5449e0d82c | ||
|
|
8010c42305 | ||
|
|
0faa0fcd1a | ||
|
|
91de5ae29d | ||
|
|
588e511a7b | ||
|
|
80db1ac76e | ||
|
|
6edff3dd50 | ||
|
|
045811d13a | ||
|
|
71779ff98c | ||
|
|
8b37c156ae | ||
|
|
8372c7b1dc | ||
|
|
92eaffa3b0 | ||
|
|
29237511ee | ||
|
|
dae5f65c3e | ||
|
|
06869e82f4 | ||
|
|
d499219236 | ||
|
|
da8006644c | ||
|
|
cfcef02ba7 | ||
|
|
14639822b1 | ||
|
|
88602f7c95 | ||
|
|
077bd683a7 | ||
|
|
b8a9b252b5 | ||
|
|
7930cf4075 | ||
|
|
e7868e86e3 | ||
|
|
2bf5ce30f6 | ||
|
|
e1ab0bd5fd | ||
|
|
b357a3c743 | ||
|
|
5d9fc02502 | ||
|
|
ce46668e6e |
12
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
12
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
@@ -59,3 +59,15 @@ body:
|
|||||||
description: Add additional context here.
|
description: Add additional context here.
|
||||||
validations:
|
validations:
|
||||||
required: false
|
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
|
||||||
46
.github/ISSUE_TEMPLATE/feature-issue.yml
vendored
46
.github/ISSUE_TEMPLATE/feature-issue.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
name: ⭐ Feature request
|
|
||||||
description: Create a detailed feature request.
|
|
||||||
title: 'feat: <title>'
|
|
||||||
labels: [feature-request]
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
# ReVanced feature request
|
|
||||||
|
|
||||||
Do not submit requests for patches here. Please submit them [here](https://github.com/orgs/revanced/discussions/categories/patches) instead.
|
|
||||||
Important to note that your feature request may have already been made before. Please check for existing feature requests [here](https://github.com/revanced/revanced-patches/labels/feature-request).
|
|
||||||
|
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: Type
|
|
||||||
options:
|
|
||||||
- Functionality
|
|
||||||
- Cosmetic
|
|
||||||
- Other
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Issue
|
|
||||||
description: What is the current problem. Why does it require a feature request?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Feature
|
|
||||||
description: Describe your feature in detail. How does it solve the issue?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Motivation
|
|
||||||
description: Why should your feature should be considered?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Additional context
|
|
||||||
description: Add additional context here.
|
|
||||||
validations:
|
|
||||||
required: false
|
|
||||||
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
Normal file
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: ⭐ Patch Request
|
||||||
|
description: Create a detailed patch request.
|
||||||
|
title: 'feat(patch): '
|
||||||
|
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 should 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
|
||||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -12,32 +12,35 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup JDK
|
- name: Setup JDK
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
cache: gradle
|
cache: gradle
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "lts/*"
|
node-version: 'latest'
|
||||||
|
cache: 'npm'
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
uses: android-actions/setup-android@v2
|
uses: amyu/setup-android@v2
|
||||||
|
with:
|
||||||
|
cache-disabled: true
|
||||||
|
sdk-version: '33'
|
||||||
|
build-tools-version: '33.0.1'
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew build clean generateReadme
|
run: ./gradlew build generateMeta
|
||||||
- name: Install Android build-tools
|
|
||||||
run: sdkmanager "build-tools;32.0.0"
|
|
||||||
- name: Setup semantic-release
|
- name: Setup semantic-release
|
||||||
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
|
run: npm install semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -114,4 +114,10 @@ gradle-app.setting
|
|||||||
# gradle/wrapper/gradle-wrapper.properties
|
# gradle/wrapper/gradle-wrapper.properties
|
||||||
|
|
||||||
# Potentially copyrighted test APK
|
# Potentially copyrighted test APK
|
||||||
*.apk
|
*.apk
|
||||||
|
|
||||||
|
# Ignore vscode config
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
1
.idea/.gitignore
generated
vendored
1
.idea/.gitignore
generated
vendored
@@ -6,3 +6,4 @@
|
|||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
# Editor-based HTTP Client requests
|
# Editor-based HTTP Client requests
|
||||||
/httpRequests/
|
/httpRequests/
|
||||||
|
/kotlinc.xml
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
"assets": [
|
"assets": [
|
||||||
"README.md",
|
"README.md",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
"gradle.properties"
|
"gradle.properties",
|
||||||
|
"patches.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
"path": "build/libs/*.jar"
|
"path": "build/libs/*.jar"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "build/libs/*.dex"
|
"path": "patches.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
1379
CHANGELOG.md
1379
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,122 @@
|
|||||||
# 🧩 ReVanced Patches
|
## 🧩 Patches
|
||||||
|
|
||||||
Official patches by ReVanced
|
The official Patch bundle provided by ReVanced and the community.
|
||||||
|
|
||||||
## 📜 List of available patches
|
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||||
|
|
||||||
{{ table }}
|
{{ table }}
|
||||||
|
|
||||||
|
## 📝 JSON Format
|
||||||
|
|
||||||
|
This section explains the JSON format for the [patches.json](patches.json) file.
|
||||||
|
|
||||||
|
The file contains an array of objects, each object representing a patch. The object contains the following properties:
|
||||||
|
|
||||||
|
| key | description |
|
||||||
|
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `name` | The name of the patch. |
|
||||||
|
| `description` | The description of the patch. |
|
||||||
|
| `version` | The version of the patch. |
|
||||||
|
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
|
||||||
|
| `options` | An array of options for this patch. |
|
||||||
|
| `options.key` | The key of the option. |
|
||||||
|
| `options.title` | The title of the option. |
|
||||||
|
| `options.description` | The description of the option. |
|
||||||
|
| `options.required` | Whether the option is required. |
|
||||||
|
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
|
||||||
|
| `dependencies` | An array of dependencies, which are patch names. |
|
||||||
|
| `compatiblePackages` | An array of packages compatible with this patch. |
|
||||||
|
| `compatiblePackages.name` | The name of the package. |
|
||||||
|
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "remember-video-quality",
|
||||||
|
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"options": [],
|
||||||
|
"dependencies": [
|
||||||
|
"integrations",
|
||||||
|
"video-id-hook"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": [
|
||||||
|
"17.22.36",
|
||||||
|
"17.24.35",
|
||||||
|
"17.26.35",
|
||||||
|
"17.27.39",
|
||||||
|
"17.28.34",
|
||||||
|
"17.29.34",
|
||||||
|
"17.32.35",
|
||||||
|
"17.33.42"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "theme",
|
||||||
|
"description": "Enables a custom theme.",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "theme",
|
||||||
|
"title": "Theme",
|
||||||
|
"description": "Select a theme.",
|
||||||
|
"required": true,
|
||||||
|
"choices": [
|
||||||
|
"Amoled"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "custom-branding",
|
||||||
|
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "appName",
|
||||||
|
"title": "Application Name",
|
||||||
|
"description": "The name of the application it will show on your home screen.",
|
||||||
|
"required": true,
|
||||||
|
"choices": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "appIconPath",
|
||||||
|
"title": "Application Icon Path",
|
||||||
|
"description": "A path to the icon of the application.",
|
||||||
|
"required": false,
|
||||||
|
"choices": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
385
README.md
385
README.md
@@ -1,14 +1,141 @@
|
|||||||
# 🧩 ReVanced Patches
|
## 🧩 Patches
|
||||||
|
|
||||||
Official patches by ReVanced
|
The official Patch bundle provided by ReVanced and the community.
|
||||||
|
|
||||||
## 📜 List of available patches
|
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||||
|
|
||||||
|
### 📦 `com.google.android.youtube`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `always-autorepeat` | Always repeats the playing video again. | 17.45.36 |
|
||||||
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
|
| `comments` | Hides components related to comments. | 17.45.36 |
|
||||||
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.45.36 |
|
||||||
|
| `custom-video-speed` | Adds more video speed options. | 17.45.36 |
|
||||||
|
| `debugging` | Adds debugging options. | all |
|
||||||
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 17.45.36 |
|
||||||
|
| `disable-auto-player-popup-panels` | Disable automatic popup panels (playlist or live chat) on video player. | 17.45.36 |
|
||||||
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.45.36 |
|
||||||
|
| `disable-startup-shorts-player` | Disables playing YouTube Shorts when launching YouTube. | 17.45.36 |
|
||||||
|
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||||
|
| `downloads` | Enables downloading music and videos from YouTube. | 17.45.36 |
|
||||||
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.45.36 |
|
||||||
|
| `general-ads` | Removes general ads. | 17.45.36 |
|
||||||
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.45.36 |
|
||||||
|
| `hide-album-cards` | Hides the album cards below the artist description. | 17.45.36 |
|
||||||
|
| `hide-artist-card` | Hides the artist card below the searchbar. | 17.45.36 |
|
||||||
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.45.36 |
|
||||||
|
| `hide-captions-button` | Hides the captions button on video player. | 17.45.36 |
|
||||||
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
|
| `hide-create-button` | Hides the create button in the navigation bar. | 17.45.36 |
|
||||||
|
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 17.45.36 |
|
||||||
|
| `hide-email-address` | Hides the email address in the account switcher. | 17.45.36 |
|
||||||
|
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 17.45.36 |
|
||||||
|
| `hide-info-cards` | Hides info-cards in videos. | 17.45.36 |
|
||||||
|
| `hide-my-mix` | Hides mix playlists. | 17.45.36 |
|
||||||
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.45.36 |
|
||||||
|
| `hide-time-and-seekbar` | Hides progress bar and time counter on videos. | 17.45.36 |
|
||||||
|
| `hide-video-buttons` | Adds options to hide action buttons under a video. | 17.45.36 |
|
||||||
|
| `hide-watch-in-vr` | Hides the Watch in VR option from the player settings flyout panel. | 17.45.36 |
|
||||||
|
| `hide-watermark` | Hides creator's watermarks on videos. | 17.45.36 |
|
||||||
|
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 17.45.36 |
|
||||||
|
| `minimized-playback` | Enables minimized and background playback. | 17.45.36 |
|
||||||
|
| `old-quality-layout` | Enables the original quality flyout menu. | 17.45.36 |
|
||||||
|
| `open-links-directly` | Bypasses redirect links and allows opening links directly. | 17.45.36 |
|
||||||
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.45.36 |
|
||||||
|
| `remove-player-button-background` | Removes the background from the video player buttons. | 17.45.36 |
|
||||||
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.45.36 |
|
||||||
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.45.36 |
|
||||||
|
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
||||||
|
| `sponsorblock` | Integrate SponsorBlock. | 17.45.36 |
|
||||||
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.45.36 |
|
||||||
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.45.36 |
|
||||||
|
| `theme` | Applies a custom theme. | all |
|
||||||
|
| `video-ads` | Removes ads in the video player. | 17.45.36 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.google.android.apps.youtube.music`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `background-play` | Enables playing music in the background. | 5.34.51 |
|
||||||
|
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.34.51 |
|
||||||
|
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.34.51 |
|
||||||
|
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.34.51 |
|
||||||
|
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.34.51 |
|
||||||
|
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.34.51 |
|
||||||
|
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.34.51 |
|
||||||
|
| `music-video-ads` | Removes ads in the music player. | 5.34.51 |
|
||||||
|
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.34.51 |
|
||||||
|
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.34.51 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.ss.android.ugc.trill`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-login-requirement` | Do not force login. | all |
|
||||||
|
| `downloads` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
|
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
||||||
|
| `fix-google-login` | Allows logging in with a Google account. | all |
|
||||||
|
| `hide-ads` | Removes ads from TikTok. | all |
|
||||||
|
| `playback-speed` | Enables the playback speed option for all videos. | all |
|
||||||
|
| `settings` | Adds settings for ReVanced to TikTok. | all |
|
||||||
|
| `show-seekbar` | Shows progress bar for all video. | all |
|
||||||
|
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.zhiliaoapp.musically`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-login-requirement` | Do not force login. | all |
|
||||||
|
| `downloads` | Removes download restrictions and changes the default path to download to. | all |
|
||||||
|
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | all |
|
||||||
|
| `fix-google-login` | Allows logging in with a Google account. | all |
|
||||||
|
| `hide-ads` | Removes ads from TikTok. | all |
|
||||||
|
| `playback-speed` | Enables the playback speed option for all videos. | all |
|
||||||
|
| `settings` | Adds settings for ReVanced to TikTok. | all |
|
||||||
|
| `show-seekbar` | Shows progress bar for all video. | all |
|
||||||
|
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `tv.twitch.android.app`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `block-audio-ads` | Blocks audio ads in streams and VODs. | all |
|
||||||
|
| `block-video-ads` | Blocks video ads in streams and VODs. | all |
|
||||||
|
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
|
||||||
|
| `settings` | Adds settings menu to Twitch. | all |
|
||||||
|
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.spotify.music`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-capture-restriction` | Allows capturing Spotify's audio output while screen sharing or screen recording. | all |
|
||||||
|
| `hide-premium-navbar` | Removes the premium tab from the navbar. | all |
|
||||||
|
| `spotify-theme` | Applies a custom theme. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
### 📦 `com.twitter.android`
|
### 📦 `com.twitter.android`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
|
||||||
|
| `monochrome-icon` | Adds a monochrome icon. | all |
|
||||||
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
|
| `timeline-ads` | Removes ads from the Twitter timeline. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -18,23 +145,55 @@ Official patches by ReVanced
|
|||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
|
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | all |
|
||||||
|
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.google.android.apps.youtube.music`
|
### 📦 `com.vanced.android.youtube`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `minimized-playback-music` | Enables minimized playback on Kids music. | 5.17.51 |
|
| `client-spoof` | Spoofs the YouTube or Vanced client to prevent playback issues. | all |
|
||||||
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | 5.16.51 |
|
</details>
|
||||||
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.17.51 |
|
|
||||||
| `compact-header` | Hides the music category bar at the top of the homepage. | 5.16.51 |
|
### 📦 `com.myprog.hexedit`
|
||||||
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | 5.17.51 |
|
<details>
|
||||||
| `background-play` | Enables playing music in the background. | 5.17.51 |
|
|
||||||
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | 5.17.51 |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
| `music-video-ads` | Removes ads in the music player. | 5.17.51 |
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | 5.17.51 |
|
| `disable-ads` | Disables ads in HexEditor. | all |
|
||||||
| `exclusive-audio-playback` | Enables the option to play music without video. | 5.17.51 |
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.crunchyroll.crunchyroid`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `enable-downloads` | Enables downloads for Crunchyroll. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.garzotto.pflotsh.ecmwf_a`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `pflotsh-ecmwf-subscription-unlock` | Unlocks all subscription features. | 3.5.4 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `org.citra.citra_emu`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `premium-unlock` | Unlocks premium functions. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.backdrops.wallpapers`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `pro-unlock` | Unlocks pro-only functions. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `de.dwd.warnapp`
|
### 📦 `de.dwd.warnapp`
|
||||||
@@ -45,47 +204,183 @@ Official patches by ReVanced
|
|||||||
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.ss.android.ugc.trill`
|
### 📦 `com.shervinkoushan.anyTracker`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `tiktok-ads` | Removes ads from TikTok. | all |
|
| `unlock-premium` | Unlocks all premium features. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📦 `com.google.android.youtube`
|
### 📦 `com.urbandroid.sleep`
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|:--------:|:--------------:|:-----------------:|
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `swipe-controls` | Adds volume and brightness swipe controls. | 17.29.34 |
|
| `unlock-premium` | Unlocks all premium features. | all |
|
||||||
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 17.29.34 |
|
</details>
|
||||||
| `minimized-playback` | Enables minimized and background playback. | 17.29.34 |
|
|
||||||
| `amoled` | Enables pure black theme. | 17.29.34 |
|
### 📦 `com.awedea.nyx`
|
||||||
| `disable-create-button` | Hides the create button in the navigation bar. | 17.29.34 |
|
<details>
|
||||||
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
|
||||||
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 17.29.34 |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 17.29.34 |
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `premium-heading` | Shows premium branding on the home screen. | all |
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
</details>
|
||||||
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 17.29.34 |
|
|
||||||
| `old-quality-layout` | Enables the original quality flyout menu. | 17.29.34 |
|
### 📦 `co.windyapp.android`
|
||||||
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 17.29.34 |
|
<details>
|
||||||
| `hide-watermark` | Hides creator's watermarks on videos. | 17.29.34 |
|
|
||||||
| `sponsorblock` | Integrate SponsorBlock. | 17.29.34 |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 17.29.34 |
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `tablet-mini-player` | Enables the tablet mini player layout. | 17.29.34 |
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
| `custom-video-buffer` | Lets you change the buffers of videos. | 17.29.34 |
|
</details>
|
||||||
| `always-autorepeat` | Always repeats the playing video again. | 17.29.34 |
|
|
||||||
| `microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG | 17.29.34 |
|
### 📦 `org.totschnig.myexpenses`
|
||||||
| `settings` | Adds settings for ReVanced to YouTube. | all |
|
<details>
|
||||||
| `enable-debugging` | Enables app debugging by patching the manifest file. | all |
|
|
||||||
| `custom-playback-speed` | Adds more video playback speed options. | 17.29.34 |
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 17.29.34 |
|
|:--------:|:--------------:|:-----------------:|
|
||||||
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 17.29.34 |
|
| `unlock-pro` | Unlocks all professional features. | all |
|
||||||
| `video-ads` | Removes ads in the video player. | 17.29.34 |
|
</details>
|
||||||
| `general-ads` | Removes general ads. | 17.29.34 |
|
|
||||||
| `hide-infocard-suggestions` | Hides infocards in videos. | 17.29.34 |
|
### 📦 `com.ithebk.expensemanager`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `ginlemon.iconpackstudio`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### 📦 `com.ticktick.task`
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-themes` | Unlocks all themes. | all |
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 📝 JSON Format
|
||||||
|
|
||||||
|
This section explains the JSON format for the [patches.json](patches.json) file.
|
||||||
|
|
||||||
|
The file contains an array of objects, each object representing a patch. The object contains the following properties:
|
||||||
|
|
||||||
|
| key | description |
|
||||||
|
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `name` | The name of the patch. |
|
||||||
|
| `description` | The description of the patch. |
|
||||||
|
| `version` | The version of the patch. |
|
||||||
|
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
|
||||||
|
| `options` | An array of options for this patch. |
|
||||||
|
| `options.key` | The key of the option. |
|
||||||
|
| `options.title` | The title of the option. |
|
||||||
|
| `options.description` | The description of the option. |
|
||||||
|
| `options.required` | Whether the option is required. |
|
||||||
|
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
|
||||||
|
| `dependencies` | An array of dependencies, which are patch names. |
|
||||||
|
| `compatiblePackages` | An array of packages compatible with this patch. |
|
||||||
|
| `compatiblePackages.name` | The name of the package. |
|
||||||
|
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "remember-video-quality",
|
||||||
|
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"options": [],
|
||||||
|
"dependencies": [
|
||||||
|
"integrations",
|
||||||
|
"video-id-hook"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": [
|
||||||
|
"17.22.36",
|
||||||
|
"17.24.35",
|
||||||
|
"17.26.35",
|
||||||
|
"17.27.39",
|
||||||
|
"17.28.34",
|
||||||
|
"17.29.34",
|
||||||
|
"17.32.35",
|
||||||
|
"17.33.42"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "theme",
|
||||||
|
"description": "Enables a custom theme.",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "theme",
|
||||||
|
"title": "Theme",
|
||||||
|
"description": "Select a theme.",
|
||||||
|
"required": true,
|
||||||
|
"choices": [
|
||||||
|
"Amoled"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "custom-branding",
|
||||||
|
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "appName",
|
||||||
|
"title": "Application Name",
|
||||||
|
"description": "The name of the application it will show on your home screen.",
|
||||||
|
"required": true,
|
||||||
|
"choices": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "appIconPath",
|
||||||
|
"title": "Application Icon Path",
|
||||||
|
"description": "A path to the icon of the application.",
|
||||||
|
"required": false,
|
||||||
|
"choices": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
@@ -20,22 +20,21 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation("app.revanced:revanced-patcher:6.3.0")
|
||||||
|
|
||||||
implementation("app.revanced:revanced-patcher:3.3.3")
|
|
||||||
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
implementation("app.revanced:multidexlib2:2.5.2.r2")
|
||||||
|
// Required for meta
|
||||||
|
implementation("com.google.code.gson:gson:2.10")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
register<DefaultTask>("generateDex") {
|
register<DefaultTask>("generateBundle") {
|
||||||
description = "Generate dex files from build"
|
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 androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
||||||
val d8 = "${androidHome}/build-tools/32.0.0/d8"
|
val d8 = "${androidHome}/build-tools/33.0.1/d8"
|
||||||
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
||||||
val output = input.replace(".jar", ".dex")
|
|
||||||
val work = File("${buildDir}/libs")
|
val work = File("${buildDir}/libs")
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
@@ -45,16 +44,16 @@ tasks {
|
|||||||
|
|
||||||
exec {
|
exec {
|
||||||
workingDir = work
|
workingDir = work
|
||||||
commandLine = listOf("mv", "classes.dex", output)
|
commandLine = listOf("zip", "-u", input, "classes.dex")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
register<JavaExec>("generateReadme") {
|
register<JavaExec>("generateMeta") {
|
||||||
description = "Generate README.md"
|
description = "Generate metadata for this bundle"
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
mainClass.set("app.revanced.meta.readme.Generator")
|
mainClass.set("app.revanced.meta.Meta")
|
||||||
}
|
}
|
||||||
// Dummy task to fix the Gradle semantic-release plugin.
|
// Dummy task to fix the Gradle semantic-release plugin.
|
||||||
// Remove this if you forked it to support building only.
|
// Remove this if you forked it to support building only.
|
||||||
@@ -62,6 +61,6 @@ tasks {
|
|||||||
register<DefaultTask>("publish") {
|
register<DefaultTask>("publish") {
|
||||||
group = "publish"
|
group = "publish"
|
||||||
description = "Dummy task"
|
description = "Dummy task"
|
||||||
dependsOn(named("generateDex"), named("generateReadme"))
|
dependsOn(named("generateBundle"), named("generateMeta"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.36.2
|
version = 2.140.1-dev.1
|
||||||
|
|||||||
6107
package-lock.json
generated
Normal file
6107
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
8
package.json
Normal file
8
package.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"@semantic-release/changelog": "^6.0.2",
|
||||||
|
"@semantic-release/git": "^10.0.1",
|
||||||
|
"gradle-semantic-release-plugin": "^1.7.4",
|
||||||
|
"semantic-release": "^19.0.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
patches.json
Normal file
1
patches.json
Normal file
File diff suppressed because one or more lines are too long
@@ -1,32 +1,31 @@
|
|||||||
package app.revanced.extensions
|
package app.revanced.extensions
|
||||||
|
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.data.impl.ResourceData
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.patch.PatchResultError
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patcher.util.smali.toInstruction
|
import org.jf.dexlib2.iface.Method
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.util.MethodUtil
|
||||||
import org.jf.dexlib2.Opcode
|
|
||||||
import org.jf.dexlib2.builder.MutableMethodImplementation
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11n
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21t
|
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction35c
|
|
||||||
import org.jf.dexlib2.immutable.reference.ImmutableMethodReference
|
|
||||||
import org.w3c.dom.Node
|
import org.w3c.dom.Node
|
||||||
import java.nio.file.Files
|
|
||||||
|
|
||||||
// TODO: this method does not make sense here
|
// TODO: populate this to all patches
|
||||||
internal fun MutableMethodImplementation.injectHideCall(
|
/**
|
||||||
index: Int,
|
* Convert a [MethodFingerprint] to a [PatchResultError].
|
||||||
register: Int
|
*
|
||||||
) {
|
* @return A [PatchResultError] for the [MethodFingerprint].
|
||||||
this.addInstruction(
|
*/
|
||||||
index,
|
fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name")
|
||||||
"invoke-static { v$register }, Lapp/revanced/integrations/patches/HideHomeAdsPatch;->HideHomeAds(Landroid/view/View;)V".toInstruction()
|
|
||||||
)
|
/**
|
||||||
|
* 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)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,9 +34,9 @@ internal fun MutableMethodImplementation.injectHideCall(
|
|||||||
* @param targetClass the class to start traversing the class hierarchy from
|
* @param targetClass the class to start traversing the class hierarchy from
|
||||||
* @param callback function that is called for every class in the hierarchy
|
* @param callback function that is called for every class in the hierarchy
|
||||||
*/
|
*/
|
||||||
fun BytecodeData.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
|
fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
|
||||||
callback(targetClass)
|
callback(targetClass)
|
||||||
this.findClass(targetClass.superclass ?: return)?.resolve()?.let {
|
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
|
||||||
traverseClassHierarchy(it, callback)
|
traverseClassHierarchy(it, callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,160 +52,7 @@ fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod)
|
|||||||
methods.addAll(transformedMethods)
|
methods.addAll(transformedMethods)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Insert an event hook at the top of the method. If the hook returns true, the event is consumed and the method will return with true
|
|
||||||
*
|
|
||||||
* the hook method MUST return a boolean and MUST take two parameters, like so:
|
|
||||||
* fun hook(thisRef: Object, eventData: Object): Boolean {}
|
|
||||||
*
|
|
||||||
* The final injected code will resemble the following logic:
|
|
||||||
* if( YouHook(this, event) ) { return true; }
|
|
||||||
* ...
|
|
||||||
*
|
|
||||||
* @param hookRef reference to the hook method
|
|
||||||
*/
|
|
||||||
internal fun MutableMethod.injectConsumableEventHook(hookRef: ImmutableMethodReference) {
|
|
||||||
val isStaticMethod = AccessFlags.STATIC.isSet(this.accessFlags)
|
|
||||||
this.implementation?.let { impl ->
|
|
||||||
// create label to index 0 to continue to the normal program flow
|
|
||||||
val lblContinueNormalFlow = impl.newLabelForIndex(0)
|
|
||||||
|
|
||||||
// define registers
|
|
||||||
/** V0 */
|
|
||||||
val regV0 = 0
|
|
||||||
|
|
||||||
/** this */
|
|
||||||
val regP0 = impl.registerCount - this.parameters.size - (if (isStaticMethod) 0 else 1)
|
|
||||||
|
|
||||||
/** motionEvent */
|
|
||||||
val regP1 = regP0 + 1
|
|
||||||
|
|
||||||
// insert instructions at the start of the method:
|
|
||||||
// if( Hook(this, event) ) { return true; }
|
|
||||||
impl.addInstructions(
|
|
||||||
0, listOf(
|
|
||||||
// invoke-static { p0, p1 } <hook>
|
|
||||||
BuilderInstruction35c(
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
2,
|
|
||||||
regP0,
|
|
||||||
regP1,
|
|
||||||
0, 0, 0,
|
|
||||||
hookRef
|
|
||||||
),
|
|
||||||
|
|
||||||
// move-result v0
|
|
||||||
BuilderInstruction11x(
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
regV0
|
|
||||||
),
|
|
||||||
|
|
||||||
// if-eqz v0, :continue_normal_flow
|
|
||||||
BuilderInstruction21t(
|
|
||||||
Opcode.IF_EQZ,
|
|
||||||
regV0,
|
|
||||||
lblContinueNormalFlow
|
|
||||||
),
|
|
||||||
|
|
||||||
// const/4 v0, 0x1
|
|
||||||
BuilderInstruction11n(
|
|
||||||
Opcode.CONST_4,
|
|
||||||
regV0,
|
|
||||||
0x1
|
|
||||||
),
|
|
||||||
|
|
||||||
// return v0
|
|
||||||
BuilderInstruction11x(
|
|
||||||
Opcode.RETURN,
|
|
||||||
regV0
|
|
||||||
)
|
|
||||||
|
|
||||||
// :continue_normal_flow
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inject resources into the patched app
|
|
||||||
*
|
|
||||||
* @param classLoader classloader to use for loading the resources
|
|
||||||
* @param patchDirectoryPath path to the files. this will be the directory you created under the 'resources' source folder
|
|
||||||
* @param resourceType the resource type, for example 'drawable'. this has to match both the source and the target
|
|
||||||
* @param resourceFileNames names of all resources of this type to inject
|
|
||||||
*/
|
|
||||||
fun ResourceData.injectResources(
|
|
||||||
classLoader: ClassLoader,
|
|
||||||
patchDirectoryPath: String,
|
|
||||||
resourceType: String,
|
|
||||||
resourceFileNames: List<String>
|
|
||||||
) {
|
|
||||||
resourceFileNames.forEach { name ->
|
|
||||||
val relativePath = "$resourceType/$name"
|
|
||||||
val sourceRes = classLoader.getResourceAsStream("$patchDirectoryPath/$relativePath")
|
|
||||||
?: throw PatchResultError("could not open resource '$patchDirectoryPath/$relativePath'")
|
|
||||||
|
|
||||||
Files.copy(
|
|
||||||
sourceRes,
|
|
||||||
this["res"].resolve(relativePath).toPath()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inject strings into the patched app
|
|
||||||
*
|
|
||||||
* @param classLoader classloader to use for loading the resources
|
|
||||||
* @param patchDirectoryPath path to the files. this will be the directory you created under the 'resources' source folder
|
|
||||||
* @param languageIdentifier ISO 639-2 two- letter language code identifier (aka the one android uses for values directory)
|
|
||||||
*/
|
|
||||||
fun ResourceData.injectStrings(
|
|
||||||
classLoader: ClassLoader,
|
|
||||||
patchDirectoryPath: String,
|
|
||||||
languageIdentifier: String? = null,
|
|
||||||
) {
|
|
||||||
val relativePath =
|
|
||||||
if (languageIdentifier.isNullOrBlank()) "values/strings.xml" else "values/strings-$languageIdentifier.xml"
|
|
||||||
|
|
||||||
// open source strings.xml
|
|
||||||
val sourceInputStream = classLoader.getResourceAsStream("$patchDirectoryPath/$relativePath")
|
|
||||||
?: throw PatchResultError("failed to open '$patchDirectoryPath/$relativePath'")
|
|
||||||
xmlEditor[sourceInputStream].use { sourceStringsXml ->
|
|
||||||
val strings = sourceStringsXml.file.getElementsByTagName("resources").item(0).childNodes
|
|
||||||
|
|
||||||
// open target strings.xml
|
|
||||||
xmlEditor["res/$relativePath"].use { targetStringsXml ->
|
|
||||||
val targetFile = targetStringsXml.file
|
|
||||||
val targetRootNode = targetFile.getElementsByTagName("resources").item(0)
|
|
||||||
|
|
||||||
// process all children strings in the source
|
|
||||||
for (i in 0 until strings.length) {
|
|
||||||
// clone the node from source to target
|
|
||||||
val node = strings.item(i).cloneNode(true)
|
|
||||||
targetFile.adoptNode(node)
|
|
||||||
targetRootNode.appendChild(node)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun Node.doRecursively(action: (Node) -> Unit) {
|
internal fun Node.doRecursively(action: (Node) -> Unit) {
|
||||||
action(this)
|
action(this)
|
||||||
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun String.startsWithAny(vararg prefixes: String): Boolean {
|
|
||||||
for (prefix in prefixes)
|
|
||||||
if (this.startsWith(prefix))
|
|
||||||
return true
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun String.equalsAny(vararg other: String): Boolean {
|
|
||||||
for (_other in other)
|
|
||||||
if (this == _other)
|
|
||||||
return true
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
27
src/main/kotlin/app/revanced/meta/Meta.kt
Normal file
27
src/main/kotlin/app/revanced/meta/Meta.kt
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package app.revanced.meta
|
||||||
|
|
||||||
|
import app.revanced.meta.json.generateJson
|
||||||
|
import app.revanced.meta.readme.generateText
|
||||||
|
import app.revanced.patcher.data.Context
|
||||||
|
import app.revanced.patcher.patch.Patch
|
||||||
|
import app.revanced.patcher.util.patch.PatchBundle
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
typealias Bundle = List<Class<out Patch<Context>>>
|
||||||
|
|
||||||
|
object Meta {
|
||||||
|
@JvmStatic
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
val patches = accumulatePatches()
|
||||||
|
if (patches.isEmpty()) throw IllegalStateException("No patches found")
|
||||||
|
|
||||||
|
generateText(patches)
|
||||||
|
generateJson(patches)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun accumulatePatches() = PatchBundle.Jar(
|
||||||
|
File("build/libs/").listFiles()!!.first {
|
||||||
|
it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar")
|
||||||
|
}.absolutePath
|
||||||
|
).loadPatches()
|
||||||
48
src/main/kotlin/app/revanced/meta/json/Generator.kt
Normal file
48
src/main/kotlin/app/revanced/meta/json/Generator.kt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
package app.revanced.meta.json
|
||||||
|
|
||||||
|
import app.revanced.meta.Bundle
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
||||||
|
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.extensions.PatchExtensions.version
|
||||||
|
import app.revanced.patcher.patch.PatchOption
|
||||||
|
import com.google.gson.GsonBuilder
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
private val gson = GsonBuilder().serializeNulls().create()
|
||||||
|
|
||||||
|
fun generateJson(bundle: Bundle) {
|
||||||
|
val patches = bundle.map {
|
||||||
|
JsonPatch(
|
||||||
|
it.patchName,
|
||||||
|
it.description ?: "This patch has no description.",
|
||||||
|
it.version ?: "0.0.0",
|
||||||
|
!it.include,
|
||||||
|
it.options?.map { option ->
|
||||||
|
Option(
|
||||||
|
option.key,
|
||||||
|
option.title,
|
||||||
|
option.description,
|
||||||
|
option.required,
|
||||||
|
option.let { lo ->
|
||||||
|
if (lo is PatchOption.ListOption<*>) {
|
||||||
|
lo.options.toMutableList().toTypedArray()
|
||||||
|
} else null
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}?.toTypedArray() ?: emptyArray(),
|
||||||
|
it.dependencies?.map { dep ->
|
||||||
|
dep.java.patchName
|
||||||
|
}?.toTypedArray() ?: emptyArray(),
|
||||||
|
it.compatiblePackages?.map { pkg ->
|
||||||
|
CompatiblePackage(pkg.name, pkg.versions)
|
||||||
|
}?.toTypedArray() ?: emptyArray()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
val json = File("patches.json")
|
||||||
|
json.writeText(gson.toJson(patches))
|
||||||
|
}
|
||||||
26
src/main/kotlin/app/revanced/meta/json/JsonPatch.kt
Normal file
26
src/main/kotlin/app/revanced/meta/json/JsonPatch.kt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
@file:Suppress("ArrayInDataClass") // We don't need it here.
|
||||||
|
|
||||||
|
package app.revanced.meta.json
|
||||||
|
|
||||||
|
data class JsonPatch(
|
||||||
|
val name: String,
|
||||||
|
val description: String,
|
||||||
|
val version: String,
|
||||||
|
val excluded: Boolean,
|
||||||
|
val options: Array<Option>,
|
||||||
|
val dependencies: Array<String>,
|
||||||
|
val compatiblePackages: Array<CompatiblePackage>,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class CompatiblePackage(
|
||||||
|
val name: String,
|
||||||
|
val versions: Array<String>,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Option(
|
||||||
|
val key: String,
|
||||||
|
val title: String,
|
||||||
|
val description: String,
|
||||||
|
val required: Boolean,
|
||||||
|
val choices: Array<*>?,
|
||||||
|
)
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
package app.revanced.meta.readme
|
package app.revanced.meta.readme
|
||||||
|
|
||||||
import app.revanced.patcher.data.Data
|
import app.revanced.patcher.data.Context
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
import app.revanced.patcher.patch.Patch
|
import app.revanced.patcher.patch.Patch
|
||||||
|
|
||||||
internal fun Class<out Patch<Data>>.getLatestVersion(): SemanticVersion? =
|
internal fun Class<out Patch<Context>>.getLatestVersion() =
|
||||||
this.compatiblePackages?.first()?.versions?.map { SemanticVersion.fromString(it) }
|
this.compatiblePackages?.first()?.versions?.map {
|
||||||
?.maxWithOrNull(
|
SemanticVersion.fromString(it)
|
||||||
SemanticVersionComparator
|
}?.maxWithOrNull(SemanticVersionComparator)
|
||||||
)
|
|
||||||
|
|||||||
@@ -1,55 +1,42 @@
|
|||||||
package app.revanced.meta.readme
|
package app.revanced.meta.readme
|
||||||
|
|
||||||
import app.revanced.patcher.data.Data
|
import app.revanced.meta.Bundle
|
||||||
|
import app.revanced.patcher.data.Context
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||||
import app.revanced.patcher.patch.Patch
|
import app.revanced.patcher.patch.Patch
|
||||||
import app.revanced.patcher.util.patch.impl.JarPatchBundle
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
object Generator {
|
private const val TABLE_HEADER =
|
||||||
private const val TABLE_HEADER =
|
"| \uD83D\uDC8A Patch | \uD83D\uDCDC Description | \uD83C\uDFF9 Target Version |\n" + "|:--------:|:--------------:|:-----------------:|"
|
||||||
"| \uD83D\uDC8A Patch | \uD83D\uDCDC Description | \uD83C\uDFF9 Target Version |\n" +
|
|
||||||
"|:--------:|:--------------:|:-----------------:|"
|
|
||||||
|
|
||||||
@JvmStatic
|
private val TABLE_REGEX = Regex("\\{\\{\\s?table\\s?}}")
|
||||||
fun main(args: Array<String>) {
|
|
||||||
val buildDir = File("build/libs/")
|
|
||||||
val buildJar =
|
|
||||||
buildDir.listFiles()?.first { it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar") }!!
|
|
||||||
|
|
||||||
val bundle = JarPatchBundle(buildJar.absolutePath).loadPatches()
|
fun generateText(bundle: Bundle) {
|
||||||
|
val output = StringBuilder()
|
||||||
|
val packages = mutableMapOf<String, MutableList<Class<out Patch<Context>>>>()
|
||||||
|
|
||||||
val output = StringBuilder()
|
for (patch in bundle) {
|
||||||
|
patch.compatiblePackages?.forEach { pkg ->
|
||||||
val packages = mutableMapOf<String, MutableList<Class<out Patch<Data>>>>()
|
if (!packages.contains(pkg.name)) packages[pkg.name] = mutableListOf()
|
||||||
|
packages[pkg.name]!!.add(patch)
|
||||||
bundle.map {
|
|
||||||
val packageName = it.compatiblePackages?.first()?.name!!
|
|
||||||
if (!packages.contains(packageName)) {
|
|
||||||
packages[packageName] = mutableListOf()
|
|
||||||
}
|
|
||||||
|
|
||||||
packages[packageName]?.add(it)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pkg in packages) {
|
|
||||||
output.appendLine("### \uD83D\uDCE6 `${pkg.key}`")
|
|
||||||
output.appendLine("<details>\n")
|
|
||||||
|
|
||||||
output.appendLine(TABLE_HEADER)
|
|
||||||
pkg.value.forEach { output.appendLine("| `${it.patchName}` | ${it.description} | ${it.getLatestVersion() ?: "all"} |") }
|
|
||||||
|
|
||||||
output.appendLine("</details>\n")
|
|
||||||
}
|
|
||||||
|
|
||||||
val readMeTemplateFile = File("README-template.md")
|
|
||||||
val readmeTemplate = Template(readMeTemplateFile.readText())
|
|
||||||
|
|
||||||
readmeTemplate.replaceVariable("table", output.toString())
|
|
||||||
|
|
||||||
val readme = File("README.md")
|
|
||||||
readme.writeText(readmeTemplate.toString())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (pkg in packages.entries.sortedByDescending { it.value.size }) {
|
||||||
|
output.appendLine("### \uD83D\uDCE6 `${pkg.key}`")
|
||||||
|
output.appendLine("<details>\n")
|
||||||
|
|
||||||
|
output.appendLine(TABLE_HEADER)
|
||||||
|
pkg.value.forEach { output.appendLine("| `${it.patchName}` | ${it.description} | ${it.getLatestVersion() ?: "all"} |") }
|
||||||
|
|
||||||
|
output.appendLine("</details>\n")
|
||||||
|
}
|
||||||
|
|
||||||
|
val readmeTemplate = Template(File("README-template.md").readText())
|
||||||
|
readmeTemplate.replaceVariable(TABLE_REGEX, output.toString())
|
||||||
|
|
||||||
|
val readme = File("README.md")
|
||||||
|
readme.writeText(readmeTemplate.toString())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ package app.revanced.meta.readme
|
|||||||
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int) {
|
data class SemanticVersion(val major: Int, val minor: Int, val patch: Int) {
|
||||||
companion object {
|
companion object {
|
||||||
fun fromString(version: String): SemanticVersion {
|
fun fromString(version: String): SemanticVersion {
|
||||||
var parts = version.split(".")
|
val parts = version.split(".")
|
||||||
|
|
||||||
if (parts.count() != 3) throw IllegalArgumentException("Invalid semantic version")
|
if (parts.count() != 3) throw IllegalArgumentException("Invalid semantic version")
|
||||||
|
|
||||||
val versionNumbers = parts.map { it.toInt() }
|
val versionNumbers = parts.map { it.toInt() }
|
||||||
return SemanticVersion(versionNumbers[0], versionNumbers[1], versionNumbers[2])
|
return SemanticVersion(versionNumbers[0], versionNumbers[1], versionNumbers[2])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package app.revanced.meta.readme
|
package app.revanced.meta.readme
|
||||||
|
|
||||||
class Template(template: String) {
|
class Template(template: String) {
|
||||||
val result: StringBuilder = StringBuilder(template)
|
val result = StringBuilder(template)
|
||||||
|
|
||||||
fun replaceVariable(name: String, value: String) {
|
fun replaceVariable(regex: Regex, value: String) {
|
||||||
val regex = Regex("\\{\\{\\s?$name\\s?}}")
|
|
||||||
val range = regex.find(result)!!.range
|
val range = regex.find(result)!!.range
|
||||||
|
|
||||||
result.replace(range.first, range.last + 1, value)
|
result.replace(range.first, range.last + 1, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.anytracker.misc.premium.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.shervinkoushan.anyTracker")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockPremiumCompatibility
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.anytracker.misc.premium.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object IsPurchasedFlowFingerprint : MethodFingerprint(
|
||||||
|
"Landroidx/lifecycle/LiveData",
|
||||||
|
strings = listOf("premium_user", "sku"),
|
||||||
|
)
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package app.revanced.patches.anytracker.misc.premium.patch
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.anytracker.misc.premium.annotations.UnlockPremiumCompatibility
|
||||||
|
import app.revanced.patches.anytracker.misc.premium.fingerprints.IsPurchasedFlowFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-premium")
|
||||||
|
@Description("Unlocks all premium features.")
|
||||||
|
@UnlockPremiumCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockPremiumPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
IsPurchasedFlowFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = IsPurchasedFlowFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-static {v0}, Lkotlinx/coroutines/flow/FlowKt;->flowOf(Ljava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
move-result-object v1
|
||||||
|
const/4 v2, 0x0
|
||||||
|
const-wide/16 v3, 0x0
|
||||||
|
const/4 v5, 0x3
|
||||||
|
const/4 v6, 0x0
|
||||||
|
invoke-static/range {v1 .. v6}, Landroidx/lifecycle/FlowLiveDataConversions;->asLiveData${'$'}default(Lkotlinx/coroutines/flow/Flow;Lkotlin/coroutines/CoroutineContext;JILjava/lang/Object;)Landroidx/lifecycle/LiveData;
|
||||||
|
move-result-object v0
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.backdrops.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.backdrops.wallpapers")])
|
||||||
|
internal annotation class ProUnlockCompatibility
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object ProUnlockFingerprint : MethodFingerprint(
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
Opcode.INVOKE_INTERFACE,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.IF_EQZ
|
||||||
|
),
|
||||||
|
customFingerprint = { it.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;" && it.name == "lambda\$existPurchase\$0" }
|
||||||
|
)
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package app.revanced.patches.backdrops.misc.pro.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
|
||||||
|
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("pro-unlock")
|
||||||
|
@Description("Unlocks pro-only functions.")
|
||||||
|
@ProUnlockCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class ProUnlockPatch : BytecodePatch(
|
||||||
|
listOf(ProUnlockFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val result = ProUnlockFingerprint.result ?: return PatchResultError("${ProUnlockFingerprint.name} not found")
|
||||||
|
|
||||||
|
val moveRegisterInstruction = result.mutableMethod.instruction(result.scanResult.patternScanResult!!.endIndex - 1)
|
||||||
|
val register = (moveRegisterInstruction as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
|
result.mutableMethod.addInstructions(
|
||||||
|
result.scanResult.patternScanResult!!.endIndex,
|
||||||
|
"""
|
||||||
|
const/4 v$register, 0x1
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.citra.misc.premium.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("org.citra.citra_emu")])
|
||||||
|
internal annotation class PremiumUnlockCompatbility
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.citra.misc.premium.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object PremiumUnlockFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { it.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && it.name == "isPremiumActive" }
|
||||||
|
)
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package app.revanced.patches.citra.misc.premium.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patches.citra.misc.premium.annotations.PremiumUnlockCompatbility
|
||||||
|
import app.revanced.patches.citra.misc.premium.fingerprints.PremiumUnlockFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("premium-unlock")
|
||||||
|
@Description("Unlocks premium functions.")
|
||||||
|
@PremiumUnlockCompatbility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class PremiumUnlockPatch : BytecodePatch(
|
||||||
|
listOf(PremiumUnlockFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val result = PremiumUnlockFingerprint.result ?: return PatchResultError("${PremiumUnlockFingerprint.name} not found")
|
||||||
|
|
||||||
|
result.mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.crunchyroll.downloads.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.crunchyroll.crunchyroid")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class DownloadsCompatibility
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.revanced.patches.crunchyroll.downloads.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
@Name("downloads-fingerprint")
|
||||||
|
@DownloadsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
object DownloadsFingerprint : MethodFingerprint(
|
||||||
|
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, null,
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.CONST_STRING,
|
||||||
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
Opcode.MOVE_RESULT,
|
||||||
|
Opcode.RETURN
|
||||||
|
),
|
||||||
|
strings = listOf("offline_viewing"),
|
||||||
|
)
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package app.revanced.patches.crunchyroll.downloads.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.crunchyroll.downloads.annotations.DownloadsCompatibility
|
||||||
|
import app.revanced.patches.crunchyroll.downloads.fingerprints.DownloadsFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("enable-downloads")
|
||||||
|
@Description("Enables downloads for Crunchyroll.")
|
||||||
|
@DownloadsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class DownloadsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
DownloadsFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
with(DownloadsFingerprint.result!!.mutableMethod) {
|
||||||
|
val index = implementation!!.instructions.lastIndex
|
||||||
|
replaceInstruction(
|
||||||
|
index - 1,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.ecmwf.misc.subscription.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[Package(
|
||||||
|
"com.garzotto.pflotsh.ecmwf_a", arrayOf("3.5.4")
|
||||||
|
)]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class SubscriptionUnlockCompatibility
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.ecmwf.misc.subscription.fingerprints
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object SubscriptionUnlockFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("MapsActivity;") && methodDef.name == "t0"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package app.revanced.patches.ecmwf.misc.subscription.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.ecmwf.misc.subscription.annotations.SubscriptionUnlockCompatibility
|
||||||
|
import app.revanced.patches.ecmwf.misc.subscription.fingerprints.SubscriptionUnlockFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("pflotsh-ecmwf-subscription-unlock")
|
||||||
|
@Description("Unlocks all subscription features.")
|
||||||
|
@SubscriptionUnlockCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class SubscriptionUnlockPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
SubscriptionUnlockFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val result = SubscriptionUnlockFingerprint.result!!
|
||||||
|
val method = result.mutableMethod
|
||||||
|
|
||||||
|
val index = method.implementation!!.instructions.size
|
||||||
|
|
||||||
|
// remove R() at 10212
|
||||||
|
method.removeInstruction(index - 3)
|
||||||
|
// remove R() at 10206
|
||||||
|
method.removeInstruction(index - 5)
|
||||||
|
|
||||||
|
val insertIndex = index
|
||||||
|
|
||||||
|
method.addInstructions(
|
||||||
|
insertIndex - 1 - 2,
|
||||||
|
"""
|
||||||
|
const/4 p1, 0x1
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
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)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class HexEditorAdsCompatibility
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.hexeditor.ad.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object PrimaryAdsFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package app.revanced.patches.hexeditor.ad.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.extensions.replaceInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.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
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HexEditorAdsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
PrimaryAdsFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = PrimaryAdsFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
method.replaceInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
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)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
customFingerprint = { it.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||||
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks all pro features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
CheckProFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.moneymanager.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.ithebk.expensemanager")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.revanced.patches.moneymanager.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
|
object UnlockProFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
AccessFlags.STATIC or AccessFlags.SYNTHETIC,
|
||||||
|
parameters = listOf("L"),
|
||||||
|
opcodes = listOf(
|
||||||
|
Opcode.IGET_BOOLEAN,
|
||||||
|
Opcode.RETURN
|
||||||
|
),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("MainActivity;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package app.revanced.patches.moneymanager.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.moneymanager.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.moneymanager.fingerprints.UnlockProFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks pro features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(UnlockProFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
UnlockProFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,23 +1,11 @@
|
|||||||
package app.revanced.patches.music.ad.video.fingerprints
|
package app.revanced.patches.music.ad.video.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("show-video-ads-constructor-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Laghd;",
|
|
||||||
"<init>",
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@MusicVideoAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
|
object ShowMusicVideoAdsConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
|||||||
@@ -1,22 +1,10 @@
|
|||||||
package app.revanced.patches.music.ad.video.fingerprints
|
package app.revanced.patches.music.ad.video.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("show-video-ads-method-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Laghd;", "d"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
|
||||||
@MusicVideoAdsCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
object ShowMusicVideoAdsFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), listOf(
|
||||||
Opcode.IPUT_BOOLEAN,
|
Opcode.IPUT_BOOLEAN,
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ package app.revanced.patches.music.ad.video.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
import app.revanced.patches.music.ad.video.annotations.MusicVideoAdsCompatibility
|
||||||
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
|
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsConstructorFingerprint
|
||||||
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
|
import app.revanced.patches.music.ad.video.fingerprints.ShowMusicVideoAdsFingerprint
|
||||||
@@ -24,13 +24,13 @@ class MusicVideoAdsPatch : BytecodePatch(
|
|||||||
ShowMusicVideoAdsConstructorFingerprint
|
ShowMusicVideoAdsConstructorFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
ShowMusicVideoAdsFingerprint.resolve(data, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
|
ShowMusicVideoAdsFingerprint.resolve(context, ShowMusicVideoAdsConstructorFingerprint.result!!.classDef)
|
||||||
|
|
||||||
val result = ShowMusicVideoAdsFingerprint.result!!
|
val result = ShowMusicVideoAdsFingerprint.result!!
|
||||||
|
|
||||||
result.mutableMethod.addInstructions(
|
result.mutableMethod.addInstructions(
|
||||||
result.patternScanResult!!.startIndex, """
|
result.scanResult.patternScanResult!!.startIndex, """
|
||||||
const/4 p1, 0x0
|
const/4 p1, 0x0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,23 +1,13 @@
|
|||||||
package app.revanced.patches.music.audio.codecs.fingerprints
|
package app.revanced.patches.music.audio.codecs.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher. fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("all-codecs-reference-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Laari;",
|
|
||||||
"b",
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@CodecsUnlockCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object AllCodecsReferenceFingerprint : MethodFingerprint(
|
object AllCodecsReferenceFingerprint : MethodFingerprint(
|
||||||
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
|
"J", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("L"), listOf(
|
||||||
Opcode.INVOKE_STATIC,
|
Opcode.INVOKE_STATIC,
|
||||||
|
|||||||
@@ -1,25 +1,15 @@
|
|||||||
package app.revanced.patches.music.audio.codecs.fingerprints
|
package app.revanced.patches.music.audio.codecs.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("codec-lock-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lacfr;",
|
|
||||||
"a",
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@CodecsUnlockCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CodecsLockFingerprint : MethodFingerprint(
|
object CodecsLockFingerprint : MethodFingerprint(
|
||||||
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, null, listOf(
|
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT,
|
Opcode.MOVE_RESULT,
|
||||||
@@ -35,5 +25,5 @@ object CodecsLockFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.RETURN_OBJECT
|
Opcode.RETURN_OBJECT
|
||||||
),
|
),
|
||||||
listOf("eac3_supported")
|
strings = listOf("eac3_supported")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package app.revanced.patches.music.audio.codecs.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.data.impl.toMethodWalker
|
import app.revanced.patcher.data.toMethodWalker
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.smali.toInstruction
|
import app.revanced.patcher.util.smali.toInstruction
|
||||||
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
import app.revanced.patches.music.audio.codecs.annotations.CodecsUnlockCompatibility
|
||||||
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
|
import app.revanced.patches.music.audio.codecs.fingerprints.AllCodecsReferenceFingerprint
|
||||||
@@ -25,12 +25,12 @@ class CodecsUnlockPatch : BytecodePatch(
|
|||||||
CodecsLockFingerprint, AllCodecsReferenceFingerprint
|
CodecsLockFingerprint, AllCodecsReferenceFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
val codecsLockResult = CodecsLockFingerprint.result!!
|
val codecsLockResult = CodecsLockFingerprint.result!!
|
||||||
|
|
||||||
val implementation = codecsLockResult.mutableMethod.implementation!!
|
val implementation = codecsLockResult.mutableMethod.implementation!!
|
||||||
|
|
||||||
val scanResultStartIndex = codecsLockResult.patternScanResult!!.startIndex
|
val scanResultStartIndex = codecsLockResult.scanResult.patternScanResult!!.startIndex
|
||||||
val instructionIndex = scanResultStartIndex +
|
val instructionIndex = scanResultStartIndex +
|
||||||
if (implementation.instructions[scanResultStartIndex - 1].opcode == Opcode.CHECK_CAST) {
|
if (implementation.instructions[scanResultStartIndex - 1].opcode == Opcode.CHECK_CAST) {
|
||||||
// for 5.16.xx and lower
|
// for 5.16.xx and lower
|
||||||
@@ -42,8 +42,8 @@ class CodecsUnlockPatch : BytecodePatch(
|
|||||||
|
|
||||||
val allCodecsResult = AllCodecsReferenceFingerprint.result!!
|
val allCodecsResult = AllCodecsReferenceFingerprint.result!!
|
||||||
val allCodecsMethod =
|
val allCodecsMethod =
|
||||||
data.toMethodWalker(allCodecsResult.method)
|
context.toMethodWalker(allCodecsResult.method)
|
||||||
.nextMethod(allCodecsResult.patternScanResult!!.startIndex)
|
.nextMethod(allCodecsResult.scanResult.patternScanResult!!.startIndex)
|
||||||
.getMethod()
|
.getMethod()
|
||||||
|
|
||||||
implementation.replaceInstruction(
|
implementation.replaceInstruction(
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,25 +1,10 @@
|
|||||||
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("audio-only-enabler-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lgmd;",
|
|
||||||
"d"
|
|
||||||
)
|
|
||||||
@DirectPatternScanMethod
|
|
||||||
@ExclusiveAudioCompatibility
|
|
||||||
@Version(
|
|
||||||
"0.0.1"
|
|
||||||
)
|
|
||||||
object AudioOnlyEnablerFingerprint: MethodFingerprint(
|
object AudioOnlyEnablerFingerprint: MethodFingerprint(
|
||||||
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"Z", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
|
|||||||
@@ -1,22 +1,13 @@
|
|||||||
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
package app.revanced.patches.music.audio.exclusiveaudio.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("exclusive-audio-fingerprints")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lgmd;", "c"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@ExclusiveAudioCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ExclusiveAudioFingerprint : MethodFingerprint(
|
object ExclusiveAudioFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -3,17 +3,15 @@ package app.revanced.patches.music.audio.exclusiveaudio.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstruction
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
import app.revanced.patches.music.audio.exclusiveaudio.annotations.ExclusiveAudioCompatibility
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
|
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.AudioOnlyEnablerFingerprint
|
||||||
import app.revanced.patches.music.audio.exclusiveaudio.fingerprints.ExclusiveAudioFingerprint
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("exclusive-audio-playback")
|
@Name("exclusive-audio-playback")
|
||||||
@@ -25,7 +23,7 @@ class ExclusiveAudioPatch : BytecodePatch(
|
|||||||
AudioOnlyEnablerFingerprint
|
AudioOnlyEnablerFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
|
val method = AudioOnlyEnablerFingerprint.result!!.mutableMethod
|
||||||
method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1")
|
method.replaceInstruction(method.implementation!!.instructions.count() - 1, "const/4 v0, 0x1")
|
||||||
method.addInstruction("return v0")
|
method.addInstruction("return v0")
|
||||||
|
|||||||
@@ -5,7 +5,22 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.compactheader.fingerprints
|
package app.revanced.patches.music.layout.compactheader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("compact-header-constructor-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Llcz;", "<init>"
|
|
||||||
)
|
|
||||||
@CompactHeaderCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CompactHeaderConstructorFingerprint : MethodFingerprint(
|
object CompactHeaderConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L", "L"), listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package app.revanced.patches.music.layout.compactheader.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
|
import app.revanced.patches.music.layout.compactheader.annotations.CompactHeaderCompatibility
|
||||||
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
|
import app.revanced.patches.music.layout.compactheader.fingerprints.CompactHeaderConstructorFingerprint
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction11x
|
||||||
@@ -23,16 +23,16 @@ class CompactHeaderPatch : BytecodePatch(
|
|||||||
CompactHeaderConstructorFingerprint
|
CompactHeaderConstructorFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
val result = CompactHeaderConstructorFingerprint.result!!
|
val result = CompactHeaderConstructorFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
val insertIndex = result.patternScanResult!!.endIndex
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
insertIndex, """
|
insertIndex, """
|
||||||
const/16 v0, 0x8
|
const/16 v2, 0x8
|
||||||
invoke-virtual {v${register}, v0}, Landroid/view/View;->setVisibility(I)V
|
invoke-virtual {v${register}, v2}, Landroid/view/View;->setVisibility(I)V
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
package app.revanced.patches.music.layout.minimizedplayback.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("minimized-playback-manager-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Llxw;", "c"
|
|
||||||
)
|
|
||||||
@MinimizedPlaybackCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
|
|||||||
@@ -3,18 +3,14 @@ package app.revanced.patches.music.layout.minimizedplayback.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.data.impl.toMethodWalker
|
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
|
import app.revanced.patches.music.layout.minimizedplayback.annotations.MinimizedPlaybackCompatibility
|
||||||
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
import app.revanced.patches.music.layout.minimizedplayback.fingerprints.MinimizedPlaybackManagerFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import org.jf.dexlib2.iface.reference.MethodReference
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@Name("minimized-playback-music")
|
@Name("minimized-playback-music")
|
||||||
@@ -26,7 +22,7 @@ class MinimizedPlaybackPatch : BytecodePatch(
|
|||||||
MinimizedPlaybackManagerFingerprint
|
MinimizedPlaybackManagerFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstructions(
|
MinimizedPlaybackManagerFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0, """
|
0, """
|
||||||
return-void
|
return-void
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.premium.fingerprints
|
package app.revanced.patches.music.layout.premium.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("hide-get-premium-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lktn;", "k"
|
|
||||||
)
|
|
||||||
@HideGetPremiumCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object HideGetPremiumFingerprint : MethodFingerprint(
|
object HideGetPremiumFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
Opcode.IF_NEZ,
|
Opcode.IF_NEZ,
|
||||||
|
|||||||
@@ -1,20 +1,10 @@
|
|||||||
package app.revanced.patches.music.layout.premium.fingerprints
|
package app.revanced.patches.music.layout.premium.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("hide-get-premium-parent-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lktn;", "k"
|
|
||||||
)
|
|
||||||
@HideGetPremiumCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
object HideGetPremiumParentFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf(), listOf(
|
||||||
Opcode.IGET_BOOLEAN,
|
Opcode.IGET_BOOLEAN,
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ package app.revanced.patches.music.layout.premium.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.extensions.replaceInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
import app.revanced.patches.music.layout.premium.annotations.HideGetPremiumCompatibility
|
||||||
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
|
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumFingerprint
|
||||||
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
|
import app.revanced.patches.music.layout.premium.fingerprints.HideGetPremiumParentFingerprint
|
||||||
@@ -25,13 +25,15 @@ class HideGetPremiumPatch : BytecodePatch(
|
|||||||
HideGetPremiumParentFingerprint
|
HideGetPremiumParentFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
val parentResult = HideGetPremiumParentFingerprint.result!!
|
val parentResult = HideGetPremiumParentFingerprint.result!!
|
||||||
HideGetPremiumFingerprint.resolve(data, parentResult.classDef)
|
HideGetPremiumFingerprint.resolve(context, parentResult.classDef)
|
||||||
|
|
||||||
|
val startIndex = parentResult.scanResult.patternScanResult!!.startIndex
|
||||||
|
|
||||||
val parentMethod = parentResult.mutableMethod
|
val parentMethod = parentResult.mutableMethod
|
||||||
parentMethod.replaceInstruction(
|
parentMethod.replaceInstruction(
|
||||||
parentResult.patternScanResult!!.startIndex, """
|
startIndex, """
|
||||||
const/4 v1, 0x0
|
const/4 v1, 0x0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
@@ -39,7 +41,7 @@ class HideGetPremiumPatch : BytecodePatch(
|
|||||||
val result = HideGetPremiumFingerprint.result!!
|
val result = HideGetPremiumFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
result.patternScanResult!!.startIndex, """
|
startIndex, """
|
||||||
const/16 v0, 0x8
|
const/16 v0, 0x8
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,20 @@ import app.revanced.patcher.annotation.Package
|
|||||||
*/
|
*/
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,24 +1,15 @@
|
|||||||
package app.revanced.patches.music.layout.tastebuilder.fingerprints
|
package app.revanced.patches.music.layout.tastebuilder.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("taste-builder-constructor-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lkyu;", "<init>"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@RemoveTasteBuilderCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object TasteBuilderConstructorFingerprint : MethodFingerprint(
|
object TasteBuilderConstructorFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L", "L"), listOf(
|
"V", AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, listOf("L", "L", "L"), listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.NEW_INSTANCE,
|
Opcode.NEW_INSTANCE,
|
||||||
@@ -35,9 +26,9 @@ object TasteBuilderConstructorFingerprint : MethodFingerprint(
|
|||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
Opcode.IPUT_OBJECT,
|
|
||||||
Opcode.NEW_INSTANCE,
|
Opcode.NEW_INSTANCE,
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.IPUT_OBJECT
|
Opcode.IPUT_OBJECT,
|
||||||
|
Opcode.CONST
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -3,12 +3,12 @@ package app.revanced.patches.music.layout.tastebuilder.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
|
import app.revanced.patches.music.layout.tastebuilder.annotations.RemoveTasteBuilderCompatibility
|
||||||
import app.revanced.patches.music.layout.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
|
import app.revanced.patches.music.layout.tastebuilder.fingerprints.TasteBuilderConstructorFingerprint
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
import org.jf.dexlib2.iface.instruction.formats.Instruction22c
|
||||||
@@ -23,11 +23,11 @@ class RemoveTasteBuilderPatch : BytecodePatch(
|
|||||||
TasteBuilderConstructorFingerprint
|
TasteBuilderConstructorFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
val result = TasteBuilderConstructorFingerprint.result!!
|
val result = TasteBuilderConstructorFingerprint.result!!
|
||||||
val method = result.mutableMethod
|
val method = result.mutableMethod
|
||||||
|
|
||||||
val insertIndex = result.patternScanResult!!.endIndex - 8
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex - 8
|
||||||
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
|
val register = (method.implementation!!.instructions[insertIndex] as Instruction22c).registerA
|
||||||
method.addInstructions(
|
method.addInstructions(
|
||||||
insertIndex, """
|
insertIndex, """
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,22 +1,13 @@
|
|||||||
package app.revanced.patches.music.layout.upgradebutton.fingerprints
|
package app.revanced.patches.music.layout.upgradebutton.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("pivot-bar-constructor-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lhfu;", "<init2>"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@RemoveUpgradeButtonCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PivotBarConstructorFingerprint : MethodFingerprint(
|
object PivotBarConstructorFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package app.revanced.patches.music.layout.upgradebutton.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.smali.toInstructions
|
import app.revanced.patcher.util.smali.toInstructions
|
||||||
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
|
import app.revanced.patches.music.layout.upgradebutton.annotations.RemoveUpgradeButtonCompatibility
|
||||||
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
import app.revanced.patches.music.layout.upgradebutton.fingerprints.PivotBarConstructorFingerprint
|
||||||
@@ -28,12 +28,12 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
PivotBarConstructorFingerprint
|
PivotBarConstructorFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
val result = PivotBarConstructorFingerprint.result!!
|
val result = PivotBarConstructorFingerprint.result!!
|
||||||
val implementation = result.mutableMethod.implementation!!
|
val implementation = result.mutableMethod.implementation!!
|
||||||
|
|
||||||
val pivotBarElementFieldRef =
|
val pivotBarElementFieldRef =
|
||||||
(implementation.instructions[result.patternScanResult!!.endIndex - 1] as Instruction22c).reference
|
(implementation.instructions[result.scanResult.patternScanResult!!.endIndex - 1] as Instruction22c).reference
|
||||||
|
|
||||||
val register = (implementation.instructions.first() as Instruction35c).registerC
|
val register = (implementation.instructions.first() as Instruction35c).registerC
|
||||||
// first compile all the needed instructions
|
// first compile all the needed instructions
|
||||||
@@ -46,16 +46,18 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
""".toInstructions().toMutableList()
|
""".toInstructions().toMutableList()
|
||||||
|
|
||||||
|
|
||||||
|
val endIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
|
|
||||||
// replace the instruction to retain the label at given index
|
// replace the instruction to retain the label at given index
|
||||||
implementation.replaceInstruction(
|
implementation.replaceInstruction(
|
||||||
result.patternScanResult!!.endIndex - 1, instructionList[0] // invoke-interface
|
endIndex - 1, instructionList[0] // invoke-interface
|
||||||
)
|
)
|
||||||
// do not forget to remove this instruction since we added it already
|
// do not forget to remove this instruction since we added it already
|
||||||
instructionList.removeFirst()
|
instructionList.removeFirst()
|
||||||
|
|
||||||
val exitInstruction = instructionList.last() // iput-object
|
val exitInstruction = instructionList.last() // iput-object
|
||||||
implementation.addInstruction(
|
implementation.addInstruction(
|
||||||
result.patternScanResult!!.endIndex, exitInstruction
|
endIndex, exitInstruction
|
||||||
)
|
)
|
||||||
// do not forget to remove this instruction since we added it already
|
// do not forget to remove this instruction since we added it already
|
||||||
instructionList.removeLast()
|
instructionList.removeLast()
|
||||||
@@ -64,12 +66,12 @@ class RemoveUpgradeButtonPatch : BytecodePatch(
|
|||||||
instructionList.add(
|
instructionList.add(
|
||||||
2, // if-le
|
2, // if-le
|
||||||
BuilderInstruction22t(
|
BuilderInstruction22t(
|
||||||
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(result.patternScanResult!!.endIndex)
|
Opcode.IF_LE, 1, 2, implementation.newLabelForIndex(endIndex)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
implementation.addInstructions(
|
implementation.addInstructions(
|
||||||
result.patternScanResult!!.endIndex, instructionList
|
endIndex, instructionList
|
||||||
)
|
)
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,20 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("cast-context-fetch-fingerprint")
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
@MatchingMethod(
|
|
||||||
"Lvvz;", "a"
|
|
||||||
)
|
|
||||||
@DirectPatternScanMethod
|
|
||||||
@MicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CastContextFetchFingerprint : MethodFingerprint(
|
object CastContextFetchFingerprint : MethodFingerprint(
|
||||||
null, null, null, null,
|
strings = listOf("Error fetching CastContext.")
|
||||||
listOf("Error fetching CastContext.")
|
|
||||||
)
|
)
|
||||||
@@ -1,20 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("cast-module-fingerprint")
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
@MatchingMethod(
|
|
||||||
"Llqh;", "c"
|
|
||||||
)
|
|
||||||
@DirectPatternScanMethod
|
|
||||||
@MicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CastDynamiteModuleFingerprint : MethodFingerprint(
|
object CastDynamiteModuleFingerprint : MethodFingerprint(
|
||||||
null, null, null, null,
|
strings = listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
|
||||||
listOf("com.google.android.gms.cast.framework.internal.CastDynamiteModuleImpl")
|
|
||||||
)
|
)
|
||||||
@@ -1,20 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.youtube.misc.microg.annotations.MicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("cast-context-fetch-fingerprint")
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
@MatchingMethod(
|
|
||||||
"Lmcf;", "c"
|
|
||||||
)
|
|
||||||
@DirectPatternScanMethod
|
|
||||||
@MicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
|
object CastDynamiteModuleV2Fingerprint : MethodFingerprint(
|
||||||
null, null, null, null,
|
strings = listOf("Failed to load module via V2: ")
|
||||||
listOf("Failed to load module via V2: ")
|
|
||||||
)
|
)
|
||||||
@@ -1,21 +1,18 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("google-play-utility-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lnuv;", "b"
|
|
||||||
)
|
|
||||||
@DirectPatternScanMethod
|
|
||||||
@MusicMicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
object GooglePlayUtilityFingerprint : MethodFingerprint(
|
||||||
"I", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null, listOf("This should never happen.", "MetadataValueReader", "GooglePlayServicesUtil", "com.android.vending", "android.hardware.type.embedded")
|
"I",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
listOf("L", "I"),
|
||||||
|
strings = listOf(
|
||||||
|
"This should never happen.",
|
||||||
|
"MetadataValueReader",
|
||||||
|
"GooglePlayServicesUtil",
|
||||||
|
"com.android.vending",
|
||||||
|
"android.hardware.type.embedded"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
@@ -1,19 +1,8 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.DirectPatternScanMethod
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
|
||||||
|
|
||||||
@Name("google-play-prime-fingerprint")
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
@MatchingMethod(
|
|
||||||
"Lrwi;", "a"
|
|
||||||
)
|
|
||||||
@DirectPatternScanMethod
|
|
||||||
@MusicMicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object PrimeFingerprint : MethodFingerprint(
|
object PrimeFingerprint : MethodFingerprint(
|
||||||
null, null, null, null, listOf("com.google.android.GoogleCamera", "com.android.vending")
|
strings = listOf("com.google.android.GoogleCamera", "com.android.vending")
|
||||||
)
|
)
|
||||||
@@ -1,21 +1,15 @@
|
|||||||
package app.revanced.patches.music.misc.microg.fingerprints
|
package app.revanced.patches.music.misc.microg.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
@Name("google-play-service-checker-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lnuv;", "d"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@MusicMicroGPatchCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object ServiceCheckFingerprint : MethodFingerprint(
|
object ServiceCheckFingerprint : MethodFingerprint(
|
||||||
"V", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L", "I"), null, listOf("Google Play Services not available")
|
"V",
|
||||||
|
AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
|
listOf("L", "I"),
|
||||||
|
strings = listOf("Google Play Services not available")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,37 +1,27 @@
|
|||||||
package app.revanced.patches.music.misc.microg.patch.bytecode
|
package app.revanced.patches.music.misc.microg.patch.bytecode
|
||||||
|
|
||||||
import app.revanced.extensions.equalsAny
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.annotations.DependsOn
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
||||||
import app.revanced.patches.music.misc.microg.patch.resource.MusicMicroGResourcePatch
|
|
||||||
import app.revanced.patches.youtube.misc.microg.patch.resource.enum.StringReplaceMode
|
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME
|
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
|
||||||
import app.revanced.patches.music.misc.microg.fingerprints.*
|
import app.revanced.patches.music.misc.microg.fingerprints.*
|
||||||
import org.jf.dexlib2.Opcode
|
import app.revanced.patches.music.misc.microg.patch.resource.MusicMicroGResourcePatch
|
||||||
import org.jf.dexlib2.builder.MutableMethodImplementation
|
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
|
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
||||||
import org.jf.dexlib2.iface.instruction.formats.Instruction21c
|
import app.revanced.patches.youtube.misc.microg.shared.Constants
|
||||||
import org.jf.dexlib2.iface.reference.StringReference
|
import app.revanced.util.microg.MicroGBytecodeHelper
|
||||||
import org.jf.dexlib2.immutable.reference.ImmutableStringReference
|
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
@DependsOn([MusicMicroGResourcePatch::class])
|
@DependsOn([MusicMicroGResourcePatch::class])
|
||||||
@Name("music-microg-support")
|
@Name("music-microg-support")
|
||||||
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
|
@Description("Allows YouTube Music ReVanced to run without root and under a different package name.")
|
||||||
@MusicMicroGPatchCompatibility
|
@MusicMicroGPatchCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.2")
|
||||||
class MusicMicroGBytecodePatch : BytecodePatch(
|
class MusicMicroGBytecodePatch : BytecodePatch(
|
||||||
listOf(
|
listOf(
|
||||||
ServiceCheckFingerprint,
|
ServiceCheckFingerprint,
|
||||||
@@ -42,130 +32,34 @@ class MusicMicroGBytecodePatch : BytecodePatch(
|
|||||||
PrimeFingerprint,
|
PrimeFingerprint,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
// NOTE: the previous patch also replaced the following strings, but it seems like they are not needed:
|
||||||
disablePlayServiceChecks()
|
// - "com.google.android.gms.chimera.GmsIntentOperationService",
|
||||||
data.classes.forEach { classDef ->
|
// - "com.google.android.gms.phenotype.internal.IPhenotypeCallbacks",
|
||||||
var proxiedClass: MutableClass? = null
|
// - "com.google.android.gms.phenotype.internal.IPhenotypeService",
|
||||||
|
// - "com.google.android.gms.phenotype.PACKAGE_NAME",
|
||||||
classDef.methods.forEach methodLoop@{ method ->
|
// - "com.google.android.gms.phenotype.UPDATE",
|
||||||
val implementation = method.implementation ?: return@methodLoop
|
// - "com.google.android.gms.phenotype",
|
||||||
|
override fun execute(context: BytecodeContext) =
|
||||||
var proxiedImplementation: MutableMethodImplementation? = null
|
// apply common microG patch
|
||||||
|
MicroGBytecodeHelper.patchBytecode(
|
||||||
implementation.instructions.forEachIndexed { i, instruction ->
|
context,
|
||||||
if (instruction.opcode != Opcode.CONST_STRING) return@forEachIndexed
|
arrayOf(
|
||||||
|
MicroGBytecodeHelper.packageNameTransform(
|
||||||
val stringValue = ((instruction as Instruction21c).reference as StringReference).string
|
Constants.PACKAGE_NAME,
|
||||||
|
Constants.REVANCED_PACKAGE_NAME
|
||||||
val replaceMode = if (stringValue.equalsAny(
|
)
|
||||||
"com.google.android.gms",
|
),
|
||||||
"com.google.android.gms.chimera",
|
MicroGBytecodeHelper.PrimeMethodTransformationData(
|
||||||
"com.google.android.c2dm.intent.REGISTER",
|
PrimeFingerprint,
|
||||||
"com.google.android.c2dm.permission.SEND",
|
MUSIC_PACKAGE_NAME,
|
||||||
"com.google.iid.TOKEN_REQUEST",
|
REVANCED_MUSIC_PACKAGE_NAME
|
||||||
"com.google",
|
),
|
||||||
"com.google.android.gms.chimera.GmsIntentOperationService",
|
listOf(
|
||||||
"com.google.android.gms.phenotype.internal.IPhenotypeCallbacks",
|
ServiceCheckFingerprint,
|
||||||
"com.google.android.gms.phenotype.internal.IPhenotypeService",
|
GooglePlayUtilityFingerprint,
|
||||||
"com.google.android.gms.phenotype.service.START",
|
CastDynamiteModuleFingerprint,
|
||||||
"com.google.android.gms.phenotype.PACKAGE_NAME",
|
CastDynamiteModuleV2Fingerprint,
|
||||||
"com.google.android.gms.phenotype.UPDATE",
|
CastContextFetchFingerprint
|
||||||
"com.google.android.gms.phenotype",
|
|
||||||
"com.google.android.gms.auth.accounts",
|
|
||||||
"com.google.android.c2dm.intent.REGISTRATION",
|
|
||||||
"com.google.android.gsf.action.GET_GLS",
|
|
||||||
"com.google.android.gsf.login",
|
|
||||||
"content://com.google.settings/partner",
|
|
||||||
"content://com.google.android.gms.phenotype/",
|
|
||||||
"content://com.google.android.gsf.gservices",
|
|
||||||
"content://com.google.android.gsf.gservices/prefix",
|
|
||||||
"com.google.android.c2dm.intent.RECEIVE"
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
StringReplaceMode.REPLACE_WITH_MICROG
|
|
||||||
} else if (stringValue.equalsAny(
|
|
||||||
"com.google.android.apps.youtube.music.SuggestionsProvider", "com.google.android.apps.youtube.music.fileprovider"
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
StringReplaceMode.REPLACE_WITH_REVANCED
|
|
||||||
} else {
|
|
||||||
StringReplaceMode.DO_NOT_REPLACE
|
|
||||||
}
|
|
||||||
|
|
||||||
if (replaceMode != StringReplaceMode.DO_NOT_REPLACE) {
|
|
||||||
if (proxiedClass == null) {
|
|
||||||
proxiedClass = data.proxy(classDef).resolve()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (proxiedImplementation == null) {
|
|
||||||
proxiedImplementation = proxiedClass!!.methods.first {
|
|
||||||
it.name == method.name && it.parameterTypes.containsAll(method.parameterTypes)
|
|
||||||
}.implementation!!
|
|
||||||
}
|
|
||||||
|
|
||||||
val newString = if (replaceMode == StringReplaceMode.REPLACE_WITH_REVANCED) stringValue.replace(
|
|
||||||
"com.google.android.apps.youtube.music", REVANCED_MUSIC_PACKAGE_NAME
|
|
||||||
)
|
|
||||||
else stringValue.replace("com.google", BASE_MICROG_PACKAGE_NAME)
|
|
||||||
|
|
||||||
proxiedImplementation!!.replaceInstruction(
|
|
||||||
i, BuilderInstruction21c(
|
|
||||||
Opcode.CONST_STRING, instruction.registerA, ImmutableStringReference(newString)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun disablePlayServiceChecks() {
|
|
||||||
listOf(
|
|
||||||
ServiceCheckFingerprint,
|
|
||||||
GooglePlayUtilityFingerprint,
|
|
||||||
CastDynamiteModuleFingerprint,
|
|
||||||
CastDynamiteModuleV2Fingerprint,
|
|
||||||
CastContextFetchFingerprint,
|
|
||||||
).forEach { fingerprint ->
|
|
||||||
val result = fingerprint.result!!
|
|
||||||
val stringInstructions = when (result.method.returnType.first()) {
|
|
||||||
'L' -> """
|
|
||||||
const/4 v0, 0x0
|
|
||||||
return-object v0
|
|
||||||
"""
|
|
||||||
|
|
||||||
'V' -> "return-void"
|
|
||||||
'I' -> """
|
|
||||||
const/4 v0, 0x0
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
|
|
||||||
else -> throw Exception("This case should never happen.")
|
|
||||||
}
|
|
||||||
result.mutableMethod.addInstructions(
|
|
||||||
0, stringInstructions
|
|
||||||
)
|
)
|
||||||
}
|
).let { PatchResultSuccess() }
|
||||||
|
|
||||||
val primeMethod = PrimeFingerprint.result!!.mutableMethod
|
|
||||||
val implementation = primeMethod.implementation!!
|
|
||||||
|
|
||||||
var register = 2
|
|
||||||
val index = implementation.instructions.indexOfFirst {
|
|
||||||
if (it.opcode != Opcode.CONST_STRING) return@indexOfFirst false
|
|
||||||
|
|
||||||
val instructionString = ((it as Instruction21c).reference as StringReference).string
|
|
||||||
if (instructionString != "com.google.android.apps.youtube.music") return@indexOfFirst false
|
|
||||||
|
|
||||||
register = it.registerA
|
|
||||||
return@indexOfFirst true
|
|
||||||
}
|
|
||||||
|
|
||||||
primeMethod.replaceInstruction(
|
|
||||||
index, "const-string v$register, \"$REVANCED_MUSIC_PACKAGE_NAME\""
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +1,41 @@
|
|||||||
package app.revanced.patches.music.misc.microg.patch.resource
|
package app.revanced.patches.music.misc.microg.patch.resource
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.ResourceData
|
import app.revanced.patcher.data.ResourceContext
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
import app.revanced.patches.music.misc.microg.annotations.MusicMicroGPatchCompatibility
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.BASE_MICROG_PACKAGE_NAME
|
import app.revanced.patches.music.misc.microg.shared.Constants.MUSIC_PACKAGE_NAME
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
|
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_APP_NAME
|
||||||
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
import app.revanced.patches.music.misc.microg.shared.Constants.REVANCED_MUSIC_PACKAGE_NAME
|
||||||
|
import app.revanced.patches.music.misc.microg.shared.Constants.SPOOFED_PACKAGE_NAME
|
||||||
@Name("music-microg-resource-patch")
|
import app.revanced.patches.music.misc.microg.shared.Constants.SPOOFED_PACKAGE_SIGNATURE
|
||||||
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
|
import app.revanced.util.microg.MicroGManifestHelper
|
||||||
@MusicMicroGPatchCompatibility
|
import app.revanced.util.microg.MicroGResourceHelper
|
||||||
@Version("0.0.1")
|
|
||||||
class MusicMicroGResourcePatch : ResourcePatch() {
|
@Name("music-microg-resource-patch")
|
||||||
override fun execute(data: ResourceData): PatchResult {
|
@Description("Resource patch to allow YouTube Music ReVanced to run without root and under a different package name.")
|
||||||
|
@MusicMicroGPatchCompatibility
|
||||||
val manifest = data["AndroidManifest.xml"].readText()
|
@Version("0.0.2")
|
||||||
|
class MusicMicroGResourcePatch : ResourcePatch {
|
||||||
data["AndroidManifest.xml"].writeText(
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
manifest.replace(
|
// update manifest
|
||||||
"package=\"com.google.android.apps.youtube.music", "package=\"$REVANCED_MUSIC_PACKAGE_NAME"
|
MicroGResourceHelper.patchManifest(
|
||||||
).replace(
|
context,
|
||||||
"android:label=\"@string/app_name", "android:label=\"$REVANCED_MUSIC_APP_NAME"
|
MUSIC_PACKAGE_NAME,
|
||||||
).replace(
|
REVANCED_MUSIC_PACKAGE_NAME,
|
||||||
"android:label=\"@string/app_launcher_name", "android:label=\"$REVANCED_MUSIC_APP_NAME"
|
REVANCED_MUSIC_APP_NAME
|
||||||
).replace(
|
)
|
||||||
"android:authorities=\"com.google.android.apps.youtube.music", "android:authorities=\"$REVANCED_MUSIC_PACKAGE_NAME"
|
|
||||||
).replace(
|
// add metadata to the manifest
|
||||||
"com.google.android.apps.youtube.music.permission.C2D_MESSAGE", "$REVANCED_MUSIC_PACKAGE_NAME.permission.C2D_MESSAGE"
|
MicroGManifestHelper.addSpoofingMetadata(
|
||||||
).replace(
|
context,
|
||||||
"com.google.android.c2dm", "$BASE_MICROG_PACKAGE_NAME.android.c2dm"
|
SPOOFED_PACKAGE_NAME,
|
||||||
).replace(
|
SPOOFED_PACKAGE_SIGNATURE
|
||||||
"</queries>", "<package android:name=\"$BASE_MICROG_PACKAGE_NAME.android.gms\"/></queries>"
|
)
|
||||||
)
|
return PatchResultSuccess()
|
||||||
)
|
}
|
||||||
|
|
||||||
return PatchResultSuccess()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package app.revanced.patches.music.misc.microg.shared
|
package app.revanced.patches.music.misc.microg.shared
|
||||||
|
|
||||||
object Constants {
|
object Constants {
|
||||||
internal const val BASE_MICROG_PACKAGE_NAME = "com.mgoogle"
|
internal const val REVANCED_MUSIC_APP_NAME = "YT Music ReVanced"
|
||||||
internal const val REVANCED_MUSIC_APP_NAME = "YouTube Music ReVanced"
|
|
||||||
internal const val REVANCED_MUSIC_PACKAGE_NAME = "app.revanced.android.apps.youtube.music"
|
internal const val REVANCED_MUSIC_PACKAGE_NAME = "app.revanced.android.apps.youtube.music"
|
||||||
}
|
internal const val MUSIC_PACKAGE_NAME = "com.google.android.apps.youtube.music"
|
||||||
|
internal const val SPOOFED_PACKAGE_NAME = MUSIC_PACKAGE_NAME
|
||||||
|
internal const val SPOOFED_PACKAGE_SIGNATURE = "afb0fed5eeaebdd86f56a97742f4b6b33ef59875"
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,23 @@ import app.revanced.patcher.annotation.Package
|
|||||||
|
|
||||||
@Compatibility(
|
@Compatibility(
|
||||||
[Package(
|
[Package(
|
||||||
"com.google.android.apps.youtube.music", arrayOf("5.14.53", "5.16.51", "5.17.51")
|
"com.google.android.apps.youtube.music",
|
||||||
|
arrayOf(
|
||||||
|
"5.14.53",
|
||||||
|
"5.16.51",
|
||||||
|
"5.17.51",
|
||||||
|
"5.21.52",
|
||||||
|
"5.22.54",
|
||||||
|
"5.23.50",
|
||||||
|
"5.25.51",
|
||||||
|
"5.25.52",
|
||||||
|
"5.26.52",
|
||||||
|
"5.27.51",
|
||||||
|
"5.28.52",
|
||||||
|
"5.29.52",
|
||||||
|
"5.31.50",
|
||||||
|
"5.34.51"
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
|||||||
@@ -1,22 +1,13 @@
|
|||||||
package app.revanced.patches.music.premium.backgroundplay.fingerprints
|
package app.revanced.patches.music.premium.backgroundplay.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.annotation.Name
|
|
||||||
import app.revanced.patcher.annotation.Version
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
import app.revanced.patcher.fingerprint.method.annotation.FuzzyPatternScanMethod
|
||||||
import app.revanced.patcher.fingerprint.method.annotation.MatchingMethod
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
|
|
||||||
import org.jf.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
@Name("background-playback-disabler-fingerprint")
|
|
||||||
@MatchingMethod(
|
|
||||||
"Lafgf;", "e"
|
|
||||||
)
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
@BackgroundPlayCompatibility
|
|
||||||
@Version("0.0.1")
|
|
||||||
object BackgroundPlaybackDisableFingerprint : MethodFingerprint(
|
object BackgroundPlaybackDisableFingerprint : MethodFingerprint(
|
||||||
"Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf(
|
"Z", AccessFlags.PUBLIC or AccessFlags.STATIC, listOf("L"), listOf(
|
||||||
Opcode.CONST_4,
|
Opcode.CONST_4,
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package app.revanced.patches.music.premium.backgroundplay.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
|
import app.revanced.patches.music.premium.backgroundplay.annotations.BackgroundPlayCompatibility
|
||||||
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
|
import app.revanced.patches.music.premium.backgroundplay.fingerprints.BackgroundPlaybackDisableFingerprint
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ class BackgroundPlayPatch : BytecodePatch(
|
|||||||
BackgroundPlaybackDisableFingerprint
|
BackgroundPlaybackDisableFingerprint
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
|
BackgroundPlaybackDisableFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.myexpenses.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("org.totschnig.myexpenses")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.myexpenses.misc.pro.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object IsEnabledFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
strings = listOf("feature", "feature.licenceStatus")
|
||||||
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.myexpenses.misc.pro.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.myexpenses.misc.pro.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.myexpenses.misc.pro.fingerprints.IsEnabledFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks all professional features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
IsEnabledFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = IsEnabledFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.nyx.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.awedea.nyx")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.nyx.misc.pro.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("BillingManager;") && methodDef.name == "isProVersion"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.nyx.misc.pro.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.nyx.misc.pro.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.nyx.misc.pro.fingerprints.CheckProFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks all pro features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
CheckProFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,11 +3,7 @@ package app.revanced.patches.reddit.ad.general.annotations
|
|||||||
import app.revanced.patcher.annotation.Compatibility
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
import app.revanced.patcher.annotation.Package
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
@Compatibility(
|
@Compatibility([Package("com.reddit.frontpage")])
|
||||||
[Package(
|
|
||||||
"com.reddit.frontpage", arrayOf()
|
|
||||||
)]
|
|
||||||
)
|
|
||||||
@Target(AnnotationTarget.CLASS)
|
@Target(AnnotationTarget.CLASS)
|
||||||
@Retention(AnnotationRetention.RUNTIME)
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
internal annotation class GeneralAdsCompatibility
|
internal annotation class GeneralAdsCompatibility
|
||||||
|
|||||||
@@ -3,12 +3,11 @@ package app.revanced.patches.reddit.ad.general.patch
|
|||||||
import app.revanced.patcher.annotation.Description
|
import app.revanced.patcher.annotation.Description
|
||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.impl.BytecodeData
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.replaceInstruction
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
|
||||||
import app.revanced.patcher.patch.impl.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patches.reddit.ad.general.annotations.GeneralAdsCompatibility
|
import app.revanced.patches.reddit.ad.general.annotations.GeneralAdsCompatibility
|
||||||
import org.jf.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
|
import org.jf.dexlib2.builder.instruction.BuilderInstruction21c
|
||||||
@@ -22,8 +21,8 @@ import org.jf.dexlib2.immutable.reference.ImmutableStringReference
|
|||||||
@GeneralAdsCompatibility
|
@GeneralAdsCompatibility
|
||||||
@Version("0.0.1")
|
@Version("0.0.1")
|
||||||
class GeneralAdsPatch : BytecodePatch() {
|
class GeneralAdsPatch : BytecodePatch() {
|
||||||
override fun execute(data: BytecodeData): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
data.classes.forEach { classDef ->
|
context.classes.forEach { classDef ->
|
||||||
classDef.methods.forEach methodLoop@{ method ->
|
classDef.methods.forEach methodLoop@{ method ->
|
||||||
val implementation = method.implementation ?: return@methodLoop
|
val implementation = method.implementation ?: return@methodLoop
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ class GeneralAdsPatch : BytecodePatch() {
|
|||||||
if (instruction.opcode != Opcode.CONST_STRING) return@forEachIndexed
|
if (instruction.opcode != Opcode.CONST_STRING) return@forEachIndexed
|
||||||
if (((instruction as ReferenceInstruction).reference as StringReference).string != "AdPost") return@forEachIndexed
|
if (((instruction as ReferenceInstruction).reference as StringReference).string != "AdPost") return@forEachIndexed
|
||||||
|
|
||||||
val proxiedClass = data.proxy(classDef).resolve()
|
val proxiedClass = context.proxy(classDef).mutableClass
|
||||||
|
|
||||||
val proxiedImplementation = proxiedClass.methods.first {
|
val proxiedImplementation = proxiedClass.methods.first {
|
||||||
it.name == method.name && it.parameterTypes.containsAll(method.parameterTypes)
|
it.name == method.name && it.parameterTypes.containsAll(method.parameterTypes)
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.reddit.layout.premiumicon.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.reddit.frontpage")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
@Retention(AnnotationRetention.RUNTIME)
|
||||||
|
internal annotation class PremiumIconCompatibility
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.reddit.layout.premiumicon.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object PremiumIconFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("MyAccount;") && methodDef.name == "isPremiumSubscriber"
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package app.revanced.patches.reddit.layout.premiumicon.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.reddit.layout.premiumicon.annotations.PremiumIconCompatibility
|
||||||
|
import app.revanced.patches.reddit.layout.premiumicon.fingerprints.PremiumIconFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("premium-icon-reddit")
|
||||||
|
@Description("Unlocks premium Reddit app icons.")
|
||||||
|
@PremiumIconCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class PremiumIconPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
PremiumIconFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = PremiumIconFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package app.revanced.patches.shared.fingerprints
|
||||||
|
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object WatchWhileActivityFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
|
||||||
|
}
|
||||||
|
)
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user