Skip to content

Commit

Permalink
new flags system, code cleanups/improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
XDream8 committed Oct 16, 2023
1 parent 6f6c5ba commit f6772b3
Show file tree
Hide file tree
Showing 3 changed files with 318 additions and 280 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cache/
revanced-cache/
*cache/
revanced*.keystore
*.jar
*.apk
*.aria2
*.st
*aapt2*
options.toml
options.*
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,22 @@ $ cd revanced-creator
$ ./patch.sh
```

### options
## options
there are two ways to pass config options:
- flags
- environment variables

#### using custom apk
### using cli flags
to see all available flags:
```sh
$ ./patch.sh -h
```
usage:
```sh
$ ./patch.sh --patch=youtube --additional-args="-e <patch>" --downloader="curl"
```

### using custom apk
here is how to patch user downloaded reddit apk\
(!) if apk_filename is not set, script uses find to select an apk from the directory you are in randomly(if there is only one apk in the directory you are in it is fine)\
(?) output_apk is optional
Expand All @@ -59,7 +71,7 @@ $ export output_apk=revanced-reddit.apk
$ ./patch.sh
```

#### additional_args
### additional_args

we include `enable-wide-searchbar` and `swipe-controls` patch and exclude `hide-shorts-button` here

Expand All @@ -68,14 +80,14 @@ $ export additional_args="-i enable-wide-searchbar -i swipe-controls -e hide-sho
$ ./patch.sh
```

#### what_to_patch(youtube, youtube-music, reddit or twitter)
### what_to_patch(youtube, youtube-music, reddit or twitter)

```sh
$ export what_to_patch="youtube-music"
$ ./patch.sh
```

#### output_apk
### output_apk

you can set output apk name with this

Expand All @@ -84,7 +96,7 @@ $ export output_apk="ReReddit.apk"
$ ./patch.sh
```

#### apk_version(defaults to latest)
### apk_version(defaults to latest)

**To see versions available see the releases section**

Expand All @@ -100,7 +112,7 @@ $ export root=0
$ ./patch.sh
```

#### downloader
### downloader

aria2, axel, curl, wget; they are detected in this order and the first detected is used

Expand All @@ -109,7 +121,7 @@ $ export downloader="axel -n 16"
$ ./patch.sh
```

#### or you can use all these options together
### or you can use all these options together

```sh
$ export root=0
Expand All @@ -119,6 +131,6 @@ $ export apk_version=17.27.39
$ ./patch.sh
```

### mentions
## mentions

- @halal-beef [added CI](https://github.com/XDream8/revanced-creator/pull/3) which was a great help
Loading

0 comments on commit f6772b3

Please sign in to comment.