bluecord/README.md

4 KiB

cutthecord

Modular Client Mod for Discord's Android app.

Latest supported Discord Android version: 9.0.9 (909), released on 2019-06-07.

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

Binaries (apk)

An F-Droid repo is available on https://fdroid.a3.pm/seabear/repo/?fingerprint=9DC9CB5FDD85D37121A5FEE99D24475F03FEA7F2EC25FB94DD51866D87933ED1

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.

If you fail recaptcha, follow this (run through adb).

PSA: Please keep in mind that you may be unable to receive updates due to an F-Droid bug.

If you're affected by this, here's a workaround: F-Droid -> Settings -> Repositories -> Seabear, tap Share on top bar, copy to clipboard, tap Delete (next to share), then tap Add Repository. It should already be filled in (from clipboard), so add it and you should be able to get updates after that.

If you're affected by this, ensure that your F-Droid version is 1.7 or higher. As of time of writing, F-Droid 1.7 is alpha, and can only be downloaded by enabling Unstable Updates through Settings -> Advanced Settings.

Building

Toolchain setup

  • Get apktool (due to 2 bugs present in v2.3.4, you're strongly recommended to use v2.4.0)
  • Get a keystore, see here, step 1.
  • If you want Mutant Standard emoji patches, get 72x72 PNG copies of latest version of mutant standard emojis with codepoints. I have a zip here.
  • If you want Blob emoji patches, get 72x72 PNG copies of blobmojis with codepoints. I personally resized the png/128 folder in this repo (find /home/ave/blobmoji/png/72 -iname '*.png' -exec convert \{\} -verbose -resize 72x72\> \{\} \;).
  • 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.py to easily attempt to port patches.

It's not really intelligent and doesn't do much more than manually preparing necessary patch, checking if an existing patch can be applied to a given version, replacing relevant variables required for porting various patches and eliminating offsets caused by updates, but it saves a lot of time if used carefully.

Example command: python3 patchport.py /home/ave/Downloads/dic/com.discord-841