@@ -13,10 +13,12 @@ java -jar revanced-cli.jar -h
13
13
## 📃 List patches
14
14
15
15
``` bash
16
- java -jar revanced-cli.jar list-patches --with-descriptions --with- packages --with-versions --with-options --with-universal-patches revanced-patches.rvp
16
+ java -jar revanced-cli.jar list-patches --with-packages --with-versions --with-options revanced-patches.rvp
17
17
```
18
18
19
- ## 💉 Patch an app with the default list of patches
19
+ ## 💉 Patch an app
20
+
21
+ To patch an app using the default list of patches, use the ` patch ` command:
20
22
21
23
``` bash
22
24
java -jar revanced-cli.jar patch -b revanced-patches.rvp input.apk
@@ -28,22 +30,37 @@ You can also use multiple patch bundles:
28
30
java -jar revanced-cli.jar patch -b revanced-patches.rvp -b another-patches.rvp input.apk
29
31
```
30
32
31
- To manually include or exclude patches, use the options ` -i ` and ` -e ` .
32
- Keep in mind the name of the patch must be an exact match .
33
- You can also use the options ` --ii ` and ` --ie ` to include or exclude patches by their index
34
- if two patches have the same name .
35
- To know the indices of patches, use the option ` --with-indices ` when listing patches :
33
+ To change the default set of used patches, use the option ` -i ` or ` -e ` to use or disuse specific patches .
34
+ You can use the ` list-patches ` command to see which patches are used by default .
35
+
36
+ To only use specific patches, you can use the option ` --exclusive ` combined with ` -i ` .
37
+ Remember that the options ` -i ` and ` -e ` match the patch's name exactly. Here is an example :
36
38
37
39
``` bash
38
- java -jar revanced-cli.jar list- patches --with-indices revanced-patches.rvp
40
+ java -jar revanced-cli.jar patch -b revanced- patches.rvp --exclusive -i " Patch name " -i " Another patch name " input.apk
39
41
```
40
42
41
- Then you can use the indices to include or exclude patches:
43
+ You can also use the options ` --ii ` and ` --ie ` to use or disuse patches by their index.
44
+ This is useful, if two patches happen to have the same name.
45
+ To know the indices of patches, use the command ` list-patches ` :
46
+
47
+ ``` bash
48
+ java -jar revanced-cli.jar list-patches revanced-patches.rvp
49
+ ```
50
+
51
+ Then you can use the indices to use or disuse patches:
42
52
43
53
``` bash
44
54
java -jar revanced-cli.jar patch -b revanced-patches.rvp --ii 123 --ie 456 input.apk
45
55
```
46
56
57
+ You can combine the option ` -i ` , ` -e ` , ` --ii ` , ` --ie ` and ` --exclusive ` . Here is an example:
58
+
59
+ ``` bash
60
+ java -jar revanced-cli.jar patch -b revanced-patches.rvp --exclusive -i " Patch name" --ii 123 input.apk
61
+ ```
62
+
63
+
47
64
> [ !TIP]
48
65
> You can use the option ` -d ` to automatically install the patched app after patching.
49
66
> Make sure ADB is working:
@@ -62,7 +79,61 @@ java -jar revanced-cli.jar patch -b revanced-patches.rvp --ii 123 --ie 456 input
62
79
> adb install input.apk
63
80
> ` ` `
64
81
65
- # # 📦 Install an app manually
82
+ Patches can have options you can set using the option ` -O` alongside the option to include the patch by name or index.
83
+ To know the options of a patch, use the option ` --with-options` when listing patches:
84
+
85
+ ` ` ` bash
86
+ java -jar revanced-cli.jar list-patches --with-options revanced-patches.rvp
87
+ ```
88
+
89
+ Each patch can have multiple options. You can set them using the option ` -O ` .
90
+ For example, to set the options for the patch with the name ` Patch name `
91
+ with the key ` key1 ` and ` key2 ` to ` value1 ` and ` value2 ` respectively, use the following command:
92
+
93
+ ``` bash
94
+ java -jar revanced-cli.jar patch -b revanced-patches.rvp -i " Patch name" -Okey1=value1 -Okey2=value2 input.apk
95
+ ```
96
+
97
+ If you want to set a value to ` null ` , you can omit the value:
98
+
99
+ ``` bash
100
+ java -jar revanced-cli.jar patch -b revanced-patches.rvp -i " Patch name" -Okey1 input.apk
101
+ ```
102
+
103
+ > [ !WARNING]
104
+ > Option values are usually typed. If you set a value with the wrong type, the patch can fail.
105
+ > Option value types can be seen when listing patches with the option ` --with-options ` .
106
+ >
107
+ > Example option values:
108
+ >
109
+ > - String: ` string `
110
+ > - Boolean: ` true ` , ` false `
111
+ > - Integer: ` 123 `
112
+ > - Double: ` 1.0 `
113
+ > - Float: ` 1.0f `
114
+ > - Long: ` 1234567890 ` , ` 1L `
115
+ > - List: ` [item1,item2,item3] `
116
+ > - List of type ` Any ` : ` [item1,123,true,1.0] `
117
+ > - Empty list of type ` Any ` : ` [] `
118
+ > - Typed empty list: ` int[] `
119
+ > - Typed and nested empty list: ` [int[]] `
120
+ > - List with null value and two empty strings: ` [null,\'\',\"\"] `
121
+ >
122
+ > Quotes and commas escaped in strings (` \" ` , ` \' ` , ` \, ` ) are parsed as part of the string.
123
+ > List items are recursively parsed, so you can escape values in lists:
124
+ >
125
+ > - Escaped integer as a string: ` [\'123\'] `
126
+ > - Escaped boolean as a string: ` [\'true\'] `
127
+ > - Escaped list as a string: ` [\'[item1,item2]\'] `
128
+ > - Escaped null value as a string: ` [\'null\'] `
129
+ > - List with an integer, an integer as a string and a string with a comma, and an escaped list: [ ` 123,\'123\',str\,ing ` ,` \'[]\' ` ]
130
+ >
131
+ > Example command with an escaped integer as a string:
132
+ >
133
+ > ``` bash
134
+ > java -jar revanced-cli.jar -b revanced-patches.rvp -i " Patch name" -OstringKey=\' 1\' input.apk
135
+ > ` ` `
136
+ # # 📦 Install an app manually
66
137
67
138
` ` ` bash
68
139
java -jar revanced-cli.jar utility install -a input.apk
0 commit comments