mirror of
https://github.com/revanced/revanced-patches.git
synced 2025-12-08 18:33:57 +01:00
Compare commits
2 Commits
v2.191.0-d
...
v2.169.1-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85a32e833e | ||
|
|
5614651d34 |
9
.gitattributes
vendored
9
.gitattributes
vendored
@@ -1,9 +0,0 @@
|
|||||||
#
|
|
||||||
# https://help.github.com/articles/dealing-with-line-endings/
|
|
||||||
#
|
|
||||||
# Linux start script should use lf
|
|
||||||
/gradlew text eol=lf
|
|
||||||
|
|
||||||
# These are Windows script files and should use crlf
|
|
||||||
*.bat text eol=crlf
|
|
||||||
|
|
||||||
73
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
Normal file
73
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
name: 🐞 Bug report
|
||||||
|
description: Report a very clearly broken issue.
|
||||||
|
title: 'bug: <title>'
|
||||||
|
labels: [bug]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
# ReVanced bug report
|
||||||
|
|
||||||
|
Important to note that your issue may have already been reported before. Please check for existing issues [here](https://github.com/revanced/revanced-patches/labels/bug).
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Type
|
||||||
|
options:
|
||||||
|
- Error while patching
|
||||||
|
- Error at runtime
|
||||||
|
- Cosmetic
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Bug description
|
||||||
|
description: How did you find the bug? Any additional details that might help?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: Add the steps to reproduce this bug including your environment.
|
||||||
|
placeholder: Step 1. Download some files. Step 2. ...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Relevant log output
|
||||||
|
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. Capture crash logs by running `logcat | grep AndroidRuntime`.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Screenshots or videos
|
||||||
|
description: Add screenshots or videos that show the bug here.
|
||||||
|
placeholder: Drag and drop the screenshots/videos into this box.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Solution
|
||||||
|
description: If applicable, add a possible solution.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Add additional context here.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: checkboxes
|
||||||
|
id: acknowledgements
|
||||||
|
attributes:
|
||||||
|
label: Acknowledgements
|
||||||
|
description: Your issue will be closed if you haven't done these steps.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||||
|
required: true
|
||||||
|
- label: I have written a short but informative title.
|
||||||
|
required: true
|
||||||
|
- label: I filled out all of the requested information in this issue properly.
|
||||||
|
required: true
|
||||||
49
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
49
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -1,49 +0,0 @@
|
|||||||
name: 🐞 Bug report
|
|
||||||
description: Report a bug or an issue.
|
|
||||||
title: 'bug: '
|
|
||||||
labels: ['Bug report']
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
# ReVanced Patches bug report
|
|
||||||
|
|
||||||
Please check for existing bug reports
|
|
||||||
[here](https://github.com/ReVanced/revanced-patches/labels/Bug%20report)
|
|
||||||
before creating a new one.
|
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Bug description
|
|
||||||
description: |
|
|
||||||
- Describe your bug in detail
|
|
||||||
- Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...)
|
|
||||||
- Add images and videos if possible
|
|
||||||
- List used patches if applicable
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Error logs
|
|
||||||
description: Exceptions can be captured by running `logcat | grep AndroidRuntime` in a shell.
|
|
||||||
render: shell
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Solution
|
|
||||||
description: If applicable, add a possible solution to the bug.
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Additional context
|
|
||||||
description: Add additional context here.
|
|
||||||
- type: checkboxes
|
|
||||||
id: acknowledgements
|
|
||||||
attributes:
|
|
||||||
label: Acknowledgements
|
|
||||||
description: Your issue will be closed if you don't follow the checklist below.
|
|
||||||
options:
|
|
||||||
- label: This request is not a duplicate of an existing issue.
|
|
||||||
required: true
|
|
||||||
- label: I have chosen an appropriate title.
|
|
||||||
required: true
|
|
||||||
- label: All requested information has been provided properly.
|
|
||||||
required: true
|
|
||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,5 +1,8 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
|
- name: 📃 Documentation
|
||||||
|
url: https://github.com/revanced/revanced-documentation/
|
||||||
|
about: Don't know how or where to start? Check out our documentation!
|
||||||
- name: 🗨 Discussions
|
- name: 🗨 Discussions
|
||||||
url: https://github.com/revanced/revanced-suggestions/discussions
|
url: https://github.com/revanced/revanced-suggestions/discussions
|
||||||
about: Have something unspecific to ReVanced Patches in mind? Search for or start a new discussion!
|
about: Got something you think should change or be added? Search for or start a new discussion!
|
||||||
44
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
44
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -1,44 +0,0 @@
|
|||||||
name: ⭐ Feature request
|
|
||||||
description: Create a detailed request for a new feature.
|
|
||||||
title: 'feat: '
|
|
||||||
labels: ['Feature request']
|
|
||||||
body:
|
|
||||||
- type: markdown
|
|
||||||
attributes:
|
|
||||||
value: |
|
|
||||||
# ReVanced Patches feature request
|
|
||||||
|
|
||||||
Please check for existing feature requests
|
|
||||||
[here](https://github.com/ReVanced/revanced-patches/labels/Feature%20request)
|
|
||||||
before creating a new one.
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Feature description
|
|
||||||
description: |
|
|
||||||
- Describe your feature in detail
|
|
||||||
- Add images, videos, links, examples, references, etc. if possible
|
|
||||||
- Add the target application name in case you request a new patch
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Motivation
|
|
||||||
description: |
|
|
||||||
A strong motivation is necessary for a feature request to be considered.
|
|
||||||
|
|
||||||
- Why should this feature be implemented?
|
|
||||||
- What is the explicit use case?
|
|
||||||
- What are the benefits?
|
|
||||||
- What makes this feature important?
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: checkboxes
|
|
||||||
id: acknowledgements
|
|
||||||
attributes:
|
|
||||||
label: Acknowledgements
|
|
||||||
description: Your issue will be closed if you don't follow the checklist below.
|
|
||||||
options:
|
|
||||||
- label: This request is not a duplicate of an existing issue.
|
|
||||||
required: true
|
|
||||||
- label: I have chosen an appropriate title.
|
|
||||||
required: true
|
|
||||||
- label: All requested information has been provided properly.
|
|
||||||
required: true
|
|
||||||
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
Normal file
41
.github/ISSUE_TEMPLATE/patch-request.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: ⭐ Patch Request
|
||||||
|
description: Create a detailed patch request.
|
||||||
|
title: 'feat(patch): '
|
||||||
|
labels: [patch-request]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Application
|
||||||
|
description: Which application is this patch for?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Issue
|
||||||
|
description: What is the issue this patch should solve?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Patch
|
||||||
|
description: "Describe the patch you'd like to see in detail."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Motivation
|
||||||
|
description: Why should your patch request should be considered? What makes it valuable to the community?
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: acknowledgements
|
||||||
|
attributes:
|
||||||
|
label: Acknowledgements
|
||||||
|
description: Your issue will be closed if you haven't done these steps.
|
||||||
|
options:
|
||||||
|
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||||
|
required: true
|
||||||
|
- label: I have written a short but informative title.
|
||||||
|
required: true
|
||||||
|
- label: I filled out all of the requested information in this issue properly.
|
||||||
|
required: true
|
||||||
2
.github/config.yml
vendored
2
.github/config.yml
vendored
@@ -1,2 +0,0 @@
|
|||||||
firstPRMergeComment: >
|
|
||||||
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.
|
|
||||||
4
.github/workflows/pull_request.yml
vendored
4
.github/workflows/pull_request.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Open a PR to main
|
name: PR to main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pull-request:
|
pull-request:
|
||||||
|
|||||||
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
@@ -23,19 +23,27 @@ 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: Setup JDK
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
java-version: '17'
|
||||||
${{ runner.home }}/.gradle/caches
|
distribution: 'zulu'
|
||||||
${{ runner.home }}/.gradle/wrapper
|
cache: gradle
|
||||||
.gradle
|
- name: Setup Node.js
|
||||||
node_modules
|
uses: actions/setup-node@v3
|
||||||
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
cache: 'npm'
|
||||||
|
- name: Setup Android SDK
|
||||||
|
uses: amyu/setup-android@v2
|
||||||
|
with:
|
||||||
|
cache-disabled: false
|
||||||
|
sdk-version: '33'
|
||||||
|
build-tools-version: '33.0.1'
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: ./gradlew generateMeta clean
|
run: ./gradlew generateMeta clean --no-daemon
|
||||||
- name: Setup semantic-release
|
- name: Setup semantic-release
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Release
|
- name: Release
|
||||||
|
|||||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -4,5 +4,5 @@
|
|||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="azul-17" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="azul-17" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
||||||
@@ -7,13 +7,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
[
|
"@semantic-release/commit-analyzer",
|
||||||
"@semantic-release/commit-analyzer", {
|
|
||||||
"releaseRules": [
|
|
||||||
{ "type": "build", "scope": "Needs bump", "release": "patch" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/changelog",
|
"@semantic-release/changelog",
|
||||||
"gradle-semantic-release-plugin",
|
"gradle-semantic-release-plugin",
|
||||||
|
|||||||
2014
CHANGELOG.md
2014
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
106
CONTRIBUTING.md
106
CONTRIBUTING.md
@@ -1,106 +0,0 @@
|
|||||||
<p align="center">
|
|
||||||
<picture>
|
|
||||||
<source
|
|
||||||
width="256px"
|
|
||||||
media="(prefers-color-scheme: dark)"
|
|
||||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
|
||||||
>
|
|
||||||
</picture>
|
|
||||||
<br>
|
|
||||||
<a href="https://revanced.app/">
|
|
||||||
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
|
||||||
</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">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
|
||||||
</a>
|
|
||||||
<a href="https://reddit.com/r/revancedapp">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
|
||||||
</a>
|
|
||||||
<a href="https://t.me/app_revanced">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
|
||||||
</a>
|
|
||||||
<a href="https://twitter.com/revancedapp">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
|
|
||||||
</a>
|
|
||||||
<a href="https://www.youtube.com/@ReVanced">
|
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
|
||||||
</a>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
Continuing the legacy of Vanced
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# 📙 ReVanced Patches contribution guidelines
|
|
||||||
|
|
||||||
This document describes how to contribute to ReVanced Patches.
|
|
||||||
|
|
||||||
## 📖 Resources to help you get started
|
|
||||||
|
|
||||||
* The [documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs) provides the fundamentals of patches
|
|
||||||
and everything necessary to create your own patch from scratch
|
|
||||||
* [Our backlog](https://github.com/orgs/ReVanced/projects/12) is where we keep track of what we're working on
|
|
||||||
* [Issues](https://github.com/ReVanced/revanced-patches/issues) are where we keep track of bugs and feature requests
|
|
||||||
|
|
||||||
## 🙏 Submitting a feature request
|
|
||||||
|
|
||||||
Features can be requested by opening an issue using the
|
|
||||||
[Feature request issue template](https://github.com/ReVanced/revanced-patches/issues/new?assignees=&labels=Feature+request&projects=&template=feature-request.yml&title=feat%3A+).
|
|
||||||
|
|
||||||
> **Note**
|
|
||||||
> Requests can be accepted or rejected at the discretion of maintainers of ReVanced Patches.
|
|
||||||
> Good motivation has to be provided for a request to be accepted.
|
|
||||||
|
|
||||||
## 🐞 Submitting a bug report
|
|
||||||
|
|
||||||
If you encounter a bug while using ReVanced Patches, open an issue using the
|
|
||||||
[Bug report issue template](https://github.com/ReVanced/revanced-patches/issues/new?assignees=&labels=Bug+report&projects=&template=bug-report.yml&title=bug%3A+).
|
|
||||||
|
|
||||||
## 🧑⚖️ Guidelines for requesting or contributing patches
|
|
||||||
|
|
||||||
To maintain a high-quality and ethical collection of patches, the following guidelines for requesting
|
|
||||||
or contributing patches are effective as of September 14, 2023. Any patches present prior to this date
|
|
||||||
are unaffected by this change.
|
|
||||||
|
|
||||||
> **Note**
|
|
||||||
> We generally adhere to the guidelines outlined below. However, we may make exceptions
|
|
||||||
> in specific cases based on our discretion. Pull requests for patches that deviate from the guidelines
|
|
||||||
> will be evaluated individually. While a patch may not align with our general guidelines,
|
|
||||||
> we will consider its acceptance on a case-by-case basis, taking into account its impact on user experience
|
|
||||||
> and ethical considerations. We reserve the right to make exceptions for patches that provide significant value.
|
|
||||||
|
|
||||||
✅ Examples for acceptable patches include:
|
|
||||||
|
|
||||||
* Customizations: Feel free to contribute patches that allow users to personalize their experience
|
|
||||||
* Ad-Blocking: Patches aimed at enhancing user privacy and blocking intrusive advertisements are appreciated
|
|
||||||
* Feature additions: Patches that add new features or change behaviour to the app are welcome
|
|
||||||
|
|
||||||
❌ Examples for unacceptable patches include:
|
|
||||||
|
|
||||||
* Payment circumvention: We do not accept patches that exist solely to bypass payment for the app or any of its features
|
|
||||||
* Malicious patches: Patches that are malicious in nature are not allowed
|
|
||||||
|
|
||||||
|
|
||||||
## 📝 How to contribute
|
|
||||||
|
|
||||||
1. Before contributing, it is recommended to open an issue to discuss your change
|
|
||||||
with the maintainers of ReVanced Patches. This will help you determine whether your change is acceptable
|
|
||||||
and whether it is worth your time to implement it
|
|
||||||
2. Development happens on the `dev` branch. Fork the repository and create your branch from `dev`
|
|
||||||
3. Commit your changes. In case you are contributing a new patch, make sure to follow the conventions for patches
|
|
||||||
described in the [documentation](https://github.com/ReVanced/revanced-patches/tree/docs/docs)
|
|
||||||
4. Submit a pull request to the `dev` branch of the repository and reference issues
|
|
||||||
that your pull request closes in the description of your pull request
|
|
||||||
5. Our team will review your pull request and provide feedback. Once your pull request is approved,
|
|
||||||
it will be merged into the `dev` branch and will be included in the next release of ReVanced Patches
|
|
||||||
|
|
||||||
❤️ Thank you for considering contributing to ReVanced Patches,
|
|
||||||
ReVanced
|
|
||||||
122
README-template.md
Normal file
122
README-template.md
Normal file
@@ -0,0 +1,122 @@
|
|||||||
|
## 🧩 Patches
|
||||||
|
|
||||||
|
The official Patch bundle provided by ReVanced and the community.
|
||||||
|
|
||||||
|
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||||
|
|
||||||
|
{{ table }}
|
||||||
|
|
||||||
|
## 📝 JSON Format
|
||||||
|
|
||||||
|
This section explains the JSON format for the [patches.json](patches.json) file.
|
||||||
|
|
||||||
|
The file contains an array of objects, each object representing a patch. The object contains the following properties:
|
||||||
|
|
||||||
|
| key | description |
|
||||||
|
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `name` | The name of the patch. |
|
||||||
|
| `description` | The description of the patch. |
|
||||||
|
| `version` | The version of the patch. |
|
||||||
|
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
|
||||||
|
| `options` | An array of options for this patch. |
|
||||||
|
| `options.key` | The key of the option. |
|
||||||
|
| `options.title` | The title of the option. |
|
||||||
|
| `options.description` | The description of the option. |
|
||||||
|
| `options.required` | Whether the option is required. |
|
||||||
|
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
|
||||||
|
| `dependencies` | An array of dependencies, which are patch names. |
|
||||||
|
| `compatiblePackages` | An array of packages compatible with this patch. |
|
||||||
|
| `compatiblePackages.name` | The name of the package. |
|
||||||
|
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "remember-video-quality",
|
||||||
|
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"options": [],
|
||||||
|
"dependencies": [
|
||||||
|
"integrations",
|
||||||
|
"video-id-hook"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": [
|
||||||
|
"17.22.36",
|
||||||
|
"17.24.35",
|
||||||
|
"17.26.35",
|
||||||
|
"17.27.39",
|
||||||
|
"17.28.34",
|
||||||
|
"17.29.34",
|
||||||
|
"17.32.35",
|
||||||
|
"17.33.42"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "theme",
|
||||||
|
"description": "Enables a custom theme.",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "theme",
|
||||||
|
"title": "Theme",
|
||||||
|
"description": "Select a theme.",
|
||||||
|
"required": true,
|
||||||
|
"choices": [
|
||||||
|
"Amoled"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "custom-branding",
|
||||||
|
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "appName",
|
||||||
|
"title": "Application Name",
|
||||||
|
"description": "The name of the application it will show on your home screen.",
|
||||||
|
"required": true,
|
||||||
|
"choices": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "appIconPath",
|
||||||
|
"title": "Application Icon Path",
|
||||||
|
"description": "A path to the icon of the application.",
|
||||||
|
"required": false,
|
||||||
|
"choices": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
563
README.md
563
README.md
@@ -1,91 +1,488 @@
|
|||||||
<p align="center">
|
## 🧩 Patches
|
||||||
<picture>
|
|
||||||
<source
|
The official Patch bundle provided by ReVanced and the community.
|
||||||
width="256px"
|
|
||||||
media="(prefers-color-scheme: dark)"
|
> Looking for the JSON variant of this? [Click here](patches.json).
|
||||||
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
|
|
||||||
>
|
### [📦 `com.google.android.youtube`](https://play.google.com/store/apps/details?id=com.google.android.youtube)
|
||||||
<img
|
<details>
|
||||||
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
|
|
||||||
>
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
</picture>
|
|:--------:|:--------------:|:-----------------:|
|
||||||
<br>
|
| `always-autorepeat` | Always repeats the playing video again. | 18.08.37 |
|
||||||
<a href="https://revanced.app/">
|
| `client-spoof` | Spoofs a patched client to allow playback. | all |
|
||||||
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
|
| `comments` | Hides components related to comments. | 18.08.37 |
|
||||||
</a>
|
| `copy-video-url` | Adds buttons in player to copy video links. | 18.08.37 |
|
||||||
<a href="https://github.com/revanced">
|
| `custom-branding` | Changes the YouTube launcher icon and name to your choice (defaults to ReVanced). | all |
|
||||||
<picture>
|
| `custom-video-buffer` | Lets you change the buffers of videos. | 18.08.37 |
|
||||||
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
|
| `custom-video-speed` | Adds more video speed options. | 18.08.37 |
|
||||||
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
|
| `disable-auto-captions` | Disable forced captions from being automatically enabled. | 18.08.37 |
|
||||||
</picture>
|
| `disable-fullscreen-panels` | Disables video description and comments panel in fullscreen view. | 18.08.37 |
|
||||||
</a>
|
| `disable-player-popup-panels` | Disables panels from appearing automatically when going into fullscreen (playlist or live chat). | 18.08.37 |
|
||||||
<a href="http://revanced.app/discord">
|
| `disable-shorts-on-startup` | Disables playing YouTube Shorts when launching YouTube. | 18.08.37 |
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
|
| `disable-zoom-haptics` | Disables haptics when zooming. | all |
|
||||||
</a>
|
| `downloads` | Enables downloading music and videos from YouTube. | 18.08.37 |
|
||||||
<a href="https://reddit.com/r/revancedapp">
|
| `enable-debugging` | Adds debugging options. | all |
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
|
| `enable-wide-searchbar` | Replaces the search icon with a wide search bar. This will hide the YouTube logo when active. | 18.08.37 |
|
||||||
</a>
|
| `general-ads` | Removes general ads. | 18.08.37 |
|
||||||
<a href="https://t.me/app_revanced">
|
| `hdr-auto-brightness` | Makes the brightness of HDR videos follow the system default. | 18.08.37 |
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
|
| `hide-album-cards` | Hides the album cards below the artist description. | 18.08.37 |
|
||||||
</a>
|
| `hide-artist-card` | Hides the artist card below the searchbar. | 18.08.37 |
|
||||||
<a href="https://twitter.com/revancedapp">
|
| `hide-autoplay-button` | Hides the autoplay button in the video player. | 18.08.37 |
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032018-6da37214-7474-4641-a1da-7af7db3a31cd.png" />
|
| `hide-breaking-news-shelf` | Hides the breaking news shelf on the homepage tab. | 18.08.37 |
|
||||||
</a>
|
| `hide-captions-button` | Hides the captions button on video player. | 18.08.37 |
|
||||||
<a href="https://www.youtube.com/@ReVanced">
|
| `hide-cast-button` | Hides the cast button in the video player. | all |
|
||||||
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
|
| `hide-create-button` | Hides the create button in the navigation bar. | 18.08.37 |
|
||||||
</a>
|
| `hide-crowdfunding-box` | Hides the crowdfunding box between the player and video description. | 18.08.37 |
|
||||||
<br>
|
| `hide-email-address` | Hides the email address in the account switcher. | 18.08.37 |
|
||||||
<br>
|
| `hide-endscreen-cards` | Hides the suggested video cards at the end of a video in fullscreen. | 18.08.37 |
|
||||||
Continuing the legacy of Vanced
|
| `hide-floating-microphone-button` | Hides the floating microphone button which appears in search. | 18.08.37 |
|
||||||
</p>
|
| `hide-info-cards` | Hides info cards in videos. | 18.08.37 |
|
||||||
|
| `hide-my-mix` | Hides mix playlists. | 18.08.37 |
|
||||||
|
| `hide-player-buttons` | Adds the option to hide video player previous and next buttons. | all |
|
||||||
|
| `hide-seekbar` | Hides the seekbar. | 18.08.37 |
|
||||||
|
| `hide-shorts-button` | Hides the shorts button on the navigation bar. | 18.08.37 |
|
||||||
|
| `hide-timestamp` | Hides timestamp in video player. | 18.08.37 |
|
||||||
|
| `hide-video-action-buttons` | Adds the options to hide action buttons under a video. | 18.08.37 |
|
||||||
|
| `hide-watch-in-vr` | Hides the option to watch in VR from the player settings flyout panel. | 18.08.37 |
|
||||||
|
| `hide-watermark` | Hides creator's watermarks on videos. | 18.08.37 |
|
||||||
|
| `minimized-playback` | Enables minimized and background playback. | 18.08.37 |
|
||||||
|
| `old-quality-layout` | Enables the original video quality flyout in the video player settings | 18.08.37 |
|
||||||
|
| `open-links-externally` | Open links outside of the app directly in your browser. | 18.08.37 |
|
||||||
|
| `premium-heading` | Shows premium branding on the home screen. | all |
|
||||||
|
| `remember-playback-speed` | Adds the ability to remember the playback speed you chose in the video playback speed flyout. | 18.08.37 |
|
||||||
|
| `remember-video-quality` | Adds the ability to remember the video quality you chose in the video quality flyout. | 18.08.37 |
|
||||||
|
| `remove-player-button-background` | Removes the background from the video player buttons. | 18.08.37 |
|
||||||
|
| `return-youtube-dislike` | Shows the dislike count of videos using the Return YouTube Dislike API. | 18.08.37 |
|
||||||
|
| `seekbar-tapping` | Enables tap-to-seek on the seekbar of the video player. | 18.08.37 |
|
||||||
|
| `sponsorblock` | Integrates SponsorBlock which allows skipping video segments such as sponsored content. | 18.08.37 |
|
||||||
|
| `spoof-app-version` | Tricks YouTube into thinking, you are running an older version of the app. One of the side effects also includes restoring the old UI. | 18.08.37 |
|
||||||
|
| `spoof-signature-verification` | Spoofs a patched client to prevent playback issues. | 18.08.37 |
|
||||||
|
| `swipe-controls` | Adds volume and brightness swipe controls. | 18.08.37 |
|
||||||
|
| `tablet-mini-player` | Enables the tablet mini player layout. | 18.08.37 |
|
||||||
|
| `theme` | Applies a custom theme. | all |
|
||||||
|
| `vanced-microg-support` | Allows YouTube ReVanced to run without root and under a different package name with Vanced MicroG. | 18.08.37 |
|
||||||
|
| `video-ads` | Removes ads in the video player. | 18.08.37 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.google.android.apps.youtube.music`](https://play.google.com/store/apps/details?id=com.google.android.apps.youtube.music)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `background-play` | Enables playing music in the background. | all |
|
||||||
|
| `bypass-certificate-checks` | Bypasses certificate checks which prevent YouTube Music from working on Android Auto. | 5.39.52 |
|
||||||
|
| `codecs-unlock` | Adds more audio codec options. The new audio codecs usually result in better audio quality. | all |
|
||||||
|
| `compact-header` | Hides the music category bar at the top of the homepage. | all |
|
||||||
|
| `exclusive-audio-playback` | Enables the option to play music without video. | all |
|
||||||
|
| `hide-get-premium` | Removes all "Get Premium" evidences from the avatar menu. | 5.39.52 |
|
||||||
|
| `minimized-playback-music` | Enables minimized playback on Kids music. | all |
|
||||||
|
| `music-microg-support` | Allows YouTube Music ReVanced to run without root and under a different package name. | all |
|
||||||
|
| `music-video-ads` | Removes ads in the music player. | all |
|
||||||
|
| `tasteBuilder-remover` | Removes the "Tell us which artists you like" card from the home screen. | all |
|
||||||
|
| `upgrade-button-remover` | Removes the upgrade tab from the pivot bar. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.ss.android.ugc.trill`](https://play.google.com/store/apps/details?id=com.ss.android.ugc.trill)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-login-requirement` | Do not force login. | all |
|
||||||
|
| `downloads` | Removes download restrictions and changes the default path to download to. | 27.8.3 |
|
||||||
|
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | 27.8.3 |
|
||||||
|
| `fix-google-login` | Allows logging in with a Google account. | all |
|
||||||
|
| `hide-ads` | Removes ads from TikTok. | all |
|
||||||
|
| `playback-speed` | Enables the playback speed option for all videos. | all |
|
||||||
|
| `settings` | Adds ReVanced settings to TikTok. | 27.8.3 |
|
||||||
|
| `show-seekbar` | Shows progress bar for all video. | all |
|
||||||
|
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | 27.8.3 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.zhiliaoapp.musically`](https://play.google.com/store/apps/details?id=com.zhiliaoapp.musically)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-login-requirement` | Do not force login. | all |
|
||||||
|
| `downloads` | Removes download restrictions and changes the default path to download to. | 27.8.3 |
|
||||||
|
| `feed-filter` | Filters tiktok videos: removing ads, removing livestreams. | 27.8.3 |
|
||||||
|
| `fix-google-login` | Allows logging in with a Google account. | all |
|
||||||
|
| `hide-ads` | Removes ads from TikTok. | all |
|
||||||
|
| `playback-speed` | Enables the playback speed option for all videos. | all |
|
||||||
|
| `settings` | Adds ReVanced settings to TikTok. | 27.8.3 |
|
||||||
|
| `show-seekbar` | Shows progress bar for all video. | all |
|
||||||
|
| `sim-spoof` | Spoofs the information which is retrieved from the sim-card. | 27.8.3 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `tv.twitch.android.app`](https://play.google.com/store/apps/details?id=tv.twitch.android.app)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `block-audio-ads` | Blocks audio ads in streams and VODs. | 14.6.1 |
|
||||||
|
| `block-embedded-ads` | Blocks embedded steam ads using services like TTV.lol or PurpleAdBlocker. | 14.6.1 |
|
||||||
|
| `block-video-ads` | Blocks video ads in streams and VODs. | 14.6.1 |
|
||||||
|
| `debug-mode` | Enables Twitch's internal debugging mode. | all |
|
||||||
|
| `settings` | Adds settings menu to Twitch. | all |
|
||||||
|
| `show-deleted-messages` | Shows deleted chat messages behind a clickable spoiler. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.twitter.android`](https://play.google.com/store/apps/details?id=com.twitter.android)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `dynamic-color` | Replaces the default Twitter Blue with the users Material You palette. | all |
|
||||||
|
| `hide-ads` | Hides ads. | all |
|
||||||
|
| `hide-recommended-users` | Hides recommended users. | all |
|
||||||
|
| `hide-views-stats` | Hides the view stats under tweets. | 9.71.0-release.0 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.spotify.music`](https://play.google.com/store/apps/details?id=com.spotify.music)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-capture-restriction` | Allows capturing Spotify's audio output while screen sharing or screen recording. | all |
|
||||||
|
| `hide-premium-navbar` | Removes the premium tab from the navbar. | all |
|
||||||
|
| `spotify-theme` | Applies a custom theme. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.reddit.frontpage`](https://play.google.com/store/apps/details?id=com.reddit.frontpage)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `general-reddit-ads` | Removes general ads from the Reddit frontpage and subreddits. | 2023.12.0 |
|
||||||
|
| `hide-subreddit-banner` | Hides banner ads from comments on subreddits. | 2023.12.0 |
|
||||||
|
| `premium-icon-reddit` | Unlocks premium Reddit app icons. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.vanced.android.youtube`](https://play.google.com/store/apps/details?id=com.vanced.android.youtube)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `client-spoof` | Spoofs a patched client to allow playback. | all |
|
||||||
|
| `hide-ads` | Removes general ads. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `at.gv.bmf.bmf2go`](https://play.google.com/store/apps/details?id=at.gv.bmf.bmf2go)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `remove-bootloader-detection` | Removes the check for an unlocked bootloader. | 2.2.0 |
|
||||||
|
| `remove-root-detection` | Removes the check for root permissions. | 2.2.0 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `at.gv.oe.app`](https://play.google.com/store/apps/details?id=at.gv.oe.app)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `remove-root-detection` | Removes the check for root permissions and unlocked bootloader. | 2.6.0 |
|
||||||
|
| `spoof-signature` | Spoofs the signature of the app. | 2.6.0 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.myprog.hexedit`](https://play.google.com/store/apps/details?id=com.myprog.hexedit)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `disable-ads` | Disables ads in HexEditor. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.spotify.lite`](https://play.google.com/store/apps/details?id=com.spotify.lite)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `enable-on-demand` | Enables listening to songs on-demand, allowing to play any song from playlists, albums or artists without limitations. This does not remove ads. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.nis.app`](https://play.google.com/store/apps/details?id=com.nis.app)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `hide-ads` | Removes ads from Inshorts. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.facebook.orca`](https://play.google.com/store/apps/details?id=com.facebook.orca)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `hide-inbox-ads` | Hides ads in inbox. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.instagram.android`](https://play.google.com/store/apps/details?id=com.instagram.android)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `hide-timeline-ads` | Removes ads from the timeline. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `org.citra.citra_emu`](https://play.google.com/store/apps/details?id=org.citra.citra_emu)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `premium-unlock` | Unlocks premium functions. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `org.citra.citra_emu.canary`](https://play.google.com/store/apps/details?id=org.citra.citra_emu.canary)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `premium-unlock` | Unlocks premium functions. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.backdrops.wallpapers`](https://play.google.com/store/apps/details?id=com.backdrops.wallpapers)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `pro-unlock` | Unlocks pro-only functions. | 4.52 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `de.dwd.warnapp`](https://play.google.com/store/apps/details?id=de.dwd.warnapp)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `promo-code-unlock` | Disables the validation of promo code. Any code will work to unlock all features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `net.binarymode.android.irplus`](https://play.google.com/store/apps/details?id=net.binarymode.android.irplus)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `remove-ads` | Removes all ads from the app. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `eu.faircode.netguard`](https://play.google.com/store/apps/details?id=eu.faircode.netguard)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `remove-broadcasts-restriction` | Enables starting/stopping NetGuard via broadcasts. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.dci.dev.androidtwelvewidgets`](https://play.google.com/store/apps/details?id=com.dci.dev.androidtwelvewidgets)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-paid-widgets` | Unlocks paid widgets of the app | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.microblink.photomath`](https://play.google.com/store/apps/details?id=com.microblink.photomath)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-plus` | Unlocks plus features. | 8.9.0 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `io.yuka.android`](https://play.google.com/store/apps/details?id=io.yuka.android)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-premium` | Unlocks premium features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.teslacoilsw.launcher`](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-prime` | Unlocks Nova Prime and all functions of the app. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `ginlemon.iconpackstudio`](https://play.google.com/store/apps/details?id=ginlemon.iconpackstudio)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `co.windyapp.android`](https://play.google.com/store/apps/details?id=co.windyapp.android)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.ithebk.expensemanager`](https://play.google.com/store/apps/details?id=com.ithebk.expensemanager)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `org.totschnig.myexpenses`](https://play.google.com/store/apps/details?id=org.totschnig.myexpenses)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all professional features. | 3.4.9 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.zombodroid.MemeGenerator`](https://play.google.com/store/apps/details?id=com.zombodroid.MemeGenerator)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks pro features. | 4.6364 |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.awedea.nyx`](https://play.google.com/store/apps/details?id=com.awedea.nyx)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-pro` | Unlocks all pro features. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `com.ticktick.task`](https://play.google.com/store/apps/details?id=com.ticktick.task)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-themes` | Unlocks all themes that are inaccessible until a certain level is reached. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### [📦 `net.dinglisch.android.taskerm`](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm)
|
||||||
|
<details>
|
||||||
|
|
||||||
|
| 💊 Patch | 📜 Description | 🏹 Target Version |
|
||||||
|
|:--------:|:--------------:|:-----------------:|
|
||||||
|
| `unlock-trial` | Unlocks the trial version. | all |
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
# 🧩 ReVanced Patches
|
|
||||||
|
|
||||||

|
## 📝 JSON Format
|
||||||

|
|
||||||
|
|
||||||
This repository contains a collection of ReVanced Patches.
|
This section explains the JSON format for the [patches.json](patches.json) file.
|
||||||
|
|
||||||
## ❓ About
|
The file contains an array of objects, each object representing a patch. The object contains the following properties:
|
||||||
|
|
||||||
Patches are small modifications to Android apps that allow you to change the behaviour of or add new features,
|
| key | description |
|
||||||
block ads, customize the appearance, and much more.
|
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `name` | The name of the patch. |
|
||||||
|
| `description` | The description of the patch. |
|
||||||
|
| `version` | The version of the patch. |
|
||||||
|
| `excluded` | Whether the patch is excluded by default. If `true`, the patch must never be included by default. |
|
||||||
|
| `options` | An array of options for this patch. |
|
||||||
|
| `options.key` | The key of the option. |
|
||||||
|
| `options.title` | The title of the option. |
|
||||||
|
| `options.description` | The description of the option. |
|
||||||
|
| `options.required` | Whether the option is required. |
|
||||||
|
| `options.choices?` | An array of choices of the option. This may be `null` if this option has no choices. The element type of this array may be any type. It can be a `String`, `Int` or something else. |
|
||||||
|
| `dependencies` | An array of dependencies, which are patch names. |
|
||||||
|
| `compatiblePackages` | An array of packages compatible with this patch. |
|
||||||
|
| `compatiblePackages.name` | The name of the package. |
|
||||||
|
| `compatiblePackages.versions` | An array of versions of the package compatible with this patch. If empty, all versions are seemingly compatible. |
|
||||||
|
|
||||||
## 💪 Features
|
Example:
|
||||||
|
|
||||||
Some of the features the patches provide are:
|
```json
|
||||||
|
[
|
||||||
* 🚫 **Block ads**: Say goodbye to ads
|
{
|
||||||
* ⭐ **Customize your app**: Personalize the appearance of apps with various layouts and themes
|
"name": "remember-video-quality",
|
||||||
* 🪄 **Add new features**: Extend the functionality of apps with lots of new features
|
"description": "Adds the ability to remember the video quality you chose in the video quality flyout.",
|
||||||
* ⚙️ **Miscellaneous and general purpose**: Rename packages, enable debugging, disable screen capture restrictions,
|
"version": "0.0.1",
|
||||||
export activities, etc.
|
"excluded": false,
|
||||||
* ✨ **And much more!**
|
"options": [],
|
||||||
|
"dependencies": [
|
||||||
For a full list of all available patches, visit [revanced.app/patches](https://revanced.app/patches).
|
"integrations",
|
||||||
|
"video-id-hook"
|
||||||
## 🚀 How to get started
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
You can use [ReVanced CLI](https://github.com/ReVanced/revanced-cli) or [ReVanced Manager](https://github.com/ReVanced/revanced-manager) to use ReVanced Patches.
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
## 📚 Everything else
|
"versions": [
|
||||||
|
"17.22.36",
|
||||||
### 📙 Contributing
|
"17.24.35",
|
||||||
|
"17.26.35",
|
||||||
Thank you for considering contributing to ReVanced Patches. You can find the contribution guidelines [here](CONTRIBUTING.md).
|
"17.27.39",
|
||||||
|
"17.28.34",
|
||||||
### 📃 Documentation
|
"17.29.34",
|
||||||
|
"17.32.35",
|
||||||
The documentation provides the fundamentals of patches and everything necessary to create your own patch from scratch.
|
"17.33.42"
|
||||||
You can find it [here](https://github.com/ReVanced/revanced-patches/tree/docs/docs).
|
]
|
||||||
|
}
|
||||||
### 🛠️ Building
|
]
|
||||||
|
},
|
||||||
In order to build ReVanced Patches, you can follow the [ReVanced documentation](https://github.com/ReVanced/revanced-documentation).
|
{
|
||||||
|
"name": "theme",
|
||||||
## 📜 Licence
|
"description": "Enables a custom theme.",
|
||||||
|
"version": "0.0.1",
|
||||||
ReVanced Patches is licensed under the GPLv3 licence. Please see the [licence file](LICENSE) for more information.
|
"excluded": false,
|
||||||
[tl;dr](https://www.tldrlegal.com/license/gnu-general-public-license-v3-gpl-3) you may copy, distribute and modify ReVanced patches as long as you track changes/dates in source files.
|
"deprecated": false,
|
||||||
Any modifications to ReVanced Patches must also be made available under the GPL along with build & install instructions.
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "theme",
|
||||||
|
"title": "Theme",
|
||||||
|
"description": "Select a theme.",
|
||||||
|
"required": true,
|
||||||
|
"choices": [
|
||||||
|
"Amoled"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "custom-branding",
|
||||||
|
"description": "Changes the YouTube launcher icon and name to your choice (defaults to ReVanced).",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"excluded": false,
|
||||||
|
"deprecated": false,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"key": "appName",
|
||||||
|
"title": "Application Name",
|
||||||
|
"description": "The name of the application it will show on your home screen.",
|
||||||
|
"required": true,
|
||||||
|
"choices": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "appIconPath",
|
||||||
|
"title": "Application Icon Path",
|
||||||
|
"description": "A path to the icon of the application.",
|
||||||
|
"required": false,
|
||||||
|
"choices": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": [
|
||||||
|
"locale-config-fix"
|
||||||
|
],
|
||||||
|
"compatiblePackages": [
|
||||||
|
{
|
||||||
|
"name": "com.google.android.youtube",
|
||||||
|
"versions": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 11 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 11 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 800 800" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g id="Logo"><g id="Ring"><circle id="Ring-Background" serif:id="Ring Background" cx="400" cy="400" r="400" style="fill:#1b1b1b;"/><path id="Ring1" serif:id="Ring" d="M400,0c220.766,0 400,179.234 400,400c-0,220.766 -179.234,400 -400,400c-220.766,-0 -400,-179.234 -400,-400c0,-220.766 179.234,-400 400,-400Zm-0,36c200.897,-0 364,163.103 364,364c0,200.897 -163.103,364 -364,364c-200.897,0 -364,-163.103 -364,-364c-0,-200.897 163.103,-364 364,-364Z" style="fill:url(#_Linear1);"/></g><g id="Shape"><path id="V-Shape" serif:id="V Shape" d="M538.74,269.872c1.481,-3.382 1.157,-7.283 -0.863,-10.373c-2.021,-3.091 -5.464,-4.954 -9.156,-4.954c-5.148,0 -10.435,0 -14.165,0c-3.1,0 -5.907,1.834 -7.153,4.672c-12.468,28.396 -78.273,178.273 -100.25,228.328c-1.246,2.838 -4.053,4.671 -7.154,4.671c-3.1,0 -5.907,-1.833 -7.153,-4.671c-21.977,-50.055 -87.782,-199.932 -100.25,-228.328c-1.246,-2.838 -4.053,-4.672 -7.153,-4.672c-3.73,0 -9.017,0 -14.164,0c-3.693,0 -7.135,1.863 -9.156,4.954c-2.02,3.09 -2.344,6.991 -0.863,10.373c23.557,53.766 101.872,232.519 117.871,269.034c1.743,3.979 5.674,6.549 10.018,6.549c6.293,-0 15.408,-0 21.701,-0c4.344,-0 8.275,-2.57 10.018,-6.549c15.999,-36.515 94.315,-215.268 117.872,-269.034Z" style="fill:#fff;"/><path id="Diamond" d="M408.119,395.312c-1.675,2.901 -4.77,4.688 -8.119,4.688c-3.349,-0 -6.444,-1.787 -8.119,-4.688c-16.997,-29.44 -56.156,-97.264 -73.153,-126.704c-1.675,-2.901 -1.675,-6.474 0,-9.375c1.675,-2.901 4.77,-4.688 8.119,-4.688c33.995,0 112.311,0 146.306,0c3.349,0 6.444,1.787 8.119,4.688c1.675,2.901 1.675,6.474 -0,9.375c-16.997,29.44 -56.156,97.264 -73.153,126.704Z" style="fill:url(#_Linear2);"/></g></g><defs><linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(4.89859e-14,800,-800,4.89859e-14,400.001,3.31681e-10)"><stop offset="0" style="stop-color:#f04e98;stop-opacity:1"/><stop offset="0.5" style="stop-color:#5f65d4;stop-opacity:1"/><stop offset="1" style="stop-color:#4e98f0;stop-opacity:1"/></linearGradient><linearGradient id="_Linear2" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.77155e-14,289.317,-282.535,1.73003e-14,400,254.545)"><stop offset="0" style="stop-color:#f04e98;stop-opacity:1"/><stop offset="0.5" style="stop-color:#5f65d4;stop-opacity:1"/><stop offset="1" style="stop-color:#4e98f0;stop-opacity:1"/></linearGradient></defs></svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,46 +1,29 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "1.8.20"
|
kotlin("jvm") version "1.8.10"
|
||||||
alias(libs.plugins.ksp)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "app.revanced"
|
group = "app.revanced"
|
||||||
|
|
||||||
|
val githubUsername: String = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
||||||
|
val githubPassword: String = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
google()
|
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||||
credentials {
|
credentials {
|
||||||
username = project.findProperty("gpr.user") as? String ?: System.getenv("GITHUB_ACTOR")
|
username = githubUsername
|
||||||
password = project.findProperty("gpr.key") as? String ?: System.getenv("GITHUB_TOKEN")
|
password = githubPassword
|
||||||
}
|
|
||||||
}
|
|
||||||
// Required for FlexVer-Java
|
|
||||||
maven {
|
|
||||||
url = uri("https://repo.sleeping.town")
|
|
||||||
content {
|
|
||||||
includeGroup("com.unascribed")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.revanced.patcher)
|
implementation("app.revanced:revanced-patcher:7.0.0")
|
||||||
implementation(libs.smali)
|
implementation("app.revanced:multidexlib2:2.5.3-a3836654")
|
||||||
implementation(libs.revanced.patch.annotation.processor)
|
// Required for meta
|
||||||
// TODO: Required because build fails without it. Find a way to remove this dependency.
|
implementation("com.google.code.gson:gson:2.10.1")
|
||||||
implementation(libs.guava)
|
|
||||||
// Used in JsonGenerator.
|
|
||||||
implementation(libs.gson)
|
|
||||||
// A dependency to the Android library unfortunately fails the build, which is why this is required.
|
|
||||||
compileOnly(project("dummy"))
|
|
||||||
|
|
||||||
ksp(libs.revanced.patch.annotation.processor)
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvmToolchain(11)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@@ -52,7 +35,7 @@ tasks {
|
|||||||
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
val androidHome = System.getenv("ANDROID_HOME") ?: throw GradleException("ANDROID_HOME not found")
|
||||||
val d8 = "${androidHome}/build-tools/33.0.1/d8"
|
val d8 = "${androidHome}/build-tools/33.0.1/d8"
|
||||||
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
val input = configurations.archives.get().allArtifacts.files.files.first().absolutePath
|
||||||
val work = layout.buildDirectory.dir("libs").get().asFile
|
val work = File("${buildDir}/libs")
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
workingDir = work
|
workingDir = work
|
||||||
@@ -65,7 +48,6 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
register<JavaExec>("generateMeta") {
|
register<JavaExec>("generateMeta") {
|
||||||
description = "Generate metadata for this bundle"
|
description = "Generate metadata for this bundle"
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
@@ -73,7 +55,6 @@ tasks {
|
|||||||
classpath = sourceSets["main"].runtimeClasspath
|
classpath = sourceSets["main"].runtimeClasspath
|
||||||
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
mainClass.set("app.revanced.meta.PatchesFileGenerator")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dummy task to fix the Gradle semantic-release plugin.
|
// Dummy task to fix the Gradle semantic-release plugin.
|
||||||
// Remove this if you forked it to support building only.
|
// Remove this if you forked it to support building only.
|
||||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id("java")
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain {
|
|
||||||
languageVersion.set(JavaLanguageVersion.of(11))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package android.os;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
public final class Environment {
|
|
||||||
public static File getExternalStorageDirectory() {
|
|
||||||
throw new UnsupportedOperationException("Stub");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,2 @@
|
|||||||
org.gradle.parallel = true
|
|
||||||
org.gradle.caching = true
|
|
||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 2.191.0-dev.12
|
version = 2.169.1-dev.2
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
[versions]
|
|
||||||
revanced-patcher = "15.0.1"
|
|
||||||
revanced-patch-annotation-processor = "15.0.1"
|
|
||||||
ksp = "1.9.0-1.0.11"
|
|
||||||
smali = "3.0.3"
|
|
||||||
guava = "32.1.2-jre"
|
|
||||||
gson = "2.10.1"
|
|
||||||
|
|
||||||
[libraries]
|
|
||||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
|
||||||
revanced-patch-annotation-processor = { module = "app.revanced:revanced-patch-annotation-processor", version.ref = "revanced-patch-annotation-processor" }
|
|
||||||
smali = { module = "com.android.tools.smali:smali", version.ref = "smali" }
|
|
||||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
|
||||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
|
||||||
|
|
||||||
[plugins]
|
|
||||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
|
||||||
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
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
12
gradlew
vendored
12
gradlew
vendored
@@ -85,6 +85,9 @@ done
|
|||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
|
# 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"'
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
@@ -130,13 +133,10 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
if ! command -v java >/dev/null 2>&1
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
then
|
|
||||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
@@ -197,10 +197,6 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# 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"'
|
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Collect all arguments for the java command;
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
|||||||
870
package-lock.json
generated
870
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
|||||||
include("dummy")
|
|
||||||
|
|
||||||
rootProject.name = "revanced-patches"
|
rootProject.name = "revanced-patches"
|
||||||
|
|||||||
@@ -1,25 +1,21 @@
|
|||||||
package app.revanced.extensions
|
package app.revanced.extensions
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import app.revanced.patcher.patch.PatchException
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableClass
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.patches.shared.mapping.misc.ResourceMappingPatch
|
import org.jf.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.util.MethodUtil
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.WideLiteralInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.util.MethodUtil
|
|
||||||
import org.w3c.dom.Node
|
import org.w3c.dom.Node
|
||||||
|
|
||||||
|
// TODO: populate this to all patches
|
||||||
/**
|
/**
|
||||||
* The [PatchException] of failing to resolve a [MethodFingerprint].
|
* Convert a [MethodFingerprint] to a [PatchResultError].
|
||||||
*
|
*
|
||||||
* @return The [PatchException].
|
* @return A [PatchResultError] for the [MethodFingerprint].
|
||||||
*/
|
*/
|
||||||
val MethodFingerprint.exception
|
fun MethodFingerprint.toErrorResult() = PatchResultError("Failed to resolve $name")
|
||||||
get() = PatchException("Failed to resolve ${this.javaClass.simpleName}")
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
* Find the [MutableMethod] from a given [Method] in a [MutableClass].
|
||||||
@@ -32,9 +28,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. original method goes in, transformed method goes out.
|
* @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() }
|
||||||
@@ -42,65 +38,7 @@ fun MutableClass.transformMethods(transform: MutableMethod.() -> MutableMethod)
|
|||||||
methods.addAll(transformedMethods)
|
methods.addAll(transformedMethods)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Node.doRecursively(action: (Node) -> Unit) {
|
internal fun Node.doRecursively(action: (Node) -> Unit) {
|
||||||
action(this)
|
action(this)
|
||||||
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun MutableMethod.injectHideViewCall(
|
|
||||||
insertIndex: Int,
|
|
||||||
viewRegister: Int,
|
|
||||||
classDescriptor: String,
|
|
||||||
targetMethod: String
|
|
||||||
) = addInstruction(
|
|
||||||
insertIndex,
|
|
||||||
"invoke-static { v$viewRegister }, $classDescriptor->$targetMethod(Landroid/view/View;)V"
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the index of the first constant instruction with the id of the given resource name.
|
|
||||||
*
|
|
||||||
* @param resourceName the name of the resource to find the id for.
|
|
||||||
* @return the index of the first constant instruction with the id of the given resource name, or -1 if not found.
|
|
||||||
*/
|
|
||||||
fun Method.findIndexForIdResource(resourceName: String): Int {
|
|
||||||
fun getIdResourceId(resourceName: String) = ResourceMappingPatch.resourceMappings.single {
|
|
||||||
it.type == "id" && it.name == resourceName
|
|
||||||
}.id
|
|
||||||
|
|
||||||
return indexOfFirstConstantInstructionValue(getIdResourceId(resourceName))
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the index of the first constant instruction with the given value.
|
|
||||||
*
|
|
||||||
* @return the first constant instruction with the value, or -1 if not found.
|
|
||||||
*/
|
|
||||||
fun Method.indexOfFirstConstantInstructionValue(constantValue: Long) = implementation?.let {
|
|
||||||
it.instructions.indexOfFirst { instruction ->
|
|
||||||
instruction.opcode == Opcode.CONST && (instruction as WideLiteralInstruction).wideLiteral == constantValue
|
|
||||||
}
|
|
||||||
} ?: -1
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the method contains a constant with the given value.
|
|
||||||
*
|
|
||||||
* @return if the method contains a constant with the given value.
|
|
||||||
*/
|
|
||||||
fun Method.containsConstantInstructionValue(constantValue: Long) =
|
|
||||||
indexOfFirstConstantInstructionValue(constantValue) >= 0
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Traverse the class hierarchy starting from the given root class.
|
|
||||||
*
|
|
||||||
* @param targetClass the class to start traversing the class hierarchy from.
|
|
||||||
* @param callback function that is called for every class in the hierarchy.
|
|
||||||
*/
|
|
||||||
fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback: MutableClass.() -> Unit) {
|
|
||||||
callback(targetClass)
|
|
||||||
this.findClass(targetClass.superclass ?: return)?.mutableClass?.let {
|
|
||||||
traverseClassHierarchy(it, callback)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +1,70 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.PatchSet
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
import app.revanced.patcher.patch.Patch
|
import app.revanced.patcher.extensions.PatchExtensions.dependencies
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.include
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.options
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.version
|
||||||
|
import app.revanced.patcher.patch.PatchOption
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
internal class JsonGenerator : PatchesFileGenerator {
|
internal class JsonGenerator : PatchesFileGenerator {
|
||||||
override fun generate(patches: PatchSet) = patches.map {
|
override fun generate(bundle: PatchBundlePatches) {
|
||||||
JsonPatch(
|
val patches = bundle.map {
|
||||||
it.name!!,
|
JsonPatch(
|
||||||
it.description,
|
it.patchName,
|
||||||
it.compatiblePackages,
|
it.description ?: "This patch has no description.",
|
||||||
it.dependencies?.map { dependency -> dependency::class.java.name }?.toSet(),
|
it.version ?: "0.0.0",
|
||||||
it.use,
|
!it.include,
|
||||||
it.requiresIntegrations,
|
it.options?.map { option ->
|
||||||
it.options.values.map { option ->
|
JsonPatch.Option(
|
||||||
JsonPatch.Option(option.key, option.value, option.title, option.description, option.required)
|
option.key,
|
||||||
}
|
option.title,
|
||||||
)
|
option.description,
|
||||||
}.let {
|
option.required,
|
||||||
File("patches.json").writeText(GsonBuilder().serializeNulls().create().toJson(it))
|
option.let { listOption ->
|
||||||
|
if (listOption is PatchOption.ListOption<*>) {
|
||||||
|
listOption.options.toMutableList().toTypedArray()
|
||||||
|
} else null
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}?.toTypedArray() ?: emptyArray(),
|
||||||
|
it.dependencies?.map { dep ->
|
||||||
|
dep.java.patchName
|
||||||
|
}?.toTypedArray() ?: emptyArray(),
|
||||||
|
it.compatiblePackages?.map { pkg ->
|
||||||
|
JsonPatch.CompatiblePackage(pkg.name, pkg.versions)
|
||||||
|
}?.toTypedArray() ?: emptyArray()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
val json = File("patches.json")
|
||||||
|
json.writeText(GsonBuilder().serializeNulls().create().toJson(patches))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("unused")
|
|
||||||
private class JsonPatch(
|
private class JsonPatch(
|
||||||
val name: String? = null,
|
val name: String,
|
||||||
val description: String? = null,
|
val description: String,
|
||||||
val compatiblePackages: Set<Patch.CompatiblePackage>? = null,
|
val version: String,
|
||||||
val dependencies: Set<String>? = null,
|
val excluded: Boolean,
|
||||||
val use: Boolean = true,
|
val options: Array<Option>,
|
||||||
val requiresIntegrations: Boolean = false,
|
val dependencies: Array<String>,
|
||||||
val options: List<Option>
|
val compatiblePackages: Array<CompatiblePackage>,
|
||||||
) {
|
) {
|
||||||
|
class CompatiblePackage(
|
||||||
|
val name: String,
|
||||||
|
val versions: Array<String>,
|
||||||
|
)
|
||||||
|
|
||||||
class Option(
|
class Option(
|
||||||
val key: String,
|
val key: String,
|
||||||
val default: Any?,
|
val title: String,
|
||||||
val title: String?,
|
val description: String,
|
||||||
val description: String?,
|
|
||||||
val required: Boolean,
|
val required: Boolean,
|
||||||
|
val choices: Array<*>?,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,25 @@
|
|||||||
package app.revanced.meta
|
package app.revanced.meta
|
||||||
|
|
||||||
import app.revanced.patcher.PatchBundleLoader
|
import app.revanced.patcher.data.Context
|
||||||
import app.revanced.patcher.PatchSet
|
import app.revanced.patcher.patch.Patch
|
||||||
|
import app.revanced.patcher.util.patch.PatchBundle
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
|
typealias PatchBundlePatches = List<Class<out Patch<Context>>>
|
||||||
|
|
||||||
internal interface PatchesFileGenerator {
|
internal interface PatchesFileGenerator {
|
||||||
fun generate(patches: PatchSet)
|
fun generate(bundle: PatchBundlePatches)
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun main(args: Array<String>) = PatchBundleLoader.Jar(
|
fun main(args: Array<String>) = PatchBundle.Jar(
|
||||||
File("build/libs/").listFiles { it -> it.name.endsWith(".jar") }!!.first()
|
File("build/libs/").listFiles()!!.first {
|
||||||
).also { loader ->
|
it.name.startsWith("revanced-patches-") && it.name.endsWith(".jar")
|
||||||
if (loader.isEmpty()) throw IllegalStateException("No patches found")
|
}.absolutePath
|
||||||
|
).loadPatches().also {
|
||||||
|
if (it.isEmpty()) throw IllegalStateException("No patches found")
|
||||||
}.let { bundle ->
|
}.let { bundle ->
|
||||||
arrayOf(JsonGenerator()).forEach { generator -> generator.generate(bundle) }
|
arrayOf(JsonGenerator(), ReadmeGenerator()).forEach { it.generate(bundle) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
69
src/main/kotlin/app/revanced/meta/ReadmeGenerator.kt
Normal file
69
src/main/kotlin/app/revanced/meta/ReadmeGenerator.kt
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
package app.revanced.meta
|
||||||
|
|
||||||
|
import app.revanced.patcher.data.Context
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||||
|
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||||
|
import app.revanced.patcher.patch.Patch
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
internal class ReadmeGenerator : PatchesFileGenerator {
|
||||||
|
private companion object {
|
||||||
|
private const val TABLE_HEADER =
|
||||||
|
"| \uD83D\uDC8A Patch | \uD83D\uDCDC Description | \uD83C\uDFF9 Target Version |\n" +
|
||||||
|
"|:--------:|:--------------:|:-----------------:|"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun generate(bundle: PatchBundlePatches) {
|
||||||
|
val output = StringBuilder()
|
||||||
|
|
||||||
|
mutableMapOf<String, MutableList<Class<out Patch<Context>>>>()
|
||||||
|
.apply {
|
||||||
|
for (patch in bundle) {
|
||||||
|
patch.compatiblePackages?.forEach { pkg ->
|
||||||
|
if (!contains(pkg.name)) put(pkg.name, mutableListOf())
|
||||||
|
this[pkg.name]!!.add(patch)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.entries
|
||||||
|
.sortedByDescending { it.value.size }
|
||||||
|
.forEach { (`package`, patches) ->
|
||||||
|
val mostCommonVersion = buildMap {
|
||||||
|
patches.forEach { patch ->
|
||||||
|
patch.compatiblePackages?.single { compatiblePackage -> compatiblePackage.name == `package` }?.versions?.let {
|
||||||
|
it.forEach { version -> merge(version, 1, Integer::sum) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.let { commonMap ->
|
||||||
|
commonMap.maxByOrNull { it.value }?.value?.let {
|
||||||
|
// This is not foolproof, because for example v1.0.0-dev.0 will be returned instead of v1.0.0-release.
|
||||||
|
// Unfortunately this can not be solved easily because versioning can be complex.
|
||||||
|
commonMap.entries.filter { mostCommon -> mostCommon.value == it }.maxBy { it.key }.key
|
||||||
|
} ?: "all"
|
||||||
|
}
|
||||||
|
|
||||||
|
output.apply {
|
||||||
|
appendLine("### [\uD83D\uDCE6 `${`package`}`](https://play.google.com/store/apps/details?id=${`package`})")
|
||||||
|
appendLine("<details>\n")
|
||||||
|
appendLine(TABLE_HEADER)
|
||||||
|
patches.forEach { patch ->
|
||||||
|
val recommendedPatchVersion = if (
|
||||||
|
patch.compatiblePackages?.single { it.name == `package` }?.versions?.isNotEmpty() == true
|
||||||
|
) mostCommonVersion else "all"
|
||||||
|
|
||||||
|
appendLine(
|
||||||
|
"| `${patch.patchName}` " +
|
||||||
|
"| ${patch.description} " +
|
||||||
|
"| $recommendedPatchVersion |"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
appendLine("</details>\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder(File("README-template.md").readText())
|
||||||
|
.replace(Regex("\\{\\{\\s?table\\s?}}"), output.toString())
|
||||||
|
.let(File("README.md")::writeText)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
package app.revanced.patches.all.activity.exportall
|
package app.revanced.patches.all.activity.exportAll.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.ResourceContext
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
|
||||||
@Patch(
|
@Patch(false)
|
||||||
name = "Export all activities",
|
@Name("export-all-activities")
|
||||||
description = "Makes all app activities exportable.",
|
@Description("Makes all app activities exportable.")
|
||||||
use = false
|
@Version("0.0.1")
|
||||||
)
|
class ExportAllActivitiesPatch : ResourcePatch {
|
||||||
@Suppress("unused")
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
object ExportAllActivitiesPatch : ResourcePatch() {
|
|
||||||
private const val EXPORTED_FLAG = "android:exported"
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
val document = editor.file
|
val document = editor.file
|
||||||
val activities = document.getElementsByTagName("activity")
|
val activities = document.getElementsByTagName("activity")
|
||||||
@@ -33,5 +35,11 @@ object ExportAllActivitiesPatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
private companion object {
|
||||||
|
const val EXPORTED_FLAG = "android:exported"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,44 +1,29 @@
|
|||||||
package app.revanced.patches.all.connectivity.wifi.spoof
|
package app.revanced.patches.all.connectivity.wifi.spoof.patch
|
||||||
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
import app.revanced.util.patch.*
|
||||||
import app.revanced.util.patch.IMethodCall
|
import org.jf.dexlib2.iface.ClassDef
|
||||||
import app.revanced.util.patch.Instruction35cInfo
|
import org.jf.dexlib2.iface.Method
|
||||||
import app.revanced.util.patch.filterMapInstruction35c
|
import org.jf.dexlib2.iface.instruction.Instruction
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import java.util.*
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(false)
|
||||||
name = "Spoof Wi-Fi connection",
|
@Name("spoof-wifi-connection")
|
||||||
description = "Spoofs an existing Wi-Fi connection.",
|
@Description("Spoofs an existing Wi-Fi connection.")
|
||||||
use = false,
|
@Version("0.0.1")
|
||||||
requiresIntegrations = true
|
@RequiresIntegrations
|
||||||
)
|
internal class SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
@Suppress("unused")
|
|
||||||
object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
|
||||||
|
|
||||||
override fun filterMap(
|
private companion object {
|
||||||
classDef: ClassDef,
|
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX = "Lapp/revanced/all/connectivity/wifi/spoof/SpoofWifiPatch"
|
||||||
method: Method,
|
const val INTEGRATIONS_CLASS_DESCRIPTOR = "${INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX};"
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
) = filterMapInstruction35c<MethodCall>(
|
|
||||||
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
|
||||||
classDef,
|
|
||||||
instruction,
|
|
||||||
instructionIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
|
||||||
val (methodType, instruction, instructionIndex) = entry
|
|
||||||
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Information about method calls we want to replace
|
// Information about method calls we want to replace
|
||||||
enum class MethodCall(
|
enum class MethodCall(
|
||||||
override val definedClassName: String,
|
override val definedClassName: String,
|
||||||
@@ -203,4 +188,21 @@ object SpoofWifiPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>()
|
|||||||
"V",
|
"V",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun filterMap(
|
||||||
|
classDef: ClassDef,
|
||||||
|
method: Method,
|
||||||
|
instruction: Instruction,
|
||||||
|
instructionIndex: Int
|
||||||
|
) = filterMapInstruction35c<MethodCall>(
|
||||||
|
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
||||||
|
classDef,
|
||||||
|
instruction,
|
||||||
|
instructionIndex
|
||||||
|
)
|
||||||
|
|
||||||
|
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
||||||
|
val (methodType, instruction, instructionIndex) = entry
|
||||||
|
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package app.revanced.patches.all.interaction.gestures
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Predictive back gesture",
|
|
||||||
description = "Enables the predictive back gesture introduced on Android 13.",
|
|
||||||
use = false
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object PredictiveBackGesturePatch : ResourcePatch() {
|
|
||||||
private const val FLAG = "android:enableOnBackInvokedCallback"
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
|
||||||
val document = editor.file
|
|
||||||
|
|
||||||
with(document.getElementsByTagName("application").item(0)) {
|
|
||||||
if (attributes.getNamedItem(FLAG) != null) return@with
|
|
||||||
|
|
||||||
document.createAttribute(FLAG)
|
|
||||||
.apply { value = "true" }
|
|
||||||
.let(attributes::setNamedItem)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package app.revanced.patches.all.interaction.gestures.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.ResourcePatch
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("predictive-back-gesture")
|
||||||
|
@Description("Enables the predictive back gesture introduced on Android 13.")
|
||||||
|
@Version("0.0.1")
|
||||||
|
class PredictiveBackGesturePatch : ResourcePatch {
|
||||||
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
|
val document = editor.file
|
||||||
|
|
||||||
|
with(document.getElementsByTagName("application").item(0)) {
|
||||||
|
if (attributes.getNamedItem(FLAG) != null) return@with
|
||||||
|
|
||||||
|
document.createAttribute(FLAG)
|
||||||
|
.apply { value = "true" }
|
||||||
|
.let(attributes::setNamedItem)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
private companion object {
|
||||||
|
const val FLAG = "android:enableOnBackInvokedCallback"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package app.revanced.patches.all.misc.debugging
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import org.w3c.dom.Element
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Enable Android debugging",
|
|
||||||
description = "Enables Android debugging capabilities. This can slow down the app.",
|
|
||||||
use = false
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object EnableAndroidDebuggingPatch : ResourcePatch() {
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
|
||||||
val applicationNode = dom
|
|
||||||
.file
|
|
||||||
.getElementsByTagName("application")
|
|
||||||
.item(0) as Element
|
|
||||||
|
|
||||||
// set application as debuggable
|
|
||||||
applicationNode.setAttribute("android:debuggable", "true")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package app.revanced.patches.all.misc.debugging.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.*
|
||||||
|
import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("enable-android-debugging")
|
||||||
|
@Description("Enables Android debugging capabilities.")
|
||||||
|
@Version("0.0.1")
|
||||||
|
class EnableAndroidDebuggingPatch : ResourcePatch {
|
||||||
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
if (debuggable == true) {
|
||||||
|
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
||||||
|
val applicationNode = dom
|
||||||
|
.file
|
||||||
|
.getElementsByTagName("application")
|
||||||
|
.item(0) as Element
|
||||||
|
|
||||||
|
// set application as debuggable
|
||||||
|
applicationNode.setAttribute("android:debuggable", "true")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object : OptionsContainer() {
|
||||||
|
var debuggable: Boolean? by option(
|
||||||
|
PatchOption.BooleanOption(
|
||||||
|
key = "debuggable",
|
||||||
|
default = true,
|
||||||
|
title = "App debugging",
|
||||||
|
description = "Whether to make the app debuggable on Android.",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
package app.revanced.patches.all.misc.network
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.all.misc.debugging.EnableAndroidDebuggingPatch
|
|
||||||
import org.w3c.dom.Element
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Override certificate pinning",
|
|
||||||
description = "Overrides certificate pinning, allowing to inspect traffic via a proxy.",
|
|
||||||
dependencies = [EnableAndroidDebuggingPatch::class],
|
|
||||||
use = false
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object OverrideCertificatePinningPatch : ResourcePatch() {
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
val resXmlDirectory = context["res/xml"]
|
|
||||||
|
|
||||||
// Add android:networkSecurityConfig="@xml/network_security_config" and the "networkSecurityConfig" attribute if it does not exist.
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
|
||||||
val document = editor.file
|
|
||||||
val applicationNode = document.getElementsByTagName("application").item(0) as Element
|
|
||||||
|
|
||||||
if (!applicationNode.hasAttribute("networkSecurityConfig")) {
|
|
||||||
document.createAttribute("android:networkSecurityConfig")
|
|
||||||
.apply { value = "@xml/network_security_config" }.let(applicationNode.attributes::setNamedItem)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// In case the file does not exist create the "network_security_config.xml" file.
|
|
||||||
File(resXmlDirectory, "network_security_config.xml").apply {
|
|
||||||
if (!exists()) {
|
|
||||||
createNewFile()
|
|
||||||
writeText(
|
|
||||||
"""
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<network-security-config>
|
|
||||||
<base-config cleartextTrafficPermitted="true">
|
|
||||||
<trust-anchors>
|
|
||||||
<certificates src="system" />
|
|
||||||
<certificates
|
|
||||||
src="user"
|
|
||||||
overridePins="true" />
|
|
||||||
</trust-anchors>
|
|
||||||
</base-config>
|
|
||||||
<debug-overrides>
|
|
||||||
<trust-anchors>
|
|
||||||
<certificates src="system" />
|
|
||||||
<certificates
|
|
||||||
src="user"
|
|
||||||
overridePins="true" />
|
|
||||||
</trust-anchors>
|
|
||||||
</debug-overrides>
|
|
||||||
</network-security-config>
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
// If the file already exists.
|
|
||||||
readText().let { text ->
|
|
||||||
if (!text.contains("<certificates src=\"user\" />")) {
|
|
||||||
writeText(
|
|
||||||
text.replace(
|
|
||||||
"<trust-anchors>",
|
|
||||||
"<trust-anchors>\n<certificates src=\"user\" overridePins=\"true\" />\n<certificates src=\"system\" />"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
package app.revanced.patches.all.misc.packagename
|
|
||||||
|
|
||||||
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.patch.options.types.StringPatchOption.Companion.stringPatchOption
|
|
||||||
import org.w3c.dom.Element
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Change package name",
|
|
||||||
description = "Appends \".revanced\" to the package name by default.",
|
|
||||||
use = false
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object ChangePackageNamePatch : ResourcePatch() {
|
|
||||||
private var packageName by stringPatchOption(
|
|
||||||
key = "packageName",
|
|
||||||
default = null,
|
|
||||||
title = "Package name",
|
|
||||||
description = "The name of the package to rename the app to.",
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
val packageNameToUse = packageName ?: getDefaultPackageName(context)
|
|
||||||
|
|
||||||
val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$")
|
|
||||||
if (!packageNameToUse.matches(packageNameRegex))
|
|
||||||
throw PatchException("Invalid package name")
|
|
||||||
|
|
||||||
val originalPackageName = getOriginalPackageName(context)
|
|
||||||
|
|
||||||
context["AndroidManifest.xml"].apply {
|
|
||||||
readText().replace(originalPackageName, packageNameToUse).let(::writeText)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getDefaultPackageName(context: ResourceContext): String {
|
|
||||||
val originalPackageName = getOriginalPackageName(context)
|
|
||||||
return "$originalPackageName.revanced"
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getOriginalPackageName(context: ResourceContext): String {
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
|
||||||
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
|
||||||
return manifest.getAttribute("package")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package app.revanced.patches.all.misc.packagename.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.ResourceContext
|
||||||
|
import app.revanced.patcher.patch.*
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import org.w3c.dom.Element
|
||||||
|
|
||||||
|
@Patch(false)
|
||||||
|
@Name("change-package-name")
|
||||||
|
@Description("Changes the package name.")
|
||||||
|
@Version("0.0.1")
|
||||||
|
class ChangePackageNamePatch : ResourcePatch {
|
||||||
|
override fun execute(context: ResourceContext): PatchResult {
|
||||||
|
packageName?.let { packageName ->
|
||||||
|
val packageNameRegex = Regex("^[a-z]\\w*(\\.[a-z]\\w*)+\$")
|
||||||
|
if (!packageName.matches(packageNameRegex))
|
||||||
|
return PatchResultError("Invalid package name")
|
||||||
|
|
||||||
|
var originalPackageName = ""
|
||||||
|
context.xmlEditor["AndroidManifest.xml"].use { editor ->
|
||||||
|
val manifest = editor.file.getElementsByTagName("manifest").item(0) as Element
|
||||||
|
originalPackageName = manifest.getAttribute("package")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!originalPackageName.matches(packageNameRegex))
|
||||||
|
return PatchResultError("Failed to get the original package name")
|
||||||
|
|
||||||
|
context["AndroidManifest.xml"].apply {
|
||||||
|
readText().replace(originalPackageName, packageName).let(::writeText)
|
||||||
|
}
|
||||||
|
|
||||||
|
} ?: return PatchResultError("No package name provided")
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object : OptionsContainer() {
|
||||||
|
var packageName: String? by option(
|
||||||
|
PatchOption.StringOption(
|
||||||
|
key = "packageName",
|
||||||
|
default = "",
|
||||||
|
title = "Package name",
|
||||||
|
description = "The name of the package to rename of the app.",
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
package app.revanced.patches.all.screencapture.removerestriction
|
|
||||||
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
|
||||||
import app.revanced.util.patch.IMethodCall
|
|
||||||
import app.revanced.util.patch.Instruction35cInfo
|
|
||||||
import app.revanced.util.patch.filterMapInstruction35c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Remove screen capture restriction",
|
|
||||||
description = "Removes the restriction of capturing audio from apps that normally wouldn't allow it.",
|
|
||||||
dependencies = [RemoveCaptureRestrictionResourcePatch::class],
|
|
||||||
use = false,
|
|
||||||
requiresIntegrations = true
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object RemoveCaptureRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
|
||||||
"Lapp/revanced/all/screencapture/removerestriction/RemoveScreencaptureRestrictionPatch"
|
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
|
||||||
// Information about method calls we want to replace
|
|
||||||
enum class MethodCall(
|
|
||||||
override val definedClassName: String,
|
|
||||||
override val methodName: String,
|
|
||||||
override val methodParams: Array<String>,
|
|
||||||
override val returnType: String
|
|
||||||
): IMethodCall {
|
|
||||||
SetAllowedCapturePolicySingle(
|
|
||||||
"Landroid/media/AudioAttributes\$Builder;",
|
|
||||||
"setAllowedCapturePolicy",
|
|
||||||
arrayOf("I"),
|
|
||||||
"Landroid/media/AudioAttributes\$Builder;",
|
|
||||||
),
|
|
||||||
SetAllowedCapturePolicyGlobal(
|
|
||||||
"Landroid/media/AudioManager;",
|
|
||||||
"setAllowedCapturePolicy",
|
|
||||||
arrayOf("I"),
|
|
||||||
"V",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun filterMap(
|
|
||||||
classDef: ClassDef,
|
|
||||||
method: Method,
|
|
||||||
instruction: Instruction,
|
|
||||||
instructionIndex: Int
|
|
||||||
) = filterMapInstruction35c<MethodCall>(
|
|
||||||
INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX,
|
|
||||||
classDef,
|
|
||||||
instruction,
|
|
||||||
instructionIndex
|
|
||||||
)
|
|
||||||
|
|
||||||
override fun transform(mutableMethod: MutableMethod, entry: Instruction35cInfo) {
|
|
||||||
val (methodType, instruction, instructionIndex) = entry
|
|
||||||
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
package app.revanced.patches.all.screencapture.removerestriction
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.ResourceContext
|
|
||||||
import app.revanced.patcher.patch.ResourcePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import org.w3c.dom.Element
|
|
||||||
|
|
||||||
@Patch(description = "Sets allowAudioPlaybackCapture in manifest to true.")
|
|
||||||
internal object RemoveCaptureRestrictionResourcePatch : ResourcePatch() {
|
|
||||||
override fun execute(context: ResourceContext) {
|
|
||||||
// create an xml editor instance
|
|
||||||
context.xmlEditor["AndroidManifest.xml"].use { dom ->
|
|
||||||
// get the application node
|
|
||||||
val applicationNode = dom
|
|
||||||
.file
|
|
||||||
.getElementsByTagName("application")
|
|
||||||
.item(0) as Element
|
|
||||||
|
|
||||||
// set allowAudioPlaybackCapture attribute to true
|
|
||||||
applicationNode.setAttribute("android:allowAudioPlaybackCapture", "true")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +1,44 @@
|
|||||||
package app.revanced.patches.all.screenshot.removerestriction
|
package app.revanced.patches.all.screenshot.removerestriction.patch
|
||||||
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.patch.annotations.RequiresIntegrations
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
||||||
import app.revanced.util.patch.AbstractTransformInstructionsPatch
|
import app.revanced.util.patch.*
|
||||||
import app.revanced.util.patch.IMethodCall
|
import org.jf.dexlib2.iface.ClassDef
|
||||||
import app.revanced.util.patch.Instruction35cInfo
|
import org.jf.dexlib2.iface.Method
|
||||||
import app.revanced.util.patch.filterMapInstruction35c
|
import org.jf.dexlib2.iface.instruction.Instruction
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import java.util.*
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.Instruction
|
|
||||||
|
|
||||||
@Patch(
|
@Patch(false)
|
||||||
name = "Remove screenshot restriction",
|
@Name("remove-screenshot-restriction")
|
||||||
description = "Removes the restriction of taking screenshots in apps that normally wouldn't allow it.",
|
@Description("Removes the restriction of taking screenshots in apps that normally wouldn't allow it.")
|
||||||
use = false,
|
@Version("0.0.1")
|
||||||
requiresIntegrations = true,
|
@RequiresIntegrations
|
||||||
)
|
internal class RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
||||||
@Suppress("unused")
|
|
||||||
object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Instruction35cInfo>() {
|
private companion object {
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
const val INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX =
|
||||||
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
"Lapp/revanced/all/screenshot/removerestriction/RemoveScreenshotRestrictionPatch"
|
||||||
private const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
const val INTEGRATIONS_CLASS_DESCRIPTOR = "$INTEGRATIONS_CLASS_DESCRIPTOR_PREFIX;"
|
||||||
|
}
|
||||||
|
|
||||||
|
// Information about method calls we want to replace
|
||||||
|
enum class MethodCall(
|
||||||
|
override val definedClassName: String,
|
||||||
|
override val methodName: String,
|
||||||
|
override val methodParams: Array<String>,
|
||||||
|
override val returnType: String
|
||||||
|
): IMethodCall {
|
||||||
|
SetFlags(
|
||||||
|
"Landroid/view/Window;",
|
||||||
|
"setFlags",
|
||||||
|
arrayOf("I", "I"),
|
||||||
|
"V",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
override fun filterMap(
|
override fun filterMap(
|
||||||
classDef: ClassDef,
|
classDef: ClassDef,
|
||||||
@@ -38,19 +56,4 @@ object RemoveScreenshotRestrictionPatch : AbstractTransformInstructionsPatch<Ins
|
|||||||
val (methodType, instruction, instructionIndex) = entry
|
val (methodType, instruction, instructionIndex) = entry
|
||||||
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
methodType.replaceInvokeVirtualWithIntegrations(INTEGRATIONS_CLASS_DESCRIPTOR, mutableMethod, instruction, instructionIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Information about method calls we want to replace
|
|
||||||
enum class MethodCall(
|
|
||||||
override val definedClassName: String,
|
|
||||||
override val methodName: String,
|
|
||||||
override val methodParams: Array<String>,
|
|
||||||
override val returnType: String
|
|
||||||
): IMethodCall {
|
|
||||||
SetFlags(
|
|
||||||
"Landroid/view/Window;",
|
|
||||||
"setFlags",
|
|
||||||
arrayOf("I", "I"),
|
|
||||||
"V",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Pro unlock",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.backdrops.wallpapers", ["4.52"])]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object ProUnlockPatch : BytecodePatch(
|
|
||||||
setOf(ProUnlockFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
ProUnlockFingerprint.result?.let { result ->
|
|
||||||
val registerIndex = result.scanResult.patternScanResult!!.endIndex - 1
|
|
||||||
|
|
||||||
result.mutableMethod.apply {
|
|
||||||
val register = getInstruction<OneRegisterInstruction>(registerIndex).registerA
|
|
||||||
addInstruction(
|
|
||||||
result.scanResult.patternScanResult!!.endIndex,
|
|
||||||
"""
|
|
||||||
const/4 v$register, 0x1
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
} ?: throw ProUnlockFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.backdrops.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.backdrops.wallpapers", arrayOf("4.52"))])
|
||||||
|
internal annotation class ProUnlockCompatibility
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
package app.revanced.patches.backdrops.misc.pro.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object ProUnlockFingerprint : MethodFingerprint(
|
object ProUnlockFingerprint : MethodFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
@@ -11,8 +11,5 @@ object ProUnlockFingerprint : MethodFingerprint(
|
|||||||
Opcode.MOVE_RESULT,
|
Opcode.MOVE_RESULT,
|
||||||
Opcode.IF_EQZ
|
Opcode.IF_EQZ
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { it.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;" && it.name == "lambda\$existPurchase\$0" }
|
||||||
methodDef.definingClass == "Lcom/backdrops/wallpapers/data/local/DatabaseHandlerIAB;"
|
|
||||||
&& methodDef.name == "lambda\$existPurchase\$0"
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package app.revanced.patches.backdrops.misc.pro.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.instruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.backdrops.misc.pro.annotations.ProUnlockCompatibility
|
||||||
|
import app.revanced.patches.backdrops.misc.pro.fingerprints.ProUnlockFingerprint
|
||||||
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("pro-unlock")
|
||||||
|
@Description("Unlocks pro-only functions.")
|
||||||
|
@ProUnlockCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class ProUnlockPatch : BytecodePatch(
|
||||||
|
listOf(ProUnlockFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val result = ProUnlockFingerprint.result ?: return PatchResultError("${ProUnlockFingerprint.name} not found")
|
||||||
|
|
||||||
|
val moveRegisterInstruction = result.mutableMethod.instruction(result.scanResult.patternScanResult!!.endIndex - 1)
|
||||||
|
val register = (moveRegisterInstruction as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
|
result.mutableMethod.addInstructions(
|
||||||
|
result.scanResult.patternScanResult!!.endIndex,
|
||||||
|
"""
|
||||||
|
const/4 v$register, 0x1
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package app.revanced.patches.candylinkvpn
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.candylinkvpn.fingerprints.IsPremiumPurchasedFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Unlock pro",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.candylink.openvpn")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object UnlockProPatch : BytecodePatch(
|
|
||||||
setOf(IsPremiumPurchasedFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
IsPremiumPurchasedFingerprint.result?.mutableMethod?.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
) ?: throw IsPremiumPurchasedFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
package app.revanced.patches.candylinkvpn.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
object IsPremiumPurchasedFingerprint : MethodFingerprint(
|
|
||||||
customFingerprint = { methodDef, _ ->
|
|
||||||
methodDef.definingClass.endsWith("PreferenceProvider;") &&
|
|
||||||
methodDef.name == "isPremiumPurchased"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.citra.misc.premium.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("org.citra.citra_emu"), Package("org.citra.citra_emu.canary")])
|
||||||
|
internal annotation class PremiumUnlockCompatbility
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package app.revanced.patches.citra.misc.premium.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
|
object PremiumUnlockFingerprint : MethodFingerprint(
|
||||||
|
customFingerprint = { it.definingClass == "Lorg/citra/citra_emu/ui/main/MainActivity;" && it.name == "isPremiumActive" }
|
||||||
|
)
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package app.revanced.patches.citra.misc.premium.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultError
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patches.citra.misc.premium.annotations.PremiumUnlockCompatbility
|
||||||
|
import app.revanced.patches.citra.misc.premium.fingerprints.PremiumUnlockFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("premium-unlock")
|
||||||
|
@Description("Unlocks premium functions.")
|
||||||
|
@PremiumUnlockCompatbility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class PremiumUnlockPatch : BytecodePatch(
|
||||||
|
listOf(PremiumUnlockFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val result = PremiumUnlockFingerprint.result ?: return PatchResultError("${PremiumUnlockFingerprint.name} not found")
|
||||||
|
|
||||||
|
result.mutableMethod.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstructions
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.PatchException
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod
|
|
||||||
import app.revanced.patches.duolingo.unlocksuper.fingerprints.IsUserSuperMethodFingerprint
|
|
||||||
import app.revanced.patches.duolingo.unlocksuper.fingerprints.UserSerializationMethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
import com.android.tools.smali.dexlib2.builder.instruction.BuilderInstruction22c
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.Reference
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Unlock Duolingo Super",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.duolingo")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object UnlockDuolingoSuperPatch : BytecodePatch(
|
|
||||||
setOf(
|
|
||||||
UserSerializationMethodFingerprint,
|
|
||||||
IsUserSuperMethodFingerprint
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
/* First find the reference to the isUserSuper field, then patch the instruction that assigns it to false.
|
|
||||||
* This strategy is used because the method that sets the isUserSuper field is difficult to fingerprint reliably.
|
|
||||||
*/
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
// Find the reference to the isUserSuper field.
|
|
||||||
val isUserSuperReference = IsUserSuperMethodFingerprint
|
|
||||||
.result
|
|
||||||
?.mutableMethod
|
|
||||||
?.getInstructions()
|
|
||||||
?.filterIsInstance<BuilderInstruction22c>()
|
|
||||||
?.firstOrNull { it.opcode == Opcode.IGET_BOOLEAN }
|
|
||||||
?.reference
|
|
||||||
?: throw IsUserSuperMethodFingerprint.exception
|
|
||||||
|
|
||||||
// Patch the instruction that assigns isUserSuper to true.
|
|
||||||
UserSerializationMethodFingerprint
|
|
||||||
.result
|
|
||||||
?.mutableMethod
|
|
||||||
?.apply {
|
|
||||||
replaceInstructions(
|
|
||||||
indexOfReference(isUserSuperReference) - 1,
|
|
||||||
"const/4 v2, 0x1"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
?: throw UserSerializationMethodFingerprint.exception
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun MutableMethod.indexOfReference(reference: Reference) = getInstructions()
|
|
||||||
.indexOfFirst { it is BuilderInstruction22c && it.opcode == Opcode.IPUT_BOOLEAN && it.reference == reference }
|
|
||||||
.let {
|
|
||||||
if (it == -1) throw PatchException("Could not find index of instruction with supplied reference.")
|
|
||||||
else it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object IsUserSuperMethodFingerprint : MethodFingerprint(
|
|
||||||
returnType = "Ljava/lang/Object",
|
|
||||||
parameters = listOf("Ljava/lang/Object"),
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
strings = listOf("user"),
|
|
||||||
opcodes = listOf(Opcode.IGET_BOOLEAN),
|
|
||||||
)
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
package app.revanced.patches.duolingo.unlocksuper.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object UserSerializationMethodFingerprint : MethodFingerprint(
|
|
||||||
returnType = "V",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR,
|
|
||||||
strings = listOf(
|
|
||||||
"betaStatus",
|
|
||||||
"coachOutfit",
|
|
||||||
"globalAmbassadorStatus",
|
|
||||||
),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.MOVE_FROM16,
|
|
||||||
Opcode.IPUT_BOOLEAN,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
|
|
||||||
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.CreateKeyFingerprint
|
|
||||||
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Remove bootloader detection",
|
|
||||||
description = "Removes the check for an unlocked bootloader.",
|
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.bmf.bmf2go")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object BootloaderDetectionPatch : BytecodePatch(
|
|
||||||
setOf(CreateKeyFingerprint, BootStateFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
arrayOf(CreateKeyFingerprint, BootStateFingerprint).forEach { fingerprint ->
|
|
||||||
fingerprint.result?.mutableMethod?.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
) ?: throw fingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +1,13 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#isBootStateOk (3.0.1)
|
|
||||||
object BootStateFingerprint : MethodFingerprint(
|
object BootStateFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
access = AccessFlags.PUBLIC.value,
|
||||||
opcodes = listOf(
|
strings = listOf("Boot state of device: %s"),
|
||||||
Opcode.INVOKE_DIRECT,
|
customFingerprint = { methodDef ->
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
methodDef.definingClass.endsWith("/AttestationHelper;")
|
||||||
Opcode.CONST_4,
|
}
|
||||||
Opcode.NEW_ARRAY,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.APUT_OBJECT,
|
|
||||||
Opcode.CONST_STRING,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IF_EQ,
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IF_NE,
|
|
||||||
Opcode.GOTO,
|
|
||||||
Opcode.MOVE,
|
|
||||||
Opcode.RETURN
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
|
object BootloaderDetectionFingerprint : MethodFingerprint(
|
||||||
|
"Z",
|
||||||
|
access = AccessFlags.PUBLIC.value,
|
||||||
|
strings = listOf("Creation of attestation key succeeded", "Creation of attestation key failed"),
|
||||||
|
customFingerprint = { methodDef ->
|
||||||
|
methodDef.definingClass.endsWith("/AttestationHelper;")
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.bootloader.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.AttestationHelper#createKey (3.0.1)
|
|
||||||
object CreateKeyFingerprint : MethodFingerprint(
|
|
||||||
"Z",
|
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
|
||||||
strings = listOf("attestation", "SHA-256", "random", "EC", "AndroidKeyStore")
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.finanzonline.detection.bootloader.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootStateFingerprint
|
||||||
|
import app.revanced.patches.finanzonline.detection.bootloader.fingerprints.BootloaderDetectionFingerprint
|
||||||
|
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
|
||||||
|
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("remove-bootloader-detection")
|
||||||
|
@Description("Removes the check for an unlocked bootloader.")
|
||||||
|
@DetectionCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class BootloaderDetectionPatch : BytecodePatch(
|
||||||
|
listOf(BootloaderDetectionFingerprint, BootStateFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
arrayOf(BootloaderDetectionFingerprint, BootStateFingerprint).forEach { fingerprint ->
|
||||||
|
fingerprint.result?.mutableMethod?.addInstruction(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
) ?: return fingerprint.toErrorResult()
|
||||||
|
}
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.root
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Remove root detection",
|
|
||||||
description = "Removes the check for root permissions.",
|
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.bmf.bmf2go")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object RootDetectionPatch : BytecodePatch(
|
|
||||||
setOf(RootDetectionFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
RootDetectionFingerprint.result?.mutableMethod?.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
||||||
return-object v0
|
|
||||||
"""
|
|
||||||
) ?: throw RootDetectionFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +1,10 @@
|
|||||||
package app.revanced.patches.finanzonline.detection.root.fingerprints
|
package app.revanced.patches.finanzonline.detection.root.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
// Located @ at.gv.bmf.bmf2go.taxequalization.tools.utils.RootDetection#isRooted (3.0.1)
|
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC,
|
customFingerprint = { methodDef ->
|
||||||
parameters = listOf("L"),
|
methodDef.definingClass == "Lat/gv/bmf/bmf2go/tools/utils/z;"
|
||||||
opcodes = listOf(
|
}
|
||||||
Opcode.NEW_INSTANCE,
|
|
||||||
Opcode.INVOKE_DIRECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.RETURN_OBJECT
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package app.revanced.patches.finanzonline.detection.root.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.finanzonline.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
|
import app.revanced.patches.finanzonline.detection.shared.annotations.DetectionCompatibility
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("remove-root-detection")
|
||||||
|
@Description("Removes the check for root permissions.")
|
||||||
|
@DetectionCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class RootDetectionPatch : BytecodePatch(
|
||||||
|
listOf(RootDetectionFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
RootDetectionFingerprint.result?.mutableMethod?.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
||||||
|
return-object v0
|
||||||
|
"""
|
||||||
|
) ?: return RootDetectionFingerprint.toErrorResult()
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.finanzonline.detection.shared.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("at.gv.bmf.bmf2go", arrayOf("2.2.0"))])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class DetectionCompatibility
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package app.revanced.patches.googlerecorder.restrictions
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.googlerecorder.restrictions.fingerprints.OnApplicationCreateFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Remove device restrictions",
|
|
||||||
description = "Removes restrictions from using the app on any device.",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.google.android.apps.recorder")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object RemoveDeviceRestrictions : BytecodePatch(
|
|
||||||
setOf(OnApplicationCreateFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
OnApplicationCreateFingerprint.result?.let {
|
|
||||||
val featureStringIndex = it.scanResult.stringsScanResult!!.matches.first().index
|
|
||||||
|
|
||||||
it.mutableMethod.apply {
|
|
||||||
// Remove check for device restrictions.
|
|
||||||
removeInstructions(featureStringIndex - 2, 5)
|
|
||||||
|
|
||||||
val featureAvailableRegister = getInstruction<OneRegisterInstruction>(featureStringIndex).registerA
|
|
||||||
|
|
||||||
// Override "isPixelDevice()" to return true.
|
|
||||||
addInstruction(featureStringIndex, "const/4 v$featureAvailableRegister, 0x1")
|
|
||||||
}
|
|
||||||
} ?: throw OnApplicationCreateFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package app.revanced.patches.googlerecorder.restrictions.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
|
|
||||||
object OnApplicationCreateFingerprint : MethodFingerprint(
|
|
||||||
strings = listOf("com.google.android.feature.PIXEL_2017_EXPERIENCE"),
|
|
||||||
customFingerprint = custom@{ methodDef, classDef ->
|
|
||||||
if (methodDef.name != "onCreate") return@custom false
|
|
||||||
|
|
||||||
classDef.type.endsWith("RecorderApplication;")
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package app.revanced.patches.hexeditor.ad
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Disable ads",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.myprog.hexedit")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object DisableAdsPatch : BytecodePatch(
|
|
||||||
setOf(PrimaryAdsFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) = PrimaryAdsFingerprint.result?.mutableMethod?.replaceInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
) ?: throw PrimaryAdsFingerprint.exception
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package app.revanced.patches.hexeditor.ad.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility(
|
||||||
|
[
|
||||||
|
Package("com.myprog.hexedit")
|
||||||
|
]
|
||||||
|
)
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class HexEditorAdsCompatibility
|
||||||
@@ -3,7 +3,7 @@ package app.revanced.patches.hexeditor.ad.fingerprints
|
|||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
|
||||||
object PrimaryAdsFingerprint : MethodFingerprint(
|
object PrimaryAdsFingerprint : MethodFingerprint(
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
methodDef.definingClass.endsWith("PreferencesHelper;") && methodDef.name == "isAdsDisabled"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package app.revanced.patches.hexeditor.ad.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.extensions.replaceInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.hexeditor.ad.annotations.HexEditorAdsCompatibility
|
||||||
|
import app.revanced.patches.hexeditor.ad.fingerprints.PrimaryAdsFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("disable-ads")
|
||||||
|
@Description("Disables ads in HexEditor.")
|
||||||
|
@HexEditorAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HexEditorAdsPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
PrimaryAdsFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = PrimaryAdsFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
method.replaceInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package app.revanced.patches.iconpackstudio.misc.pro
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Unlock pro",
|
|
||||||
compatiblePackages = [CompatiblePackage("ginlemon.iconpackstudio")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object UnlockProPatch : BytecodePatch(
|
|
||||||
setOf(CheckProFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
val method = CheckProFingerprint.result!!.mutableMethod
|
|
||||||
method.addInstructions(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
const/4 v0, 0x1
|
|
||||||
return v0
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("ginlemon.iconpackstudio")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class UnlockProCompatibility
|
||||||
@@ -4,5 +4,5 @@ import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|||||||
|
|
||||||
object CheckProFingerprint : MethodFingerprint(
|
object CheckProFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("IPSPurchaseRepository;")}
|
customFingerprint = { it.definingClass.endsWith("IPSPurchaseRepository;")}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.iconpackstudio.misc.pro.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.iconpackstudio.misc.pro.annotations.UnlockProCompatibility
|
||||||
|
import app.revanced.patches.iconpackstudio.misc.pro.fingerprints.CheckProFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("unlock-pro")
|
||||||
|
@Description("Unlocks all pro features.")
|
||||||
|
@UnlockProCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class UnlockProPatch : BytecodePatch(
|
||||||
|
listOf(
|
||||||
|
CheckProFingerprint
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = CheckProFingerprint.result!!.mutableMethod
|
||||||
|
method.addInstructions(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
const/4 v0, 0x1
|
||||||
|
return v0
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Remove root detection",
|
|
||||||
description = "Removes the check for root permissions and unlocked bootloader.",
|
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object RootDetectionPatch : BytecodePatch(
|
|
||||||
setOf(RootDetectionFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) =
|
|
||||||
RootDetectionFingerprint.result!!.mutableMethod.addInstruction(0, "return-void")
|
|
||||||
}
|
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
package app.revanced.patches.idaustria.detection.root.fingerprints
|
package app.revanced.patches.idaustria.detection.root.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
object RootDetectionFingerprint : MethodFingerprint(
|
object RootDetectionFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
accessFlags = AccessFlags.PUBLIC.value,
|
access = AccessFlags.PUBLIC.value,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
methodDef.definingClass.endsWith("/DeviceIntegrityCheck;")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.root.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.*
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.idaustria.detection.root.fingerprints.RootDetectionFingerprint
|
||||||
|
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("remove-root-detection")
|
||||||
|
@Description("Removes the check for root permissions and unlocked bootloader.")
|
||||||
|
@DetectionCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class RootDetectionPatch : BytecodePatch(
|
||||||
|
listOf(RootDetectionFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
RootDetectionFingerprint.result!!.mutableMethod.addInstructions(0, "return-void")
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.idaustria.detection.shared.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("at.gv.oe.app", arrayOf("2.5.2", "2.6.0"))])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class DetectionCompatibility
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package app.revanced.patches.idaustria.detection.signature.fingerprints
|
package app.revanced.patches.idaustria.detection.signature.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
object SpoofSignatureFingerprint : MethodFingerprint(
|
object SpoofSignatureFingerprint : MethodFingerprint(
|
||||||
"L",
|
"L",
|
||||||
parameters = listOf("L"),
|
parameters = listOf("L"),
|
||||||
accessFlags = AccessFlags.PRIVATE.value,
|
access = AccessFlags.PRIVATE.value,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey"
|
methodDef.definingClass.endsWith("/SL2Step1Task;") && methodDef.name == "getPubKey"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,23 +1,25 @@
|
|||||||
package app.revanced.patches.idaustria.detection.signature
|
package app.revanced.patches.idaustria.detection.signature.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.*
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.idaustria.detection.shared.annotations.DetectionCompatibility
|
||||||
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
import app.revanced.patches.idaustria.detection.signature.fingerprints.SpoofSignatureFingerprint
|
||||||
|
|
||||||
@Patch(
|
@Patch
|
||||||
name = "Spoof signature",
|
@Name("spoof-signature")
|
||||||
description = "Spoofs the signature of the app.",
|
@Description("Spoofs the signature of the app.")
|
||||||
compatiblePackages = [CompatiblePackage("at.gv.oe.app")]
|
@DetectionCompatibility
|
||||||
)
|
@Version("0.0.1")
|
||||||
@Suppress("unused")
|
class SpoofSignaturePatch : BytecodePatch(
|
||||||
object SpoofSignaturePatch : BytecodePatch(
|
listOf(SpoofSignatureFingerprint)
|
||||||
setOf(SpoofSignatureFingerprint)
|
|
||||||
) {
|
) {
|
||||||
private const val EXPECTED_SIGNATURE =
|
companion object {
|
||||||
"OpenSSLRSAPublicKey{modulus=ac3e6fd6050aa7e0d6010ae58190404cd89a56935b44f6fee" +
|
const val EXPECTED_SIGNATURE = "OpenSSLRSAPublicKey{modulus=ac3e6fd6050aa7e0d6010ae58190404cd89a56935b44f6fee" +
|
||||||
"067c149768320026e10b24799a1339e414605e448e3f264444a327b9ae292be2b62ad567dd1800dbed4a88f718a33dc6db6b" +
|
"067c149768320026e10b24799a1339e414605e448e3f264444a327b9ae292be2b62ad567dd1800dbed4a88f718a33dc6db6b" +
|
||||||
"f5178aa41aa0efff8a3409f5ca95dbfccd92c7b4298966df806ea7a0204a00f0e745f6d9f13bdf24f3df715d7b62c1600906" +
|
"f5178aa41aa0efff8a3409f5ca95dbfccd92c7b4298966df806ea7a0204a00f0e745f6d9f13bdf24f3df715d7b62c1600906" +
|
||||||
"15de1c8a956b9286764985a3b3c060963c435fb9481a5543aaf0671fc2dba6c5c2b17d1ef1d85137f14dc9bbdf3490288087" +
|
"15de1c8a956b9286764985a3b3c060963c435fb9481a5543aaf0671fc2dba6c5c2b17d1ef1d85137f14dc9bbdf3490288087" +
|
||||||
@@ -28,8 +30,9 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
"0def55be2c1f6f9c72c92fb45d7e0a9ac571cb38f0a9a37bb33ea06f223fde8c7a92e8c47769e386f9799776e8f110c21df2" +
|
"0def55be2c1f6f9c72c92fb45d7e0a9ac571cb38f0a9a37bb33ea06f223fde8c7a92e8c47769e386f9799776e8f110c21df2" +
|
||||||
"77ef1be61b2c01ebdabddcbf53cc4b6fd9a3c445606ee77b3758162c80ad8f8137b3c6864e92db904807dcb2be9d7717dd21" +
|
"77ef1be61b2c01ebdabddcbf53cc4b6fd9a3c445606ee77b3758162c80ad8f8137b3c6864e92db904807dcb2be9d7717dd21" +
|
||||||
"bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}"
|
"bf42c121d620ddfb7914f7a95c713d9e1c1b7bdb4a03d618e40cf7e9e235c0b5687e03b7ab3,publicExponent=10001}"
|
||||||
|
}
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions(
|
SpoofSignatureFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
@@ -37,5 +40,6 @@ object SpoofSignaturePatch : BytecodePatch(
|
|||||||
return-object v0
|
return-object v0
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
package app.revanced.patches.inshorts.ad
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Hide ads",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.nis.app")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object HideAdsPatch : BytecodePatch(
|
|
||||||
setOf(InshortsAdsFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
InshortsAdsFingerprint.result?.let { result ->
|
|
||||||
result.apply {
|
|
||||||
mutableMethod.addInstruction(
|
|
||||||
0,
|
|
||||||
"""
|
|
||||||
return-void
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} ?: throw InshortsAdsFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.revanced.patches.inshorts.ad.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("com.nis.app")])
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class HideAdsCompatibility
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package app.revanced.patches.inshorts.ad.fingerprints
|
package app.revanced.patches.inshorts.ad.fingerprints
|
||||||
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object InshortsAdsFingerprint : MethodFingerprint(
|
object InshortsAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
strings = listOf("GoogleAdLoader","exception in requestAd"),
|
strings = listOf("GoogleAdLoader","exception in requestAd")
|
||||||
)
|
)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package app.revanced.patches.inshorts.ad.patch
|
||||||
|
|
||||||
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.inshorts.ad.annotations.HideAdsCompatibility
|
||||||
|
import app.revanced.patches.inshorts.ad.fingerprints.InshortsAdsFingerprint
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("hide-ads")
|
||||||
|
@Description("Removes ads from Inshorts.")
|
||||||
|
@HideAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class HideAdsPatch : BytecodePatch(
|
||||||
|
listOf(InshortsAdsFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
InshortsAdsFingerprint.result?.let { result ->
|
||||||
|
result.apply {
|
||||||
|
mutableMethod.addInstruction(
|
||||||
|
0,
|
||||||
|
"""
|
||||||
|
return-void
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
} ?: return InshortsAdsFingerprint.toErrorResult()
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,8 +2,8 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object ShowAdFingerprint : MethodFingerprint(
|
object ShowAdFingerprint : MethodFingerprint(
|
||||||
"Z",
|
"Z",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
object GenericMediaAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -2,20 +2,19 @@ package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
import org.jf.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
|
||||||
|
|
||||||
abstract class MediaAdFingerprint(
|
abstract class MediaAdFingerprint(
|
||||||
returnType: String? = "Z",
|
returnType: String? = "Z",
|
||||||
accessFlags: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
access: Int? = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
||||||
parameters: Iterable<String>? = listOf(),
|
parameters: Iterable<String>? = listOf(),
|
||||||
opcodes: Iterable<Opcode>?,
|
opcodes: Iterable<Opcode>?,
|
||||||
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null
|
customFingerprint: ((methodDef: Method) -> Boolean)? = null
|
||||||
) : MethodFingerprint(
|
) : MethodFingerprint(
|
||||||
returnType,
|
returnType,
|
||||||
accessFlags,
|
access,
|
||||||
parameters,
|
parameters,
|
||||||
opcodes,
|
opcodes,
|
||||||
customFingerprint = customFingerprint
|
customFingerprint = customFingerprint
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import org.jf.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import org.jf.dexlib2.iface.reference.MethodReference
|
||||||
|
|
||||||
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
||||||
"V",
|
"V",
|
||||||
@@ -14,7 +14,7 @@ object PaidPartnershipAdFingerprint : MediaAdFingerprint(
|
|||||||
Opcode.IPUT_BOOLEAN,
|
Opcode.IPUT_BOOLEAN,
|
||||||
Opcode.IPUT_BOOLEAN
|
Opcode.IPUT_BOOLEAN
|
||||||
),
|
),
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef ->
|
||||||
methodDef.definingClass.endsWith("ClipsEditMetadataController;")
|
methodDef.definingClass.endsWith("ClipsEditMetadataController;")
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
package app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads
|
||||||
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import org.jf.dexlib2.Opcode
|
||||||
|
|
||||||
object ShoppingAdFingerprint : MediaAdFingerprint(
|
object ShoppingAdFingerprint : MediaAdFingerprint(
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
package app.revanced.patches.instagram.patches.ads.timeline
|
package app.revanced.patches.instagram.patches.ads.timeline.patch
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
import app.revanced.extensions.toErrorResult
|
||||||
|
import app.revanced.patcher.annotation.*
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.getInstruction
|
import app.revanced.patcher.extensions.instruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstruction
|
import app.revanced.patcher.extensions.removeInstruction
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint.Companion.resolve
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
import app.revanced.patcher.util.smali.ExternalLabel
|
import app.revanced.patcher.util.smali.ExternalLabel
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.MediaFingerprint
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ShowAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ShowAdFingerprint
|
||||||
@@ -16,35 +18,34 @@ import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.Gene
|
|||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.MediaAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.MediaAdFingerprint
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.PaidPartnershipAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.PaidPartnershipAdFingerprint
|
||||||
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.ShoppingAdFingerprint
|
import app.revanced.patches.instagram.patches.ads.timeline.fingerprints.ads.ShoppingAdFingerprint
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction
|
import org.jf.dexlib2.iface.instruction.OneRegisterInstruction
|
||||||
|
|
||||||
@Patch(
|
@Patch
|
||||||
name = "Hide timeline ads",
|
@Name("hide-timeline-ads")
|
||||||
description = "Removes ads from the timeline.",
|
@Description("Removes ads from the timeline.")
|
||||||
compatiblePackages = [CompatiblePackage("com.instagram.android", ["275.0.0.27.98"])]
|
@Compatibility([Package("com.instagram.android")])
|
||||||
)
|
@Version("0.0.1")
|
||||||
@Suppress("unused")
|
class HideTimelineAdsPatch : BytecodePatch(
|
||||||
object HideTimelineAdsPatch : BytecodePatch(
|
listOf(
|
||||||
setOf(
|
|
||||||
ShowAdFingerprint,
|
ShowAdFingerprint,
|
||||||
MediaFingerprint,
|
MediaFingerprint,
|
||||||
PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes.
|
PaidPartnershipAdFingerprint // Unlike the other ads this one is resolved from all classes.
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
// region Resolve required methods to check for ads.
|
// region Resolve required methods to check for ads.
|
||||||
|
|
||||||
ShowAdFingerprint.result ?: throw ShowAdFingerprint.exception
|
ShowAdFingerprint.result ?: return ShowAdFingerprint.toErrorResult()
|
||||||
|
|
||||||
PaidPartnershipAdFingerprint.result ?: throw PaidPartnershipAdFingerprint.exception
|
PaidPartnershipAdFingerprint.result ?: return PaidPartnershipAdFingerprint.toErrorResult()
|
||||||
|
|
||||||
MediaFingerprint.result?.let {
|
MediaFingerprint.result?.let {
|
||||||
GenericMediaAdFingerprint.resolve(context, it.classDef)
|
GenericMediaAdFingerprint.resolve(context, it.classDef)
|
||||||
ShoppingAdFingerprint.resolve(context, it.classDef)
|
ShoppingAdFingerprint.resolve(context, it.classDef)
|
||||||
|
|
||||||
return@let
|
return@let
|
||||||
} ?: throw MediaFingerprint.exception
|
} ?: return MediaFingerprint.toErrorResult()
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
@@ -54,8 +55,8 @@ object HideTimelineAdsPatch : BytecodePatch(
|
|||||||
val scanStart = scanResult.patternScanResult!!.startIndex
|
val scanStart = scanResult.patternScanResult!!.startIndex
|
||||||
val jumpIndex = scanStart - 1
|
val jumpIndex = scanStart - 1
|
||||||
|
|
||||||
val mediaInstanceRegister = mutableMethod.getInstruction<FiveRegisterInstruction>(scanStart).registerC
|
val mediaInstanceRegister = (mutableMethod.instruction(scanStart) as FiveRegisterInstruction).registerC
|
||||||
val freeRegister = mutableMethod.getInstruction<OneRegisterInstruction>(jumpIndex).registerA
|
val freeRegister = (mutableMethod.instruction(jumpIndex) as OneRegisterInstruction).registerA
|
||||||
|
|
||||||
val returnFalseLabel = "an_ad"
|
val returnFalseLabel = "an_ad"
|
||||||
|
|
||||||
@@ -76,12 +77,14 @@ object HideTimelineAdsPatch : BytecodePatch(
|
|||||||
|
|
||||||
val insertIndex = scanStart + 3
|
val insertIndex = scanStart + 3
|
||||||
|
|
||||||
mutableMethod.addInstructionsWithLabels(
|
mutableMethod.addInstructions(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
checkForAdInstructions,
|
checkForAdInstructions,
|
||||||
ExternalLabel(
|
listOf(
|
||||||
returnFalseLabel,
|
ExternalLabel(
|
||||||
mutableMethod.getInstruction(mutableMethod.implementation!!.instructions.size - 2 /* return false = ad */)
|
returnFalseLabel,
|
||||||
|
mutableMethod.instruction(mutableMethod.implementation!!.instructions.size - 2 /* return false = ad */)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -90,14 +93,16 @@ object HideTimelineAdsPatch : BytecodePatch(
|
|||||||
// region Jump to checks for ads from previous patch.
|
// region Jump to checks for ads from previous patch.
|
||||||
|
|
||||||
mutableMethod.apply {
|
mutableMethod.apply {
|
||||||
addInstructionsWithLabels(
|
addInstructions(
|
||||||
jumpIndex + 1,
|
jumpIndex + 1,
|
||||||
"if-nez v$freeRegister, :start_check",
|
"if-nez v$freeRegister, :start_check",
|
||||||
ExternalLabel("start_check", getInstruction(insertIndex))
|
listOf(ExternalLabel("start_check", instruction(insertIndex)))
|
||||||
)
|
)
|
||||||
}.removeInstruction(jumpIndex)
|
}.removeInstruction(jumpIndex)
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package app.revanced.patches.irplus.ad
|
|
||||||
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
|
||||||
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Remove ads",
|
|
||||||
compatiblePackages = [CompatiblePackage("net.binarymode.android.irplus")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object RemoveAdsPatch : BytecodePatch(
|
|
||||||
setOf(IrplusAdsFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
|
||||||
|
|
||||||
// By overwriting the second parameter of the method,
|
|
||||||
// the view which holds the advertisement is removed.
|
|
||||||
method.addInstruction(0, "const/4 p2, 0x0")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package app.revanced.patches.irplus.ad.annotations
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Compatibility
|
||||||
|
import app.revanced.patcher.annotation.Package
|
||||||
|
|
||||||
|
@Compatibility([Package("net.binarymode.android.irplus")])
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
internal annotation class IrplusAdsCompatibility
|
||||||
@@ -2,7 +2,7 @@ package app.revanced.patches.irplus.ad.fingerprints
|
|||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import org.jf.dexlib2.AccessFlags
|
||||||
|
|
||||||
object IrplusAdsFingerprint : MethodFingerprint(
|
object IrplusAdsFingerprint : MethodFingerprint(
|
||||||
"V",
|
"V",
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package app.revanced.patches.irplus.ad.patch
|
||||||
|
|
||||||
|
import app.revanced.patcher.annotation.Description
|
||||||
|
import app.revanced.patcher.annotation.Name
|
||||||
|
import app.revanced.patcher.annotation.Version
|
||||||
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
|
import app.revanced.patcher.extensions.addInstruction
|
||||||
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
|
import app.revanced.patcher.patch.PatchResult
|
||||||
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
|
import app.revanced.patcher.patch.annotations.Patch
|
||||||
|
import app.revanced.patches.irplus.ad.annotations.IrplusAdsCompatibility
|
||||||
|
import app.revanced.patches.irplus.ad.fingerprints.IrplusAdsFingerprint
|
||||||
|
|
||||||
|
|
||||||
|
@Patch
|
||||||
|
@Name("remove-ads")
|
||||||
|
@Description("Removes all ads from the app.")
|
||||||
|
@IrplusAdsCompatibility
|
||||||
|
@Version("0.0.1")
|
||||||
|
class IrplusAdsPatch : BytecodePatch(
|
||||||
|
listOf(IrplusAdsFingerprint)
|
||||||
|
) {
|
||||||
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
|
val method = IrplusAdsFingerprint.result!!.mutableMethod
|
||||||
|
|
||||||
|
// By overwriting the second parameter of the method,
|
||||||
|
// the view which holds the advertisement is removed.
|
||||||
|
method.addInstruction(0, "const/4 p2, 0x0")
|
||||||
|
|
||||||
|
return PatchResultSuccess()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.login
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.lightroom.misc.login.fingerprints.IsLoggedInFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Disable mandatory login",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.adobe.lrmobile")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object DisableMandatoryLoginPatch : BytecodePatch(
|
|
||||||
setOf(IsLoggedInFingerprint)
|
|
||||||
) {
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
IsLoggedInFingerprint.result?.mutableMethod?.apply {
|
|
||||||
val index = implementation!!.instructions.lastIndex - 1
|
|
||||||
// Set isLoggedIn = true.
|
|
||||||
replaceInstruction(index, "const/4 v0, 0x1")
|
|
||||||
} ?: throw IsLoggedInFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.login.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object IsLoggedInFingerprint : MethodFingerprint(
|
|
||||||
returnType = "Z",
|
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.FINAL,
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.INVOKE_STATIC,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.IF_NE,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.GOTO
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.premium
|
|
||||||
|
|
||||||
import app.revanced.extensions.exception
|
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
|
||||||
import app.revanced.patcher.patch.annotation.CompatiblePackage
|
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
|
||||||
import app.revanced.patches.lightroom.misc.premium.fingerprints.HasPurchasedFingerprint
|
|
||||||
|
|
||||||
@Patch(
|
|
||||||
name = "Unlock premium",
|
|
||||||
compatiblePackages = [CompatiblePackage("com.adobe.lrmobile")]
|
|
||||||
)
|
|
||||||
@Suppress("unused")
|
|
||||||
object UnlockPremiumPatch : BytecodePatch(
|
|
||||||
setOf(HasPurchasedFingerprint)
|
|
||||||
){
|
|
||||||
override fun execute(context: BytecodeContext) {
|
|
||||||
// Set hasPremium = true.
|
|
||||||
HasPurchasedFingerprint.result?.mutableMethod?.replaceInstruction(2, "const/4 v2, 0x1")
|
|
||||||
?: throw HasPurchasedFingerprint.exception
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
package app.revanced.patches.lightroom.misc.premium.fingerprints
|
|
||||||
|
|
||||||
import app.revanced.patcher.extensions.or
|
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
|
||||||
|
|
||||||
object HasPurchasedFingerprint : MethodFingerprint(
|
|
||||||
returnType = "Z",
|
|
||||||
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
|
||||||
strings = listOf("isPurchaseDoneRecently = true, access platform profile present? = "),
|
|
||||||
opcodes = listOf(
|
|
||||||
Opcode.SGET_OBJECT,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
Opcode.CONST_4,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user