@@ -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
2121To 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
3327To 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
3731Remember 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
4337You 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
5145Then 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
5751You 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+
8278Patches can have options you can set using the option ` -O` alongside the option to include the patch by name or index.
8379To 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`
9187with 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
9793If 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
0 commit comments