##########################################################################################
#
# Magisk Module Template Config Script
# by topjohnwu
#
##########################################################################################
##########################################################################################
#
# Instructions:
#
# 1. Place your files into system folder (delete the placeholder file)
# 2. Fill in your module's info into module.prop
# 3. Configure the settings in this file (config.sh)
# 4. If you need boot scripts, add them into common/post-fs-data.sh or common/service.sh
# 5. Add your additional or modified system properties into common/system.prop
#
##########################################################################################

##########################################################################################
# Configs
##########################################################################################

# Set to true if you need to enable Magic Mount
# Most mods would like it to be enabled
AUTOMOUNT=true

# Set to true if you need to load system.prop
PROPFILE=false

# Set to true if you need post-fs-data script
POSTFSDATA=false

# Set to true if you need late_start service script
LATESTARTSERVICE=false

##########################################################################################
# Installation Message
##########################################################################################

# Set what you want to show when installing your mod

print_modname() {
  ui_print "*******************************"
  ui_print "  ╭─────────╮
  │落霞与孤鹜齐飞，　│
  │秋水共长天一色。　│
  │─王勃《滕王阁序》│
  ╰─────────╯
  ┳　┐┌┌┐┳　┳ Font
  ┇　 ╳ │┬┇┇┇ Magisk
  ╩┛┘└└┘┗┻┛ Module
  微信公众号：霞鹜(lxgwshare)
  微博：孤鹜先森
  酷安：落霞孤鹜lxgw    
  Wechat Official Account: lxgwshare
  Sina Weibo Account: 孤鹜先森
  CoolApk UID: 633884
  Telegram Channel: lxgwandroidfont
  Telegram Account: lxgwtg"
  ui_print "*******************************"
  ui_print "  声明：
  字体模块仅供个人使用，禁止商用，
  禁止二传到其他平台或倒卖盈利！
  获取资源请认准公众号“霞鹜”，
  从他处获取模块刷入出现的任何问题与本人无关。
  如有侵权请联系本人取消分享删除资源，
  本人将立即处理并致以歉意。
  若用于商业用途请联系相应的字体公司购买正版授权。
          *         *         *
  STATEMENTS:
  - This Font module is only for personal use
    NOT FOR COMMERCIAL USE.
    For commercial use, please purchase genuine 
    authorization from the corresponding type
    foundry (or type foundries).
  - Please DO NOT upload this file to other sites
    or sell this file for profit.
  - If this file infringes your rights,
    please contact me to stop sharing and delete 
    this file. Sorry."
  ui_print "*******************************"
}

##########################################################################################
# Replace list
##########################################################################################

# List all directories you want to directly replace in the system
# Check the documentations for more info about how Magic Mount works, and why you need this

# This is an example
REPLACE="
/system/app/Youtube
/system/priv-app/SystemUI
/system/priv-app/Settings
/system/framework
"

# Construct your own list here, it will override the example above
# !DO NOT! remove this if you don't need to replace anything, leave it empty as it is now
REPLACE="
/system/etc/fonts.xml
/system/fonts/font.ttf
/system/fonts/MiLanProVF.ttf
/system/fonts/MitypeClock.otf
/system/fonts/MitypeClockMono.otf
/system/fonts/MitypeMonoVF.ttf
/system/fonts/MitypeVF.ttf
/system/fonts/Miui-Bold.ttf
/system/fonts/Miui-Light.ttf
/system/fonts/Miui-Regular.ttf
/system/fonts/Miui-Thin.ttf
/system/fonts/MiuiEx-Bold.ttf
/system/fonts/MiuiEx-Light.ttf
/system/fonts/MiuiEx-Regular.ttf
"

##########################################################################################
# Permissions
##########################################################################################

set_permissions() {
  # Only some special files require specific permissions
  # The default permissions should be good enough for most cases

  # Here are some examples for the set_perm functions:

  # set_perm_recursive  <dirname>                <owner> <group> <dirpermission> <filepermission> <contexts> (default: u:object_r:system_file:s0)
  # set_perm_recursive  $MODPATH/system/lib       0       0       0755            0644

  # set_perm  <filename>                         <owner> <group> <permission> <contexts> (default: u:object_r:system_file:s0)
  # set_perm  $MODPATH/system/bin/app_process32   0       2000    0755         u:object_r:zygote_exec:s0
  # set_perm  $MODPATH/system/bin/dex2oat         0       2000    0755         u:object_r:dex2oat_exec:s0
  # set_perm  $MODPATH/system/lib/libart.so       0       0       0644

  # The following is default permissions, DO NOT remove
  set_perm_recursive  $MODPATH  0  0  0755  0644
}

##########################################################################################
# Custom Functions
##########################################################################################

# This file (config.sh) will be sourced by the main flash script after util_functions.sh
# If you need custom logic, please add them here as functions, and call these functions in
# update-binary. Refrain from adding code directly into update-binary, as it will make it
# difficult for you to migrate your modules to newer template versions.
# Make update-binary as clean as possible, try to only do function calls in it.

