Skip to content

Commit 5ad20c0

Browse files
chore: Merge branch dev to main (#43)
2 parents 4eb90c4 + d7e2b0e commit 5ad20c0

File tree

18 files changed

+4287
-4741
lines changed

18 files changed

+4287
-4741
lines changed

.github/workflows/build_pull_request.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ jobs:
2323
env:
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
run: ./gradlew build --no-daemon
26+
27+
- name: Upload artifacts
28+
uses: actions/upload-artifact@v6
29+
with:
30+
name: morphe-patches
31+
path: build/libs/morphe-cli-*-all.jar
32+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ google-services.json
3232

3333
# Android Profiling
3434
*.hprof
35+
36+
# NPM modules
37+
node_modules/

.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040
],
4141
[
42-
"@saithodev/semantic-release-backmerge",
42+
"@cleyrop-org/semantic-release-backmerge",
4343
{
4444
backmergeBranches: [{"from": "main", "to": "dev"}],
4545
clearWorkspace: true

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
# [1.4.0-dev.6](https://github.com/MorpheApp/morphe-cli/compare/v1.4.0-dev.5...v1.4.0-dev.6) (2026-02-19)
2+
3+
4+
### Features
5+
6+
* Add `--options-file` json patch/option configuration ([#53](https://github.com/MorpheApp/morphe-cli/issues/53)) ([44943da](https://github.com/MorpheApp/morphe-cli/commit/44943da5f40f8ec37364d4f67b9d2e82d2b5e98f))
7+
8+
# [1.4.0-dev.5](https://github.com/MorpheApp/morphe-cli/compare/v1.4.0-dev.4...v1.4.0-dev.5) (2026-02-14)
9+
10+
11+
### Bug Fixes
12+
13+
* Do not log patch name more than once if disabled ([#49](https://github.com/MorpheApp/morphe-cli/issues/49)) ([b980bb8](https://github.com/MorpheApp/morphe-cli/commit/b980bb8e0b3bf8eb4c7af1fe289ff1b63c437fa3))
14+
15+
# [1.4.0-dev.4](https://github.com/MorpheApp/morphe-cli/compare/v1.4.0-dev.3...v1.4.0-dev.4) (2026-02-14)
16+
17+
18+
### Bug Fixes
19+
20+
* Allow enabling/disabling patches using case insensitive patch names ([#48](https://github.com/MorpheApp/morphe-cli/issues/48)) ([03a280a](https://github.com/MorpheApp/morphe-cli/commit/03a280abea6c9187eec22548707eb889b0252c3f))
21+
22+
# [1.4.0-dev.3](https://github.com/MorpheApp/morphe-cli/compare/v1.4.0-dev.2...v1.4.0-dev.3) (2026-02-12)
23+
24+
25+
### Features
26+
27+
* Add `--continue-on-error` argument, return non zero exit code if patching fails ([#47](https://github.com/MorpheApp/morphe-cli/issues/47)) ([255646b](https://github.com/MorpheApp/morphe-cli/commit/255646b250237087ab7d7f9733daa6751b7e4016))
28+
29+
# [1.4.0-dev.2](https://github.com/MorpheApp/morphe-cli/compare/v1.4.0-dev.1...v1.4.0-dev.2) (2026-02-10)
30+
31+
32+
### Features
33+
34+
* Add `--striplibs` argument to strip unwanted architectures ([#46](https://github.com/MorpheApp/morphe-cli/issues/46)) ([7442d94](https://github.com/MorpheApp/morphe-cli/commit/7442d942d392b3e1e9ce959c30db8460bffee8d6))
35+
36+
# [1.4.0-dev.1](https://github.com/MorpheApp/morphe-cli/compare/v1.3.0...v1.4.0-dev.1) (2026-02-07)
37+
38+
39+
### Features
40+
41+
* Support patching APKM bundles ([#40](https://github.com/MorpheApp/morphe-cli/issues/40)) ([bfe43d0](https://github.com/MorpheApp/morphe-cli/commit/bfe43d0b747d0e336a3f36f048e85907a140f1fc))
42+
143
# [1.3.0](https://github.com/MorpheApp/morphe-cli/compare/v1.2.0...v1.3.0) (2026-02-04)
244

345

NOTICE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ outside this repository, and do not change the terms of the GPLv3 license.
88
For the full license text, see the LICENSE file or:
99
https://www.gnu.org/licenses/gpl-3.0.html
1010

11+
7b. Attribution Requirement
12+
---------------------------
13+
14+
Any distributed source code that incorporates Morphe CLI,
15+
including modified versions and derivative works, must retain this NOTICE file.
16+
17+
https://morphe.software
18+
1119
7c. Project Name Restriction
1220
----------------------------
1321

build.gradle.kts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,33 @@ repositories {
3232
maven { url = uri("https://jitpack.io") }
3333
}
3434

35+
val apkEditorLib by configurations.creating
36+
37+
val strippedApkEditorLib by tasks.registering(org.gradle.jvm.tasks.Jar::class) {
38+
archiveFileName.set("APKEditor-cli.jar")
39+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
40+
doFirst {
41+
from(apkEditorLib.resolve().map { zipTree(it) })
42+
}
43+
exclude(
44+
"org/xmlpull/**",
45+
"antlr/**",
46+
"org/antlr/**",
47+
"com/beust/jcommander/**",
48+
"javax/annotation/**",
49+
"smali.properties",
50+
"baksmali.properties"
51+
)
52+
}
53+
3554
dependencies {
3655
implementation(libs.morphe.patcher)
3756
implementation(libs.morphe.library)
3857
implementation(libs.kotlinx.coroutines.core)
3958
implementation(libs.kotlinx.serialization.json)
4059
implementation(libs.picocli)
60+
apkEditorLib(files("$rootDir/libs/APKEditor-1.4.7.jar"))
61+
implementation(files(strippedApkEditorLib))
4162

4263
testImplementation(libs.kotlin.test)
4364
}
@@ -65,7 +86,11 @@ tasks {
6586
}
6687

6788
shadowJar {
68-
exclude("/prebuilt/linux/aapt", "/prebuilt/windows/aapt.exe", "/prebuilt/*/aapt_*")
89+
exclude(
90+
"/prebuilt/linux/aapt",
91+
"/prebuilt/windows/aapt.exe",
92+
"/prebuilt/*/aapt_*",
93+
)
6994
minimize {
7095
exclude(dependency("org.bouncycastle:.*"))
7196
exclude(dependency("app.morphe:morphe-patcher"))

docs/1_usage.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You can list patches, patch an app, uninstall, and install an app.
77
## 🚀 Show all commands
88

99
```bash
10-
java -jar morphe-cli.jar -h
10+
java -jar morphe-cli.jar --help
1111
```
1212

1313
## 📃 List patches
@@ -21,13 +21,7 @@ java -jar morphe-cli.jar list-patches --with-packages --with-versions --with-opt
2121
To patch an app using the default list of patches, use the `patch` command:
2222

2323
```bash
24-
java -jar morphe-cli.jar patch -p patches.mpp input.apk
25-
```
26-
27-
You can also use multiple MPP files:
28-
29-
```bash
30-
java -jar morphe-cli.jar patch -p patches.mpp -p another-patches.mpp input.apk
24+
java -jar morphe-cli.jar patch --patches patches.mpp input.apk
3125
```
3226

3327
To change the default set of enabled or disabled patches, use the option `-e` or `-d` to enable or disable specific patches.
@@ -37,7 +31,7 @@ To only enable specific patches, you can use the option `--exclusive` combined w
3731
Remember that the options `-e` and `-d` match the patch's name exactly. Here is an example:
3832

3933
```bash
40-
java -jar morphe-cli.jar patch -p patches.mpp --exclusive -e "Patch name" -e "Another patch name" input.apk
34+
java -jar morphe-cli.jar patch --patches patches.mpp --exclusive -e "Patch name" -e "Another patch name" input.apk
4135
```
4236

4337
You can also use the options `--ei` or `--di` to enable or disable patches by their index.
@@ -51,13 +45,13 @@ java -jar morphe-cli.jar list-patches patches.mpp
5145
Then you can use the indices to enable or disable patches:
5246

5347
```bash
54-
java -jar morphe-cli.jar patch -p patches.mpp --ei 123 --di 456 input.apk
48+
java -jar morphe-cli.jar patch --patches patches.mpp --ei 123 --di 456 input.apk
5549
```
5650

5751
You can combine the option `-e`, `-d`, `--ei`, `--di` and `--exclusive`. Here is an example:
5852

5953
```bash
60-
java -jar morphe-cli.jar patch -p patches.mpp --exclusive -e "Patch name" --ei 123 input.apk
54+
java -jar morphe-cli.jar patch --patches patches.mpp --exclusive -e "Patch name" --ei 123 input.apk
6155
```
6256

6357

@@ -79,6 +73,8 @@ java -jar morphe-cli.jar patch -p patches.mpp --exclusive -e "Patch name" --ei 1
7973
> adb install input.apk
8074
> ```
8175
76+
## 📃 Patch options
77+
8278
Patches can have options you can set using the option `-O` alongside the option to include the patch by name or index.
8379
To know the options of a patch, use the option `--with-options` when listing patches:
8480
@@ -91,15 +87,36 @@ For example, to set the options for the patch with the name `Patch name`
9187
with the key `key1` and `key2` to `value1` and `value2` respectively, use the following command:
9288

9389
```bash
94-
java -jar morphe-cli.jar patch -p patches.mpp -e "Patch name" -Okey1=value1 -Okey2=value2 input.apk
90+
java -jar morphe-cli.jar patch --patches patches.mpp -e "Patch name" -Okey1=value1 -Okey2=value2 input.apk
9591
```
9692

9793
If you want to set the option value to `null`, you can omit the value:
9894

9995
```bash
100-
java -jar morphe-cli.jar patch -p patches.mpp -i "Patch name" -Okey1 input.apk
96+
java -jar morphe-cli.jar patch --patches patches.mpp -i "Patch name" -Okey1 input.apk
97+
```
98+
99+
## 📃 Patch option json
100+
101+
Generate a template patch options file, or update your existing file (remove invalid json, add missing json):
102+
```bash
103+
java -jar morphe-cli.jar options-create --patches patches.mpp --out options.json
101104
```
102105

106+
After modifying the json file to include/exclude patches or set any patch options, use the file with `--options-file`:
107+
```bash
108+
java -jar morphe-cli.jar patch --patches patches.mpp --options-file options.json input.apk
109+
```
110+
111+
To patch with an options.json and update the json (same functionality as `options-create` above),
112+
then add parameter `--options-update`:
113+
```bash
114+
java -jar morphe-cli.jar patch --patches patches.mpp --options-file options.json --options-update input.apk
115+
```
116+
117+
118+
## 📃 List patches
119+
103120
> [!WARNING]
104121
> Option values are usually typed. If you set a value with the wrong type, the patch can fail.
105122
> The value types can be seen when listing patches with the option `--with-options`.
@@ -131,7 +148,7 @@ java -jar morphe-cli.jar patch -p patches.mpp -i "Patch name" -Okey1 input.apk
131148
> Example command with an escaped integer as a string:
132149
>
133150
> ```bash
134-
> java -jar morphe-cli.jar -p patches.mpp -e "Patch name" -OstringKey=\'1\' input.apk
151+
> java -jar morphe-cli.jar --patches patches.mpp -e "Patch name" -OstringKey=\'1\' input.apk
135152
> ```
136153
## 📦 Install an app manually
137154

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
org.gradle.parallel = true
22
org.gradle.caching = true
33
kotlin.code.style = official
4-
version = 1.3.0
4+
version = 1.4.0-dev.6

libs/APKEditor-1.4.7.jar

7.32 MB
Binary file not shown.

0 commit comments

Comments
 (0)