Compare commits

...

38 Commits

Author SHA1 Message Date
ave 59c76a6506 Revert "betterrotation: Restore from old-patches"
This reverts commit a8c17e2032.

I am an idiot
2021-08-24 22:14:28 +03:00
ave a8c17e2032 betterrotation: Restore from old-patches 2021-08-24 21:47:57 +03:00
ave de8cfb9a10 readme: Make the screenshot smaller 2021-08-23 00:03:15 +03:00
ave b7aa569435 README: Update readme 2021-08-23 00:01:16 +03:00
ave 7e4c49becc customtheme 87202: red pings 2021-08-22 22:42:41 +03:00
ave f58c28410d customtheme 87202: Fix logo bg color, drop bg field from ctcconfig 2021-08-22 22:34:47 +03:00
ave 91c37ab9d0 87202 nocamerabutton: Don't show the fucking expand button 2021-08-22 22:19:39 +03:00
ave 166d763792 87202 customtheme: Use CTC logo for splash 2021-08-22 22:04:35 +03:00
ave 0754700d51 87202 customtheme: black background pls 2021-08-22 21:49:40 +03:00
ave c4fd0be029 Fix gradle builds
whoops, broke it with d139344274
2021-08-22 20:16:55 +03:00
ave d139344274 Remove hardcode'd docker paths 2021-08-22 20:04:01 +03:00
ave b6f80bbee0 ctcci: Get xmlpatch command from config 2021-08-22 19:41:58 +03:00
ave 2786de6c73 Add a keystores folder 2021-08-22 19:26:57 +03:00
ave de992e86ea Stricter gitignore 2021-08-22 19:25:32 +03:00
ave 78d5dea649 Create an "others" icon folder 2021-08-22 19:17:25 +03:00
ave 7b77ce9eda Merge pull request '87202 patches' (#127) from clienthax/cutthecord:2021-05-31 into 2021-05-31
Reviewed-on: distok/cutthecord#127
2021-08-22 15:58:56 +00:00
ave f1e8382505 ctcconfig: Use better defaults 2021-08-22 18:57:56 +03:00
ave d3c51e2bef Fix images defaulting to spoilered state + not getting out 2021-08-22 18:38:17 +03:00
ave 4199ef9d22 Fix permissions on files 2021-08-22 18:37:50 +03:00
clienthax e1e88773ec notrack fixup 2021-08-21 18:12:56 +01:00
clienthax 015c90eb70 cmd cleanup 2021-08-21 18:12:42 +01:00
clienthax cdfa005d35 Split notrack and port 2021-08-21 18:00:17 +01:00
clienthax c17cb44eaa Fixup commands/supplemental changes. 2021-08-21 17:02:18 +01:00
clienthax 4de5282bf3 Woops. 2021-08-21 15:37:47 +01:00
clienthax a70f7395aa Split and implement betterdmheader 2021-08-21 15:37:40 +01:00
clienthax 1d0a8b7088 Implement slashcommands for discord api 2021-08-21 15:18:19 +01:00
clienthax 5bd99aa8c3 Deprecate old slashcommand patches 2021-08-15 14:44:15 +01:00
clienthax 5cca5ef444 Port more patches. 2021-08-11 17:56:22 +01:00
clienthax 3e0464c796 Move customtheme to xml+smali patch 2021-08-10 20:36:53 +01:00
clienthax f08854f5d0 Exclude -custom generated patches from git 2021-08-10 20:15:15 +01:00
clienthax f8dbc9333c Move noblocked to xml patch 2021-08-10 20:14:07 +01:00
clienthax 1c6b151083 Move betterrotation to xml patch 2021-08-10 20:09:53 +01:00
clienthax 0359f5f975 fix customversion 2021-08-10 20:01:46 +01:00
clienthax f709704fce Implement squareavatars as xml patch 2021-08-10 20:01:12 +01:00
clienthax ec47b98061 Move squareavatars to old patches 2021-08-10 19:57:49 +01:00
clienthax 1a7ad17c87 Add xml-port support. 2021-08-10 19:56:58 +01:00
clienthax 55e2e94b63 Dockerise 2021-08-06 18:43:36 +01:00
clienthax 8ec2dd75c2 87202 patches 2021-08-06 15:58:49 +01:00
3959 changed files with 61251 additions and 148 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
* text=auto eol=lf

12
.gitignore vendored
View File

@ -1,2 +1,14 @@
patches/*/*-custom.patch
patches/*/*.patch-failed
resources/distok/versionlogs/*
!resources/distok/versionlogs/.gitkeep
resources/fdroid/repo/icons/*.xml
resources/fonts/*.ttf
resources/fonts/*.otf
resources/icons/others/*
!resources/icons/others/.gitkeep
resources/ringtones/*
!resources/ringtones/.gitkeep
resources/keystores/*
!resources/keystores/.gitkeep
*.apk

68
Dockerfile Normal file
View File

@ -0,0 +1,68 @@
FROM ubuntu:21.04
# Install needed packages
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3 android-sdk-build-tools wget unzip imagemagick git patch software-properties-common
# Mirror is being weird currently so install this seperatly
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install zipmerge
# Install fdroid
RUN add-apt-repository ppa:fdroid/fdroidserver
RUN apt-get update
RUN apt-get -y install fdroidserver
# Create resources folder for tools/images etc
ENV CTC_FOLDER=/opt/ctc
RUN mkdir ${CTC_FOLDER}
# Grab modified apktool
RUN mkdir ${CTC_FOLDER}/tools
RUN wget -O ${CTC_FOLDER}/tools/apktool.jar https://f001.backblazeb2.com/file/avepub/apktool-cli-all.jar
# Grab xml-patch (https://github.com/dnault/xml-patch)
RUN wget -O ${CTC_FOLDER}/tools/xml-patch.jar https://jcenter.bintray.com/com/github/dnault/xml-patch/0.3.1/xml-patch-0.3.1.jar
# Grab dex2jar (https://github.com/Aliucord/dex2jar)
RUN wget -O ${CTC_FOLDER}/tools/dex2jar.jar https://github.com/Aliucord/dex2jar/releases/download/v19-fork2/dex2jar.jar
# Grab emoji sets
ENV EMOJI_PATH=${CTC_FOLDER}/emojis
ENV EMOJI_MUTANT_PATH=${EMOJI_PATH}/mutant
ENV EMOJI_BLOBMOJIS_PATH=${EMOJI_PATH}/blobmojis
RUN mkdir ${EMOJI_PATH}
# Mutant emojis
RUN mkdir ${EMOJI_MUTANT_PATH}
WORKDIR ${EMOJI_MUTANT_PATH}
RUN wget https://mutant.lavatech.top/72x72.zip
RUN unzip 72x72.zip
RUN mv 72x72/*.png .
RUN rm -rf 72x72
RUN rm 72x72.zip
# Blobmojis
RUN mkdir ${EMOJI_BLOBMOJIS_PATH}
RUN mkdir /tmp/blobmoji
WORKDIR /tmp/blobmoji
RUN wget https://github.com/C1710/blobmoji/archive/refs/heads/main.zip
RUN 7za x main.zip
WORKDIR /tmp/blobmoji/blobmoji-main/svg
RUN find ./*.svg -exec mogrify -format png -resize 72x72 -path ${EMOJI_BLOBMOJIS_PATH} {} \; ; exit 0
# Generate self signed KS
RUN mkdir ${CTC_FOLDER}/keystores
WORKDIR ${CTC_FOLDER}/keystores
RUN keytool -genkey -alias test \
-keyalg RSA -keystore keystore.jks \
-dname "CN=Test, OU=Test, O=Test, L=Test, S=Test, C=Test" \
-storepass password -keypass password
# Make folder for git repo
RUN mkdir ${CTC_FOLDER}/gitrepo
WORKDIR ${CTC_FOLDER}/gitrepo
# paths in ctcconfig in docker
# container fs
# /opt/ctc/gitrepo
# /opt/ctc/keystores/keystore.jks not specified by default

View File

@ -2,15 +2,17 @@
Modular Client Mod for Discord's Android app.
**THIS IS A WORK IN PROGRESS BRANCH! THE PATCHES ARE INCOMPLETE!**
**THIS IS A WORK IN PROGRESS BRANCH! SOME PATCHES ARE MISSING (tokenlogin, hideunusableemojis, plus showtag has a bug)!**
Current state is good enough™ for an RC release, and there's currently RC releases in the repo. Update away!
For status updates and support on the project, join #cutthecord on https://libera.chat. WebIRC link: https://web.libera.chat/#cutthecord
**Latest supported Discord Android version:** 78.4 - Alpha (78204), released on 2021-05-31.
**Latest supported Discord Android version:** 87.2 - Alpha (87202), released on 2021-08-04.
New patch development will be done for the latest supported version.
![A CutTheCord screenshot](https://elixi.re/t/mh3eirsy9.png)
![A CutTheCord screenshot](https://elixi.re/t/m16z287iw.png)
Check out [README.md in patches folder to see what patches are available and what each of them do](patches/README.md)!

View File

@ -1,7 +0,0 @@
\cp res/mipmap-xxxhdpi/ic_launcher_background.png res/mipmap-hdpi/ic_launcher_background.png
\cp res/mipmap-xxxhdpi/ic_launcher_background.png res/mipmap-xhdpi/ic_launcher_background.png
\cp res/mipmap-xxxhdpi/ic_launcher_background.png res/mipmap-xxhdpi/ic_launcher_background.png
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-hdpi/ic_launcher_foreground.png
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-xhdpi/ic_launcher_foreground.png
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-xxhdpi/ic_launcher_foreground.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,2 +0,0 @@
#!/bin/bash
\cp "$1" res/drawable-xxxhdpi/img_loading_logo.png

View File

@ -1 +0,0 @@
{"versionname": "78.4 - Alpha", "versioncode": "78204"}

2
resources/distok/android/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.apk

View File

View File

View File

0
resources/fonts/.gitkeep Normal file
View File

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 578 KiB

View File

Before

Width:  |  Height:  |  Size: 638 KiB

After

Width:  |  Height:  |  Size: 638 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 578 KiB

View File

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

Before

Width:  |  Height:  |  Size: 591 KiB

After

Width:  |  Height:  |  Size: 591 KiB

View File

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View File

View File

View File

@ -11,3 +11,7 @@ Here's why these patches are no longer maintained in this form:
- customdefaultemoji: There doesn't seem to be default emojis anymore?
- noprofilestrip: UI changes removed the profile strip.
- nonearby: Didn't add much anyways.
- squareavatars: Moved to xml-patchs
- betterrotation: Moved to xml-patchs
- noblocked: Moved to xml-patchs
- slashcommands: Moved to dynamic patch due to discord api supporting this now

View File

@ -0,0 +1,22 @@
diff -crB fromAndroidManifest.xml to/AndroidManifest.xml
*** fromAndroidManifest.xml 2021-05-31 15:40:24.000000000 +0300
--- to/AndroidManifest.xml 2021-05-31 15:40:24.000000000 +0300
***************
*** 37,44 ****
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:allowBackup="false" android:appCategory="social" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:icon="@mipmap/ic_logo_square_canary" android:label="@string/discord" android:largeHeap="true" android:name="com.discord.app.App" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_logo_round_canary" android:supportsRtl="true" android:theme="@style/AppTheme.Dark">
<activity android:name="com.discord.samsung.SamsungConnectActivity" android:theme="@style/AppTheme.Translucent"/>
! <activity android:name="com.discord.app.AppActivity" android:screenOrientation="fullUser" android:theme="@style/AppTheme.Dark" android:windowSoftInputMode="adjustResize|stateHidden"/>
! <activity android:exported="true" android:launchMode="singleTask" android:name="com.discord.app.AppActivity$Main" android:screenOrientation="fullUser" android:theme="@style/AppTheme.Loading" android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
--- 37,44 ----
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:allowBackup="false" android:appCategory="social" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:icon="@mipmap/ic_logo_square_canary" android:label="@string/discord" android:largeHeap="true" android:name="com.discord.app.App" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_logo_round_canary" android:supportsRtl="true" android:theme="@style/AppTheme.Dark">
<activity android:name="com.discord.samsung.SamsungConnectActivity" android:theme="@style/AppTheme.Translucent"/>
! <activity android:name="com.discord.app.AppActivity" android:theme="@style/AppTheme.Dark" android:windowSoftInputMode="adjustResize|stateHidden"/>
! <activity android:exported="true" android:launchMode="singleTask" android:name="com.discord.app.AppActivity$Main" android:theme="@style/AppTheme.Loading" android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>

Some files were not shown because too many files have changed in this diff Show More