2020-03-13 22:33:40 +01:00
|
|
|
## [CutTheCord][] patcher
|
|
|
|
|
|
|
|
### Requires
|
|
|
|
|
|
|
|
- `bash`
|
|
|
|
- `sed`
|
|
|
|
- `patch`
|
|
|
|
- `curl`
|
2020-11-02 12:36:12 +01:00
|
|
|
- `tar`
|
2020-03-13 22:33:40 +01:00
|
|
|
- `apktool`
|
|
|
|
- `keytool`
|
|
|
|
- `jarsigner`
|
|
|
|
- `adb` (optional if `SKIP_INSTALL` is set)
|
|
|
|
|
|
|
|
### Patches
|
|
|
|
|
|
|
|
- `bettertm`
|
|
|
|
- `branding`
|
|
|
|
- `customfont` ([text][Asap], [code][Hasklig])
|
|
|
|
- `customversion`
|
|
|
|
- `necessary`
|
2020-12-15 20:15:44 +01:00
|
|
|
- `nocamerabutton`
|
2020-03-13 22:33:40 +01:00
|
|
|
- `noblocked`
|
|
|
|
- `squareavatars`
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
The script needs a keystore to sign the patched app.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# the path to a .keystore or .jks file
|
|
|
|
export KEYSTORE_PATH="ctc-key.jks"
|
|
|
|
# the alias of the keystore
|
|
|
|
export KEYSTORE_ALIAS="ctc-key"
|
|
|
|
```
|
|
|
|
|
|
|
|
If the file doesn't exist, generate it with `keytool`.
|
|
|
|
|
|
|
|
```sh
|
2020-11-02 12:36:12 +01:00
|
|
|
keytool -genkeypair -keystore "$KEYSTORE_PATH" -alias "$KEYSTORE_ALIAS"
|
|
|
|
```
|
|
|
|
|
2021-11-19 18:32:22 +01:00
|
|
|
You also need to set the following variable:
|
2020-11-02 12:36:12 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
# the version code of the Discord APK
|
2020-12-15 20:15:44 +01:00
|
|
|
export VERCODE="1340"
|
2020-03-13 22:33:40 +01:00
|
|
|
```
|
|
|
|
|
2020-12-15 20:15:44 +01:00
|
|
|
The variables below are optional:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# if you don't want to be prompted before patching
|
|
|
|
export NO_PROMPT=1
|
|
|
|
# if you want to manually install the patched app
|
|
|
|
# you will find the APK in com.discord/dist/
|
|
|
|
export SKIP_INSTALL=1
|
|
|
|
```
|
|
|
|
|
|
|
|
Now, you can run the script like so:
|
2020-03-13 22:33:40 +01:00
|
|
|
|
|
|
|
```sh
|
2020-11-02 12:36:12 +01:00
|
|
|
bash < <(curl -LSs https://discord.coffee/5V4AnGq)
|
2020-03-13 22:33:40 +01:00
|
|
|
```
|
|
|
|
|
2020-12-15 20:15:44 +01:00
|
|
|
You will be prompted to enter the keystore password.
|
2020-03-13 22:33:40 +01:00
|
|
|
|
|
|
|
[CutTheCord]: https://gitdab.com/distok/cutthecord
|
|
|
|
[Asap]: https://fonts.google.com/specimen/Asap
|
|
|
|
[Hasklig]: https://github.com/i-tu/Hasklig
|