discord-android-modding/patch.py

33 lines
614 B
Python
Raw Permalink Normal View History

2021-08-04 21:55:47 +00:00
from android_discord_patches import patch_theme
import shutil
import os
def disassemble():
shutil.rmtree("discord", ignore_errors=True)
os.system("apktool d ./discord.apk -o discord")
def patch():
patch_theme()
input("[hit enter]")
def reassemble():
os.system("apktool b discord -o discord-patched.apk")
os.system(
"apksigner sign "
"--ks discord.keystore "
"--ks-pass file:discord.keystore.pw "
"--in discord-patched.apk "
"--out discord-patched-signed.apk "
)
if __name__ == "__main__":
disassemble()
patch()
reassemble()