Skip to content

Instantly share code, notes, and snippets.

@MrCarb0n
Last active May 24, 2022 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrCarb0n/41df3bda73492498e3c17de6a3284a7f to your computer and use it in GitHub Desktop.
Save MrCarb0n/41df3bda73492498e3c17de6a3284a7f to your computer and use it in GitHub Desktop.
NotoEmojiPlus extension dev script for OMF!
# NotoEmojiPlus OMF Extension | @MrCarb0n
# Don't modify file or filename: 88_NotoEmojiPlus.sh
# Style: Google, Unicode 15
# Resources: @rkbdiemoji
# Thanks: @nongthaihoang, MFFM!
${EMOJ:=false} && return
EXT="$OMFDIR/88_NotoEmojiPlus.sh"
tail -n +$(($(grep -an ^'# RESOURCE'$ $EXT | cut -d : -f 1) + 1)) $EXT |
tar xJf - -C $SYSFONT && {
ui_print ' NotoEmojiPlus v2022.5.8'
font und-Zsye NotoEmojiPlus.ttf r
font und-Zsym NotoSansSymbols-RS2.ttf r
xml 's|Regular-Subsetted|RS|'
# create shortcut as OEM's emoji filename
for i in $(find $ORISYSFONT -type f -iname '*emoji*.[ot]t[fc]' -exec basename {} \;); do
ln -s $SYSFONT/NotoEmojiPlus.ttf $SYSFONT/$i
done
# change facebook's in-app emojis on boot time
{
echo "# NotoEmojiPlus OMF Extension | @MrCarb0n"
echo " "
echo "("
echo " while [ \"\$(getprop sys.boot_completed)\" != \"1\" ] && [ ! -d /data/data ]; do"
echo " sleep 1"
echo " done"
echo " "
echo " for i in \$(find /data/data/*facebook* -type f -iname '*emoji*.[ot]t[fc]'); do"
echo " cp /data/adb/modules/ohmyfont/system/fonts/NotoEmojiPlus.ttf \$i"
echo " done"
echo ")"
} >> $MODPATH/service.sh
# clear cache data of Gboard
[ -d /data/data/com.google.android.inputmethod.latin ] &&
find /data -type d -path '*inputmethod.latin*/*cache*' -exec rm -rf {} + &&
/system/bin/am force-stop com.google.android.inputmethod.latin
# Android 12+ | extended checking.. [?!]
[ -d /data/fonts ] &&
for i in $(find /data/fonts -type f -iname '*emoji*.[ot]t[fc]'); do
cp $SYSFONT/NotoEmojiPlus.ttf $i
done
EMOJ=true
ver emoji
} &&
return
# RESOURCE
# change facebook's in-app emojis
(
while [ "$(getprop sys.boot_completed)" != "1" ] && [ ! -d /data/data ]; do
sleep 1
done
for i in $(find /data/data/*facebook* -type f -iname '*emoji*.[ot]t[fc]'); do
cp /data/adb/modules/ohmyfont/system/fonts/NotoEmojiPlus.ttf $i
done
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment