mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-12 20:33:55 +01:00
Compare commits
2 Commits
v4.0.1
...
v2.196.0-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c38ffb45fb | ||
|
|
f933d2c537 |
71
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
71
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -6,73 +6,12 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
<p align="center">
|
|
||||||
<picture>
|
|
||||||
<source
|
|
||||||
width="256px"
|
|
||||||
media="(prefers-color-scheme: dark)"
|
|
||||||
srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
width="256px"
|
|
||||||
src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
|
|
||||||
>
|
|
||||||
</picture>
|
|
||||||
<br>
|
|
||||||
<a href="https://revanced.app/">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/ReVanced">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
|
||||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="http://revanced.app/discord">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://reddit.com/r/revancedapp">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://t.me/app_revanced">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://x.com/revancedapp">
|
|
||||||
<picture>
|
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://www.youtube.com/@ReVanced">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
Continuing the legacy of Vanced
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# ReVanced Patches bug report
|
# ReVanced Patches bug report
|
||||||
|
|
||||||
Before creating a new bug report, please keep the following in mind:
|
Please check for existing bug reports
|
||||||
|
[here](https://github.com/ReVanced/revanced-patches/labels/Bug%20report)
|
||||||
|
before creating a new one.
|
||||||
|
|
||||||
- **Do not submit a duplicate bug report**: You can review existing bug reports [here](https://github.com/ReVanced/revanced-patches/labels/Bug%20report).
|
|
||||||
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md).
|
|
||||||
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Bug description
|
label: Bug description
|
||||||
@@ -100,9 +39,9 @@ body:
|
|||||||
id: acknowledgements
|
id: acknowledgements
|
||||||
attributes:
|
attributes:
|
||||||
label: Acknowledgements
|
label: Acknowledgements
|
||||||
description: Your bug report will be closed if you don't follow the checklist below.
|
description: Your issue will be closed if you don't follow the checklist below.
|
||||||
options:
|
options:
|
||||||
- label: This issue is not a duplicate of an existing bug report.
|
- label: This request is not a duplicate of an existing issue.
|
||||||
required: true
|
required: true
|
||||||
- label: I have chosen an appropriate title.
|
- label: I have chosen an appropriate title.
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
74
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
74
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -6,73 +6,11 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
<p align="center">
|
|
||||||
<picture>
|
|
||||||
<source
|
|
||||||
width="256px"
|
|
||||||
media="(prefers-color-scheme: dark)"
|
|
||||||
srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
width="256px"
|
|
||||||
src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-headline/revanced-headline-vertical-light.svg"
|
|
||||||
>
|
|
||||||
</picture>
|
|
||||||
<br>
|
|
||||||
<a href="https://revanced.app/">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
<img height="24px" src="https://raw.githubusercontent.com/revanced/revanced-patches/main/assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://github.com/ReVanced">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
|
||||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="http://revanced.app/discord">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://reddit.com/r/revancedapp">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://t.me/app_revanced">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://x.com/revancedapp">
|
|
||||||
<picture>
|
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<a href="https://www.youtube.com/@ReVanced">
|
|
||||||
<picture>
|
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
Continuing the legacy of Vanced
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# ReVanced Patches feature request
|
# ReVanced Patches feature request
|
||||||
|
|
||||||
Before creating a new feature request, please keep the following in mind:
|
Please check for existing feature requests
|
||||||
|
[here](https://github.com/ReVanced/revanced-patches/labels/Feature%20request)
|
||||||
- **Do not submit a duplicate feature request**: You can review existing feature requests [here](https://github.com/ReVanced/revanced-patches/labels/Feature%20request).
|
before creating a new one.
|
||||||
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-patches/blob/main/CONTRIBUTING.md).
|
|
||||||
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Feature description
|
label: Feature description
|
||||||
@@ -96,9 +34,9 @@ body:
|
|||||||
id: acknowledgements
|
id: acknowledgements
|
||||||
attributes:
|
attributes:
|
||||||
label: Acknowledgements
|
label: Acknowledgements
|
||||||
description: Your feature request will be closed if you don't follow the checklist below.
|
description: Your issue will be closed if you don't follow the checklist below.
|
||||||
options:
|
options:
|
||||||
- label: This issue is not a duplicate of an existing feature request.
|
- label: This request is not a duplicate of an existing issue.
|
||||||
required: true
|
required: true
|
||||||
- label: I have chosen an appropriate title.
|
- label: I have chosen an appropriate title.
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
2
.github/config.yml
vendored
2
.github/config.yml
vendored
@@ -1,2 +1,2 @@
|
|||||||
firstPRMergeComment: >
|
firstPRMergeComment: >
|
||||||
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) to receive a role for your contribution.
|
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.
|
||||||
|
|||||||
22
.github/dependabot.yml
vendored
22
.github/dependabot.yml
vendored
@@ -1,22 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: github-actions
|
|
||||||
labels: []
|
|
||||||
directory: /
|
|
||||||
target-branch: dev
|
|
||||||
schedule:
|
|
||||||
interval: monthly
|
|
||||||
|
|
||||||
- package-ecosystem: npm
|
|
||||||
labels: []
|
|
||||||
directory: /
|
|
||||||
target-branch: dev
|
|
||||||
schedule:
|
|
||||||
interval: monthly
|
|
||||||
|
|
||||||
- package-ecosystem: gradle
|
|
||||||
labels: []
|
|
||||||
directory: /
|
|
||||||
target-branch: dev
|
|
||||||
schedule:
|
|
||||||
interval: monthly
|
|
||||||
1
.github/workflows/pull_request.yml
vendored
1
.github/workflows/pull_request.yml
vendored
@@ -16,7 +16,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Open pull request
|
- name: Open pull request
|
||||||
uses: repo-sync/pull-request@v2
|
uses: repo-sync/pull-request@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@@ -23,24 +23,21 @@ jobs:
|
|||||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- name: Cache
|
||||||
- name: Cache Gradle
|
uses: actions/cache@v3
|
||||||
uses: burrunan/gradle-cache-action@v1
|
with:
|
||||||
|
path: |
|
||||||
- name: Build
|
${{ runner.home }}/.gradle/caches
|
||||||
|
${{ runner.home }}/.gradle/wrapper
|
||||||
|
.gradle
|
||||||
|
node_modules
|
||||||
|
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
||||||
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew generateMeta clean
|
run: ./gradlew generateMeta clean
|
||||||
|
- name: Setup semantic-release
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: "lts/*"
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||||
|
|||||||
18
.github/workflows/update-gradle-wrapper.yml
vendored
18
.github/workflows/update-gradle-wrapper.yml
vendored
@@ -1,18 +0,0 @@
|
|||||||
name: Update Gradle wrapper
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 1 * *"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Update Gradle Wrapper
|
|
||||||
uses: gradle-update/update-gradle-wrapper-action@v1
|
|
||||||
with:
|
|
||||||
target-branch: dev
|
|
||||||
1001
CHANGELOG.md
1001
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -6,52 +6,36 @@
|
|||||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
width="256px"
|
|
||||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||||
>
|
>
|
||||||
</picture>
|
</picture>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://revanced.app/">
|
<a href="https://revanced.app/">
|
||||||
<picture>
|
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/ReVanced">
|
<a href="https://github.com/revanced">
|
||||||
<picture>
|
<picture>
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
<a href="http://revanced.app/discord">
|
<a href="http://revanced.app/discord">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://reddit.com/r/revancedapp">
|
<a href="https://reddit.com/r/revancedapp">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://t.me/app_revanced">
|
<a href="https://t.me/app_revanced">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://x.com/revancedapp">
|
<a href="https://x.com/revancedapp">
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||||
</picture>
|
<picture/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.youtube.com/@ReVanced">
|
<a href="https://www.youtube.com/@ReVanced">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -6,52 +6,36 @@
|
|||||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
width="256px"
|
|
||||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
||||||
>
|
>
|
||||||
</picture>
|
</picture>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://revanced.app/">
|
<a href="https://revanced.app/">
|
||||||
<picture>
|
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/ReVanced">
|
<a href="https://github.com/revanced">
|
||||||
<picture>
|
<picture>
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
||||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
<a href="http://revanced.app/discord">
|
<a href="http://revanced.app/discord">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://reddit.com/r/revancedapp">
|
<a href="https://reddit.com/r/revancedapp">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://t.me/app_revanced">
|
<a href="https://t.me/app_revanced">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<a href="https://x.com/revancedapp">
|
<a href="https://x.com/revancedapp">
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
|
||||||
</picture>
|
<picture/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://www.youtube.com/@ReVanced">
|
<a href="https://www.youtube.com/@ReVanced">
|
||||||
<picture>
|
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -1,8 +1,7 @@
|
|||||||
import org.gradle.kotlin.dsl.support.listFilesOrdered
|
import org.gradle.kotlin.dsl.support.listFilesOrdered
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.9.22"
|
kotlin("jvm") version "1.9.10"
|
||||||
alias(libs.plugins.binary.compatibility.validator)
|
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,6 +12,13 @@ repositories {
|
|||||||
mavenLocal()
|
mavenLocal()
|
||||||
google()
|
google()
|
||||||
maven { url = uri("https://jitpack.io") }
|
maven { url = uri("https://jitpack.io") }
|
||||||
|
// Required for FlexVer-Java
|
||||||
|
maven {
|
||||||
|
url = uri("https://repo.sleeping.town")
|
||||||
|
content {
|
||||||
|
includeGroup("com.unascribed")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -31,25 +37,9 @@ kotlin {
|
|||||||
jvmToolchain(11)
|
jvmToolchain(11)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(Jar::class) {
|
|
||||||
exclude("app/revanced/meta")
|
|
||||||
|
|
||||||
manifest {
|
|
||||||
attributes["Name"] = "ReVanced Patches"
|
|
||||||
attributes["Description"] = "Patches for ReVanced."
|
|
||||||
attributes["Version"] = version
|
|
||||||
attributes["Timestamp"] = System.currentTimeMillis().toString()
|
|
||||||
attributes["Source"] = "git@github.com:revanced/revanced-patches.git"
|
|
||||||
attributes["Author"] = "ReVanced"
|
|
||||||
attributes["Contact"] = "contact@revanced.app"
|
|
||||||
attributes["Origin"] = "https://revanced.app"
|
|
||||||
attributes["License"] = "GNU General Public License v3.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
register<DefaultTask>("generateBundle") {
|
register<DefaultTask>("generateBundle") {
|
||||||
description = "Generate DEX files and add them in the JAR file"
|
description = "Generate dex files from build and bundle them in the jar file"
|
||||||
|
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
@@ -78,7 +68,7 @@ tasks {
|
|||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
|
|
||||||
classpath = sourceSets["main"].runtimeClasspath
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
mainClass.set("app.revanced.meta.IPatchesFileGenerator")
|
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Required to run tasks because Gradle semantic-release plugin runs the publish task.
|
// Required to run tasks because Gradle semantic-release plugin runs the publish task.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 4.0.1
|
version = 2.196.0-dev.14
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
[versions]
|
[versions]
|
||||||
revanced-patcher = "19.2.0"
|
revanced-patcher = "19.0.0"
|
||||||
smali = "3.0.3"
|
smali = "3.0.3"
|
||||||
guava = "33.0.0-jre"
|
guava = "32.1.2-jre"
|
||||||
gson = "2.10.1"
|
gson = "2.10.1"
|
||||||
binary-compatibility-validator = "0.13.2"
|
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
||||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
||||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||||
|
|
||||||
[plugins]
|
|
||||||
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
|
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
17
gradlew
vendored
17
gradlew
vendored
@@ -83,8 +83,7 @@ done
|
|||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -145,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC2039,SC3045
|
# shellcheck disable=SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
@@ -153,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC2039,SC3045
|
# shellcheck disable=SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -202,11 +201,11 @@ fi
|
|||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# Collect all arguments for the java command;
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# and any embedded shellness will be escaped.
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
# double quotes to make sure that they get re-expanded; and
|
||||||
# treated as '${Hostname}' itself on the command line.
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
|||||||
5307
package-lock.json
generated
5307
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-backmerge": "^4.0.1",
|
"@saithodev/semantic-release-backmerge": "^3.1.0",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.2",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"gradle-semantic-release-plugin": "^1.9.1",
|
"gradle-semantic-release-plugin": "^1.7.6",
|
||||||
"semantic-release": "^23.0.0"
|
"semantic-release": "^20.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,9 +1,3 @@
|
|||||||
include("dummy")
|
include("dummy")
|
||||||
|
|
||||||
rootProject.name = "revanced-patches"
|
rootProject.name = "revanced-patches"
|
||||||
|
|
||||||
buildCache {
|
|
||||||
local {
|
|
||||||
isEnabled = "CI" !in System.getenv()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,19 +1,16 @@
|
|||||||
package app.revanced.util
|
package app.revanced.extensions
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchException
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.shared.misc.mapping.ResourceMappingPatch
|
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
|
||||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
import com.android.tools.smali.dexlib2.util.MethodUtil
|
||||||
|
import org.w3c.dom.Node
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [PatchException] of failing to resolve a [MethodFingerprint].
|
* The [PatchException] of failing to resolve a [MethodFingerprint].
|
||||||
@@ -34,9 +31,9 @@ fun MutableClass.findMutableMethodOf(method: Method) = this.methods.first {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply a transform to all methods of the class.
|
* apply a transform to all methods of the class.
|
||||||
*
|
*
|
||||||
* @param transform The transformation function. Accepts a [MutableMethod] and returns a transformed [MutableMethod].
|
* @param transform the transformation function. original method goes in, transformed method goes out.
|
||||||
*/
|
*/
|
||||||
fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
|
fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod) {
|
||||||
val transformedMethods = methods.map { it.transform() }
|
val transformedMethods = methods.map { it.transform() }
|
||||||
@@ -44,14 +41,11 @@ fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod)
|
|||||||
methods.addAll(transformedMethods)
|
methods.addAll(transformedMethods)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
fun Node.doRecursively(action: (Node) -> Unit) {
|
||||||
* Inject a call to a method that hides a view.
|
action(this)
|
||||||
*
|
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
||||||
* @param insertIndex The index to insert the call at.
|
}
|
||||||
* @param viewRegister The register of the view to hide.
|
|
||||||
* @param classDescriptor The descriptor of the class that contains the method.
|
|
||||||
* @param targetMethod The name of the method to call.
|
|
||||||
*/
|
|
||||||
fun MutableMethod.injectHideViewCall(
|
fun MutableMethod.injectHideViewCall(
|
||||||
insertIndex: Int,
|
insertIndex: Int,
|
||||||
viewRegister: Int,
|
viewRegister: Int,
|
||||||
@@ -87,6 +81,7 @@ fun Method.indexOfFirstWideLiteralInstructionValue(literal: Long) = implementati
|
|||||||
}
|
}
|
||||||
} ?: -1
|
} ?: -1
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the method contains a literal with the given value.
|
* Check if the method contains a literal with the given value.
|
||||||
*
|
*
|
||||||
@@ -95,6 +90,7 @@ fun Method.indexOfFirstWideLiteralInstructionValue(literal: Long) = implementati
|
|||||||
fun Method.containsWideLiteralInstructionValue(literal: Long) =
|
fun Method.containsWideLiteralInstructionValue(literal: Long) =
|
||||||
indexOfFirstWideLiteralInstructionValue(literal) >= 0
|
indexOfFirstWideLiteralInstructionValue(literal) >= 0
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Traverse the class hierarchy starting from the given root class.
|
* Traverse the class hierarchy starting from the given root class.
|
||||||
*
|
*
|
||||||
@@ -106,48 +102,4 @@ fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback:
|
|||||||
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
|
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
|
||||||
traverseClassHierarchy(it, callback)
|
traverseClassHierarchy(it, callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the [Reference] of an [Instruction] as [T].
|
|
||||||
*
|
|
||||||
* @param T The type of [Reference] to cast to.
|
|
||||||
* @return The [Reference] as [T] or null
|
|
||||||
* if the [Instruction] is not a [ReferenceInstruction] or the [Reference] is not of type [T].
|
|
||||||
* @see ReferenceInstruction
|
|
||||||
*/
|
|
||||||
inline fun <reified T : Reference> Instruction.getReference() = (this as? ReferenceInstruction)?.reference as? T
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the index of the first [Instruction] that matches the predicate.
|
|
||||||
*
|
|
||||||
* @param predicate The predicate to match.
|
|
||||||
* @return The index of the first [Instruction] that matches the predicate.
|
|
||||||
*/
|
|
||||||
fun Method.indexOfFirstInstruction(predicate: Instruction.() -> Boolean) =
|
|
||||||
this.implementation!!.instructions.indexOfFirst(predicate)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the resolved methods of [MethodFingerprint]s early.
|
|
||||||
*/
|
|
||||||
fun List<MethodFingerprint>.returnEarly(bool: Boolean = false) {
|
|
||||||
val const = if (bool) "0x1" else "0x0"
|
|
||||||
this.forEach { fingerprint ->
|
|
||||||
fingerprint.result?.let { result ->
|
|
||||||
val stringInstructions = when (result.method.returnType.first()) {
|
|
||||||
'L' -> """
|
|
||||||
const/4 v0, $const
|
|
||||||
return-object v0
|
|
||||||
"""
|
|
||||||
'V' -> "return-void"
|
|
||||||
'I', 'Z' -> """
|
|
||||||
const/4 v0, $const
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
else -> throw Exception("This case should never happen.")
|
|
||||||
}
|
|
||||||
|
|
||||||
result.mutableMethod.addInstructions(0, stringInstructions)
|
|
||||||
} ?: throw fingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.patch.Patch
|
|||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal class JsonPatchesFileGenerator : IPatchesFileGenerator {
|
internal class JsonGenerator : PatchesFileGenerator {
|
||||||
override fun generate(patches: PatchSet) = patches.map {
|
override fun generate(patches: PatchSet) = patches.map {
|
||||||
JsonPatch(
|
JsonPatch(
|
||||||
it.name!!,
|
it.name!!,
|
||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.PatchBundleLoader
|
|||||||
import app.revanced.patcher.PatchSet
|
import app.revanced.patcher.PatchSet
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal interface IPatchesFileGenerator {
|
internal interface PatchesFileGenerator {
|
||||||
fun generate(patches: PatchSet)
|
fun generate(patches: PatchSet)
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
@@ -14,7 +14,7 @@ internal interface IPatchesFileGenerator {
|
|||||||
).also { loader ->
|
).also { loader ->
|
||||||
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
||||||
}.let { bundle ->
|
}.let { bundle ->
|
||||||
arrayOf(JsonPatchesFileGenerator()).forEach { generator -> generator.generate(bundle) }
|
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@ package app.revanced.patches.all.connectivity.wifi.spoof
|
|||||||
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.all.misc.transformation.BaseTransformInstructionsPatch
|
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||||
import app.revanced.patches.all.misc.transformation.IMethodCall
|
import app.revanced.util.patch.IMethodCall
|
||||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
import app.revanced.util.patch.Instruction35cInfo
|
||||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
import app.revanced.util.patch.filterMapInstruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
@@ -17,8 +17,8 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|||||||
requiresIntegrations = true
|
requiresIntegrations = true
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofWifiPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/integrations/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
override fun filterMap(
|
override fun filterMap(
|
||||||
@@ -40,7 +40,7 @@ object SpoofWifiPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
|||||||
|
|
||||||
|
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
private enum class MethodCall(
|
enum class MethodCall(
|
||||||
override val definedClassName: String,
|
override val definedClassName: String,
|
||||||
override val methodName: String,
|
override val methodName: String,
|
||||||
override val methodParams: Array<String>,
|
override val methodParams: Array<String>,
|
||||||
|
|||||||
@@ -4,21 +4,21 @@ import app.revanced.patcher.data.ResourceContext
|
|||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
||||||
import app.revanced.patcher.patch.options.PatchOptionException
|
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
import java.io.Closeable
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Change package name",
|
name = "Change package name",
|
||||||
description = "Appends \".revanced\" to the package name by default. Changing the package name of the app can lead to unexpected issues.",
|
description = "Appends \".revanced\" to the package name by default.",
|
||||||
use = false
|
use = false
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object ChangePackageNamePatch : ResourcePatch(), Closeable {
|
object ChangePackageNamePatch : ResourcePatch() {
|
||||||
private val packageNameOption = stringPatchOption(
|
private const val DEFAULT_PACKAGE_NAME_OPTION = "Default"
|
||||||
|
|
||||||
|
private var packageName by stringPatchOption(
|
||||||
key = "packageName",
|
key = "packageName",
|
||||||
default = "Default",
|
default = DEFAULT_PACKAGE_NAME_OPTION,
|
||||||
values = mapOf("Default" to "Default"),
|
values = mapOf("Default" to DEFAULT_PACKAGE_NAME_OPTION),
|
||||||
title = "Package name",
|
title = "Package name",
|
||||||
description = "The name of the package to rename the app to.",
|
description = "The name of the package to rename the app to.",
|
||||||
required = true
|
required = true
|
||||||
@@ -26,37 +26,19 @@ object ChangePackageNamePatch : ResourcePatch(), Closeable {
|
|||||||
it == "Default" || it!!.matches(Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$"))
|
it == "Default" || it!!.matches(Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$"))
|
||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var context: ResourceContext
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
this.context = context
|
fun getOriginalPackageName(context: ResourceContext): String {
|
||||||
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
|
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
||||||
|
return manifest.getAttribute("package")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val originalPackageName = getOriginalPackageName(context)
|
||||||
|
if (packageName == DEFAULT_PACKAGE_NAME_OPTION) packageName = "$originalPackageName.revanced"
|
||||||
|
|
||||||
|
context["AndroidManifest.xml"].apply {
|
||||||
|
readText().replace(originalPackageName, packageName!!).let(::writeText)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Set the package name to use.
|
|
||||||
* If this is called multiple times, the first call will set the package name.
|
|
||||||
*
|
|
||||||
* @param fallbackPackageName The package name to use if the user has not already specified a package name.
|
|
||||||
* @return The package name that was set.
|
|
||||||
* @throws PatchOptionException.ValueValidationException If the package name is invalid.
|
|
||||||
*/
|
|
||||||
fun setOrGetFallbackPackageName(fallbackPackageName: String): String {
|
|
||||||
val packageName = packageNameOption.value!!
|
|
||||||
|
|
||||||
return if (packageName == packageNameOption.default)
|
|
||||||
fallbackPackageName.also { packageNameOption.value = it }
|
|
||||||
else
|
|
||||||
packageName
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun close() = context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
|
||||||
val replacementPackageName = packageNameOption.value
|
|
||||||
|
|
||||||
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
|
||||||
manifest.setAttribute(
|
|
||||||
"package",
|
|
||||||
if (replacementPackageName != packageNameOption.default) replacementPackageName
|
|
||||||
else "${manifest.getAttribute("package")}.revanced"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,277 +0,0 @@
|
|||||||
package app.revanced.patches.all.misc.resources
|
|
||||||
|
|
||||||
import app.revanced.patcher.PatchClass
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.PatchException
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patcher.util.DomFileEditor
|
|
||||||
import app.revanced.patches.all.misc.resources.AddResourcesPatch.resources
|
|
||||||
import app.revanced.util.*
|
|
||||||
import app.revanced.util.resource.ArrayResource
|
|
||||||
import app.revanced.util.resource.BaseResource
|
|
||||||
import app.revanced.util.resource.StringResource
|
|
||||||
import org.w3c.dom.Node
|
|
||||||
import java.io.Closeable
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An identifier of an app. For example, `youtube`.
|
|
||||||
*/
|
|
||||||
private typealias AppId = String
|
|
||||||
/**
|
|
||||||
* An identifier of a patch. For example, `ad.general.HideAdsPatch`.
|
|
||||||
*/
|
|
||||||
private typealias PatchId = String
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A set of resources of a patch.
|
|
||||||
*/
|
|
||||||
private typealias PatchResources = MutableSet<BaseResource>
|
|
||||||
/**
|
|
||||||
* A map of resources belonging to a patch.
|
|
||||||
*/
|
|
||||||
private typealias AppResources = MutableMap<PatchId, PatchResources>
|
|
||||||
/**
|
|
||||||
* A map of resources belonging to an app.
|
|
||||||
*/
|
|
||||||
private typealias Resources = MutableMap<AppId, AppResources>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The value of a resource.
|
|
||||||
* For example, `values` or `values-de`.
|
|
||||||
*/
|
|
||||||
private typealias Value = String
|
|
||||||
|
|
||||||
@Patch(description = "Add resources such as strings or arrays to the app.")
|
|
||||||
object AddResourcesPatch : ResourcePatch(), MutableMap<Value, MutableSet<BaseResource>> by mutableMapOf(), Closeable {
|
|
||||||
private lateinit var context: ResourceContext
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A map of all resources associated by their value staged by [execute].
|
|
||||||
*/
|
|
||||||
private lateinit var resources: Map<Value, Resources>
|
|
||||||
|
|
||||||
/*
|
|
||||||
The strategy of this patch is to stage resources present in `/resources/addresources`.
|
|
||||||
These resources are organized by their respective value and patch.
|
|
||||||
|
|
||||||
On AddResourcesPatch#execute, all resources are staged in a temporary map.
|
|
||||||
After that, other patches that depend on AddResourcesPatch can call
|
|
||||||
AddResourcesPatch#invoke(PatchClass) to stage resources belonging to that patch
|
|
||||||
from the temporary map to AddResourcesPatch.
|
|
||||||
|
|
||||||
After all patches that depend on AddResourcesPatch have been executed,
|
|
||||||
AddResourcesPatch#close is finally called to add all staged resources to the app.
|
|
||||||
*/
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
this.context = context
|
|
||||||
|
|
||||||
resources = buildMap {
|
|
||||||
/**
|
|
||||||
* Puts resources under `/resources/addresources/<value>/<resourceKind>.xml` into the map.
|
|
||||||
*
|
|
||||||
* @param value The value of the resource. For example, `values` or `values-de`.
|
|
||||||
* @param resourceKind The kind of the resource. For example, `strings` or `arrays`.
|
|
||||||
* @param transform A function that transforms the [Node]s from the XML files to a [BaseResource].
|
|
||||||
*/
|
|
||||||
fun addResources(
|
|
||||||
value: Value,
|
|
||||||
resourceKind: String,
|
|
||||||
transform: (Node) -> BaseResource,
|
|
||||||
) {
|
|
||||||
inputStreamFromBundledResource(
|
|
||||||
"addresources",
|
|
||||||
"$value/$resourceKind.xml"
|
|
||||||
)?.let { stream ->
|
|
||||||
// Add the resources associated with the given value to the map,
|
|
||||||
// instead of overwriting it.
|
|
||||||
// This covers the example case such as adding strings and arrays of the same value.
|
|
||||||
getOrPut(value, ::mutableMapOf).apply {
|
|
||||||
context.xmlEditor[stream].use {
|
|
||||||
it.file.getElementsByTagName("app").asSequence().forEach { app ->
|
|
||||||
val appId = app.attributes.getNamedItem("id").textContent
|
|
||||||
|
|
||||||
getOrPut(appId, ::mutableMapOf).apply {
|
|
||||||
app.forEachChildElement { patch ->
|
|
||||||
val patchId = patch.attributes.getNamedItem("id").textContent
|
|
||||||
|
|
||||||
getOrPut(patchId, ::mutableSetOf).apply {
|
|
||||||
patch.forEachChildElement { resourceNode ->
|
|
||||||
val resource = transform(resourceNode)
|
|
||||||
|
|
||||||
add(resource)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stage all resources to a temporary map.
|
|
||||||
// Staged resources consumed by AddResourcesPatch#invoke(PatchClass)
|
|
||||||
// are later used in AddResourcesPatch#close.
|
|
||||||
try {
|
|
||||||
val addStringResources = { value: Value ->
|
|
||||||
addResources(value, "strings", StringResource::fromNode)
|
|
||||||
}
|
|
||||||
Locale.getISOLanguages().asSequence().map { "values-$it" }.forEach { addStringResources(it) }
|
|
||||||
addStringResources("values")
|
|
||||||
|
|
||||||
addResources("values", "arrays", ArrayResource::fromNode)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
throw PatchException("Failed to read resources", e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a [BaseResource] to the map using [MutableMap.getOrPut].
|
|
||||||
*
|
|
||||||
* @param value The value of the resource. For example, `values` or `values-de`.
|
|
||||||
* @param resource The resource to add.
|
|
||||||
*
|
|
||||||
* @return True if the resource was added, false if it already existed.
|
|
||||||
*/
|
|
||||||
operator fun invoke(value: Value, resource: BaseResource) =
|
|
||||||
getOrPut(value, ::mutableSetOf).add(resource)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a list of [BaseResource]s to the map using [MutableMap.getOrPut].
|
|
||||||
*
|
|
||||||
* @param value The value of the resource. For example, `values` or `values-de`.
|
|
||||||
* @param resources The resources to add.
|
|
||||||
*
|
|
||||||
* @return True if the resources were added, false if they already existed.
|
|
||||||
*/
|
|
||||||
operator fun invoke(value: Value, resources: Iterable<BaseResource>) =
|
|
||||||
getOrPut(value, ::mutableSetOf).addAll(resources)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a [StringResource].
|
|
||||||
*
|
|
||||||
* @param name The name of the string resource.
|
|
||||||
* @param value The value of the string resource.
|
|
||||||
* @param formatted Whether the string resource is formatted. Defaults to `true`.
|
|
||||||
* @param resourceValue The value of the resource. For example, `values` or `values-de`.
|
|
||||||
*
|
|
||||||
* @return True if the resource was added, false if it already existed.
|
|
||||||
*/
|
|
||||||
operator fun invoke(
|
|
||||||
name: String,
|
|
||||||
value: String,
|
|
||||||
formatted: Boolean = true,
|
|
||||||
resourceValue: Value = "values",
|
|
||||||
) = invoke(resourceValue, StringResource(name, value, formatted))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds an [ArrayResource].
|
|
||||||
*
|
|
||||||
* @param name The name of the array resource.
|
|
||||||
* @param items The items of the array resource.
|
|
||||||
*
|
|
||||||
* @return True if the resource was added, false if it already existed.
|
|
||||||
*/
|
|
||||||
operator fun invoke(
|
|
||||||
name: String,
|
|
||||||
items: List<String>
|
|
||||||
) = invoke("values", ArrayResource(name, items))
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Puts all resources of any [Value] staged in [resources] for the given [PatchClass] to [AddResourcesPatch].
|
|
||||||
*
|
|
||||||
* @param patch The class of the patch to add resources for.
|
|
||||||
* @param parseIds A function that parses the [AppId] and [PatchId] from the given [PatchClass].
|
|
||||||
* This is used to access the resources in [resources] to stage them in [AddResourcesPatch].
|
|
||||||
* The default implementation assumes that the [PatchClass] qualified name has the following format:
|
|
||||||
* `<any>.<any>.<any>.<app id>.<patch id>`.
|
|
||||||
*
|
|
||||||
* @return True if any resources were added, false if none were added.
|
|
||||||
*
|
|
||||||
* @see AddResourcesPatch.close
|
|
||||||
*/
|
|
||||||
operator fun invoke(
|
|
||||||
patch: PatchClass,
|
|
||||||
parseIds: PatchClass.() -> Pair<AppId, PatchId> = {
|
|
||||||
val qualifiedName = qualifiedName ?: throw PatchException("Patch qualified name is null")
|
|
||||||
|
|
||||||
// This requires qualifiedName to have the following format:
|
|
||||||
// `<any>.<any>.<any>.<app id>.<patch id>`
|
|
||||||
with(qualifiedName.split(".")) {
|
|
||||||
if (size < 5) throw PatchException("Patch qualified name has invalid format")
|
|
||||||
|
|
||||||
val appId = this[3]
|
|
||||||
val patchId = subList(4, size).joinToString(".")
|
|
||||||
|
|
||||||
appId to patchId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
): Boolean {
|
|
||||||
val (appId, patchId) = patch.parseIds()
|
|
||||||
|
|
||||||
var result = false
|
|
||||||
|
|
||||||
// Stage resources for the given patch to AddResourcesPatch associated with their value.
|
|
||||||
resources.forEach { (value, resources) ->
|
|
||||||
resources[appId]?.get(patchId)?.let { patchResources ->
|
|
||||||
if (invoke(value, patchResources)) result = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds all resources staged in [AddResourcesPatch] to the app.
|
|
||||||
* This is called after all patches that depend on [AddResourcesPatch] have been executed.
|
|
||||||
*/
|
|
||||||
override fun close() {
|
|
||||||
operator fun MutableMap<String, Pair<DomFileEditor, Node>>.invoke(
|
|
||||||
value: Value,
|
|
||||||
resource: BaseResource
|
|
||||||
) {
|
|
||||||
// TODO: Fix open-closed principle violation by modifying BaseResource#serialize so that it accepts
|
|
||||||
// a Value and the map of editors. It will then get or put the editor suitable for its resource type
|
|
||||||
// to serialize itself to it.
|
|
||||||
val resourceFileName = when (resource) {
|
|
||||||
is StringResource -> "strings"
|
|
||||||
is ArrayResource -> "arrays"
|
|
||||||
else -> throw NotImplementedError("Unsupported resource type")
|
|
||||||
}
|
|
||||||
|
|
||||||
getOrPut(resourceFileName) {
|
|
||||||
val targetFile = context["res/$value/$resourceFileName.xml"].also {
|
|
||||||
it.parentFile?.mkdirs()
|
|
||||||
it.createNewFile()
|
|
||||||
}
|
|
||||||
|
|
||||||
context.xmlEditor[targetFile.path].let { editor ->
|
|
||||||
// Save the target node here as well
|
|
||||||
// in order to avoid having to call editor.getNode("resources")
|
|
||||||
// every time addUsingEditors is called but also save the editor so that it can be closed later.
|
|
||||||
editor to editor.getNode("resources")
|
|
||||||
}
|
|
||||||
}.let { (_, targetNode) ->
|
|
||||||
targetNode.addResource(resource) { invoke(value, it) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
forEach { (value, resources) ->
|
|
||||||
// A map of editors associated by their kind (e.g. strings, arrays).
|
|
||||||
// Each editor is accompanied by the target node to which resources are added.
|
|
||||||
// A map is used because Map#getOrPut allows opening a new editor for the duration of a resource value.
|
|
||||||
// This is done to prevent having to open the files for every resource that is added.
|
|
||||||
// Instead, it is cached once and reused for resources of the same value.
|
|
||||||
// This map is later accessed to close all editors for the current resource value.
|
|
||||||
val resourceFileEditors = mutableMapOf<String, Pair<DomFileEditor, Node>>()
|
|
||||||
|
|
||||||
resources.forEach { resource -> resourceFileEditors(value, resource) }
|
|
||||||
|
|
||||||
resourceFileEditors.values.forEach { (editor, _) -> editor.close() }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,10 +2,10 @@ package app.revanced.patches.all.screencapture.removerestriction
|
|||||||
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.all.misc.transformation.BaseTransformInstructionsPatch
|
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||||
import app.revanced.patches.all.misc.transformation.IMethodCall
|
import app.revanced.util.patch.IMethodCall
|
||||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
import app.revanced.util.patch.Instruction35cInfo
|
||||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
import app.revanced.util.patch.filterMapInstruction35c
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
@@ -18,9 +18,9 @@ import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|||||||
requiresIntegrations = true
|
requiresIntegrations = true
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RemoveCaptureRestrictionPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
object RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
"Lapp/revanced/integrations/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
enum class MethodCall(
|
enum class MethodCall(
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
package app.revanced.patches.all.screenshot.removerestriction
|
package app.revanced.patches.all.screenshot.removerestriction
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.all.misc.transformation.BaseTransformInstructionsPatch
|
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
||||||
import app.revanced.patches.all.misc.transformation.IMethodCall
|
import app.revanced.util.patch.IMethodCall
|
||||||
import app.revanced.patches.all.misc.transformation.Instruction35cInfo
|
import app.revanced.util.patch.Instruction35cInfo
|
||||||
import app.revanced.patches.all.misc.transformation.filterMapInstruction35c
|
import app.revanced.util.patch.filterMapInstruction35c
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.formats.Instruction22c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Remove screenshot restriction",
|
name = "Remove screenshot restriction",
|
||||||
@@ -22,16 +17,11 @@ import com.android.tools.smali.dexlib2.iface.reference.FieldReference
|
|||||||
requiresIntegrations = true,
|
requiresIntegrations = true,
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RemoveScreenshotRestrictionPatch : BaseTransformInstructionsPatch<Instruction35cInfo>() {
|
object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
"Lapp/revanced/integrations/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
super.execute(context)
|
|
||||||
ModifyLayoutParamsFlags().execute(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun filterMap(
|
override fun filterMap(
|
||||||
classDef: ClassDef,
|
classDef: ClassDef,
|
||||||
method: Method,
|
method: Method,
|
||||||
@@ -56,12 +46,6 @@ object RemoveScreenshotRestrictionPatch : BaseTransformInstructionsPatch<Instruc
|
|||||||
override val methodParams: Array<String>,
|
override val methodParams: Array<String>,
|
||||||
override val returnType: String
|
override val returnType: String
|
||||||
): IMethodCall {
|
): IMethodCall {
|
||||||
AddFlags(
|
|
||||||
"Landroid/view/Window;",
|
|
||||||
"addFlags",
|
|
||||||
arrayOf("I"),
|
|
||||||
"V",
|
|
||||||
),
|
|
||||||
SetFlags(
|
SetFlags(
|
||||||
"Landroid/view/Window;",
|
"Landroid/view/Window;",
|
||||||
"setFlags",
|
"setFlags",
|
||||||
@@ -70,37 +54,3 @@ object RemoveScreenshotRestrictionPatch : BaseTransformInstructionsPatch<Instruc
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ModifyLayoutParamsFlags : BaseTransformInstructionsPatch<Pair<Instruction22c, Int>>() {
|
|
||||||
override fun filterMap(
|
|
||||||
classDef: ClassDef,
|
|
||||||
method: Method,
|
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
): Pair<Instruction22c, Int>? {
|
|
||||||
if (instruction.opcode != Opcode.IPUT) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
val instruction22c = instruction as Instruction22c
|
|
||||||
val fieldReference = instruction22c.reference as FieldReference
|
|
||||||
|
|
||||||
if (fieldReference.definingClass != "Landroid/view/WindowManager\$LayoutParams;"
|
|
||||||
|| fieldReference.name != "flags"
|
|
||||||
|| fieldReference.type != "I") {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return Pair(instruction22c, instructionIndex)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun transform(mutableMethod: MutableMethod, entry: Pair<Instruction22c, Int>) {
|
|
||||||
val (instruction, index) = entry
|
|
||||||
val register = instruction.registerA
|
|
||||||
|
|
||||||
mutableMethod.addInstructions(
|
|
||||||
index,
|
|
||||||
"and-int/lit16 v$register, v$register, -0x2001"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,113 +0,0 @@
|
|||||||
package app.revanced.patches.all.telephony.sim.spoof
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatchOption
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.all.misc.transformation.BaseTransformInstructionsPatch
|
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
|
||||||
import com.android.tools.smali.dexlib2.immutable.reference.ImmutableMethodReference
|
|
||||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Spoof SIM country",
|
|
||||||
description = "Spoofs country information returned by the SIM card provider.",
|
|
||||||
use = false,
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object SpoofSimCountryPatch : BaseTransformInstructionsPatch<Pair<Int, String>>() {
|
|
||||||
private val countries = Locale.getISOCountries().associateBy { Locale("", it).displayCountry }
|
|
||||||
|
|
||||||
private val networkCountryIso by isoCountryPatchOption(
|
|
||||||
"networkCountryIso",
|
|
||||||
"Network ISO Country Code",
|
|
||||||
)
|
|
||||||
|
|
||||||
private val simCountryIso by isoCountryPatchOption(
|
|
||||||
"simCountryIso",
|
|
||||||
"Sim ISO Country Code",
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun isoCountryPatchOption(
|
|
||||||
key: String,
|
|
||||||
title: String,
|
|
||||||
) = stringPatchOption(
|
|
||||||
key,
|
|
||||||
null,
|
|
||||||
countries,
|
|
||||||
title,
|
|
||||||
"ISO-3166-1 alpha-2 country code equivalent for the SIM provider's country code.",
|
|
||||||
false,
|
|
||||||
validator = { it: String? -> it == null || it.uppercase() in countries.values }
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun filterMap(
|
|
||||||
classDef: ClassDef,
|
|
||||||
method: Method,
|
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
): Pair<Int, String>? {
|
|
||||||
if (instruction !is ReferenceInstruction) return null
|
|
||||||
|
|
||||||
val reference = instruction.reference as? MethodReference ?: return null
|
|
||||||
|
|
||||||
val match = MethodCall.entries.firstOrNull { search ->
|
|
||||||
MethodUtil.methodSignaturesMatch(reference, search.reference)
|
|
||||||
} ?: return null
|
|
||||||
|
|
||||||
val iso = when (match) {
|
|
||||||
MethodCall.NetworkCountryIso -> networkCountryIso
|
|
||||||
MethodCall.SimCountryIso -> simCountryIso
|
|
||||||
}?.lowercase()
|
|
||||||
|
|
||||||
return iso?.let { instructionIndex to it }
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun transform(
|
|
||||||
mutableMethod: MutableMethod,
|
|
||||||
entry: Pair<Int, String>
|
|
||||||
) = transformMethodCall(entry, mutableMethod)
|
|
||||||
|
|
||||||
private fun transformMethodCall(
|
|
||||||
entry: Pair<Int, String>,
|
|
||||||
mutableMethod: MutableMethod
|
|
||||||
) {
|
|
||||||
val (instructionIndex, methodCallValue) = entry
|
|
||||||
|
|
||||||
val register = mutableMethod.getInstruction<OneRegisterInstruction>(instructionIndex + 1).registerA
|
|
||||||
|
|
||||||
mutableMethod.replaceInstruction(
|
|
||||||
instructionIndex + 1,
|
|
||||||
"const-string v$register, \"$methodCallValue\""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private enum class MethodCall(
|
|
||||||
val reference: MethodReference
|
|
||||||
) {
|
|
||||||
NetworkCountryIso(
|
|
||||||
ImmutableMethodReference(
|
|
||||||
"Landroid/telephony/TelephonyManager;",
|
|
||||||
"getNetworkCountryIso",
|
|
||||||
emptyList(),
|
|
||||||
"Ljava/lang/String;"
|
|
||||||
)
|
|
||||||
),
|
|
||||||
SimCountryIso(
|
|
||||||
ImmutableMethodReference(
|
|
||||||
"Landroid/telephony/TelephonyManager;",
|
|
||||||
"getSimCountryIso",
|
|
||||||
emptyList(),
|
|
||||||
"Ljava/lang/String;"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro
|
package app.revanced.patches.backdrops.misc.pro
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.backdrops.misc.pro.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object ProUnlockFingerprint : MethodFingerprint(
|
object ProUnlockFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.candylinkvpn
|
package app.revanced.patches.candylinkvpn
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.candylinkvpn.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("PreferenceProvider;") &&
|
methodDef.definingClass.endsWith("PreferenceProvider;") &&
|
||||||
methodDef.name == "isPremiumPurchased"
|
methodDef.name == "isPremiumPurchased"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.cieid.restrictions.root
|
package app.revanced.patches.cieid.restrictions.root
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.cieid.restrictions.root.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object CheckRootFingerprint : MethodFingerprint(
|
object CheckRootFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lit/ipzs/cieid/BaseActivity;" && methodDef.name == "onResume"
|
methodDef.definingClass == "Lit/ipzs/cieid/BaseActivity;" && methodDef.name == "onResume"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
package app.revanced.patches.facebook.ads.story
|
|
||||||
|
|
||||||
import app.revanced.util.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.facebook.ads.story.fingerprints.AdsInsertionFingerprint
|
|
||||||
import app.revanced.patches.facebook.ads.story.fingerprints.FetchMoreAdsFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Hide story ads",
|
|
||||||
description = "Hides the ads in the Facebook app stories.",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.facebook.katana")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object HideStoryAdsPatch : BytecodePatch(
|
|
||||||
setOf(FetchMoreAdsFingerprint, AdsInsertionFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) =
|
|
||||||
setOf(FetchMoreAdsFingerprint, AdsInsertionFingerprint).forEach { fingerprint ->
|
|
||||||
fingerprint.result?.mutableMethod?.replaceInstruction(0, "return-void")
|
|
||||||
?: throw fingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
package app.revanced.patches.facebook.ads.story.fingerprints
|
|
||||||
|
|
||||||
internal object AdsInsertionFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptAdsInsertion\$1")
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
package app.revanced.patches.facebook.ads.story.fingerprints
|
|
||||||
|
|
||||||
internal object FetchMoreAdsFingerprint : FieldMethodFingerprint(fieldValue = "AdBucketDataSourceUtil\$attemptFetchMoreAds\$1")
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package app.revanced.patches.facebook.ads.story.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.iface.value.StringEncodedValue
|
|
||||||
|
|
||||||
internal abstract class FieldMethodFingerprint(fieldValue: String) : MethodFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
parameters = listOf(),
|
|
||||||
customFingerprint = { methodDef, classDef ->
|
|
||||||
methodDef.name == "run" && classDef.fields.any any@{ field ->
|
|
||||||
if (field.name != "__redex_internal_original_name") return@any false
|
|
||||||
(field.initialValue as? StringEncodedValue)?.value == fieldValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader
|
package app.revanced.patches.finanzonline.detection.bootloader
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
||||||
internal object BootStateFingerprint : MethodFingerprint(
|
object BootStateFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
||||||
internal object CreateKeyFingerprint : MethodFingerprint(
|
object CreateKeyFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
|
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.root
|
package app.revanced.patches.finanzonline.detection.root
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
||||||
internal object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.googlerecorder.restrictions
|
package app.revanced.patches.googlerecorder.restrictions
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.googlerecorder.restrictions.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object OnApplicationCreateFingerprint : MethodFingerprint(
|
object OnApplicationCreateFingerprint : MethodFingerprint(
|
||||||
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
||||||
customFingerprint = custom@{ methodDef, classDef ->
|
customFingerprint = custom@{ methodDef, classDef ->
|
||||||
if (methodDef.name != "onCreate") return@custom false
|
if (methodDef.name != "onCreate") return@custom false
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.hexeditor.ad
|
package app.revanced.patches.hexeditor.ad
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object PrimaryAdsFingerprint : MethodFingerprint(
|
object PrimaryAdsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerp
|
|||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Unlock pro",
|
name = "Unlock pro",
|
||||||
compatiblePackages = [CompatiblePackage("ginlemon.iconpackstudio", ["2.2 build 016"])]
|
compatiblePackages = [CompatiblePackage("ginlemon.iconpackstudio")]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object UnlockProPatch : BytecodePatch(
|
object UnlockProPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.iconpackstudio.misc.pro.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object CheckProFingerprint : MethodFingerprint(
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import app.revanced.patcher.patch.annotation.Patch
|
|||||||
import app.revanced.patches.idaustria.detection.root.fingerprints.AttestationSupportedCheckFingerprint
|
import app.revanced.patches.idaustria.detection.root.fingerprints.AttestationSupportedCheckFingerprint
|
||||||
import app.revanced.patches.idaustria.detection.root.fingerprints.BootloaderCheckFingerprint
|
import app.revanced.patches.idaustria.detection.root.fingerprints.BootloaderCheckFingerprint
|
||||||
import app.revanced.patches.idaustria.detection.root.fingerprints.RootCheckFingerprint
|
import app.revanced.patches.idaustria.detection.root.fingerprints.RootCheckFingerprint
|
||||||
import app.revanced.util.returnEarly
|
import app.revanced.util.Utils.returnEarly
|
||||||
|
|
||||||
@Patch(
|
@Patch(
|
||||||
name = "Remove root detection",
|
name = "Remove root detection",
|
||||||
description = "Removes the check for root permissions and unlocked bootloader.",
|
description = "Removes the check for root permissions and unlocked bootloader.",
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
|
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object RootDetectionPatch : BytecodePatch(
|
object RootDetectionPatch : BytecodePatch(
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal object AttestationSupportedCheckFingerprint : MethodFingerprint(
|
object AttestationSupportedCheckFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal object BootloaderCheckFingerprint : MethodFingerprint(
|
object BootloaderCheckFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.root.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal object RootCheckFingerprint : MethodFingerprint(
|
object RootCheckFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
accessFlags = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSign
|
|||||||
@Patch(
|
@Patch(
|
||||||
name = "Spoof signature",
|
name = "Spoof signature",
|
||||||
description = "Spoofs the signature of the app.",
|
description = "Spoofs the signature of the app.",
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
|
compatiblePackages = [CompatiblePackage("at.gv.oe.app", ["3.0.2"])]
|
||||||
)
|
)
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
object SpoofSignaturePatch : BytecodePatch(
|
object SpoofSignaturePatch : BytecodePatch(
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.idaustria.detection.signature.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal object SpoofSignatureFingerprint : MethodFingerprint(
|
object SpoofSignatureFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
accessFlags = AccessFlags.PRIVATE.value,
|
accessFlags = AccessFlags.PRIVATE.value,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.inshorts.ad
|
package app.revanced.patches.inshorts.ad
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.inshorts.ad.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object InshortsAdsFingerprint : MethodFingerprint(
|
object InshortsAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
strings = listOf("GoogleAdLoader","exception in requestAd"),
|
strings = listOf("GoogleAdLoader","exception in requestAd"),
|
||||||
)
|
)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline
|
package app.revanced.patches.instagram.patches.ads.timeline
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
|
|
||||||
internal object MediaFingerprint : MethodFingerprint(
|
object MediaFingerprint : MethodFingerprint(
|
||||||
strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata")
|
strings = listOf("force_overlay", "Media#updateFields", "live_reels_metadata")
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object ShowAdFingerprint : MethodFingerprint(
|
object ShowAdFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
listOf("L", "L", "Z", "Z"),
|
listOf("L", "L", "Z", "Z"),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
|||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object GenericMediaAdFingerprint : MediaAdFingerprint(
|
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.INVOKE_INTERFACE,
|
Opcode.INVOKE_INTERFACE,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
|
|
||||||
internal abstract class MediaAdFingerprint(
|
abstract class MediaAdFingerprint(
|
||||||
returnType: String? = "Z",
|
returnType: String? = "Z",
|
||||||
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters: Iterable<String>? = listOf(),
|
parameters: Iterable<String>? = listOf(),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
internal object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
||||||
"V",
|
"V",
|
||||||
null,
|
null,
|
||||||
listOf("L", "L"),
|
listOf("L", "L"),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
|||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object ShoppingAdFingerprint : MediaAdFingerprint(
|
object ShoppingAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IF_EQZ,
|
Opcode.IF_EQZ,
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal object IrplusAdsFingerprint : MethodFingerprint(
|
object IrplusAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
||||||
listOf("L", "Z"),
|
listOf("L", "Z"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.lightroom.misc.login
|
package app.revanced.patches.lightroom.misc.login
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object IsLoggedInFingerprint : MethodFingerprint(
|
object IsLoggedInFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.lightroom.misc.premium
|
package app.revanced.patches.lightroom.misc.premium
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object HasPurchasedFingerprint : MethodFingerprint(
|
object HasPurchasedFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.memegenerator.detection.license
|
package app.revanced.patches.memegenerator.detection.license
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object LicenseValidationFingerprint : MethodFingerprint(
|
object LicenseValidationFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
parameters = listOf("Landroid/content/Context;"),
|
parameters = listOf("Landroid/content/Context;"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.memegenerator.detection.signature
|
package app.revanced.patches.memegenerator.detection.signature
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2)
|
@FuzzyPatternScanMethod(2)
|
||||||
internal object VerifySignatureFingerprint : MethodFingerprint(
|
object VerifySignatureFingerprint : MethodFingerprint(
|
||||||
returnType = "Z",
|
returnType = "Z",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
parameters = listOf("Landroid/app/Activity;"),
|
parameters = listOf("Landroid/app/Activity;"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.memegenerator.misc.pro
|
package app.revanced.patches.memegenerator.misc.pro
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object IsFreeVersionFingerprint : MethodFingerprint(
|
object IsFreeVersionFingerprint : MethodFingerprint(
|
||||||
returnType = "Ljava/lang/Boolean;",
|
returnType = "Ljava/lang/Boolean;",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
||||||
strings = listOf("free"),
|
strings = listOf("free"),
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import app.revanced.patcher.extensions.or
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
|
|
||||||
internal object LoadInboxAdsFingerprint : MethodFingerprint(
|
object LoadInboxAdsFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
strings = listOf(
|
strings = listOf(
|
||||||
"ads_load_begin",
|
"ads_load_begin",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.messenger.ads.inbox.patch
|
package app.revanced.patches.messenger.ads.inbox.patch
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue
|
import com.android.tools.smali.dexlib2.dexbacked.value.DexBackedStringEncodedValue
|
||||||
|
|
||||||
internal object SendTypingIndicatorFingerprint : MethodFingerprint(
|
object SendTypingIndicatorFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
parameters = listOf(),
|
parameters = listOf(),
|
||||||
customFingerprint = { methodDef, classDef ->
|
customFingerprint = { methodDef, classDef ->
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.messenger.inputfield.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
object SwitchMessangeInputEmojiButtonFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
parameters = listOf("L", "Z"),
|
parameters = listOf("L", "Z"),
|
||||||
strings = listOf("afterTextChanged", "expression_search"),
|
strings = listOf("afterTextChanged", "expression_search"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.messenger.inputfield.patch
|
package app.revanced.patches.messenger.inputfield.patch
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.messenger.inputfield.patch
|
package app.revanced.patches.messenger.inputfield.patch
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object UnlockProFingerprint : MethodFingerprint(
|
object UnlockProFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
AccessFlags.STATIC or AccessFlags.SYNTHETIC,
|
AccessFlags.STATIC or AccessFlags.SYNTHETIC,
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
internal 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,
|
||||||
Opcode.NEW_INSTANCE,
|
Opcode.NEW_INSTANCE,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal 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,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
internal 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,
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
Opcode.MOVE_RESULT_OBJECT,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
internal object CodecsLockFingerprint : MethodFingerprint(
|
object CodecsLockFingerprint : MethodFingerprint(
|
||||||
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
"L", AccessFlags.PUBLIC or AccessFlags.STATIC, opcodes = listOf(
|
||||||
Opcode.INVOKE_DIRECT,
|
Opcode.INVOKE_DIRECT,
|
||||||
Opcode.INVOKE_VIRTUAL,
|
Opcode.INVOKE_VIRTUAL,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.music.audio.exclusiveaudio
|
package app.revanced.patches.music.audio.exclusiveaudio
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
|
object AllowExclusiveAudioPlaybackFingerprint: MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf(),
|
listOf(),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||||||
|
|
||||||
|
|
||||||
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
@FuzzyPatternScanMethod(2) // FIXME: Test this threshold and find the best value.
|
||||||
internal object ExclusiveAudioFingerprint : MethodFingerprint(
|
object ExclusiveAudioFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf("L", "Z"),
|
listOf("L", "Z"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.music.interaction.permanentrepeat
|
package app.revanced.patches.music.interaction.permanentrepeat
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object RepeatTrackFingerprint : MethodFingerprint(
|
object RepeatTrackFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf("L", "L"),
|
listOf("L", "L"),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.music.interaction.permanentshuffle
|
package app.revanced.patches.music.interaction.permanentshuffle
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object DisableShuffleFingerprint : MethodFingerprint(
|
object DisableShuffleFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf(),
|
listOf(),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal 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,
|
||||||
Opcode.IPUT_OBJECT,
|
Opcode.IPUT_OBJECT,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.music.layout.minimizedplayback
|
package app.revanced.patches.music.layout.minimizedplayback
|
||||||
|
|
||||||
import app.revanced.util.exception
|
import app.revanced.extensions.exception
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
object MinimizedPlaybackManagerFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
listOf("I", "L", "Z"),
|
listOf("I", "L", "Z"),
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import app.revanced.patcher.fingerprint.MethodFingerprint
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
internal 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,
|
||||||
Opcode.CONST_16,
|
Opcode.CONST_16,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user