Dynamic icon support

This commit is contained in:
ave 2019-06-22 17:29:53 +03:00
parent deeb9f1f3c
commit 92e0511451
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
11 changed files with 506 additions and 3 deletions

View file

@ -6,14 +6,17 @@ It also enables debuggability (`android:debuggable`) and backupability (`android
You'll need to run "addpatch.py" with syntax of `python3 addpatch.py $in_patch_filename $app_name $branch_name` and use the `-custom.patch` version, or else it'll fail. You'll need to put a valid directory for storing hacky build counters to it.
Running customicon.sh (while on root of the extracted folder) will also change the icon to the debug icon:
Running `customicon.sh` (while on root of the extracted folder) will also change the icon to the debug icon:
![](https://elixi.re/i/48nc2je7.png)
If you want a different icon, replace `res/mipmap-xxxhdpi/logo_debug.png` with the icon you want before running `customicon.sh`. If you don't want dynamic icon to be shown instead of the custom icon, delete the folder `res/mipmap-anydpi-v26/` (or if you want to replace it too, look at the next line instead).
If you want a custom dynamic icon replace `res/mipmap-xxxhdpi/ic_launcher_foreground.png` (optionally transparent image with only the foreground of the icon) and `res/mipmap-xxxhdpi/ic_launcher_background.png` (optionally transparent image with only the background of the icon), both images should be square and of same size, and then run `customdynamicicon.sh`.
You can use the following line to patch authorities:
`sed -i 's/android:authorities="com.discord./android:authorities="top.distok.cutthecord.CTCBRANCH./g' AndroidManifest.xml`
`sed -i 's/android:authorities="com.discord./android:authorities="com.cutthecord.CTCBRANCH./g' AndroidManifest.xml`
#### Available and tested on:
- 8.3.3

View file

@ -0,0 +1,11 @@
\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-mdpi/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_background.png res/mipmap-xxxhdpi/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-mdpi/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
\cp res/mipmap-xxxhdpi/ic_launcher_foreground.png res/mipmap-xxxhdpi/ic_launcher_foreground.png

View file

@ -8,4 +8,5 @@
\cp res/mipmap-xxxhdpi/logo_debug.png res/mipmap-xhdpi/ic_logo_round.png
\cp res/mipmap-xxxhdpi/logo_debug.png res/mipmap-xxhdpi/ic_logo_round.png
\cp res/mipmap-xxxhdpi/logo_debug.png res/mipmap-xxxhdpi/ic_logo_round.png
rm -rf res/mipmap-anydpi-v26/
#rm -rf res/mipmap-anydpi-v26/