-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustomize.sh
56 lines (48 loc) · 1.63 KB
/
customize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/sbin/sh
#####################################
# iOS16 Emoji for FB & Messenger #
# v2.0 #
# By Robin #
#####################################
FONT_DIR=$MODPATH/system/fonts
DEF_EMOJI="NotoColorEmoji.ttf"
# Replace faceook & messnger emojis
fb_msg_emoji() {
DATA_DIR="/data/data/"
EMOJI_DIR="app_ras_blobs"
TTF_NAME="FacebookEmoji.ttf"
apps='com.facebook.orca com.facebook.katana'
for i in $apps ; do # NOTE: do not double-quote $services here.
if [ -d "$DATA_DIR$i" ]; then
cd $DATA_DIR$i
if [ ! -d "$EMOJI_DIR" ]; then
mkdir $EMOJI_DIR
fi
cd $EMOJI_DIR
APP_NAME="Facebook"
if [[ $i == *"orca"* ]]; then
APP_NAME="Messenger"
fi
# Change
if cp $FONT_DIR/$DEF_EMOJI ./$TTF_NAME; then
TTF_PATH="${DATA_DIR}${i}/${EMOJI_DIR}/${TTF_NAME}"
set_perm_recursive $TTF_PATH 0 0 0755 700
ui_print "- Replacing $APP_NAME Emojis ✅"
else
ui_print "- Replacing $APP_NAME Emojis ❎"
fi
fi
done
}
# Replace System Emoji
system_emoji(){
ui_print "- Replacing $DEF_EMOJI ✅"
emojis='SamsungColorEmoji.ttf AndroidEmoji-htc.ttf ColorUniEmoji.ttf DcmColorEmoji.ttf CombinedColorEmoji.ttf'
for i in $emojis ; do
if [ -f "/system/fonts/$i" ]; then
cp $FONT_DIR/$DEF_EMOJI $FONT_DIR/$i && ui_print "- Replacing $i ✅" || ui_print "- Replacing $i ❎"
fi
done
}
system_emoji
fb_msg_emoji