This repository has been archived on 2021-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
cutthecord/README.md

54 lines
2.8 KiB
Markdown
Raw Normal View History

2019-01-18 14:25:15 +00:00
# cutthecord
2019-01-18 16:46:27 +00:00
Discord Android app patches.
2019-01-20 19:32:58 +00:00
## Binaries
2019-01-18 16:46:27 +00:00
Automatically patched binaries are available on [distok.a3.pm/cutthecord](https://distok.a3.pm/cutthecord).
2019-01-18 14:51:40 +00:00
2019-01-21 09:36:56 +00:00
#### Installing patched binaries
2019-01-20 19:32:58 +00:00
2019-01-21 09:36:56 +00:00
First of all, download the apk you want to install from the link above, then:
2019-01-20 19:32:58 +00:00
2019-01-21 09:36:56 +00:00
- Uninstall the official Discord app from your phone. You'll need to re-login, so make sure that you remember your password!
- (optional) Disable Play Protect
- Restart your phone
- Install the APK you downloaded. Ignore Play Protect's nag.
#### Updating or moving between patches
You can just update directly or move between the patches that are built by cutthecord without having to uninstall or restart.
If you ever want to move back to official Discord builds or want to move to your own built APKs, you'll need to do the "Installing patched binaries" step above again. This is due to the different signatures provided.
## Building
#### Toolchain setup
2019-01-18 14:51:40 +00:00
- Get apktool
- Get a keystore, see [here](https://stackoverflow.com/a/14994354/3286892), step 1.
- If you want Mutant Standard emoji patches, get 72x72 copies of latest version of mutant standard emojis with codepoints. I have a zip [here](https://mutant.lavatech.top/72x72.zip).
- Extract the emojis you got somewhere.
2019-01-19 21:22:48 +00:00
- Clone this repo somewhere, edit `emojireplace.py` and set the `extracted_mutstd_path` folder to the folder you just extracted emojis to.
2019-01-18 14:51:40 +00:00
2019-01-21 09:36:56 +00:00
#### Building a patched discord app
2019-01-18 14:51:40 +00:00
2019-01-19 21:26:27 +00:00
- Get a Discord apk (*cough* [apkmirror](https://www.apkmirror.com/apk/discord-inc/discord-chat-for-gamers/), [aptoide API](https://ws75.aptoide.com/api/7/app/getMeta?package_name=com.discord)).
- Extract it with apktool (`apktool d <apk path>`)
- Get all the necessary patches for that version. Necessary patches are not available for all versions and are only required to get some versions to pack together correctly.
- Get optional patches you want for your version. If the patch you want isn't available for your version, you'll have to port them yourself.
2019-01-18 16:04:55 +00:00
- Apply the patches (`patch -p1 < <patch name>`).
- If you want mutant (or other emoji patches), edit `patches/mutant/emojireplace.py` to point to extracted discord folder (`extracted_discord_path`), and apply emoji patches (`python3 emojireplace.py`)
- Build the new APK (`apktool b com.discord-832`)
2019-01-18 14:51:40 +00:00
- Sign the new APK (`jarsigner -keystore <keystore path> <foldername>/dist/<foldername>.apk <alias>`)
- Get your new APK from `<foldername>/dist/<foldername>.apk`, install and enjoy!
2019-01-18 16:04:55 +00:00
2019-01-21 09:36:56 +00:00
#### Building patches
2019-01-18 16:04:55 +00:00
2019-01-19 22:33:40 +00:00
`diff -crB -x "dist" -x "res/raw" -x "build" CleanFolder PatchedFolder > patchname.patch`
2019-01-18 16:20:40 +00:00
2019-01-21 09:36:56 +00:00
#### Disclaimer about emojos
2019-01-18 16:20:40 +00:00
This [thing] uses Mutant Standard emoji (https://mutant.tech), which are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (https://creativecommons.org/licenses/by-nc-sa/4.0/).