You've already forked revanced-cli
mirror of
https://github.com/revanced/revanced-cli
synced 2025-11-19 15:33:27 +01:00
Compare commits
288 Commits
v2.8.3
...
v3.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a198052bb | ||
|
|
0f3e090418 | ||
|
|
6aed946183 | ||
|
|
924c1f80ec | ||
|
|
8dd709b6ef | ||
|
|
139e7facac | ||
|
|
1d26e572f7 | ||
|
|
2c7fcaf4ad | ||
|
|
52c3be23f2 | ||
|
|
3dd875d14c | ||
|
|
0350b7f1a2 | ||
|
|
a3d8705e89 | ||
|
|
a536c9f815 | ||
|
|
11c3a6cfd4 | ||
|
|
a5851f0c1a | ||
|
|
963ae3a5fa | ||
|
|
93f338a731 | ||
|
|
7dcf15e03b | ||
|
|
41898d7547 | ||
|
|
45dd15f679 | ||
|
|
c2da04a834 | ||
|
|
f556909b9e | ||
|
|
1fa3dd7b8c | ||
|
|
1fcc591222 | ||
|
|
1fd3b83d46 | ||
|
|
7ec9040d41 | ||
|
|
44cc88b25d | ||
|
|
97548f80b3 | ||
|
|
d766f0e229 | ||
|
|
b0e748daff | ||
|
|
ba758f00f4 | ||
|
|
a9c2a5f096 | ||
|
|
0dcd838de3 | ||
|
|
a7290353bf | ||
|
|
47a20afd2d | ||
|
|
f8972eac3e | ||
|
|
9edbbf3163 | ||
|
|
32da961d57 | ||
|
|
8a5daab2a3 | ||
|
|
c0cc909626 | ||
|
|
b74213f66e | ||
|
|
fe75d4ab87 | ||
|
|
07da528ce2 | ||
|
|
ef5fa9b4c9 | ||
|
|
fc359923e3 | ||
|
|
2e3cd90537 | ||
|
|
7174364ef8 | ||
|
|
4c9d414228 | ||
|
|
5e73e6d2de | ||
|
|
667ca3051c | ||
|
|
9220642a7b | ||
|
|
3f47235c64 | ||
|
|
83b475c2e3 | ||
|
|
4105b638c0 | ||
|
|
f9cf7d21b7 | ||
|
|
0a758d86df | ||
|
|
83f99e29ec | ||
|
|
00410d54c0 | ||
|
|
5eaad33dc1 | ||
|
|
fa85482c4a | ||
|
|
caed39af7f | ||
|
|
20e1fdc18d | ||
|
|
19cd541e9a | ||
|
|
f6c221d72d | ||
|
|
9c148c96bf | ||
|
|
2c5b53c7e9 | ||
|
|
77d9cb98d1 | ||
|
|
38677e2319 | ||
|
|
e5e768fa34 | ||
|
|
9082181ce5 | ||
|
|
542580ecff | ||
|
|
26112a4fd2 | ||
|
|
553fbdbb8f | ||
|
|
be429a4770 | ||
|
|
8c391cecce | ||
|
|
bd14bdb5ea | ||
|
|
d0fc886428 | ||
|
|
1ccbed8d17 | ||
|
|
3b89fb7bc2 | ||
|
|
16bb1a60fc | ||
|
|
5f1843771e | ||
|
|
9de90703c8 | ||
|
|
1201f9edc5 | ||
|
|
9c8f9608b2 | ||
|
|
be90d2e360 | ||
|
|
79dc99aa9b | ||
|
|
260ff00951 | ||
|
|
cfe4c5ed0e | ||
|
|
7133242691 | ||
|
|
55750ce16a | ||
|
|
6003e68d47 | ||
|
|
9f8c2aeedf | ||
|
|
0a16bc849b | ||
|
|
ecd5147590 | ||
|
|
ca255c9e1b | ||
|
|
e9aa490355 | ||
|
|
69fe59f97b | ||
|
|
995e1712bc | ||
|
|
a236f10bb0 | ||
|
|
4a6134ea60 | ||
|
|
b084024742 | ||
|
|
2ef48af1b3 | ||
|
|
da2c91874d | ||
|
|
379687c814 | ||
|
|
2f5577e464 | ||
|
|
6962fc2f4c | ||
|
|
a6cef26210 | ||
|
|
b4892c4413 | ||
|
|
90368405ad | ||
|
|
26967959e2 | ||
|
|
eac6f6fbe3 | ||
|
|
af4ec43352 | ||
|
|
4f5644b62c | ||
|
|
31fb3166d9 | ||
|
|
a76bd0ad35 | ||
|
|
ba07ab1ac2 | ||
|
|
92bf57f279 | ||
|
|
886d501026 | ||
|
|
4b04cc4b59 | ||
|
|
75d237058f | ||
|
|
40026fe300 | ||
|
|
dbec559ed7 | ||
|
|
00e49719ca | ||
|
|
df276846e1 | ||
|
|
ac3a8f66f7 | ||
|
|
e900ce8486 | ||
|
|
ee6dd5a57c | ||
|
|
23d9e1e841 | ||
|
|
3718b7992c | ||
|
|
bce5e86874 | ||
|
|
cda6df6238 | ||
|
|
0dc230292a | ||
|
|
695cd1ba41 | ||
|
|
d08bbf8664 | ||
|
|
d55dd0a1fc | ||
|
|
a53d3482de | ||
|
|
7a3d0420f7 | ||
|
|
5cddf5004e | ||
|
|
6393a5016a | ||
|
|
cad38ca3bd | ||
|
|
6c1169b433 | ||
|
|
bf2bb72ce0 | ||
|
|
567bdee887 | ||
|
|
9888b0e08e | ||
|
|
51c04b7b16 | ||
|
|
a39cf893d6 | ||
|
|
6485e477a1 | ||
|
|
f99d340534 | ||
|
|
4edc325978 | ||
|
|
cffa1ea3a4 | ||
|
|
d15505adaa | ||
|
|
aaf452a103 | ||
|
|
1753a1aa3e | ||
|
|
f4e74cb4f2 | ||
|
|
50df4e117e | ||
|
|
9fcd2b4cd1 | ||
|
|
e6bb05c0b9 | ||
|
|
6bd7d42e32 | ||
|
|
19200eacc1 | ||
|
|
666738ee57 | ||
|
|
961267b8cd | ||
|
|
6b7314a399 | ||
|
|
c8a47c51df | ||
|
|
72d8f73d7f | ||
|
|
1957a2c4ff | ||
|
|
07a423b19e | ||
|
|
31e4a41dd2 | ||
|
|
8284c1048f | ||
|
|
9c64f5ec3e | ||
|
|
f4c447e71b | ||
|
|
b69e784785 | ||
|
|
ccce9c926d | ||
|
|
dc4ab22f41 | ||
|
|
25d8ad4aaf | ||
|
|
3d9436e691 | ||
|
|
ee70423527 | ||
|
|
d5794b94ca | ||
|
|
3160d894da | ||
|
|
545597959a | ||
|
|
a6db0edc70 | ||
|
|
ff0d3dd224 | ||
|
|
d9a1fd33ed | ||
|
|
ad81a1b656 | ||
|
|
8c2aeff2cf | ||
|
|
eb6c659f5b | ||
|
|
bac4f839c9 | ||
|
|
c1e7215d31 | ||
|
|
18d132123f | ||
|
|
74d73ca3a7 | ||
|
|
ae91b0d597 | ||
|
|
1a67cd81da | ||
|
|
9b9fad7cc0 | ||
|
|
1620305b4a | ||
|
|
d906edbe78 | ||
|
|
4e53638cb9 | ||
|
|
7d1f200621 | ||
|
|
a7db6cb8f1 | ||
|
|
d61ab058da | ||
|
|
235c2742ec | ||
|
|
8a964efd00 | ||
|
|
8114d1dca0 | ||
|
|
5a7cadd96d | ||
|
|
1c5983b803 | ||
|
|
2c7eb7274c | ||
|
|
512152fb66 | ||
|
|
8793b5fc65 | ||
|
|
39c490d6b7 | ||
|
|
6e703eb8e8 | ||
|
|
c677eb9792 | ||
|
|
75c8ea4639 | ||
|
|
b69dd52ca9 | ||
|
|
c590bf559c | ||
|
|
ec0b847419 | ||
|
|
b3cf32e89d | ||
|
|
8a1199ba9a | ||
|
|
25b45800a1 | ||
|
|
2fe3303a27 | ||
|
|
04339f0654 | ||
|
|
456428a836 | ||
|
|
c9ae379c77 | ||
|
|
81d702949c | ||
|
|
39e377bc48 | ||
|
|
fce40421e9 | ||
|
|
cb554c8bdf | ||
|
|
269c753dfa | ||
|
|
6403e34712 | ||
|
|
f68e7697ff | ||
|
|
64b7e86252 | ||
|
|
7be9af0942 | ||
|
|
6a35cf7ea4 | ||
|
|
4914fd37bc | ||
|
|
38052b6ecf | ||
|
|
6e21d81964 | ||
|
|
3a733e5137 | ||
|
|
4f4e1f9834 | ||
|
|
e035d93d2c | ||
|
|
839854d890 | ||
|
|
43c772c98d | ||
|
|
b6dff6d832 | ||
|
|
29b057dead | ||
|
|
7df4a7e7da | ||
|
|
07c09f092c | ||
|
|
e8c9c80349 | ||
|
|
467d8387e6 | ||
|
|
65637c8b3a | ||
|
|
aa21137e99 | ||
|
|
b35302094a | ||
|
|
dfb527fc29 | ||
|
|
ac2332a592 | ||
|
|
a530624fb2 | ||
|
|
0e3ecc3a51 | ||
|
|
7fac75c6b6 | ||
|
|
7ca0b35e45 | ||
|
|
cb0fde4908 | ||
|
|
75e810e42e | ||
|
|
37cc77dfc5 | ||
|
|
075bf406fd | ||
|
|
71c81510f7 | ||
|
|
51fd16409f | ||
|
|
3f5345af6e | ||
|
|
649d9bdb2a | ||
|
|
f4b04698d8 | ||
|
|
240ab18eaf | ||
|
|
096dba2337 | ||
|
|
26780f94e5 | ||
|
|
faa52e2c68 | ||
|
|
e3e74ac0e9 | ||
|
|
de1bdb708c | ||
|
|
9b2b933998 | ||
|
|
fb5a72fdc0 | ||
|
|
86c5992630 | ||
|
|
06d2139ebf | ||
|
|
15ba4f40cd | ||
|
|
2d70037913 | ||
|
|
34108b9229 | ||
|
|
64a323e7e7 | ||
|
|
372470c77b | ||
|
|
3cef245728 | ||
|
|
aa54a2b1a9 | ||
|
|
f8c430be33 | ||
|
|
7692c18282 | ||
|
|
469d0861af | ||
|
|
208c5bc5b0 | ||
|
|
82efd9941f | ||
|
|
48e9043517 | ||
|
|
c3d8fecad0 | ||
|
|
d96eb847d7 | ||
|
|
c8e793efab |
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
12
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
12
.github/ISSUE_TEMPLATE/bug-issue.yml
vendored
@@ -59,3 +59,15 @@ body:
|
||||
description: Add additional context here.
|
||||
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
|
||||
14
.github/ISSUE_TEMPLATE/feature-issue.yml
vendored
14
.github/ISSUE_TEMPLATE/feature-issue.yml
vendored
@@ -43,4 +43,16 @@ body:
|
||||
label: Additional context
|
||||
description: Add additional context here.
|
||||
validations:
|
||||
required: false
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: acknowledgements
|
||||
attributes:
|
||||
label: Acknowledgements
|
||||
description: Your issue will be closed if you haven't done these steps.
|
||||
options:
|
||||
- label: I have searched the existing issues and this is a new and no duplicate or related to another open issue.
|
||||
required: true
|
||||
- label: I have written a short but informative title.
|
||||
required: true
|
||||
- label: I filled out all of the requested information in this issue properly.
|
||||
required: true
|
||||
2
.github/config.yml
vendored
Normal file
2
.github/config.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
firstPRMergeComment: >
|
||||
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.
|
||||
25
.github/workflows/pull_request.yml
vendored
Normal file
25
.github/workflows/pull_request.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: PR to main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
MESSAGE: merge branch `${{ github.head_ref || github.ref_name }}` to `main`
|
||||
|
||||
jobs:
|
||||
pull-request:
|
||||
name: Open pull request
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Open pull request
|
||||
uses: repo-sync/pull-request@v2
|
||||
with:
|
||||
destination_branch: 'main'
|
||||
pr_title: 'chore: ${{ env.MESSAGE }}'
|
||||
pr_body: 'This pull request will ${{ env.MESSAGE }}.'
|
||||
pr_draft: true
|
||||
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
@@ -1,4 +1,5 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -9,32 +10,37 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# Make sure the release step uses its own credentials:
|
||||
# https://github.com/cycjimmy/semantic-release-action#private-packages
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Setup JDK
|
||||
uses: actions/setup-java@v2
|
||||
- name: Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "lts/*"
|
||||
- name: Build with Gradle
|
||||
path: |
|
||||
${{ runner.home }}/.gradle/caches
|
||||
${{ runner.home }}/.gradle/wrapper
|
||||
.gradle
|
||||
build
|
||||
node_modules
|
||||
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
|
||||
- name: Build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./gradlew build clean
|
||||
# Cleaning is necessary to avoid uploading two identical artifacts with different versions
|
||||
run: ./gradlew clean --no-daemon
|
||||
- name: Setup semantic-release
|
||||
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin -D
|
||||
run: npm install
|
||||
- name: Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npx semantic-release
|
||||
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
|
||||
run: npm exec semantic-release
|
||||
|
||||
19
.github/workflows/update-documentation.yml
vendored
Normal file
19
.github/workflows/update-documentation.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Update documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- docs/**
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
name: Dispatch event to documentation repository
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
|
||||
repository: revanced/revanced-documentation
|
||||
event-type: update-documentation
|
||||
client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -74,6 +74,7 @@ cmake-build-*/
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
.idea
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
@@ -111,4 +112,11 @@ gradle-app.setting
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# ReVanced CLI
|
||||
revanced-cache/
|
||||
options.toml
|
||||
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
7
.idea/discord.xml
generated
7
.idea/discord.xml
generated
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
||||
15
.idea/git_toolbox_prj.xml
generated
15
.idea/git_toolbox_prj.xml
generated
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
10
.idea/misc.xml
generated
10
.idea/misc.xml
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="azul-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
14
.idea/vcs.xml
generated
14
.idea/vcs.xml
generated
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CommitMessageInspectionProfile">
|
||||
<profile version="1.0">
|
||||
<inspection_tool class="CommitFormat" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="CommitNamingConvention" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../revanced-patcher" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../revanced-patches" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
22
.releaserc
22
.releaserc
@@ -7,11 +7,13 @@
|
||||
}
|
||||
],
|
||||
"plugins": [
|
||||
["@semantic-release/commit-analyzer", {
|
||||
"releaseRules": [
|
||||
{"type": "build", "release": "patch"}
|
||||
]
|
||||
}],
|
||||
[
|
||||
"@semantic-release/commit-analyzer", {
|
||||
"releaseRules": [
|
||||
{ "type": "build", "scope": "Needs bump", "release": "patch" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"gradle-semantic-release-plugin",
|
||||
@@ -31,7 +33,15 @@
|
||||
{
|
||||
"path": "build/libs/*all.jar"
|
||||
}
|
||||
]
|
||||
],
|
||||
successComment: false
|
||||
}
|
||||
],
|
||||
[
|
||||
"@saithodev/semantic-release-backmerge",
|
||||
{
|
||||
backmergeBranches: [{"from": "main", "to": "dev"}],
|
||||
clearWorkspace: true
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
533
CHANGELOG.md
533
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 💻 ReVanced CLI
|
||||
|
||||
Command line application to use ReVanced.
|
||||
@@ -1,49 +1,51 @@
|
||||
plugins {
|
||||
kotlin("jvm") version "1.7.0"
|
||||
id("com.github.johnrengelman.shadow") version "7.1.2"
|
||||
kotlin("jvm") version "1.8.20"
|
||||
alias(libs.plugins.shadow)
|
||||
}
|
||||
|
||||
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 {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
maven {
|
||||
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
|
||||
credentials {
|
||||
username = githubUsername
|
||||
password = githubPassword
|
||||
}
|
||||
}
|
||||
maven { url = uri("https://jitpack.io") }
|
||||
google()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation(kotlin("reflect"))
|
||||
|
||||
implementation("app.revanced:revanced-patcher:3.3.1")
|
||||
implementation("info.picocli:picocli:4.6.3")
|
||||
implementation("com.android.tools.build:apksig:7.2.1")
|
||||
implementation("com.github.revanced:jadb:master-SNAPSHOT") // updated fork
|
||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||
implementation(libs.revanced.patcher)
|
||||
implementation(libs.kotlin.reflect)
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
implementation(libs.picocli)
|
||||
implementation(libs.jadb) // Updated fork
|
||||
implementation(libs.apksig)
|
||||
implementation(libs.bcpkix.jdk15on)
|
||||
implementation(libs.jackson.module.kotlin)
|
||||
testImplementation(libs.kotlin.test)
|
||||
}
|
||||
|
||||
kotlin { jvmToolchain(11) }
|
||||
|
||||
tasks {
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events("PASSED", "SKIPPED", "FAILED")
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
expand("projectVersion" to project.version)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
manifest {
|
||||
attributes("Main-Class" to "app.revanced.cli.command.MainCommandKt")
|
||||
}
|
||||
minimize {
|
||||
exclude(dependency("org.jetbrains.kotlin:.*"))
|
||||
exclude(dependency("org.bouncycastle:.*"))
|
||||
exclude(dependency("app.revanced:.*"))
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
shadowJar {
|
||||
manifest {
|
||||
attributes("Main-Class" to "app.revanced.cli.main.MainKt")
|
||||
attributes("Implementation-Title" to project.name)
|
||||
attributes("Implementation-Version" to project.version)
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy task to fix the Gradle semantic-release plugin.
|
||||
// Remove this if you forked it to support building only.
|
||||
// Tracking issue: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435
|
||||
|
||||
17
docs/0_prerequisites.md
Normal file
17
docs/0_prerequisites.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 💼 Prerequisites
|
||||
|
||||
To use ReVanced CLI, you will need to fulfil specific requirements.
|
||||
|
||||
## 🤝 Requirements
|
||||
|
||||
- Java SDK 11 (Azul Zulu JDK or OpenJDK)
|
||||
- [Android Debug Bridge (adb)](https://developer.android.com/studio/command-line/adb) if you want to install the patched APK file on your device
|
||||
- An ABI other than ARMv7 such as x86 or x86-64 (or a custom AAPT binary that supports ARMv7)
|
||||
- ReVanced Patches
|
||||
- ReVanced Integrations, if the patches require it
|
||||
|
||||
## ⏭️ Whats next
|
||||
|
||||
The following section will show you how to use ReVanced CLI.
|
||||
|
||||
Continue: [🛠️ Using ReVanced CLI](1_usage.md)
|
||||
111
docs/1_usage.md
Normal file
111
docs/1_usage.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# 🛠️ Using ReVanced CLI
|
||||
|
||||
Learn how to ReVanced CLI.
|
||||
|
||||
## ⚡ Setup ADB
|
||||
|
||||
1. Ensure that ADB is working
|
||||
|
||||
```bash
|
||||
adb shell exit
|
||||
```
|
||||
|
||||
Optionally, you can install the patched APK file on your device by mounting it on top of the original APK file.
|
||||
You will need root permissions for this. Check if you have root permissions by running the following command:
|
||||
|
||||
```bash
|
||||
adb shell su -c exit
|
||||
```
|
||||
|
||||
2. Get your device's serial
|
||||
|
||||
```bash
|
||||
adb devices
|
||||
```
|
||||
|
||||
## 🔨 Using ReVanced CLI
|
||||
|
||||
- ### ⚙️ Show all available options for ReVanced CLI
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar -h
|
||||
```
|
||||
|
||||
- ### 📃 List patches from supplied patch bundles
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar list-patches \
|
||||
--with-packages \
|
||||
--with-versions \
|
||||
--with-options \
|
||||
revanced-patches.jar [<patch-bundle> ...]
|
||||
```
|
||||
|
||||
- ### ⚙️ Generate options from patches using ReVanced CLI
|
||||
|
||||
This will generate an `options.json` file for the patches from a list of supplied patch bundles.
|
||||
The file can be supplied to ReVanced CLI later on.
|
||||
|
||||
- ```bash
|
||||
java -jar revanced-cli.jar options \
|
||||
--path options.json \
|
||||
--overwrite \
|
||||
revanced-patches.jar [<patch-bundle> ...]
|
||||
```
|
||||
|
||||
> **Note**: A default `options.json` file will be automatically generated, if it does not exist
|
||||
without any need for intervention when using the `patch` command.
|
||||
|
||||
- ### 💉 Use ReVanced CLI to patch an APK file but install without root permissions
|
||||
|
||||
This will install the patched APK file regularly on your device.
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar patch \
|
||||
--patch-bundle revanced-patches.jar \
|
||||
--out output.apk \
|
||||
--device-serial <device-serial> \
|
||||
input.apk
|
||||
```
|
||||
|
||||
- ### 👾 Use ReVanced CLI to patch an APK file but install with root permissions
|
||||
|
||||
This will install the patched APK file on your device by mounting it on top of the original APK file.
|
||||
|
||||
```bash
|
||||
adb install input.apk
|
||||
java -jar revanced-cli.jar patch \
|
||||
--patch-bundle revanced-patches.jar \
|
||||
--include some-other-patch \
|
||||
--exclude some-patch \
|
||||
--out patched-output.apk \
|
||||
--device-serial <device-serial> \
|
||||
--mount \
|
||||
input.apk
|
||||
```
|
||||
|
||||
> **Note**: Some patches may require integrations
|
||||
such as [ReVanced Integrations](https://github.com/revanced/revanced-integrations).
|
||||
Supply them with the option `--merge`. If any patches accepted by ReVanced Patcher require ReVanced Integrations,
|
||||
they will be merged into the APK file automatically.
|
||||
|
||||
- ### 🗑️ Uninstall a patched APK file
|
||||
```bash
|
||||
java -jar revanced-cli.jar utility uninstall \
|
||||
--package-name <package-name> \
|
||||
<device-serial>
|
||||
```
|
||||
|
||||
> **Note**: You can unmount an APK file
|
||||
with the option `--unmount`.
|
||||
|
||||
- ### ️ ⚙️ Manually install an APK file
|
||||
|
||||
```bash
|
||||
java -jar revanced-cli.jar utility install \
|
||||
-a input.apk \
|
||||
<device-serial>
|
||||
```
|
||||
|
||||
> **Note**: You can mount an APK file
|
||||
by supplying the package name of the app to mount the supplied APK file to over the option `--mount`.
|
||||
8
docs/README.md
Normal file
8
docs/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 💻 Documentation and guides of ReVanced CLI
|
||||
|
||||
This documentation explains how to use [ReVanced CLI](https://github.com/revanced/revanced-cli).
|
||||
|
||||
## 📖 Table of contents
|
||||
|
||||
1. [💼 Prerequisites](0_prerequisites.md)
|
||||
2. [🛠️ Using ReVanced CLI](1_usage.md)
|
||||
@@ -1,2 +1,4 @@
|
||||
org.gradle.parallel = true
|
||||
org.gradle.caching = true
|
||||
kotlin.code.style = official
|
||||
version = 2.8.3
|
||||
version = 3.0.0-dev.8
|
||||
|
||||
25
gradle/libs.versions.toml
Normal file
25
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,25 @@
|
||||
[versions]
|
||||
shadow = "8.1.1"
|
||||
apksig = "8.1.0"
|
||||
bcpkix-jdk15on = "1.70"
|
||||
jackson-module-kotlin = "2.14.3"
|
||||
jadb = "2531a28109"
|
||||
kotlin-reflect = "1.9.0"
|
||||
kotlin-test = "1.8.20-RC"
|
||||
kotlinx-coroutines-core = "1.7.1"
|
||||
picocli = "4.7.3"
|
||||
revanced-patcher = "14.1.0"
|
||||
|
||||
[libraries]
|
||||
apksig = { module = "com.android.tools.build:apksig", version.ref = "apksig" }
|
||||
bcpkix-jdk15on = { module = "org.bouncycastle:bcpkix-jdk15on", version.ref = "bcpkix-jdk15on" }
|
||||
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin", version.ref = "jackson-module-kotlin" }
|
||||
jadb = { module = "com.github.revanced:jadb", version.ref = "jadb" }
|
||||
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" }
|
||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }
|
||||
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
|
||||
picocli = { module = "info.picocli:picocli", version.ref = "picocli" }
|
||||
revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
|
||||
|
||||
[plugins]
|
||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
15
gradlew.bat
vendored
15
gradlew.bat
vendored
@@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -25,7 +25,8 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
6580
package-lock.json
generated
Normal file
6580
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
9
package.json
Normal file
9
package.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@saithodev/semantic-release-backmerge": "^3.1.0",
|
||||
"@semantic-release/changelog": "^6.0.2",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"gradle-semantic-release-plugin": "^1.7.6",
|
||||
"semantic-release": "^20.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1 +1,23 @@
|
||||
val githubUsername: String = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR")
|
||||
val githubPassword: String = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN")
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
google()
|
||||
maven { url = uri("https://jitpack.io") }
|
||||
listOf("revanced-patcher", "jadb").forEach { repo ->
|
||||
maven {
|
||||
url = uri("https://maven.pkg.github.com/revanced/$repo")
|
||||
credentials {
|
||||
username = githubUsername
|
||||
password = githubPassword
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "revanced-cli"
|
||||
@@ -1,12 +0,0 @@
|
||||
package app.revanced.cli.aligning
|
||||
|
||||
import app.revanced.cli.command.MainCommand.logger
|
||||
import app.revanced.utils.signing.align.ZipAligner
|
||||
import java.io.File
|
||||
|
||||
object Aligning {
|
||||
fun align(inputFile: File, outputFile: File) {
|
||||
logger.info("Aligning ${inputFile.name} to ${outputFile.name}")
|
||||
ZipAligner.align(inputFile, outputFile)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package app.revanced.cli.command
|
||||
|
||||
import app.revanced.patcher.PatchBundleLoader
|
||||
import app.revanced.patcher.annotation.Package
|
||||
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
|
||||
import app.revanced.patcher.extensions.PatchExtensions.description
|
||||
import app.revanced.patcher.extensions.PatchExtensions.options
|
||||
import app.revanced.patcher.extensions.PatchExtensions.patchName
|
||||
import app.revanced.patcher.patch.PatchClass
|
||||
import app.revanced.patcher.patch.PatchOption
|
||||
import picocli.CommandLine.*
|
||||
import picocli.CommandLine.Help.Visibility.ALWAYS
|
||||
import java.io.File
|
||||
import java.util.logging.Logger
|
||||
|
||||
|
||||
@Command(name = "list-patches", description = ["List patches from supplied patch bundles"])
|
||||
internal object ListPatchesCommand : Runnable {
|
||||
private val logger = Logger.getLogger(ListPatchesCommand::class.java.name)
|
||||
|
||||
@Parameters(
|
||||
description = ["Paths to patch bundles"], arity = "1..*"
|
||||
)
|
||||
private lateinit var patchBundles: Array<File>
|
||||
|
||||
@Option(
|
||||
names = ["-d", "--with-descriptions"], description = ["List their descriptions"], showDefaultValue = ALWAYS
|
||||
)
|
||||
private var withDescriptions: Boolean = true
|
||||
|
||||
@Option(
|
||||
names = ["-p", "--with-packages"],
|
||||
description = ["List the packages the patches are compatible with"],
|
||||
showDefaultValue = ALWAYS
|
||||
)
|
||||
private var withPackages: Boolean = false
|
||||
|
||||
@Option(
|
||||
names = ["-v", "--with-versions"],
|
||||
description = ["List the versions of the apps the patches are compatible with"],
|
||||
showDefaultValue = ALWAYS
|
||||
)
|
||||
private var withVersions: Boolean = false
|
||||
|
||||
@Option(
|
||||
names = ["-o", "--with-options"], description = ["List the options of the patches"], showDefaultValue = ALWAYS
|
||||
)
|
||||
private var withOptions: Boolean = false
|
||||
|
||||
override fun run() {
|
||||
fun Package.buildString() = buildString {
|
||||
if (withVersions && versions.isNotEmpty()) {
|
||||
appendLine("Package name: $name")
|
||||
appendLine("Compatible versions:")
|
||||
append(versions.joinToString("\n") { version -> version }.prependIndent("\t"))
|
||||
} else append("Package name: $name")
|
||||
}
|
||||
|
||||
fun PatchOption<*>.buildString() = buildString {
|
||||
appendLine("Title: $title")
|
||||
appendLine("Description: $description")
|
||||
|
||||
value?.let {
|
||||
appendLine("Key: $key")
|
||||
append("Value: $it")
|
||||
} ?: append("Key: $key")
|
||||
}
|
||||
|
||||
fun PatchClass.buildString() = buildString {
|
||||
append("Name: $patchName")
|
||||
|
||||
if (withDescriptions) append("\nDescription: $description")
|
||||
|
||||
if (withOptions && options != null) {
|
||||
appendLine("\nOptions:")
|
||||
append(
|
||||
options!!.joinToString("\n\n") { option -> option.buildString() }.prependIndent("\t")
|
||||
)
|
||||
}
|
||||
|
||||
if (withPackages && compatiblePackages != null) {
|
||||
appendLine("\nCompatible packages:")
|
||||
append(
|
||||
compatiblePackages!!.joinToString("\n") { it.buildString() }.prependIndent("\t")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
logger.info(PatchBundleLoader.Jar(*patchBundles).joinToString("\n\n") { it.buildString() })
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user