Browse Source

Switch to a simpler method of emoji stuffs

less fuckery needed now~
ave 3 years ago
No known key found for this signature in database GPG Key ID: 9356ABAA42C842B
  1. 12
  2. 45
  3. 10


@ -9,15 +9,17 @@ Automatically patched binaries are available on [](https:
- Get apktool
- Get a keystore, see [here](, step 1.
- Get 72x72 copies of latest version of mutant standard emojis with codepoints. I have a zip [here](
- Extract the emojis you got somewhere, then prepend `emoji_` to their names (`for f in * ; do mv -- "$f" "emoji_$f" ; done`).
- Get rid of `-fe0f` on filenames to fix render of some emojis (`find . -name '*png' -exec bash -c ' mv $0 ${0/-fe0f/}' {} \;`, lots of mv errors will happen, that's fine).
- Clone this repo somewhere, edit `` and set the variables to the folders you want it to run on.
- Extract the emojis you got somewhere.
- Clone this repo somewhere, edit `` and set the `extracted_mutstd_path` folder to the folder you just extracted emojis to.
## Building an patched discord app
- Get a Discord apk (*cough* [aptoide](, and get all the necessary patches and the optional patches you want for that version. If the patches aren't available, you'll have to port them yourself.
- Get a Discord apk (*cough* [aptoide](
- 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>`).
- Edit `` to point to right directories, and apply emoji patches (`bash`)
- Edit `` to point to extracted discord folder (`extracted_discord_path`), and apply emoji patches (`python3`)
- Build the new APK (`apktool b com.discord-831`)
- 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!


@ -0,0 +1,45 @@
#!/bin/env python3
import os
import shutil
extracted_discord_path = "/tmp/cutthecord/discord"
extracted_mutstd_path = "/var/www/mutant/72x72"
def clean_emoji_name(name):
name = name.lower().replace("_", "-")\
.replace("emoji_", "").replace("-fe0f", "")
return name
discord_emoji_path = os.path.join(extracted_discord_path, "res", "raw")
# Get file listings in relevant folders
discord_emojis = os.listdir(discord_emoji_path)
mutstd_emojis = os.listdir(extracted_mutstd_path)
# Clean names of mutantstd emojis so thar we can compare them
# to clean discord emojis later
clean_mutstd_emojis = {clean_emoji_name(emoji): emoji for
emoji in mutstd_emojis}
replace_counter = 0
# Go through each discord emoji, and clean their names
for emoji in discord_emojis:
clean_discord_emoji = clean_emoji_name(emoji)
# Check if said clean name of emoji is in clean mutstd list
if clean_discord_emoji in clean_mutstd_emojis:
# Get full unclean filename of mutantstd emoji, generate relevant paths
full_mutstd_name = clean_mutstd_emojis[clean_discord_emoji]
full_mutstd_path = os.path.join(extracted_mutstd_path, full_mutstd_name)
full_discord_path = os.path.join(extracted_discord_path, emoji)
# Copy and overwrite the discord emojis with the mutantstd alternatives
shutil.copyfile(full_mutstd_path, full_discord_path)
print("Replaced {} emoji.".format(full_mutstd_name))
replace_counter += 1
print("Done, {} emojis replaced.".format(replace_counter))


@ -1,10 +0,0 @@
for filename in $EXTRACTED_DISCORD/res/raw/*.png; do
basefilename=$(basename $filename)
if [ -f $EXTRACTED_MUTSTD/$basefilename ]; then
echo "$basefilename replaced"
\cp $EXTRACTED_MUTSTD/$basefilename $filename