Distok CutTheCord: Modular Discord Android client mod
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.
Go to file
ave 1a4c42b810
Push v8.5.5 patches
Unofficial v8.5.5 changelog:
- More work on getting nitro purhcases on android
- Nitro is now internally called premium
2019-03-04 12:01:18 +03:00
patches Push v8.5.5 patches 2019-03-04 12:01:18 +03:00
.gitignore branding: change app name 2019-01-25 15:48:05 +03:00
README.md Push v8.5.5 patches 2019-03-04 12:01:18 +03:00
patchport.py Add v8.4.5 patches 2019-02-15 02:05:52 +03:00

README.md

cutthecord

Discord Android app patches.

Latest supported Discord Android version: 8.5.5 (855), released on 2019-03-04.

New patch development will be done for the latest supported version.

Binaries

An F-Droid repo is available on https://fdroid.a3.pm/seabear/repo/.

You can add that to your phone and get updates easily or just download directly from there.

You will need to uninstall any and all existing Discord or CutTheCord applications from your phone before installing one, or else installation will fail.

Feel free to ignore play protect, it's bullshit.

Building

Toolchain setup

  • Get apktool (due to a bug present on apktool v2.3.4, I recommend using this build)
  • Get a keystore, see here, 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.
  • Extract the emojis you got somewhere.
  • Clone this repo somewhere, edit emojireplace.py and set the extracted_mutstd_path folder to the folder you just extracted emojis to.

Building a patched discord app

  • Get a Discord apk (cough apkmirror, aptoide API).
  • 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.
  • 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)
  • 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!

Building patches

After extracting the APK, copy it to a folder that you won't modify (cp -r com.discord-836 com.discord-836-base), so that you can easily diff them.

To get the diff, run diff -crB -x "dist" -x "res/raw" -x "build" CleanFolder PatchedFolder > patchname.patch

Porting patches

You can use patchport to easily attempt to port patches.

It's not really intelligent and doesn't do much more than just checking if an existing patch can be applied to a given version (it also replaces relevant variables required for porting various patches), but it saves a lot of time if used carefully.

Example command: python3 patchport.py 839 8.3.9g /home/ave/Downloads/dic/com.discord-841 /home/ave/Projects/cutthecord/